Plotly Express lines on maps
See original GitHub issueToday, px.line_mapbox
and px.line_geo
expect rows which are points, which are then split into groups and connected by lines.
In most GIS formats, however, as wrapped by GeoPandas, the entire line feature is often stored in a single row, just like choropleth geometries. We should have either a new pair of PX functions for this (px.line_feature_mapbox
?) or an option to the existing functions (px.line_mapbox(geojson=<geojson>)
) to support this option out of the box.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Lines on maps in Python - Plotly
Below we show how to create geographical line plots using either Plotly Express with px.line_geo function or the lower-level go.Scattergeo object.
Read more >Plot Points and Lines on Map with Plotly + Mapbox - Medium
W hen you make map by yourself, we can easily imagine that the data points and lines are needed to understand where the...
Read more >Interactive map using Geographical Information in Plotly Express
Interactive map using Geographical Information in Plotly Express. Visualizations are very powerful tools for any data science project.
Read more >Creating Geographic Maps with plotly express - YouTube
Hello there! We will learn about creating Geographic or Choropleth Maps with plotly express. Choropleth means 'area' or 'region' in Greek.
Read more >How to draw a line on Map in Python with Plotly - YouTube
How to draw a line on Mapbox maps using Scattermapbox traces and sets the mode attribute to a combination of markers and line....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just wanted to give this a bump!
Out-of-the-box support for shapely/GeoPandas
LineStrings
would be fantastic. I’m aware you’ve added some support for ShapelyPoints
andPolygons
. The GeoPandas support example given in Lines on Maps is useful but it doesn’t really exploit the strengths of pandas, as it involves unpacking the dataframe using a loop.Thanks for all the work so far though! 🙂
This will be a game changing enhancement since it will make plotly a viable alternative for representing geospatial data instead of GIS software. In addition I would like to suggest the following: People working with geospatial data are very used to be able to control the width, apart form the color of the line. I suppose this can be achieved already by iterating over each line and adjusting its width. However, straightforwardly providing this capability in px would be very useful. Cheers