From 51c9bd39750c05db4e29aa512559ac95395480a7 Mon Sep 17 00:00:00 2001 From: Brayden Youngberg Date: Fri, 17 Jul 2026 17:51:30 +0200 Subject: [PATCH 1/2] feat(data): Add 2 initial datasets --- records/glw4-2020/glw4-2020.yaml | 148 ++++++++++++++ records/mapspam2020/mapspam2020.yaml | 277 +++++++++++++++++++++++++++ 2 files changed, 425 insertions(+) create mode 100644 records/glw4-2020/glw4-2020.yaml create mode 100644 records/mapspam2020/mapspam2020.yaml diff --git a/records/glw4-2020/glw4-2020.yaml b/records/glw4-2020/glw4-2020.yaml new file mode 100644 index 0000000..736f6dd --- /dev/null +++ b/records/glw4-2020/glw4-2020.yaml @@ -0,0 +1,148 @@ +# yaml-language-server: $schema=../../spec/schemas/profiles/cdh.schema.json +"$schema": https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/schemas/profiles/cdh.schema.json +cdh_schema_version: "v0.2.0" + +extensions: + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/cdh/schema.json + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/datacube/schema.json + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/agriculture/schema.json + +id: glw4-2020 +title: Gridded livestock density for 2020 (GLW4) +series: + name: Gridded Livestock of the World (GLW) + url: https://www.fao.org/livestock-systems/global-distributions/en/ +description: > + Gridded Livestock of the World, version 4 (GLW 4) maps modelled densities of six livestock + species: buffalo, cattle, sheep, goats, pigs, and chickens. This data is for the 2020 reference + year. Densities are estimated with a Random Forest model that downscales harmonized subnational + census counts onto a regular grid, so the values represent modelled distributions rather than + direct observations. All of the values are number of animals per km^2 +license: CC-BY-4.0 +resource_type: dataset + +keywords: + - gridded + - modelled + - exposure + - term: animal husbandry + scheme: https://agrovoc.fao.org/ + uri: http://aims.fao.org/aos/agrovoc/c_8532 +note: > + Values are densities (head/km²), so individual pixel values are valid anywhere. However, the data + are distributed in lat/long (EPSG:4326), where pixel ground area shrinks toward the poles. A + standard lat/long map visually over-represents high-latitude densities, and naive spatial + aggregation (totals, means, zonal statistics) assuming equal-area pixels will be biased. Reproject + to an equal-area projection or weight by true pixel area for visualization and area-based + analysis. + +contact: + - organization: Food and Agriculture Organization of the United Nations + roles: [licensor, producer, processor] + url: https://www.fao.org/home/en/ + - name: Dominik Wisser + roles: [point-of-contact] + email: Dominik.Wisser@fao.org + organization: Food and Agriculture Organization of the United Nations + - name: Giuseppina Cinardi + roles: [point-of-contact] + email: giuseppina.cinardi@fao.org + organization: Food and Agriculture Organization of the United Nations + - name: Brayden Youngberg + roles: [processor, custodian] + email: b.youngberg@cgiar.org + organization: The Alliance of Bioversity International and CIAT + +citation: + title: "GLW 4: Gridded Livestock Density (Global - 2020 - 10 km)" + authors: + - Food and Agriculture Organization of the United Nations + date: "2024" + publisher: FAO Agro-Informatic Data Catalog + url: https://data.apps.fao.org/catalog/dataset/9d1e149b-d63f-4213-978b-317a8eb42d02 +related_publications: + - doi: 10.1371/journal.pone.0133381 + +# metadata tracking +created: "2026-06-23" +updated: "2026-06-23" + +spatial: + bbox: [-180.0, -90.0, 180.0, 90.0] + geography: [world] + crs: EPSG:4326 + resolution: + - type: xy + unit: degree + value: 0.08333333 + label: 5 arc-minutes (~10km at equator) + +temporal: + date: "2020" # static 2020 reference year (year precision) + +dimensions: + - name: species + type: species + description: The livestock species for which the data is provided + values: [buffalo, cattle, chicken, goat, pig, sheep] + +variables: + - name: Livestock Density + description: Number of livestock per km2 + data_type: float32 + unit: "{head}/km-1" + +cdh: + not_recommended_for: + - use: exact livestock counts + reason: values are spatially modeled estimates derived from census and other data + use_instead: official livestock census counts where available + domain: [agricultural-production] + +commodities: [buffalo, cattle, chickens, goats, swine, sheep] + +processing: + - id: source + description: Original GLW 4 release + date: "2024-07-15" + derived_from: + - url: https://data.apps.fao.org/catalog//iso/9d1e149b-d63f-4213-978b-317a8eb42d02 + title: GLW 4 2020 + - id: cloud-optimize + description: Optimize data for cloud storage + date: "2026-06-23" + code: + url: https://github.com/CGIAR-Climate-Data-Hub/cdh-data-pipeline/blob/main/recipes/glw4.py + version: "885ed96" + +data: + - name: zarr + locations: + - url: https://digital-atlas.s3.amazonaws.com/cdh/data/glw4-2020/glw4-2020.zarr + title: HTTPS + - url: s3://digital-atlas/cdh/data/glw4-2020/glw4-2020.zarr + title: S3 + processing_steps: [cloud-optimize] + description: Zarr store of GLW 4 2020 + nodata: "NaN" + media_type: application/vnd.zarr; version=3 + file_size: 31.1 MB + - name: cogs + locations: + - url: https://digital-atlas.s3.amazonaws.com/cdh/data/glw4-2020/cogs/ + title: HTTPS + - url: s3://digital-atlas/cdh/data/glw4-2020/cogs/ + title: S3 + href_template: "glw4-2020-{species}.tif" + processing_steps: [cloud-optimize] + description: Cloud-optimized GeoTIFFs of GLW 4 2020 + nodata: -3.4028235e+38 + media_type: "image/tiff; application=geotiff; profile=cloud-optimized" + +additional_links: + - name: FAO Livestock Distributions + rel: related + url: https://www.fao.org/livestock-systems/global-distributions/en/ + - name: FAOSTAT Crop and Livestock Production + rel: related + url: https://www.fao.org/faostat/en/#data/QCL diff --git a/records/mapspam2020/mapspam2020.yaml b/records/mapspam2020/mapspam2020.yaml new file mode 100644 index 0000000..83db695 --- /dev/null +++ b/records/mapspam2020/mapspam2020.yaml @@ -0,0 +1,277 @@ +# yaml-language-server: $schema=../../spec/schemas/profiles/cdh.schema.json +"$schema": https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/schemas/profiles/cdh.schema.json +cdh_schema_version: "v0.2.0" +extensions: + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/cdh/schema.json + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/climate/schema.json + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/datacube/schema.json + - https://cgiar-climate-data-hub.github.io/cdh-metadata-standard/v0.2.0/extensions/agriculture/schema.json + +id: spam2020 +title: MAPSPAM 2020 +version: v2r2 +series: + name: MapSPAM + url: https://mapspam.info +description: > + Global Spatially-Disaggregated Crop Production Statistics Data for 2020 Version 2.0 Release 2, + represented as a gridded crop production data cube. The record describes crop area, harvested + area, production, and yield by crop and production technology at 5 arc-minute resolution. +license: CC-BY-SA-4.0 +resource_type: dataset + +keywords: + - food security + - crop production + - spatial distribution + - gridded agriculture +note: > + Derived from available subnational statistics; local national or subnational data providers may + hold more precise source statistics for some locations. + +contact: + - name: Zhe Guo + roles: [producer] + email: z.guo@cgiar.org + organization: International Food Policy Research Institute + url: https://www.ifpri.org/ + - name: Shuang Zhou + roles: [producer] + email: s.zhou@cgiar.org + organization: International Food Policy Research Institute + url: https://www.ifpri.org/ + - name: Liangzhi You + roles: [producer] + organization: International Food Policy Research Institute + + - organization: International Food Policy Research Institute + roles: [licensor] + url: https://www.ifpri.org/ + +citation: + title: + Global Spatially-Disaggregated Crop Production Statistics Data for 2020 Version 2.0 Release 2 + authors: + - International Food Policy Research Institute (IFPRI) + date: "2026" + publisher: Harvard Dataverse +doi: 10.7910/DVN/SWPENT +related_publications: + - citation: + title: "Generating global crop distribution maps: From census to grid" + authors: + - You, L. + - Wood, S. + - Wood-Sichra, U. + - Wu, W. + date: "2014" + publisher: Agricultural Systems + doi: 10.1016/j.agsy.2014.01.002 + +created: "2026-07-06" +updated: "2026-07-06" + +spatial: + bbox: [-180, -90, 180, 90] + geography: + - world + crs: EPSG:4326 + resolution: + - type: xy + unit: degree + value: 0.08333333 + label: 5 arc-minutes (~10km at equator) + +temporal: + date: "2020" # static 2020 reference year (year precision) + +dimensions: + - name: crop + type: crop + description: MAPSPAM crop code. Full labels are provided in the dimension codes asset. + values: + - whea + - rice + - maiz + - barl + - mill + - pmil + - sorg + - ocer + - pota + - swpo + - yams + - cass + - orts + - bean + - chic + - cowp + - pige + - lent + - opul + - soyb + - grou + - cnut + - oilp + - sunf + - rape + - sesa + - ooil + - sugc + - sugb + - cott + - ofib + - coff + - rcof + - coco + - teas + - toba + - bana + - plnt + - citr + - trof + - temf + - toma + - onio + - vege + - rubb + - rest + + - name: technology + type: technology + description: + MAPSPAM production system code. Full labels are provided in the dimension codes asset. + values: [all, irrigated, rainfed] + +variables: + - name: physical_area + description: Physical crop area allocated to each grid cell. + data_type: float32 + unit: ha + - name: harvested_area + description: Harvested crop area allocated to each grid cell. + data_type: float32 + unit: ha + - name: production + description: Crop production allocated to each grid cell. + data_type: float32 + unit: t + note: Absolute quantity; regional summaries should sum values across cells. + - name: yield + description: Crop yield for each grid cell. + data_type: float32 + unit: t ha-1 + note: > + Relative quantity; do not sum yield values across grid cells. Regional summaries should use a + weighted mean with harvested_area as the weight. + +cdh: + domain: [agricultural-production] + not_recommended_for: + - use: field-scale farm management + reason: the grid is too coarse for field-scale operational decisions. + use_instead: local survey or administrative production data. + +commodities: + - wheat + - rice + - maize + - barley + - millets + - pearl-millet + - sorghum + - cereals + - potato + - sweet-potatoes + - yams + - cassava + - root-vegetables + - common-bean + - chickpeas + - cowpeas + - pigeon-pea + - lentils + - pulses + - soybeans + - groundnuts + - coconuts + - oil-palms + - sunflower + - rapeseed + - sesame + - oil-crops + - sugarcane + - sugarbeet + - cotton + - fibre-crops + - coffee + - robusta-coffee + - cocoa + - tea + - tobacco + - banana + - plantains + - citrus + - tropical-fruits + - temperate-fruit + - tomatoes + - onions + - vegetables + - rubber + - crops + +processing: + - id: source + description: Original MAPSPAM 2020 v2 release. + code: + url: https://github.com/michielvandijk/mapspamc + version: v0.0.2 + date: "2026-04-22T00:00:00Z" + derived_from: + - url: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/SWPENT + title: Source MAPSPAM dataset + - id: cloud-optimize + description: Conversion of source MAPSPAM files to a consolidated Zarr data cube. + code: + url: "https://github.com/CGIAR-Climate-Data-Hub/cdh-data-pipeline/blob/main/recipes/mapspam2020.py" + version: "47f9830" + date: "2026-07-07" + +data: + - name: zarr + locations: + - url: https://digital-atlas.s3.amazonaws.com/cdh/data/mapspam2020-v2r2/spam2020-v2r2.zarr + title: HTTPS + - url: s3://digital-atlas/cdh/data/mapspam-2020-v2r2/spam2020-v2r2.zarr + title: S3 + processing_steps: [cloud-optimize] + description: Zarr representation of the source MAPSPAM files. + nodata: -9999 + media_type: application/vnd.zarr; version=3 + file_size: 500 MB + - name: cogs + locations: + - url: https://digital-atlas.s3.amazonaws.com/cdh/data/mapspam2020-v2r2/cogs/ + title: HTTPS + - url: s3://digital-atlas/cdh/data/mapspam-2020-v2r2/cogs/ + title: S3 + href_template: "spam2020-{technology}-{variable}.tif" + processing_steps: [cloud-optimize] + description: Cloud Optimized GeoTIFFs of the MAPSPAM files. + nodata: -9999 + media_type: "image/tiff; application=geotiff; profile=cloud-optimized" + +additional_assets: + - name: crop codes + locations: + - url: https://digital-atlas.s3.amazonaws.com/cdh/data/mapspam-2020-v2r2/crop-codes.json + description: Dimension code list for crop values. + media_type: application/json + roles: [metadata, describedby] + file_size: 5 KB + +additional_links: + - name: MAPSPAM project website + rel: about + url: https://www.mapspam.info/about/ + description: Project page describing MAPSPAM methods and releases. From ffb42e8163a6a54def81baead20b7ae43b1e11d3 Mon Sep 17 00:00:00 2001 From: Brayden Youngberg Date: Fri, 17 Jul 2026 17:54:06 +0200 Subject: [PATCH 2/2] style: prettier --- records/mapspam2020/mapspam2020.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/records/mapspam2020/mapspam2020.yaml b/records/mapspam2020/mapspam2020.yaml index 83db695..97f8a10 100644 --- a/records/mapspam2020/mapspam2020.yaml +++ b/records/mapspam2020/mapspam2020.yaml @@ -49,8 +49,7 @@ contact: url: https://www.ifpri.org/ citation: - title: - Global Spatially-Disaggregated Crop Production Statistics Data for 2020 Version 2.0 Release 2 + title: Global Spatially-Disaggregated Crop Production Statistics Data for 2020 Version 2.0 Release 2 authors: - International Food Policy Research Institute (IFPRI) date: "2026" @@ -139,8 +138,7 @@ dimensions: - name: technology type: technology - description: - MAPSPAM production system code. Full labels are provided in the dimension codes asset. + description: MAPSPAM production system code. Full labels are provided in the dimension codes asset. values: [all, irrigated, rainfed] variables: