-
Notifications
You must be signed in to change notification settings - Fork 224
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
Update gpd lines gallery example #3711
base: main
Are you sure you want to change the base?
Conversation
Two thoughts:
|
Agree with both points. Regarding point 1 we just want to add it for the docs/gallery example and not as an general dependency, right? |
Yes. |
Regarding point 1, this would be also relevant / helpful for the Gallery example Choropleth map. |
Maybe we should add |
I'll open a PR in minites. |
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
/format |
Co-authored-by: Yvonne Fröhlich <[email protected]>
@@ -0,0 +1,39 @@ | |||
""" | |||
Plotting lines with LineString/MultiLineString geometry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it makes more sense to change the title to:
GeoPandas: Plotting lines with LineString/MultiLineString geometry
|
||
The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such | ||
as lines which are stored in a :class:`geopandas.GeoDataFrame` object. Use | ||
:func:`geopandas.read_file` to load data from any supported OGR format such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:func:`geopandas.read_file` to load data from any supported OGR format such as | |
:func:`geopandas.read_file` to load data from any supported OGR formats such as |
The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such | ||
as lines which are stored in a :class:`geopandas.GeoDataFrame` object. Use | ||
:func:`geopandas.read_file` to load data from any supported OGR format such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap these lines to 88 characters.
gdf = gpd.read_file(geodatasets.get_path("eea large_rivers")) | ||
|
||
# Convert object to EPSG 4326 coordinate system | ||
gdf = gdf.to_crs("EPSG:4326") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the content of the data before plotting.
gdf = gdf.to_crs("EPSG:4326") | |
gdf = gdf.to_crs("EPSG:4326") | |
print(gdf) |
Description of proposed changes
Fixes #3320
Preview: https://pygmt-dev--3711.org.readthedocs.build/en/3711/gallery/lines/linestrings.html#
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash command is:
/format
: automatically format and lint the code