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

Please add middle east countries #20

Open
reza1615 opened this issue Apr 5, 2020 · 3 comments
Open

Please add middle east countries #20

reza1615 opened this issue Apr 5, 2020 · 3 comments

Comments

@reza1615
Copy link

reza1615 commented Apr 5, 2020

Please add middle east countries to the dist

@etpinard
Copy link
Owner

etpinard commented Apr 5, 2020

Hi, I think you're looking for a middle-east scope.

If you can find generally-accepted longitude and latitude bounds (with a credible source, ideally) for the middle-east, adding this new scope would be as easy as adding an item in the scope array:

"scopes": [
{
"name": "world",
"specs": false
},
{
"name": "usa",
"specs": {
"src": "admin_0_countries",
"key": "ISO_A3",
"val": "USA",
"bounds": [-180, 0, -50, 85]
}
},
{
"name": "europe",
"specs": {
"src": "admin_0_countries",
"key": "CONTINENT",
"val": "Europe",
"bounds": [-30, 0, 60, 90]
}
},
{
"name": "asia",
"specs": {
"src": "admin_0_countries",
"key": "CONTINENT",
"val": "Asia",
"bounds": [15, -90, 180, 85]
}
},
{
"name": "africa",
"specs": {
"src": "admin_0_countries",
"key": "CONTINENT",
"val": "Africa",
"bounds": [-30, -50, 60, 50]
}
},
{
"name": "north-america",
"specs": {
"src": "admin_0_countries",
"key": "CONTINENT",
"val": "North America",
"bounds": [-180, 0, -45, 85]
}
},
{
"name": "south-america",
"specs": {
"src": "admin_0_countries",
"key": "CONTINENT",
"val": "South America",
"bounds": [-100, -70, -30, 25]
}
}
],

cc #10 - which attempted to do the same for Oceania,

@csazevedo
Copy link

Hi @etpinard . I'm also interested in having middle east and others such as APAC & OC bundled up. I would like to contribute but I don't understand what is the pre-requisite to make this move forward. Wouldn't it be enough to provide a list of countries and use the polygons we have for the scope 'world'?

I don't understand how creating an entry in config.json would be enough. How are bounds calculated?

@etpinard
Copy link
Owner

etpinard commented Aug 8, 2022

Hi @csazevedo - thanks for posting!

Are you using sane-topojson by itself? Or are you looking for a new scope for maps in plotly.js? If the latter, we should first ask the plotly.js maintainer @archmoj if this fits in plotly.js' priorities. If not, we can add a scope here in sane-topojson and make a major version bump.

I don't understand how creating an entry in config.json would be enough. How are bounds calculated?

Unfortunately the sane-topojson build pipeline doesn't currently support topojson creation from a list countries. We use longitude / latitude bounds to define each scope and then filter out countries that fall outside these bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants