Description Usage Arguments Value Examples
View source: R/get_decennial_metro.R
get_decennial_metro uses the census api to download data for all 50 states plus DC for "on spine" geographies county and below. This method will associate those geographies with a CBSA as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
geography |
unit for which to pull data |
variables |
Character string or vector of character strings of variable IDs. |
table |
The Census table for which you would like to request all variables. Uses lookup tables to identify the variables; performs faster when variable table already exists through load_variables(cache = TRUE). Only one table may be requested per call. |
cache_table |
Whether or not to cache table names for faster future access. Defaults to FALSE; if TRUE, only needs to be called once per dataset. If variables dataset is already cached via the load_variables function, this can be bypassed. |
year |
The year for which you are requesting data. 1990, 2000, and 2010 are available. |
sumfile |
The Census summary file. Defaults to sf1; the function will look in sf3 if it cannot find a variable in sf1. |
output |
One of "tidy" (the default) in which each row represents an enumeration unit-variable combination, or "wide" in which each row represents an enumeration unit and the variables are in the columns. |
summary_var |
Character string of a "summary variable" from the decennial Census to be included in your output. Usually a variable (e.g. total population) that you'll want to use as a denominator. |
key |
Your Census API key. Obtain one at http://api.census.gov/data/key_signup.html |
show_call |
if TRUE, display call made to Census API. This can be very useful in debugging and determining if error messages returned are due to tidycensus or the Census API. Copy to the API call into a browser and see what is returned by the API directly. Defaults to FALSE. |
... |
Other argumenets to pass to get_decennial. |
data frame with census info and adjoined cbsa location
1 2 3 4 5 | ## Not run:
# get Korean population for all tracts in US with appropriate metro info
get_decennial_metro("tract", c(Korean = "PCT005012"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.