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(country-map): add map for France with all overseas territories #31037

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

tarraschk
Copy link
Contributor

SUMMARY

This PR adds a GeoJSON map for France with all overseas territories in the "Country maps" charts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TESTING INSTRUCTIONS

  1. Create a new chart
  2. Choose dataset "birth_france_by_region" (built-in)
  3. Choose a "Country Map" chart type
  4. In Country option choose "France (with overseas)", DEPT_ID for ISO 3166-2 code, and avg__204 for Metric.
  5. Click on Create Chart

image

ADDITIONAL INFORMATION

  • Has associated issue: Add a map of France with overseas (ready to make the PR if approved) #30994
  • Required feature flags: viz:charts:map
  • 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

@dosubot dosubot bot added the viz:charts:map Related to Map charts label Nov 24, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@tarraschk tarraschk changed the title feat(countr-map): add map for France with all overseas territories feat(country-map): add map for France with all overseas territories Nov 24, 2024
@rusackas
Copy link
Member

Hi! I appreciate the change, but the change needs to be made in the Jupyter notebook. I hope this helps :)

@tarraschk
Copy link
Contributor Author

Hi! I appreciate the change, but the change needs to be made in the Jupyter notebook. I hope this helps :)

Hello @rusackas thanks for your feedback.

The GeoJSON has been made by hand in order to simplify some geometries (e.g. French Polynesia has a lot of islands, but I only kept the main one which is Tahiti).
Thus, can I upload it on a private repo, and then sync it with Jupyter like it has been done for India here?

image

@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Nov 26, 2024
@tarraschk
Copy link
Contributor Author

@rusackas I adapted my PR with your recommendations.

  1. I created a geojson and hosted it on my own repo.
  2. I updated the Jupyter Notebook project so that it takes my geojson file, based on the same approach as the one used for Philippines.

I added a step to plot all countries from the "altmaps" in order to preview all maps that are a little more customized. We can see the new France Overseas results right here :).

image

@tarraschk
Copy link
Contributor Author

Hello @rusackas @villebro just a kind reminder for this PR

Please tell me if you need anything else from me

@rusackas
Copy link
Member

Hi! Sorry. Just a bit swamped... I'll have to get back to it soon.

Ideally, the Jupyter notebook would make the same edits you're doing by hand... then Natural Earth can update their source data, and modifications are applied.

Pulling the data from an externally hosted json file is kind of a workaround, but we lose the benefit of having a maintained upstream data provider... that geojson is likely going to be static forever. We probably shouldn't have let that happen with India, honestly.

If you look at how the notebook was pulling in the other islands for France, we should do the same with any other islands that weren't already included.

@tarraschk
Copy link
Contributor Author

Just updated my code. Everything is now built through Jupyter.

image

and the result in Superset:

image

@rusackas
Copy link
Member

Looking significantly better! I'm getting pulled away at the end of my work day, but plan to revisit this in the morning... what I intend to check is whether we still need the cells above the ones you added... they seem to be doing similar things, and I'm not sure (as a non-French person) if we need all these variants of the map, or if yours should replace the existing ones.

@tarraschk
Copy link
Contributor Author

Well, when we talk about France without adding more precision, we most of the time talk about France with its 5 overseas departments (called DROM for Départements et Régions d'Outre-Mer) which are Guadeloupe, Mayotte, Guyane, La Réunion, and Mayotte.

These 5 items are actually listed by Natural Earth Data as part of France (admin == France), and this is what seems to generate the France and France (regions) maps in Superset.

image

Then, when we talk about "France with overseas", we want to add the overseas authorities (called COM for Collectivité d'Outre-Mer) which are French Polynesia, Wallis and Futuna, Saint Pierre and Miquelon, Saint Barthélémy, Saint Martin, New Caledonia, French Southern and Antarctic Lands and sometime even Clipperton (less studied as it is uninhabited).

image

The difference between DROM and COM is that COM have more local power and autonomy. For example, French Polynesia has its own local government, its own president, etc.

In my opinion, both use case are different as the "France with overseas" only concerns people that want to do more advanced requests on the whole French territories whereas most of the time people would focus on Metropolitan France or France with DROM.

So honestly, I would keep both France, France (regions), and France (with overseas) maps.

@tarraschk
Copy link
Contributor Author

After discussions with @rusackas here are some additional considerations.

The old map for France is actually the one with only French departments, including islands that are considered as departments
My map in this PR is the map of departments, plus the French additional territories that have their autonomy and that are not included as departments regarding administrative authorities.

As is, this PR adds a 3rd map for France which might be considered as "la lot" of maps for only one country!

I think we have two options:

Option A: we add my map as a third map of France

  • Benefits: nothing changes for actual Superset users that use the existing France map (departments or regions)
  • Bad side: it adds a third map of France, which could be considered like a lot for non French people :sourire:

Option B: we merge maps of France to keep only two. I could for example replace the existing 'France' map with mine, and re-generate the 'France (regions)' map based on mine.

  • Benefits: same number of France maps as before
  • Bad side: some people might see this as a change (a good one I think, but still a change) if they use the existing France maps

I can do both options. Please let me know which option would be the best for the Apache Superset community.

@rusackas
Copy link
Member

Running CI... thanks again for your help here!

@rusackas rusackas merged commit e788b85 into apache:master Dec 17, 2024
34 of 36 checks passed
Tinghecui added a commit to Tinghecui/superset that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation plugins size/XXL viz:charts:map Related to Map charts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants