getUSDA: Get USDA data

Description Usage Arguments Value Examples

View source: R/getUSDA.R

Description

Downloads a zip file containing a csv from the USDA website, imports it, cleans it and write two new csvs: USDA-tidy.csv containing a tidy dataframe of the data, and USDA-flowsheets.csv containing flowsheet info for the last five years, for importing into Excel.

Usage

1
  getUSDA(url = "https://apps.fas.usda.gov/psdonline/downloads/psd_coffee_csv.zip")

Arguments

url

Should be a link to the most recent USDA coffee zip file.

Value

Also returns a dataframe called usda, which is loaded from the usda-tidy.csv using loadUSDA() under the hood.

Examples

1

tomcopple/coffeestats documentation built on May 24, 2019, 7:48 a.m.