ktmud opened a new pull request #14063:
URL: https://github.com/apache/superset/pull/14063


   ### SUMMARY
   
   [Update the GeoJSON of country 
maps](https://github.com/apache-superset/superset-ui/pull/1045) with the latest 
[Natural Earth data](https://www.naturalearthdata.com/downloads/) ([public 
domain usage](https://www.naturalearthdata.com/about/terms-of-use/)) and fix a 
bunch of usability issues with this viz type.
   
   How the GeoJSON files was generated can be found 
[here](https://github.com/apache-superset/superset-ui/blob/eaf332bb7d28484de1609ac72466148c5c9c3c4c/plugins/legacy-plugin-chart-country-map/scripts/Country%20Map%20GeoJSON%20Generator.ipynb).
   
   This should fix https://github.com/apache/superset/issues/4568 (dup 
https://github.com/apache/superset/issues/11666),  provide a better solution 
for https://github.com/apache/superset/issues/12987 and supersedes 
https://github.com/apache-superset/superset-ui/pull/955 .
   
   Also updated the controls of the Country Map viz to move the required field 
"Country" out of "Chart Options" and converted all select option values to 
lowercase (for simplicity and consistency).
   
   Includes a light weight db migration that runs on all Country Map 
visualizations. It should be very fast as this is not a very popular 
visualization type.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   #### Before
   
   <img width="1353" alt="UK map - before" 
src="https://user-images.githubusercontent.com/335541/114250436-8e60ab00-9952-11eb-90bf-a4e306f7bbc3.png";>
   
   #### After
   
   <img width="1340" alt="UK map - after" 
src="https://user-images.githubusercontent.com/335541/114250442-93255f00-9952-11eb-9fbe-da99c449eab7.png";>
   
   
   ### TEST PLAN
   
   Tested locally with following virtual dataset:
   
   ```
   SELECT 'CN-11' as iso_code, 1 as metric
   UNION
   SELECT 'CN-12', 22
   UNION
   SELECT 'CN-30', 24
   UNION
   SELECT 'CN-14', 189
   UNION
   SELECT 'US-CA', 999
   UNION
   SELECT 'US-HI', 1930
   UNION
   SELECT 'US-TX', 1000
   UNION
   SELECT 'GB-BKM', 2910
   UNION
   SELECT 'GB-GLS', 2810
   UNION
   SELECT 'GB-NYK', 2018
   ```
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [x] Changes UI
   - [x] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [x] Migration is atomic, supports rollback & is backwards-compatible
     - [x] Confirm DB migration upgrade and downgrade tested
     - [x] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to