getStateTract: Retrieves shapefile for state census tracts

Description Usage Arguments Examples

View source: R/getshapefiles.R

Description

This function returns a dataframe with map data for every census tract in a particular state.

Usage

1
2
getStateTract(state, directory = "shapefiles", region = c("GEO_ID", "STATE",
  "COUNTY", "TRACT", "NAME", "LSAD", "CENSUSAREA"))

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 "GEO_ID". Choices are "GEO_ID", "STATE", "COUNTY", "TRACT", "NAME", "LSAD", "CENSUSAREA".

Examples

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

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