- geography
A character string denoting the level of census geography
whose ADIs and ADI-3s you'd like to obtain. Must be one of c("state", "county", "tract", "block group", "zcta")
. Required.
- state
A character string specifying states whose ADI and ADI-3 data is
desired. Defaults to NULL
. Can contain full state names, two-letter state
abbreviations, or a two-digit FIPS code/GEOID (must be a vector of strings,
so use quotation marks and leading zeros if necessary). Must be left as
NULL
if using the geoid
or zcta
parameter.
- county
A vector of character strings specifying the counties whose ADI
and ADI-3 data you're requesting. Defaults to NULL
. If not NULL
, the
state
parameter must have a length of 1. County names and three-digit
FIPS codes are accepted (must contain strings, so use quotation marks and
leading zeros if necessary). Must be blank if using the geoid
parameter.
- geoid
A character vector of GEOIDs (use quotation marks and leading
zeros). Defaults to NULL
. Must be blank if state
, county
, or zcta
is used. Can contain different levels of geography (see details).
- zcta
A character vector of ZCTAs or the leading digit(s) of ZCTAs (use
quotation marks and leading zeros). Defaults to NULL
. Must be blank if
state
, county
, or geoid
is used.
Strings under 5 digits long will yield all ZCTAs that begin with those
digits.
Requires that geography = "zcta"
. If geography = "zcta"
and zcta = NULL
, all ZCTAs in the US will be used.
- year
Single integer specifying the year of US Census data to use.
- dataset
The data set used to calculate ADIs and ADI-3s. Must be one of
c("acs5", "acs3", "acs1", "decennial")
, denoting the 5-, 3-, and 1-year
ACS along with the decennial census. Defaults to "acs5"
.
When dataset = "decennial"
, year
must be in c(1990, 2000, 2010)
.
The 2010 decennial census did not include the long-form questionnaire used
in the 1990 and 2000 censuses, so this function uses the 5-year estimates
from the 2010 ACS to supply the data not included in the 2010 decennial
census. In fact, the only 2010 decennial variables used are H003002,
H014002, P020002, and P020008.
Important: data are not always available depending on the level of
geography and data set chosen. See
https://www.census.gov/programs-surveys/acs/guidance/estimates.html.
- geometry
Logical value indicating whether or not shapefile data should
be included in the result, making the result an sf
object
instead of a plain tibble
. Defaults to FALSE
.
The shapefile data that is returned is somewhat customizable by passing
certain arguments along to the tidycensus
functions via ...
.
- keep_indicators
Logical value indicating whether or not the resulting
tibble
or sf
object will contain the
socioeconomic measures used to calculate the ADI and ADI-3 values. Defaults
to FALSE
.
See acs_vars
and decennial_vars
for basic descriptions of the raw
census variables.
- raw_data_only
Logical, indicating whether or not to skip calculation
of the ADI and ADI-3 and only return the census variables. Defaults to
FALSE
.
- cache_tables
The plural version of the cache_table
argument in
tidycensus::get_acs()
or tidycensus::get_decennial()
. (get_adi()
calls the necessary tidycensus
function many times in order to return
ADIs and ADI-3s, so many tables are cached if TRUE
). Defaults to TRUE
.
- key
Your Census API key as a character string. Obtain one at
http://api.census.gov/data/key_signup.html. Defaults to NULL
. Not
necessary if you have already loaded your key with census_api_key()
.
- seed
Passed to calculate_adi()
.
- ...
Additional arguments to be passed onto tidycensus::get_acs()
or
tidycensus::get_decennial()
. These must all be named. Must not match any
of the tidycensus
formal arguments that sociome
needs to set
explicitly.
This may be found to be helpful when setting geometry = TRUE
, since the
tidycensus
functions pass ...
onto the appropriate tigris
function
(namely, one of tigris::states()
, tigris::counties()
,
tigris::tracts()
, tigris::block_groups()
, or tigris::zctas()
,
according to the the value of geography
). This enables the user to
somewhat customize the shapefile data obtained.