Skip to content

Conversation

@ranjan-stha
Copy link
Collaborator

NOTE: Mention related users here if any.

Changes

  • Add the Inform Risk 2025 spreadsheet
  • Update the API
  • Fix typos
  • Fix conditional checks

This PR doesn't introduce any:

  • temporary files, auto-generated files or secret keys
  • n+1 queries
  • flake8 issues
  • print
  • typos
  • unwanted comments

This PR contains valid:

  • tests
  • permission checks (tests here too)
  • translations

@ranjan-stha
Copy link
Collaborator Author

ranjan-stha commented Jul 22, 2025

Table update steps:

  1. The record_type in the Country table wasn't updated, so, we need to update that: python manage.py update_country_data
  2. (Optional step) Additionally, we can update the bbox and centroid by running the appropriate management commands
  3. Delete the data from the InformRiskSeasonal: InformRiskSeasonal.objects.all().delete()
  4. Push the data into InformRiskSeasonal: python manage.py fetch_inform_seasonal --file seasonal/INFORM_NA_Seasonal.xlsx
  5. Delete the data from RiskScore: RiskScore.objects.all().delete()
  6. Push the data into RiskScore: python manage.py create_risk_score seasonal/INFORM_Risk_2025_v070.xlsx seasonal/WPP2022_GEN_F01_DEMOGRAPHIC_INDICATORS_COMPACT_REV1.xlsx
  7. Remove the data from InformRisk: InformRisk.objects.all().delete()
  8. Push the data into InformRisk: python manage.py fetch_inform_data --file seasonal/INFORM_Risk_2025_v070.xlsx
  9. Remove the data from GwisSeasonal: GwisSeasonal.objects.all().delete()
  10. Push the data into GwisSeasonal: python manage.py aggregate_gwis_data

Note that hazards like Drought, Flood, Cyclone are updated/pushed by the steps 5-8
Note that hazard WildFire is updated/pushed by steps 9-10

These steps will update the data for Risk Score

cc @thenav56

@sudan45 sudan45 merged commit 7e97720 into develop Aug 7, 2025
3 checks passed
@sudan45 sudan45 deleted the fix/risk-score branch August 7, 2025 04:29
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.

4 participants