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

Bake in county outlines #447

Closed
jrleeman opened this issue Jun 6, 2017 · 12 comments
Closed

Bake in county outlines #447

jrleeman opened this issue Jun 6, 2017 · 12 comments
Assignees
Labels
Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality
Milestone

Comments

@jrleeman
Copy link
Contributor

jrleeman commented Jun 6, 2017

Cartopy doesn't have state outlines - adding them is too difficult. We should bake this in somewhere.

@ktyle
Copy link

ktyle commented Jun 6, 2017

I would also advocate baking in US County outlines. I don't see them in NaturalEarth.

@dopplershift
Copy link
Member

We'll see about getting states in CartoPy first SciTools/cartopy#888

One of the challenges is finding a properly licensed and reliable counties dataset.

@dopplershift dopplershift added Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality labels Jun 6, 2017
@dopplershift
Copy link
Member

Ok so SciTools/cartopy#888 is merged, so we'll have states in the next release of CartoPy.

Now...counties.

@jrleeman jrleeman changed the title Bake in state outlines Bake in county outlines Jul 7, 2017
@kgoebber
Copy link
Collaborator

I've started work on generating a counties shapefile with the scale of 50m based on the Natural Earth 50m states, provinces, and lakes shapefile. It'll take some time, but I've got a process that I think will slowly, but surely get us there. The original county shapefile is from U.S. Census Bureau, should be okay licence-wise.

@kgoebber
Copy link
Collaborator

kgoebber commented Jul 19, 2017

Okay...so the method I have to do this would take a long LONG time to complete. The primary difficulty lies in the county polygons from the U.S. Census Bureau are available at 500K, 5M, and 20M resolutions (none of which align with the Natural Earth data [10M, 50M, 100M]. So what I have done (with the help of one of my geography colleagues) is to create new state boundaries based on the county boundaries using QGIS and the Dissolve method. I now have coordinated county and state lines for 500K, 5M, and 20M resolutions. Having these shapefiles as a part of MetPy might be the best short (maybe even) long term solution to this problem.

I should add that it is not "clean" to get these shapefiles in with Cartopy, but it can be done. Maybe we bake in a simpler format for getting these files read in and able to be used in making a map.

http://nbviewer.jupyter.org/url/fujita.valpo.edu/python/counties_test.ipynb

@jrleeman
Copy link
Contributor Author

What's the size of the shapefiles?

@kgoebber
Copy link
Collaborator

The 500K county file is 16.8mb, state outlines 4.7mb.

The 5M county file is 3.6mb, state outlines 1.4mb.

The 20M county file is 1.1mb, state outlines 225kb.

@kgoebber
Copy link
Collaborator

The 500K file loads pretty slow, but the 5M and 20M are pretty quick.

@jrleeman
Copy link
Contributor Author

I'm thinking these need to get pulled from a remote and cached. Too much to put in the individual releases. This would be similar to what Cartopy does with the natural earth datasets. Question is does it go upstream or here?

@kgoebber
Copy link
Collaborator

Shapefiles are now available at http://fujita.valpo.edu/python

@dopplershift dopplershift added this to the Spring 2018 milestone Nov 15, 2017
@jrleeman jrleeman self-assigned this Feb 21, 2018
@jrleeman jrleeman modified the milestones: 0.8, 0.9 May 4, 2018
@jrleeman
Copy link
Contributor Author

@kgoebber - do you have the associated DBF files to go with these? Otherwise, can't plot.

@kgoebber
Copy link
Collaborator

kgoebber commented Aug 21, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants