Crowdsourced Vegetation Monitoring: Global Plant Trait Mapping¶
Category: Botany · Size: 8.4 GB · Format: ZIP License: CC-BY-4.0 · Zenodo record · Data sheet on the CSDH
Source data and 1 km-resolution plant trait maps, integrating citizen science (GBIF) with professional data (sPlot) to map plant functional traits globally.
The data is mounted read-only at /srv/data/global-plant-traits/.
Save anything you produce in your personal folder (~/).
⚠️ Large dataset (8.4 GB). Your session has 4 GB RAM and your home folder is shared — don't extract the whole archive. Read the entries you need straight from inside the ZIP (see below); if you must extract, take only specific files, not everything.
What's in the dataset¶
from pathlib import Path
DATA = Path('/srv/data/global-plant-traits')
for f in sorted(DATA.rglob('*')):
if f.is_file():
print(f"{f.relative_to(DATA)} ({f.stat().st_size/1e6:,.1f} MB)")
SCI_CIT_sparse_maps_1km.zip (7,660.3 MB) SourceData.zip (725.4 MB)
Explore the ZIP¶
The dataset comes compressed. We list its contents without extracting; if it contains CSVs, pandas can read them straight from inside the ZIP. Remember: /srv/data is read-only — if you need to extract, do it into your folder (~/).
import zipfile
import pandas as pd
zips = sorted(DATA.rglob('*.zip'))
z = zipfile.ZipFile(zips[0])
print('Using:', zips[0].name)
names = z.namelist()
print(f'{len(names)} files inside; first 20:')
for n in names[:20]:
print(' ', n)
csv_inside = [n for n in names if n.lower().endswith('.csv')]
if csv_inside:
df = pd.read_csv(z.open(csv_inside[0]), nrows=100_000, low_memory=False)
display(df.head())
Using: SCI_CIT_sparse_maps_1km.zip 74 files inside; first 20: gbif/X1080.tif gbif/X13.tif gbif/X138.tif gbif/X14.tif gbif/X144.tif gbif/X145.tif gbif/X146.tif gbif/X15.tif gbif/X163.tif gbif/X169.tif gbif/X21.tif gbif/X223.tif gbif/X224.tif gbif/X237.tif gbif/X26.tif gbif/X27.tif gbif/X281.tif gbif/X282.tif gbif/X289.tif gbif/X297.tif
Your turn¶
This is just the starting point. Some ideas:
- Check the dataset challenge on its CSDH data sheet.
- Work on a copy: right-click the file → Duplicate (or Save Notebook As…). Your changes only live in your Hub space — they're never pushed to GitHub.
- Edited this notebook and want the original back? Use the Restore cell
below (or the
restore.ipynbnotebook). - Questions and results: on the platform forum.
Attribution: data from Crowdsourced Vegetation Monitoring: Global Plant Trait Mapping, license CC-BY-4.0. Notebook from the Citizen Science Data Hub (CSDH) — Fundación Ibercivis.
# ⚠️ RESTORE: this DISCARDS YOUR CHANGES to this notebook and resets it to the original.
# 1. Uncomment the line below (remove the #) 2. Run this cell
# 3. Then: menu File → Reload Notebook from Disk
# !git -C ~/citizen-science-data fetch -q origin && git -C ~/citizen-science-data checkout origin/main -- global-plant-traits.ipynb && echo "Restored. Now: File → Reload Notebook from Disk"