ca_tract_choropleth_acs: Create a choropleth map of California Census Tracts from ACS...

Description Usage Arguments Value References See Also Examples

Description

Creates a choropleth of California Census Tracts the US Census' American Community Survey (ACS) data. Requires the acs package to be installed, and a Census API Key to be set with the acs's api.key.install function. Census API keys can be obtained at http://www.census.gov/developers/tos/key_request.html.

Usage

1
2
ca_tract_choropleth_acs(tableId, endyear = 2011, span = 5, num_colors = 7,
  tract_zoom = NULL, county_zoom = NULL)

Arguments

tableId

The id of an ACS table

endyear

The end year of the survey to use. See acs.fetch (?acs.fetch) and http://1.usa.gov/1geFSSj for details.

span

The span of time to use. See acs.fetch and http://1.usa.gov/1geFSSj for details.

num_colors

The number of colors on the map. A value of 1 will use a continuous scale. A value in [2, 9] will use that many colors.

tract_zoom

An optional list of states to zoom in on. Must come from the "region" column in ?ca.tract.regions.

county_zoom

An optional list of counties to zoom in on. Must match entries of the county.fips.numeric column of ?ca.tract.regions.

Value

A choropleth.

References

The choroplethr guide to Census data: http://cran.r-project.org/web/packages/choroplethr/vignettes/e-mapping-us-census-data.html

Uses the acs package created by Ezra Haber Glenn.

See Also

api.key.install in the acs package which sets an Census API key for the acs library

Examples

1
2
3
4
5
6
7
8
## Not run: 
# per capita income, san francisco (fips code 6075)
ca_tract_choropleth_acs("B19301", county_zoom=6075)

# aggregate public assistance income, san francisco
ca_tract_choropleth_acs("B19067", county_zoom=6075)

## End(Not run)

arilamstein/choroplethrCaCensusTract documentation built on May 10, 2019, 1:27 p.m.