-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
USA-states incorrectly drawn as foreign regions in high resolution choropleth #3779
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
Comments
Thanks for reporting. |
Ha, that's a shame
has duplicate ids in it: Looks like we'll have to patch: https://github.com/etpinard/sane-topojson That said, I wonder if some users out there are using |
I'd do it if it was predictable. :D |
Do what exactly? You mean you would use |
Yeah, I meant I would plot non-USA regions on a world map if I could specify both country and region code. |
This is important as the Natural Earth files nclude state/provinces from USA, Canada, Australia and Brazil which have some overlay in their two-letter ids. For example, 'WA' is used for both Washington state and Western Australia. As subunits from USA and Canada never conflict, filtering out features south of the equator suffices to fix #3779 A better fix would have us add a "governing unit" properties in subunit features in the `sane-topojson` package to avoid conflicts.
I’ve been working on a choropleth (through plotly.py originally) and things had been going fine at 110 resolution, but I decided to switch to 50 and things got weird. The problem I’m seeing is that I’m providing a list of ‘USA-states’ and it’s deciding to map some of them to similarly named world states, e.g. WA (Washington) is mapped on Western Australia and PA (Pennsylvania) is mapped on Pará, Brazil. This problem does not occur at all at the lower 110 resolution where WA is correctly mapped to the USA state as requested.
I’d actually like to take advantage of this hidden feature for other projects but I can only get it to happen through this glitch, not through choice. I’ve tried various other formats like "WA, AUS" or "AUS-WA" and both "USA-states" and "countries" formats. The only thing that causes Western Australia to be drawn is putting “WA” and “USA-states” and resolution=50.
https://jsfiddle.net/Thlayli/3jza9sov/
or
https://plot.ly/~thlayli/22/number-of-artists-by-country-or-region/#/ 1
The text was updated successfully, but these errors were encountered: