crop_spam: SPAM crop data

View source: R/crop_spam.R

crop_spamR Documentation

SPAM crop data

Description

SPAM crop data. For each of 42 crops or crop groups get a 10-minute spatial resolution raster with the crop area, yield, production or value by cropping system (rainfed or irrigated, and subsistence, low-input or high-input).

The global data are for 2010. The Africa dataset is for 2017.

Usage

spamCrops()
crop_spam(crop="", var="area", path, africa=FALSE, ...)

Arguments

crop

character. See spamCrops for valid names

var

character. variable of interest. Must be one of "yield", "harv_area" (harvested area), "phys_area" (physical area), "prod" (production) or "val_prod" (value of production)

path

character. Path for storing the downloaded data. See geodata_path

africa

logical. retrieve the (more up to date) data for Africa instead of global data

...

additional arguments passed to download.file

Value

SpatRaster

References

International Food Policy Research Institute, 2019. Global Spatially-Disaggregated Crop Production Statistics Data for 2010 Version 2.0. https://doi.org/10.7910/DVN/PRFF8V, Harvard Dataverse, V4.

International Food Policy Research Institute, 2020. Spatially-Disaggregated Crop Production Statistics Data in Africa South of the Sahara for 2017. https://doi.org/10.7910/DVN/FSSKBW, Harvard Dataverse, V3.

See Also

https://www.mapspam.info/data/

Examples


# downloads a large file
cas <- crop_spam("cassava", "area", path=tempdir(), TRUE)


rspatial/geodata documentation built on July 26, 2024, 8:43 a.m.