Skip to content

Conversation

@12rambau
Copy link
Member

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.

@12rambau 12rambau requested a review from Copilot August 13, 2025 09:12
@12rambau
Copy link
Member Author

@dfguerrerom would you mind testing the PR branch on your end to confirm it's matching your expectations ?

Copy link

Copilot AI left a 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]
Copy link

Copilot AI Aug 13, 2025

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.

Copilot uses AI. Check for mistakes.
@12rambau 12rambau merged commit e5a605e into main Aug 25, 2025
10 of 13 checks passed
@12rambau 12rambau deleted the gaul-2024 branch August 25, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support GAUL 2024?

2 participants