census_api_query: Construct the query part of the URL for a call to the US...

View source: R/census_api_url.R

census_api_queryR Documentation

Construct the query part of the URL for a call to the US Census API

Description

Construct the query part of the URL for a call to the US Census API

Usage

census_api_query(variables, for_geo, for_items, ...)

Arguments

variables

a vector of strings with variable codes

for_geo

the geographic level of detail that you want

for_items

the specific geographic entities that you want

...

other key-value pairs to pass to the query

Value

a string with the query part of a Census API call

Examples

census_api_query(paste0("B25003_00", 1:3, "E"),
                 "tract",
                 "*",
                 state = 55L,
                 county = 101L)

census_api_query(paste0("P1_00", c(1, 3, 4), "N"),
                 "block%20group",
                 "*",
                 state = 55L,
                 county = 101L)

higherX4Racine/hiRx documentation built on Nov. 18, 2024, 10:20 a.m.