You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add gallery example for plotting geopandas.GeoDataFrame objects #1374
It would be great to have some gallery examples on how users can plot geopandas.GeoDataFrame objects in PyGMT. This will be a follow up to #1000. You will need to have some familiarity with geopandas and/or PyGMT, but if you're still keen to learn, let us know and we'll guide you along!
Note that if you are interested in writing a full tutorial for geopandas inputs, see #1268.
I played a little bit around with a dataset containing the road net of the US in shapefile format (TIGER/Line shapefiles).
However, since the dataset is huge for the whole US I selected a subset containing only the road net of Hawai'i which is only around 2.5 MB (I made a zoom on O'ahu).
I think this would be enough to generate a nice example which shows how we could use shapefile data loaded via geopandas in PyGMT. My only question is: how and where do we want to store data for generating the geopandas examples?
Thanks @weiji14. I recognized that's it's possible to load the zipped shapefile data directly from the url, however, I thought the loading procedure takes too long.
I added a PR addressing lines data in a geopandas.GeoDataFrame (#1474). Would suggest that this PR can serve as a starting point for new users which may add further examples using point and polygon data.
@GenericMappingTools/pygmt-maintainers I feel a choropleth map, like in the EGU 2021 Short Course, would be a further nice gallery example showing how to plot geopnadas-GeoDataFrame objects, in this case how to plot polygons.
@GenericMappingTools/pygmt-maintainers I feel a choropleth map, like in the EGU 2021 Short Course, would be a further nice gallery example showing how to plot geopnadas-GeoDataFrame objects, in this case how to plot polygons.
I agree. It's likely that @michaelgrund is working on a similar example in which he had the issue #2497.
@GenericMappingTools/pygmt-maintainers I feel a choropleth map, like in the EGU 2021 Short Course, would be a further nice gallery example showing how to plot geopnadas-GeoDataFrame objects, in this case how to plot polygons.
I agree. It's likely that @michaelgrund is working on a similar example in which he had the issue #2497.
Exactly, the issue came up while working on a gallery example which shows the usage of polygons. Will push the early stages in the next few days 😉
@GenericMappingTools/pygmt-maintainers I feel a choropleth map, like in the EGU 2021 Short Course, would be a further nice gallery example showing how to plot geopnadas-GeoDataFrame objects, in this case how to plot polygons.
I agree. It's likely that @michaelgrund is working on a similar example in which he had the issue #2497.
Exactly, the issue came up while working on a gallery example which shows the usage of polygons. Will push the early stages in the next few days wink
No worries 🙂. I did not work on a specific gallery example so far. But I saw that we do not have a choropleth map in the gallery (only in the Short Course, which is probably not so easy to find), when thinking about potential figures for the PyGMT paper. So @michaelgrund go ahead and submit a PR with your ideas 🚀.
Activity
maxrjones commentedon Jul 17, 2021
Assigning this issue to @Location-Artistry who's requested to work on this issue for the SciPy2021 sprint 😄
michaelgrund commentedon Aug 29, 2021
I played a little bit around with a dataset containing the road net of the US in shapefile format (TIGER/Line shapefiles).
However, since the dataset is huge for the whole US I selected a subset containing only the road net of Hawai'i which is only around 2.5 MB (I made a zoom on O'ahu).
I think this would be enough to generate a nice example which shows how we could use shapefile data loaded via geopandas in PyGMT. My only question is: how and where do we want to store data for generating the geopandas examples?
weiji14 commentedon Aug 30, 2021
We don't need to store it, it's possible to load the zipped shapefile data directly from the https url!
produces:
Alternatively, we can use the built-in datasets in geopandas using
gpd.datasets.get_path. See https://geopandas.org/gallery/polygon_plotting_with_folium.html for an example:michaelgrund commentedon Aug 30, 2021
Thanks @weiji14. I recognized that's it's possible to load the zipped shapefile data directly from the url, however, I thought the loading procedure takes too long.
I added a PR addressing lines data in a geopandas.GeoDataFrame (#1474). Would suggest that this PR can serve as a starting point for new users which may add further examples using point and polygon data.
yvonnefroehlich commentedon Apr 18, 2023
@GenericMappingTools/pygmt-maintainers I feel a choropleth map, like in the EGU 2021 Short Course, would be a further nice gallery example showing how to plot geopnadas-GeoDataFrame objects, in this case how to plot polygons.
seisman commentedon Apr 18, 2023
I agree. It's likely that @michaelgrund is working on a similar example in which he had the issue #2497.
michaelgrund commentedon Apr 18, 2023
Exactly, the issue came up while working on a gallery example which shows the usage of polygons. Will push the early stages in the next few days 😉
yvonnefroehlich commentedon Apr 18, 2023
No worries 🙂. I did not work on a specific gallery example so far. But I saw that we do not have a choropleth map in the gallery (only in the Short Course, which is probably not so easy to find), when thinking about potential figures for the PyGMT paper. So @michaelgrund go ahead and submit a PR with your ideas 🚀.