Pivot
Pivot is a high-performance real time analytics database on open data formats.
Multi-zone conservation planning trade-offs between biodiversity, carbon and livelihoods for a community-forest landscape in West Kalimantan, Indonesian Borneo.
DataPython · JavaScriptGitHub @yanhildebrandOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Multi-zone conservation planning and trade-off explorer for a community-forest landscape in West Kalimantan (open data, HiGHS, prioritizr cross-check, static MapLibre app)
Taken from the repository README
Loading the full README.
Read the full README ↗This repository plans conservation zones for a community-forest landscape in West Kalimantan (Indonesian Borneo) and lets you explore the trade-offs between biodiversity, carbon and livelihoods. It is reproducible end to end and uses open data only.
The landscape is the Cagar Alam Gunung Nyiut nature reserve plus a 10 km belt of surrounding village land, 294 kha in total. For every target combination, the pipeline finds the zoning (protection / sustainable use & agroforestry / community use) that meets the biodiversity and carbon targets at the smallest loss of livelihood opportunity. A static web app then lets anyone move through 150 precomputed plans with sliders.
Open the explorer → · 2-page methods note · scope · build report
Demonstrator, not a recommendation. The real project landscape and field data are not public, so the habitat and livelihood layers are transparent proxies (see limitations). The pipeline is built so that the project's own layers can replace them.
flowchart LR
A[Open data<br/>STAC / COG range reads] --> B[100 m layers<br/>forest, carbon, BII, DEM,<br/>roads, settlements]
B --> C[Derived layers<br/>connectivity, condition,<br/>travel time, streams,<br/>livelihood opportunity]
C --> D[Features & costs<br/>4 forest types, 7 species,<br/>carbon; 11,730 x 25 ha PUs]
D --> E[Multi-zone MILP<br/>min-set + boundary penalty<br/>HiGHS]
E --> F[150 scenarios<br/>metrics + zonings]
F --> G[Static explorer<br/>MapLibre, GitHub Pages]
F --> H[Figures + methods PDF]
Formulation. This is the prioritizr / Marxan-with-Zones minimum-set problem. Each planning
unit is assigned to one zone. Each feature f must reach its target, counting
x_P + κ_f · x_A (protection secures all of a feature, agroforestry a share κ). The objective
is the livelihood opportunity forgone plus a zone-boundary penalty; P|C edges cost twice as
much as P|A or A|C edges, which rewards buffered protection cores. It is solved exactly as a
mixed-integer programme with HiGHS (all 150 plans within 0.9 % of
optimal, ~2.6 s each). Six scenarios re-solved in R with prioritizr 9.0.1 give
identical objectives and identical zonings
(results/prioritizr_crosscheck.csv); the cross-check
script is R/prioritizr_crosscheck.R. Full details are in the methods note and
src/zoning/solver.py.
Scenario axes:
| Layer | Source | Licence |
|---|---|---|
| Tree cover 2000, loss 2001–2024 | Hansen/UMD/Google/USGS/NASA Global Forest Change v1.12 | CC BY 4.0 |
| Land cover 2021, 10 m | ESA WorldCover v200 (AWS COG) | CC BY 4.0 |
| Above-ground biomass 2024 + SD | ESA CCI Biomass v7.0 (CEDA) | ESA CCI data policy (free, attribution) |
| Elevation / slope / streams | Copernicus DEM GLO-30 (AWS COG) | Copernicus DEM licence |
| Biodiversity Intactness Index 2020 | Impact Observatory & Vizzuality (Planetary Computer STAC) | CC BY 4.0 |
| Roads, settlements, rivers, reserve boundary | © OpenStreetMap contributors (Overpass API) | ODbL |
| Regency boundaries | geoBoundaries gbOpen (BPS / OCHA) | open |
| Species occurrences (plausibility check only) | GBIF occurrence API | per record |
| Basemap (app only) | Sentinel-2 cloudless 2023 by EOX | CC BY-NC-SA 4.0 |
Downloads use HTTP range requests on Cloud-Optimised GeoTIFFs or tiles. Only the study window
is transferred (about 55 MB in total). Every request is logged with URL, size and date in
data/manifest.json.
Requires uv (the Python 3.12 environment is locked in uv.lock).
uv sync --locked --all-groups
uv run zx all # or: make all
make serve # explorer at http://localhost:8000
zx all runs these stages, each cached and individually callable (uv run zx <stage>):
| Stage | What it does |
|---|---|
aoi | Study area from OSM + geoBoundaries |
download | Clipped downloads |
layers | 100 m harmonised and derived layers |
check | GBIF plausibility check |
problem | Planning units, features, costs |
solve | 150 scenarios with HiGHS, ~2 min on 5 cores |
export | App data |
figures | Figures and docs/numbers.json |
methods | Typst → docs/methods.pdf |
Use --force to rebuild a stage. The optional zx crosscheck stage compares the solver with
prioritizr; it needs R with prioritizr, highs and tibble. Rscript is found on PATH, via
ZX_RSCRIPT, or via an uncommitted config/local.yaml with rscript: and r_libs: keys. The study area, zones, features and scenario grid are plain
YAML in config/. Pointing config/study_area.yaml at another landscape re-runs
everything there.
config/ study area, zones, features/species rules, scenario grid
R/ prioritizr cross-check (reference formulation in R)
src/zoning/ pipeline package (sources, layers, hydrology, accessibility, species,
problem, solver, scenarios, metrics, export, figures, cli)
app/ static explorer (index.html, app.js, style.css) + generated data/
data/ manifest.json (provenance) + processed/ planning-unit table
results/ scenario metrics, zonings, GBIF check
docs/ methods.typ/.pdf, figures, screenshots
tests/ pytest suite
make test runs ruff and the pytest suite, which covers:
GitHub Actions runs the same suite and builds the methods PDF. A second CI job installs R and
prioritizr and requires the cross-check to match. A separate workflow deploys app/ to GitHub
Pages.
The explorer is meant for workshops. Communities and partners set targets and zone rules, see the consequences immediately, and discuss the protection-frequency map: units protected in almost every plan are robust, while units that switch between plans are where choices matter. Real zoning requires free, prior and informed consent, participatory mapping of customary land and resource use, and community-defined targets. The tool supports those processes; it does not replace them.
See REPORT.md. In brief:
Jan Hildebrand (@yanhildebrand).
app/data, results and data/processed: CC BY 4.0, subject to the
upstream licences above. OSM-derived extracts are ODbL.Citation metadata is in CITATION.cff.