Learn R Programming

quickerstats (version 0.0.1)

get_param_values: Get all values a parameter can take.

Description

Get all values of a parameters that can be passed in a GET request. Primarily used as a utility function by other functions. See https://quickstats.nass.usda.gov/api for a table of parameter names.

Usage

get_param_values(
  key,
  param,
  short_desc = NA,
  source_desc = NA,
  year = NA,
  agg_level_desc = NA
)

Arguments

key

Your NASS api key.

param

The parameter name to get values of.

short_desc

The short_desc for which to get possible values of the param.

source_desc

The source_desc for which to get possible values of the param.

year

The year for which to get possible values of param.

agg_level_desc

The agg_level_desc for which to get possible values of param.

Value

A vector of all values that the parameter can take.

Examples

Run this code
# NOT RUN {
key <- Sys.getenv('NASS_KEY')
get_param_values(key=key, param='short_desc')
get_param_values(key=key, param='year',
                 short_desc='CORN, GRAIN - ACRES HARVESTED',
                 source_desc='CENSUS')
# }

Run the code above in your browser using DataLab