compactness_api: This function queries the compactness API rather than...

View source: R/compactness_api.R

compactness_apiR Documentation

This function queries the compactness API rather than calculating compactness locally.

Description

This function queries the compactness API rather than calculating compactness locally.

Usage

compactness_api(dir, namecol)

Arguments

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

Value

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

Examples

compactness_api(dir = "shapefiles", namecol = "GEOID")

aaronrkaufman/compactness documentation built on June 11, 2025, 6:45 a.m.