Skip to content
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

Hotfix: polygon table coverage #35

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Hotfix: polygon table coverage #35

merged 1 commit into from
Dec 24, 2024

Conversation

hannahker
Copy link
Collaborator

@hannahker hannahker commented Dec 20, 2024

Addressing #23 and #19.

The polygon table on prod is missing all pcodes for NGA and TCD. This was fixed when #16 was merged. However these changes and the integration of Floodscan (see #25) caused issues where 'PRI', 'FJI', 'UZB', 'KIR', and 'BRA' were dropped from the polygon table. This is because of an error due to the fact that these iso3s all slightly overlap with the edges of the floodscan raster so that they aren't caught with this condition. This results in the iso3 being dropped for all datasets.

This PR fixes the issue with a more complete check against the coverage for a given dataset.

This diff overrepresents the changes all because of a change in indentation. Basically I've just added the following flag:

coverage = check_coverage(row, dataset)
if coverage:
     # everything the same as before...
else:
     logger.info(f"Skipping calculation for {dataset} for {iso3}")

@hannahker hannahker requested a review from isatotun December 20, 2024 22:50
@hannahker
Copy link
Collaborator Author

FYI @zackarno once this is merged I'll update the polygon table and this should address all missing pcode issues.

Copy link
Contributor

@isatotun isatotun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand where this is going. LGTM

@hannahker hannahker merged commit 4929412 into main Dec 24, 2024
1 check passed
@hannahker hannahker deleted the metadata-fix branch December 24, 2024 14:54
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.

2 participants