-
Notifications
You must be signed in to change notification settings - Fork 0
feat: use the new version of FAO GAUL (GAUL 2024) #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@dfguerrerom would you mind testing the PR branch on your end to confirm it's matching your expectations ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the package to use the new FAO GAUL 2024 dataset instead of GAUL 2015, requiring changes to asset paths, column naming conventions, and data structure handling.
- Updates the Google Earth Engine asset path to use the new community catalog location
- Changes column naming from ADM{level}{TYPE} to gaul{level}{type} format
- Replaces continent JSON file with dynamic continent lookup from the dataset
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pyproject.toml | Removes licensecheck configuration |
| pygaul/data/gaul_continent.json | Removes static continent mapping file |
| pygaul/init.py | Updates asset path, column names, and continent handling logic |
| .pre-commit-config.yaml | Removes licensecheck pre-commit hook |
Comments suppressed due to low confidence (1)
pygaul/init.py:202
- This line appears to be accessing index 3 on a column name string, which will cause an IndexError if the column name is shorter than 4 characters. This looks like leftover code that should be removed or fixed to match the new column naming convention.
df.columns[0][4]
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # now load the useful one to get content_level | ||
| df = Names(name, admin, content_level) | ||
| content_level = df.columns[1][3] | ||
| content_level = df.columns[1][4] |
Copilot
AI
Aug 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to line 202, accessing index 4 on a column name string will cause an IndexError. The content_level should be extracted from the column name using a different approach that matches the new gaul{level}_{type} naming convention.
Fix #57
I created the missing dataset of L0 dissolving the L1 and requested to Sam a publication in the GEE community catalog: https://gee-community-catalog.org/projects/gaul/?h=gaul#earth-engine-snippet
Now that it's available I updated the source code of the package to make it compatible with it. It will be released as a new sementic version becasue it changes the GAUL code (as the nomenclature evolved since 2015), it changes the column names of the assets themselves and also update the names of the administrative areas as well.