Repository navigation
feat: Ingest the FDaP 2026a dataset for cocoa coffee - #24
Merged
Merged
Conversation
Since FAOSTAT groups both species of coffee into one item, track that
…g which binarizes using per-country/year thresholds, applies jurisdictional exclusion lists, and smooths temporally
jeffseif
marked this pull request as ready for review
October 29, 2026 17:26
jeffseif
commented
Oct 29, 2026
blallen
reviewed
Oct 29, 2026
blallen
reviewed
Oct 29, 2026
jeffseif
commented
Oct 29, 2026
jeffseif
commented
Oct 30, 2026
TenaciousThee
left a comment
There was a problem hiding this comment.
As discussed with Jeff, comments will be addressed then PR will be merged
TenaciousThee
self-requested a review
October 30, 2026 17:14
TenaciousThee
approved these changes
Oct 30, 2026
TenaciousThee
left a comment
There was a problem hiding this comment.
As discussed with Jeff, comments will be addressed and PR merged
Pull threshold floors into constants and document them Various comment and doc polishes
Switch from FAOSTAT bulk to our ingested dataset
… over-estimate their total area harvested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This provides the second and third supplements for our global crop mask, extending GACED30's coverage over woody perennials -- Descals oil palm brought oil palm and this brings cocoa and coffee. The Forest Data Partnership (FDaP) 2026a release provides probabilities at 10m resolution in one-degree
EPSG:4326tiles for 2018, 2020, 2022, and 2024. We employ several steps of pre-processing, both to streamline downstream usage and to keep the dataset consistent with other datasets:The thresholds and exclusions come from extensive manual validation by Ad Astra. That work is expected to be published in the open soon. The thresholds here are final; the exclusions are still pending, and the branch has a
TODOto cite the work.Steps before merging
Notes
tools/fdap-producers.sqlregenerates them from FAOSTAT's bulk files with DuckDB.emitfollow in the next stacked PRround(p * 100)::uint8) to a lower cardinality or lowering precision to float16Manual validation
COFFfor 78-79 countries (depending on the year), with reasonable data10N_010W:uv run python -m jdluc.ingest FDAP_COCOA CIV