getCDL: Get CDL raster data

View source: R/getCDL.R

getCDLR Documentation

Get CDL raster data

Description

getCDL retrieves CDL state raster objects for a set of years.

Usage

getCDL(
  x,
  year,
  alternativeUrl,
  location = tempdir(),
  https = TRUE,
  ssl.verifypeer = TRUE,
  returnType = "raster"
)

Arguments

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.

Value

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.

Author(s)

Jonathan Lisic, jlisic@gmail.com

Jemma Stachelek, stachel2@msu.edu

Examples

## 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)

cdlTools documentation built on May 29, 2024, 2:13 a.m.

Related to getCDL in cdlTools...