View source: R/compactness_api.R
compactness_api | R Documentation |
This function queries the compactness API rather than calculating compactness locally.
compactness_api(dir, namecol)
dir |
The name of a directory holding the shp, prj, shx, and dbf files. |
namecol |
The ID of the column with the district name in it |
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
compactness_api(dir = "shapefiles", namecol = "GEOID")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.