Extract Region Index from Spatial Object and Partition Training and Testing Data
Source:R/append-region-index.R
append_region_index.Rd
This function extracts region data for each location from a given shapefile. It also adds additional columns for day of week and training or testing data flag.
Arguments
- train_data
A data frame containing training data.
- polys
Shapefile object containing state boundaries and regions.
Examples
append_region_index(train_df, states_sf, as.Date("2020-12-31"))
#> Error in append_region_index(train_df, states_sf, as.Date("2020-12-31")): unused argument (as.Date("2020-12-31"))