Description Usage Arguments Value Author(s) See Also Examples
Read US census demographic profile data. The raw data can be downloaded in Shapefile format from http://www2.census.gov/geo/tiger/TIGER2010DP1/County_2010Census_DP1.zip to be used with this function.
1 | readCensus(dsn="",layer="County_2010Census_DP1",state,fips,codes)
|
dsn |
The data source name, usually a path pointing to the folder the county shapefile is in. Defaults to current directory. |
layer |
Layer name, usually the filename without the extension. Defaults to the 2010 Census data by county (County_2010_Census_DP1). |
state |
A character vector specifying which states to extract. If not specified, defaults to all states. |
fips |
A |
codes |
A lookup table for demographic profile data element to its full name. One such lookup table for age and sex demographic groups is provided with this package, see the |
A SpatialPolygonsDataFrame
. The data
slot contains renamed columns of all the age and sex groups along with a 5 digit state+county FIPS column. This format is compatible for use with the getSMR
function from the diseasemapping
package.
Jonathan Lee jonathan@utstat.utoronto.ca
1 2 3 4 5 6 7 | data(dplookup)
data(fipslookup)
## Not run:
usPop <- readCensus(dsn="/",layer="County_2010Census_DP1",state="Kentucky",
fips=fipslookup,codes=dplookup)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.