get_nassqs_data: Get USDA NASS data and return a data frame

Description Usage Arguments Details Examples

View source: R/request.R

Description

A wrapper function for the rnassqs package, get_nassqs_data makes a HTTP GET request to the USDA-NASS Quick Stats API and returns a subset of the data parsed as a tibble.

Usage

1
2
3
4
5
6
get_nassqs_data(
  comm_list = c("CORN", "COTTON", "SOYBEANS", "WHEAT", "SUGARCANE", "SUGARBEETS",
    "SORGHUM", "RICE", "BARLEY"),
  start_year = 1990L,
  end_year = 2019L
)

Arguments

comm_list

A list of 'nassqs' commodities. All possible values available from nassqs_param_values()

start_year

A start year integer

end_year

An end year integer

Details

Examples

1
2
3
4
5
6
7
library(tidyverse)

comm_list <- c("CORN","WHEAT")
start_year <- 2018L
end_year <- 2019L

get_nassqs_data(comm_list, start_year, end_year)

opus1993/rnassqs.extra documentation built on Oct. 14, 2020, 3:25 a.m.