getCDL | R Documentation |
getCDL
retrieves CDL state raster objects for a set of years.
getCDL(
x,
year,
alternativeUrl,
location = tempdir(),
https = TRUE,
ssl.verifypeer = TRUE,
returnType = "raster"
)
x |
Is either a two digit state FIPS code, a two letter abbreviation, or a state name. |
year |
A numerical vector. A set of years of CDL data to download. |
alternativeUrl |
An optional string containing an alternative url. |
location |
An optional string containing a folder to store the file. If no folder is given, the R temporary directory will be used. |
https |
Legacy https flag, 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. |
returnType |
An optional parameter to select to return either 'raster' or 'terra' based raster files. |
A list of CDL raster objects of interested county for a set of years. Note that this is a generic list allowing for rasters with different extents and resolutions.
Jonathan Lisic, jlisic@gmail.com
Jemma Stachelek, stachel2@msu.edu
## Not run:
# Get data for California, 2013 and 2015
# by FIPS
getCDL(6,c(2013,2015))
# Get data for California, 2013 and 2015 with Terra
getCDL("California",c(2013,2015), returnType='terra')
# Get all the west coast from 2009 to 2016
getCDL(c("CA","OR","WA"),2013:2016)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.