fetch_data | R Documentation |
Download a set of data from the US Census API
fetch_data(
variables,
year,
for_geo,
for_items,
survey_type,
table_or_survey_code,
...,
use_key = TRUE
)
variables |
<chr[]> a vector of variable names, like |
year |
an integer year, e.g. |
for_geo |
<chr> the geographical level the data will describe, e.g. |
for_items |
<chr[]> one or more instances of |
survey_type |
e.g. "acs" or "dec" |
table_or_survey_code |
e.g. "acs5" or "pl" |
... |
< |
use_key |
<lgl?> optional, should the query include a Census API key from the system environment. Defaults to |
a tibble with "Group", "Index", "Value", and "Year" fields, as well as one field for each geography.
build_api_url()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.