Description Usage Arguments Value
View source: R/spatial_data_functions.R
Load a spatial polygons object in SF format, assign location codes based on each province abbreviation, and return polygons objects in both SF and SP formats
1 | load_format_spatial_polys(shp_in_fp, abbrev_field, location_table)
|
shp_in_fp |
Input filepath to a spatial object (usually a shapefile) |
abbrev_field |
Field listing two-character province abbreviations |
location_table |
Data.frame listing province information. Should contain at least the following fields: - 'abbrev': Two-character province abbreviations (eg 'TO', 'VC') - 'location_code': Province codes that will be assigned to the spatial polygons object |
List with two items: - 'shp_sf': Formatted spatial polygons, in SF format - 'shp_sp': Formatted spatial polygons, in SP format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.