Add Japan country map (#6368)

* Add Japan country map

* Fix obsolete paths in the document about adding new country map
This commit is contained in:
Kengo Seki 2018-11-14 18:46:57 -08:00 committed by Grace Guo
parent d6953210b8
commit e66b0469b4
3 changed files with 156 additions and 3 deletions

View File

@ -711,6 +711,108 @@ List of Countries
|IT-VI |Vicenza | |IT-VI |Vicenza |
+------+------------------------------------+ +------+------------------------------------+
* Japan
+-------+----------------+
| ISO | Name of region |
+=======+================+
| JP-01 | Hokkaido |
+-------+----------------+
| JP-02 | Aomori |
+-------+----------------+
| JP-03 | Iwate |
+-------+----------------+
| JP-04 | Miyagi |
+-------+----------------+
| JP-05 | Akita |
+-------+----------------+
| JP-06 | Yamagata |
+-------+----------------+
| JP-07 | Fukushima |
+-------+----------------+
| JP-08 | Ibaraki |
+-------+----------------+
| JP-09 | Tochigi |
+-------+----------------+
| JP-10 | Gunma |
+-------+----------------+
| JP-11 | Saitama |
+-------+----------------+
| JP-12 | Chiba |
+-------+----------------+
| JP-13 | Tokyo |
+-------+----------------+
| JP-14 | Kanagawa |
+-------+----------------+
| JP-15 | Niigata |
+-------+----------------+
| JP-16 | Toyama |
+-------+----------------+
| JP-17 | Ishikawa |
+-------+----------------+
| JP-18 | Fukui |
+-------+----------------+
| JP-19 | Yamanashi |
+-------+----------------+
| JP-20 | Nagano |
+-------+----------------+
| JP-21 | Gifu |
+-------+----------------+
| JP-22 | Shizuoka |
+-------+----------------+
| JP-23 | Aichi |
+-------+----------------+
| JP-24 | Mie |
+-------+----------------+
| JP-25 | Shiga |
+-------+----------------+
| JP-26 | Kyoto |
+-------+----------------+
| JP-27 | Osaka |
+-------+----------------+
| JP-28 | Hyogo |
+-------+----------------+
| JP-29 | Nara |
+-------+----------------+
| JP-30 | Wakayama |
+-------+----------------+
| JP-31 | Tottori |
+-------+----------------+
| JP-32 | Shimane |
+-------+----------------+
| JP-33 | Okayama |
+-------+----------------+
| JP-34 | Hiroshima |
+-------+----------------+
| JP-35 | Yamaguchi |
+-------+----------------+
| JP-36 | Tokushima |
+-------+----------------+
| JP-37 | Kagawa |
+-------+----------------+
| JP-38 | Ehime |
+-------+----------------+
| JP-39 | Kochi |
+-------+----------------+
| JP-40 | Fukuoka |
+-------+----------------+
| JP-41 | Saga |
+-------+----------------+
| JP-42 | Nagasaki |
+-------+----------------+
| JP-43 | Kumamoto |
+-------+----------------+
| JP-44 | Oita |
+-------+----------------+
| JP-45 | Miyazaki |
+-------+----------------+
| JP-46 | Kagoshima |
+-------+----------------+
| JP-47 | Okinawa |
+-------+----------------+
* Morocco * Morocco
+-------+------------------------------+ +-------+------------------------------+
@ -1726,11 +1828,11 @@ To add a new country in country map tools, we need to follow the following steps
3. You need to convert shapefile to geojson file. 3. You need to convert shapefile to geojson file.
This action can make with ogr2ogr tools: http://www.gdal.org/ogr2ogr.html This action can make with ogr2ogr tools: http://www.gdal.org/ogr2ogr.html
4. Put your geojson file in next folder : superset/assets/visualizations/countries with the next name : nameofyourcountries.geojson 4. Put your geojson file in next folder : superset/assets/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
5. You can to reduce size of geojson file on this site: http://mapshaper.org/ 5. You can to reduce size of geojson file on this site: http://mapshaper.org/
6. Go in file superset/assets/javascripts/explorev2/stores/controls.jsx 6. Go in file superset/assets/src/explore/controls.jsx
7. Add your country in component 'select_country' 7. Add your country in component 'select_country'
Example : Example :
@ -1749,6 +1851,7 @@ To add a new country in country map tools, we need to follow the following steps
'France', 'France',
'Germany', 'Germany',
'Italy', 'Italy',
'Japan',
'Morocco', 'Morocco',
'Netherlands', 'Netherlands',
'Russia', 'Russia',

View File

@ -521,10 +521,11 @@ export const controls = {
'Germany', 'Germany',
'India', 'India',
'Italy', 'Italy',
'Portugal', 'Japan',
'Morocco', 'Morocco',
'Myanmar', 'Myanmar',
'Netherlands', 'Netherlands',
'Portugal',
'Russia', 'Russia',
'Singapore', 'Singapore',
'Spain', 'Spain',

File diff suppressed because one or more lines are too long