Download county level total livestock
download_nass_livestock.Rd
Provides a wrapper to rnassqs::nassqs()
with simplified arguments
for making queries that return county level livestock estimates. This
function requires an API key from USDA NASS Quickstats. See details for
more information.
Arguments
- state_alpha
Two letter character abbreviation for state.
- county_name
Character, county name.
- year
A character to filter the NASS Agriculture Census year. Expects one of:
c('2022', '2017', '2012', '2007', '2002', '1997')
.- ...
Additional arguments passed to
rnassqs::nassqs()
Details
This function requires an API key to make requests on the USDA NASS QuickStats service.
Obtain an API key from https://quickstats.nass.usda.gov/api/.
Set the
NASSQS_TOKEN
variable in your global environment. This can be done withSys.setenv('NASSQS_TOKEN' = <your api key>)
, orusethis::edit_r_environment()
.Restart your session.