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

feat(maps): Add Italy regions code to the map generator notebook #27542

Merged
merged 6 commits into from
Mar 19, 2024
Merged

feat(maps): Add Italy regions code to the map generator notebook #27542

merged 6 commits into from
Mar 19, 2024

Conversation

iskenderulgen
Copy link
Contributor

SUMMARY

Italy regions geojson file creation was constructed outside of the map generator jupyter notebook. Up on completion of #27455 pr it is suggested to add italy regions process to the map generator notebook file. Regions are created from dataframe itself since it provides region - region code information. In 2019 major changes applied on italy region information thus natural earh data directly used to create regions. This is more dynamic than creating custom dictionary as the natural-earth data updated maps will follow (this is only valid for countries that has ISO codes for all granulartiy, countries such as Turkey uses NUTS codes thus it requires custom dictionary).

Along with italy regions some code improvements also added. When plotting all the maps in earlier stages of notebook, process fails due to missing country-regions. This was fixed and those countries are shown in the center of the mini-plot for corresponding country. New italy gejson file committed , ".ts" file remained same.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

The old italy regions geojson file plot

original_italy_region

New italy regions geojson file plot

new italy region

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@iskenderulgen
Copy link
Contributor Author

Hi rusackas, added italy regions to the country map generator notebook. before merging I wanna do some tests on france regions in case i can use region - region_cod columns to create regions map for france w/o using custom dictionary. This would bring more dynamic approach and will be future proof. Also should we delete italy_regions file inside the countries_custom folder since it is added to the notebook flow.

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.70%. Comparing base (56a6660) to head (87ce1d9).
Report is 1401 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #27542   +/-   ##
=======================================
  Coverage   69.70%   69.70%           
=======================================
  Files        1910     1910           
  Lines       74799    74799           
  Branches     8345     8345           
=======================================
  Hits        52139    52139           
  Misses      20609    20609           
  Partials     2051     2051           
Flag Coverage Δ
javascript 57.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rusackas
Copy link
Member

Thank you for this! I was going to take a look at those early cell failures as well, and at least let them fail gracefully. Thanks for looking into that. I'll pull and review when I'm home after a weekend trip.

@iskenderulgen
Copy link
Contributor Author

hi, did some minor code change on italy region section to be more clear on the dataframe name. Also some code improvements applied on france regions. rather than using fixed region dictionary, now process infers regions codes and names from natural earth data. This will bring dynamic flow in case france region information changes. As the natural earth data updated, region map will be updated too. There was small file size difference but plots shows no majora diff with the old and new region files.

Previous france region map plot

original

New plot after code changes

improved

@rusackas
Copy link
Member

This looks great, thank you so much!

@rusackas rusackas merged commit 86aa8bd into apache:master Mar 19, 2024
26 checks passed
@iskenderulgen iskenderulgen deleted the italy_regions branch March 19, 2024 15:54
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
EandrewJones pushed a commit to UMD-ARLIS/superset that referenced this pull request Apr 5, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels plugins size/L 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants