View source: R/build_api_url.R
build_api_url | R Documentation |
Create an API call to send to api.census.gov
build_api_url(
variables,
for_geo,
for_items,
survey_type,
table_or_survey_code,
year,
...,
use_key = TRUE
)
variables |
<chr[]> a vector of variable names, like |
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" |
year |
an integer year, e.g. |
... |
< |
use_key |
<lgl?> optional, should the query include a Census API key from the system environment. Defaults to |
one URL, as a string
hercacstables:::build_api_url(paste0("B25003_00", 1:3, "E"),
"tract",
"*",
"acs",
"acs5",
2020L,
state = 55L,
county = 101L,
use_key = FALSE)
hercacstables:::build_api_url(paste0("P1_00", c(1, 3, 4), "N"),
"tract",
"*",
"dec",
"pl",
2020L,
state = 55L,
county = 101L,
use_key = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.