-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reprojecting Puerto Rico in albersUsa projection doesn't show it in the map #19
Comments
Hi @armsp unfortunately Puerto Rico is not included in the output of the d3 projection that this library uses under the hood. Using the command you reference means you're using d3's implementation of albers even if you choose to view the output in geopandas, or qgis, or any other software. It looks like there has been work done to show Puerto Rico in a custom albers projection. It should be pretty straightforward for someone to add that projection to the ones available in this repo. |
@dereklieu I think I may have completely misunderstood d3/d3-geo#152 and #17 |
I saw this post and I've updated the patch so that it will work with the version of @d3. Now I am seeing Puerto Rico data! Here is the patched version of d3-geo.js
You can install this by doing something like Or if you'd like to use my docker container, feel free to use this |
@soichih are you aware if the approach you took with PR will also work with other US territories (e.g Guam, etc)? |
I have a peculiar issue -
I have a shapefile of States from the US Census website which has Puerto Rico. As usual, PR is not shown in albersUsa projection. Doing a web search showed me that I can reproject the file using dirty-reprojectors and make albersUsa projection show PR.
So I used the following command -
cat states.geojson | dirty-reproject --forward albersUsa > states_pr.geojson
However, when I read the
states_pr.geojson
file in geopandas, then I don't see Puerto Rico like before.I understand that I am not using d3, rather geopandas, but my understanding was that if PR is reprojected to albersUsa then even geopandas or any other charting library should be able to plot it, right?
The text was updated successfully, but these errors were encountered: