R/pums.R
get_pums.Rd
Load data from the American Community Survey Public Use Microdata Series API
get_pums( variables = NULL, state = NULL, puma = NULL, year = 2019, survey = "acs5", variables_filter = NULL, rep_weights = NULL, recode = FALSE, show_call = FALSE, key = NULL )
variables | A vector of variables from the PUMS API.
Use |
---|---|
state | A state, or vector of states, for which you would like to
request data. The entire US can be requested with |
puma | A vector of PUMAs from a single state, for which you would like
to request data. To get data from PUMAs in more than one state, specify a
named vector of state/PUMA pairs and set |
year | The data year of the 1-year ACS sample or the endyear of the 5-year sample. Defaults to 2019. |
survey | The ACS survey; one of either |
variables_filter | A named list of filters you'd like to return from the
PUMS API. For example, passing |
rep_weights | Whether or not to return housing unit, person, or both
housing and person-level replicate weights for calculation of standard
errors; one of |
recode | If TRUE, recodes variable values using Census data dictionary
and creates a new |
show_call | If TRUE, display call made to Census API. This can be very useful in debugging and determining if error messages returned are due to tidycensus or the Census API. Copy to the API call into a browser and see what is returned by the API directly. Defaults to FALSE. |
key | Your Census API key. Obtain one at http://api.census.gov/data/key_signup.html |
A tibble of microdata from the ACS PUMS API.