question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Geopandas integration

See original GitHub issue

it would be great to have a geopandas integration. I can envision it working like this (tqdm-pandas style):

import mapboxgl as mbx
import geopandas as gp
mbx.mapboxgl()  # initialisation - checking serial number and adding function to geodataFrame

gdf = gp.read_file('points.geojson')
gdf.mbx_plot(figsize=(18,10), column='Avg Medicare Payments', cmap='...')

it would be awesome ( in my opinion ) to mimic matplotlib-esque interface in this case as much as it is possible - all the way to

ax = gdf.mbx_plot(figsize=(18,10)
gdf2.mbx_plot(ax=ax)  # second layer

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Casyfillcommented, Mar 30, 2018

sure, it can work, just looks ugly 😃

https://mailtrack.io/ Sent with Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&

On Fri, Mar 30, 2018 at 3:50 PM anmolgarg notifications@github.com wrote:

This works well for me.

import json import geopandas

if isinstance(data, geopandas.geodataframe.GeoDataFrame): data = json.loads(data.to_json())

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mapbox/mapboxgl-jupyter/issues/66#issuecomment-377607459, or mute the thread https://github.com/notifications/unsubscribe-auth/ACjTpS1AfaodmCwj6dTM6NzC749UDyZAks5tjoycgaJpZM4Slzxs .

0reactions
anmolgargcommented, Mar 30, 2018

This works well for me.

import json
import geopandas

if isinstance(data, geopandas.geodataframe.GeoDataFrame):
    data = json.loads(data.to_json())
Read more comments on GitHub >

github_iconTop Results From Across the Web

Geopandas Integration — pydeck 0.8.0b4 documentation
Built with Sphinx using a theme provided by Read the Docs. Read the Docs v: latest. Versions: latest.
Read more >
Integrating with GeoPandas | VerticaPy
123. pop_est. Int Abc. continent. Varchar(32) Abc. country. Varchar(82) 1 140 Seven seas (open ocean) Fr. S. Antarctic Lands 2 2931 South America Falkland Is. 3...
Read more >
Introduction to GeoPandas
This quick tutorial introduces the key concepts and basic features of GeoPandas to help you get started with your projects.
Read more >
Integration with geopandas to plot shapely geometries #608
Description of the desired feature Geopandas is somewhat of a defacto geographic data structure in Python nowadays, and is used to hold ...
Read more >
Geopandas Hands-on: Introduction to Geospatial Machine ...
Geopandas is also built on top of shapely for its geometric operation; ... All Data Integrations Should Use Change Data Capture.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found