census_geo_api_names: Census geo API helper functions

View source: R/census_geo_api_names.R

census_geo_api_namesR Documentation

Census geo API helper functions

Description

Census geo API helper functions

Usage

census_geo_api_names(
  year = c("2020", "2010", "2000"),
  age = FALSE,
  sex = FALSE
)

census_geo_api_url(year = c("2020", "2010", "2000"))

Arguments

year

A character object specifying the year of U.S. Census data to be downloaded. Use "2010", or "2020". Default is "2020". Warning: 2020 U.S. Census data is downloaded only when age and sex are both FALSE.

age

A TRUE/FALSE object indicating whether to condition on age or not. If FALSE (default), function will return Pr(Geolocation | Race). If TRUE, function will return Pr(Geolocation, Age | Race). If sex is also TRUE, function will return Pr(Geolocation, Age, Sex | Race).

sex

A TRUE/FALSE object indicating whether to condition on sex or not. If FALSE (default), function will return Pr(Geolocation | Race). If TRUE, function will return Pr(Geolocation, Sex | Race). If age is also TRUE, function will return Pr(Geolocation, Age, Sex | Race).

Value

census_geo_api_names()

A named list of character vectors whose values correspond to columns of a Census API table and whose names represent the new columns they are used to calculate in census_geo_api().

census_geo_api_url()

A character string containing the base of the URL to a Census API table.


wru documentation built on May 29, 2024, 9:46 a.m.