usMap: Shapefile of US state boundaries

usMapR Documentation

Shapefile of US state boundaries

Description

Examples are provided using the usMap shapefile with a synthetic dataset.

Source

https://www.cdc.gov/brfss/gis/gis_maps.htm

Examples

#read the shapefile
#display first five rows of shapefile dataset
#plot the shapefile boundaries

usMap <- sf::as_Spatial(sf::st_read(system.file("shapes/usMap.shp", package="mapStats")[1]))
head(usMap@data)
# plot the outlines of the shapefile only
sp::plot(usMap)
# plot map colored according to one of the variables in @data
sp::spplot(usMap, zcol="A187_1")


mapStats documentation built on Nov. 10, 2023, 9:09 a.m.