Description Usage Arguments Details Author(s)
Import shapefile and convert into lat/lon coordinates to plot in R or Tableau
1 2 3 4 |
baseDir |
string containing the name of the base directotry containing the shapefile |
folderName |
(optional) string containing the name of the folder within baseDir containing the shapefile. Not required if baseDir contains the full name of the folder containing the shapefile |
layerName |
string containing the name of the shapefile, e.g. 'district_boundary' for 'district_boundary.shp'. Should not include '.shp' |
exportData |
Boolean for whether to save the data as a .csv after importing |
fileName |
string containing the name of the .csv to be exported; by default, will be the same as the inputted .shp file |
labelVar |
string containing the variable name containing the names of the polygons (for instance, the names of the provinces, districts, etc.) |
reproject |
Boolean specifying whether to reproject the data |
projection |
CRS projection string to standardize the projection of the shapefile |
View available projections with 'projInfo(type = 'proj')' View available datum with 'projInfo(type = 'datum')' View available ellipsoids with 'projInfo(type = 'ellps')'
Laura Hughes, laura.d.hughes@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.