View source: R/compactness_wrapper.R
get_compactness | R Documentation |
Estimates the compactness and two standard errors for each polygon in a shp file as per Kaufman, King, and Komisarchik (2018)
get_compactness(shp, namecol, verbose = TRUE, new.models = NULL)
shp |
The filename or filepath of a shp file containing district polygons. |
namecol |
The name, in quotes, of the variable in the shapefile containing each district's unique identifier |
verbose |
Default TRUE. |
new.models |
Default NULL. Should we generate predictions using the built-in model, or a new user-generated model? |
A data frame where rows correspond to the number of polygons in shp. The columns include the district identifier, the compactness score where high is less compact, and the standard errors.
get_compactness("CnclDist_July2012.shp", "NAME")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.