getStateZip: Retrieves shapefile for state zip codes

Description Usage Arguments Examples

View source: R/getshapefiles.R

Description

This function returns a dataframe with map data for every zip code in a particular state.

Usage

1
2
getStateZip(state, directory = "shapefiles", region = c("ZCTA5CE10",
  "STATEFP10", "GEOID10", "CLASSFP10"))

Arguments

state

string with the abbreviation of the state (e.g. "GA")

directory

directory where shapefiles are located, or directory for shapefiles to be downloaded into, defaults to "shapefiles"

region

region to use with the fortify() function, defaults to "ZCTA5CE10". Choices are "ZCTA5CE10", "STATEFP10", "GEOID10", "CLASSFP10".

Examples

1
2
map <- getStateZip("GA")
makemap(data=d, map = map, var="obese", id="geoid", per=TRUE)

kevjohnson/mymaps documentation built on May 20, 2019, 9:20 a.m.