read_shapefiles: This script takes the name a .shp file and breaks it apart...

View source: R/read_shapefiles.R

read_shapefilesR Documentation

This script takes the name a .shp file and breaks it apart into its metadata and coordinates.

Description

This script takes the name a .shp file and breaks it apart into its metadata and coordinates.

Usage

read_shapefiles(shp, namecol, verbose = TRUE)

Arguments

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().

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

read_shapefiles("CnclDist_July2012.shp")

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