You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "MammadTavakoli (via GitHub)" <gi...@apache.org> on 2025/01/26 06:19:40 UTC
[I] country map for Iran [superset]
MammadTavakoli opened a new issue, #31989:
URL: https://github.com/apache/superset/issues/31989
I use [ISO 3166-2:IR](https://en.wikipedia.org/wiki/ISO_3166-2:IR) for creating ISO 3166-2 for Iran and create a country map, but it not correctly mapping code with province in map.
How can solve this problem?
Also is there a way to show the name of province name in other than the English?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-4035385601
If anyone can submit a PR updating the Iran geography in the Jupyter notebook and generating updated map data, that would be very welcome. Instructions for running the notebook are in the repository.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #31989: country map for Iran
URL: https://github.com/apache/superset/issues/31989
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-3073202219
You can definitely change this locally in your instance, but we'd love to see a PR if this is still an issue. There's a jupyter notebook that pulls data from naturalearth and overrides various things to output the geojson.
If you run the notebook and the geojson still seems goofy, you can add a cell to the notebook to correct things, and commit both the notebook and the geojson files in a PR, then everyone wins :)
This blog post explains some of it:
https://preset.io/blog/how-and-when-and-why-to-update-apache-supersets-country-maps/
Holler if I can help further on the topic.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2617226766
I just noticed you have two open issues for this. Can you close one of them in favor of the other? Of course, we'd love help with this if you feel like troubleshooting and opening a PR to resolve the situation.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-4748202218
This looks like the same Iran country-map GeoJSON mapping problem tracked in #31991, which has a more concrete reproduction. Let's consolidate the discussion there — closing this one, but please comment if you think it's distinct. PRs updating the map data via the Jupyter notebook workflow are very welcome.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "MammadTavakoli (via GitHub)" <gi...@apache.org>.
MammadTavakoli commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2778285123
the correct iso code is [here](https://en.wikipedia.org/wiki/ISO_3166-2:IR), but they are used other code for this that compactly different with what Wikipedia said.
The IR-07 in [iran GitHub GeoJSON Content](https://raw.githubusercontent.com/apache/superset/refs/heads/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/iran.geojson) used for Tehran and Alborz.
It is bather to replace one of the IR-07 code for Alborzwith IR-09 the problem solve.
`
{ "type": "Feature", "properties": { "ISO": "IR-07", "NAME_1": "Tehran" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 50.784735141613453, 35.218419093866089 ], [ 50.8712414886038, 35.4471906603207 ], [ 50.870828078353099, 35.517031358410463 ], [ 50.798687778717976, 35.604777939750079 ], [ 50.825095940725078, 35.654454591106457 ], [ 50.889640414373616, 35.686726828380415 ], [ 50.942082799381637, 35.739169213388493 ], [ 50.970321006209417, 35.799679657490174 ], [ 51.059069657138934, 35.803713687037032 ], [ 51.075205776225573, 35.916666515247471 ], [ 51.135716220327254, 35.97314292980235 ], [ 51.216396812163111, 35.997347107083328 ], [ 51.297077403998969, 35.989279047989669 ], [ 51.353553818553848, 36.017517255716768 ], [ 51.356896600397761, 36.116271267305137 ], [ 51.465003697062969, 36.064698188570503 ], [ 51.618275995141062, 36.054052843363991 ], [ 51.754391717004125, 36.010980536122815 ], [ 51.856504348396925, 35.921554469962814 ], [ 51.950245395908269, 35.799804796354
238 ], [ 52.029206984015048, 35.77091767021426 ], [ 52.108168573021203, 35.767171128744565 ], [ 52.177001580758315, 35.789960435925366 ], [ 52.306812778986512, 35.917394518242418 ], [ 52.398486768949226, 35.976202298397311 ], [ 52.625863072322886, 35.931347154447622 ], [ 52.740274692622961, 35.881014309162993 ], [ 52.816342400881069, 35.86825023046373 ], [ 52.901401807947025, 35.889695950507701 ], [ 52.944810011972436, 35.881556912421559 ], [ 53.0347270036483, 35.831094875927761 ], [ 53.066249628117816, 35.718905341008679 ], [ 53.079375441123659, 35.618136298551292 ], [ 53.047232699929111, 35.528374334707735 ], [ 52.888275994941182, 35.410190335415621 ], [ 52.674955682358814, 35.336189683806822 ], [ 52.594133742278359, 35.338721829348913 ], [ 52.21968631437187, 35.414221095926791 ], [ 51.982078077840981, 35.54431651499516 ], [ 51.922443475386046, 35.54684866053725 ], [ 51.870146926239613, 35.569818833971965 ], [ 51.853403762073924, 35.555452785717478 ], [ 51.821054315304366, 35.4034
20721988709 ], [ 51.822501255228701, 35.315260727700377 ], [ 51.980631137916646, 35.125246487135655 ], [ 51.968022087948953, 35.063725694285324 ], [ 51.916862420364396, 34.998587551174523 ], [ 51.882342564157966, 34.875494290429117 ], [ 51.31235151570985, 35.153952745222966 ], [ 51.072159457692806, 35.213251450893722 ], [ 50.784735141613453, 35.218419093866089 ] ] ] } },
{ "type": "Feature", "properties": { "ISO": "IR-07", "NAME_1": "Alborz" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 50.696471795436992, 35.550543525163562 ], [ 50.689753858853464, 35.639246120911707 ], [ 50.650996534762271, 35.676478989813518 ], [ 50.594772576992796, 35.677047431493747 ], [ 50.581956822349468, 35.650072333271567 ], [ 50.620714146440662, 35.60635407178296 ], [ 50.610378858697345, 35.574831448212763 ], [ 50.527696568441854, 35.62911754054204 ], [ 50.285540805663629, 35.666014513558935 ], [ 50.238618605064573, 35.741022853721688 ], [ 50.2302470229817, 35.771925361466231 ], [ 50.242752720161889, 35.81083771428905 ], [ 50.297736443581982, 35.853961697474347 ], [ 50.500204706282148, 35.934266872717956 ], [ 50.534517856913567, 35.960802721368452 ], [ 50.625881789413029, 36.164769599037754 ], [ 50.47188602092308, 36.239648748890602 ], [ 50.420829706126028, 36.296389472396186 ], [ 50.449665155422565, 36.331684474958536 ], [ 50.563146599735774, 36.3391775578979
83 ], [ 50.966222772263109, 36.292203681354806 ], [ 51.029888137027854, 36.27179149008515 ], [ 51.086008742009824, 36.222259630477538 ], [ 51.127970005211523, 36.20745433175199 ], [ 51.291991001283634, 36.178102118517927 ], [ 51.356896600397761, 36.116271267305137 ], [ 51.353553818553848, 36.017517255716768 ], [ 51.297077403998969, 35.989279047989669 ], [ 51.216396812163111, 35.997347107083328 ], [ 51.135716220327254, 35.97314292980235 ], [ 51.075205776225573, 35.916666515247471 ], [ 51.059069657138934, 35.803713687037032 ], [ 50.970321006209417, 35.799679657490174 ], [ 50.942082799381637, 35.739169213388493 ], [ 50.889640414373616, 35.686726828380415 ], [ 50.825095940725078, 35.654454591106457 ], [ 50.798687778717976, 35.604777939750079 ], [ 50.75269575410573, 35.601341458441539 ], [ 50.724893832684188, 35.555168564877363 ], [ 50.696471795436992, 35.550543525163562 ] ] ] } }
]
}
`
can i change the ISO in my superset installed in docker to show it correctly?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "MammadTavakoli (via GitHub)" <gi...@apache.org>.
MammadTavakoli commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2614262756
@dosuy tanks, as i see there is two IR-07 (for tehran and alborz) but thy are difrence.
also there is not IR-09 that one of then can replace with it
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2641082934
OK... not sure what the situation is then. Someone will have to dig into the current situation and see if it's from the upstream (Natural Earth) data or if there's something downstream (e.g. the Jupyter notebook) causing the questionable ISO codes. If you have time to investigate/fix, the help would be welcomed.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2614232702
<!-- Greeting -->
سلام @MammadTavakoli! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue!
<!-- Answer -->
To correctly map ISO 3166-2 codes with provinces on a country map for Iran, you can use the GeoJSON data provided in the Apache Superset repository. Each feature in the GeoJSON contains an "ISO" property that corresponds to the ISO 3166-2 code and a "NAME_1" property that represents the province name. You can use these properties to map the codes to the provinces on a map.
Here's a sample code snippet to extract and map the ISO codes to province names:
```python
import json
# Load the GeoJSON data
geojson_data = '''{
"type": "FeatureCollection",
"name": "iran",
"features": [
{ "type": "Feature", "properties": { "ISO": "IR-02", "NAME_1": "West Azarbaijan" }, "geometry": { "type": "Polygon", "coordinates": [] } },
{ "type": "Feature", "properties": { "ISO": "IR-01", "NAME_1": "East Azarbaijan" }, "geometry": { "type": "Polygon", "coordinates": [] } },
{ "type": "Feature", "properties": { "ISO": "IR-03", "NAME_1": "Ardebil" }, "geometry": { "type": "Polygon", "coordinates": [] } }
// ... other features
]
}'''
# Parse the GeoJSON data
data = json.loads(geojson_data)
# Create a mapping of ISO codes to province names
iso_to_province = {feature['properties']['ISO']: feature['properties']['NAME_1'] for feature in data['features']}
# Example usage
print(iso_to_province)
```
This code will output a dictionary mapping ISO codes to province names, which you can use to display the names on a map <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/iran.geojson)</sup>.
To display province names in languages other than English, you would need a translation of the province names. The GeoJSON data only provides the names in English, so you would need an additional data source that provides the translations. Once you have the translations, you can replace the "NAME_1" values with the translated names in your map visualization.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/3f054e9b-203c-4232-965e-04ccb01b35df?feedback_type=other)</sup>
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "MammadTavakoli (via GitHub)" <gi...@apache.org>.
MammadTavakoli commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2619304524
@rusackas thanks.
The don't use the standard iso code.
but in the data that used in superset there are duplicate code too
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "MammadTavakoli (via GitHub)" <gi...@apache.org>.
MammadTavakoli commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2614255508
If you're seeing HTML code instead of a rendered table or Markdown in GitHub, it likely means that the content is being misinterpreted. To ensure the correct rendering, use the following **Markdown-friendly version** of the table and content:
---
Thanks, @dosu, for pointing this out!
I checked the following resources:
- [[ISO 3166-2:IR](https://en.wikipedia.org/wiki/ISO_3166-2:IR)](https://en.wikipedia.org/wiki/ISO_3166-2:IR)
- [[GitHub GeoJSON Content](https://raw.githubusercontent.com/apache/superset/refs/heads/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/iran.geojson)](https://raw.githubusercontent.com/apache/superset/refs/heads/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/iran.geojson)
Below is the mapping between the two sources for Iran:
```markdown
| Code | Wiki Subdivision Name (ISO 3166-2) | ISO (GitHub Content) | Name in GitHub Content |
|--------|------------------------------------|-----------------------|----------------------------------|
| IR-01 | Gilan | IR-01 | East Azarbaijan |
| IR-02 | Mazandaran | IR-02 | West Azarbaijan |
| IR-03 | East Azerbaijan | IR-03 | Ardebil |
| IR-04 | West Azerbaijan | IR-04 | Esfahan |
| IR-05 | Kermanshah | IR-05 | Ilam |
| IR-06 | Khuzestan | IR-06 | Bushehr |
| IR-07 | Fars | IR-07 | Tehran |
| IR-07 | Fars | IR-07 | Alborz |
| IR-08 | Kerman | IR-08 | Chahar Mahall and Bakhtiari |
| IR-10 | Isfahan | IR-10 | Khuzestan |
| IR-11 | Sistan and Baluchestan | IR-11 | Zanjan |
| IR-12 | Kurdistan | IR-12 | Semnan |
| IR-13 | Hamadan | IR-13 | Sistan and Baluchestan |
| IR-14 | Chaharmahal and Bakhtiari | IR-14 | Fars |
| IR-15 | Lorestan | IR-15 | Kerman |
| IR-16 | Ilam | IR-16 | Kordestan |
| IR-17 | Kohgiluyeh and Boyer-Ahmad | IR-17 | Kermanshah |
| IR-18 | Bushehr | IR-18 | Kohgiluyeh and Buyer Ahmad |
| IR-19 | Zanjan | IR-19 | Gilan |
| IR-20 | Semnan | IR-20 | Lorestan |
| IR-21 | Yazd | IR-21 | Mazandaran |
| IR-22 | Hormozgan | IR-22 | Markazi |
| IR-23 | Tehran | IR-23 | Hormozgan |
| IR-24 | Ardabil | IR-24 | Hamadan |
| IR-25 | Qom | IR-25 | Yazd |
| IR-26 | Qazvin | IR-26 | Qom |
| IR-27 | Golestan | IR-27 | Golestan |
| IR-28 | North Khorasan | IR-28 | Qazvin |
| IR-29 | South Khorasan | IR-29 | South Khorasan |
| IR-30 | Alborz | IR-30 | Razavi Khorasan |
```
---
### Suggestions for Improvement:
1. **Add Documentation:** It would be helpful to create a structured document listing these mappings for each country. This would avoid confusion and serve as a single source of truth.
2. **Correct ISO or Wiki Data:** If the mappings differ between the ISO 3166-2 standard and the GeoJSON data, it’s crucial to either align them or ensure the Wiki data is updated for consistency.
Let me know if I can assist further! 😊
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] country map for Iran [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #31989:
URL: https://github.com/apache/superset/issues/31989#issuecomment-2614255596
<!-- Answer -->
Hey @MammadTavakoli! It looks like you're diving deep into some mapping and data alignment. While I can help with technical questions, bugs, and engineering knowledge, I'm not quite equipped to handle suggestions for documentation improvements or data corrections. If you think I should be able to help with this, feel free to reach out to the [Dosu Team](mailto:customersuccess@dosu.dev). They'll be happy to hear your thoughts! 😊
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/e0658216-9edc-46ed-acc9-8882d231c524?feedback_type=other)</sup>
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org