Learn R Programming

cdlTools (version 1.13)

metadata: CDL metadata.

Description

metadata downloads classification and crop class metadata from the cropscape website.

Usage

metadata(state, year, https = TRUE, ssl.verifypeer = TRUE)

Value

The metadata for the state identified by the state argument. If no match can be made, the program returns NA. The metadata is returned as a list with two elements, overall and class specific metrics, each in dataframes.

Arguments

state

A numeric fips code, a state's two letter abbreviation, or a state name.

year

A numeric year.

https

Legacy https, all traffic uses https, if you need http provide alternative url.

ssl.verifypeer

An optional boolean to turn on and off ssl verfication, default is on.

Author

Jonathan Lisic, jlisic@gmail.com

Details

Cropscape provides classification and crop class metadata on the Cropland Data Layer. This function fetches this data through scraping cropscape html.

Examples

Run this code
if (FALSE) {
metadata("ia", 2007)
metadata('North Carolina',2008)
metadata(44,2017)
}

Run the code above in your browser using DataLab