View source: R/read_shapefiles.R
read_shapefiles | R Documentation |
This script takes the name a .shp file and breaks it apart into its metadata and coordinates.
read_shapefiles(shp, namecol, verbose = TRUE)
shp |
The filename of a shp file containing district polygons. |
namecol |
The ID of the column with the district name in it |
verbose |
Default TRUE. Inherited from comapactness_wrapper(). |
A list of three: the metadata in n x p where n is the number of districts in the shapefile and p is the number of covariates; a list of lists of n where each sublist is a lat-long matrix, and a sublist of length >1 indicates a noncontiguous district; and the name column
read_shapefiles("CnclDist_July2012.shp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.