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

Unable to load GeoArrow into kepler when using "use_arrow=True" #2605

Open
teawithoney opened this issue Aug 8, 2024 · 0 comments
Open

Unable to load GeoArrow into kepler when using "use_arrow=True" #2605

teawithoney opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
jupyter keplergl for Jupyter

Comments

@teawithoney
Copy link

I'm using Kepler.gl Python 3.10 package version: 0.3.4a3.

getting error when adding data of geoarrow type. "ValueError: Invalid file path or buffer object type: <class 'pyarrow.lib.Table'>"

To Reproduce
Steps to reproduce the behavior:

  1. load kepler
  2. Add data
  3. code "import geoarrow.pyarrow as ga
    import pyarrow as pa

geo_array = ga.as_geoarrow(["POINT (-83.026753 42.513481)"])

id_array = pa.array([1], type=pa.int64())

table = pa.Table.from_arrays([id_array, geo_array], ['id', 'geometry'])

from keplergl import KeplerGl

map2 = KeplerGl(height=800, width=600)

map2.add_data(data=table, name="test", use_arrow=True)

map2"

Expected behavior

Screenshots
ValueError: Invalid file path or buffer object type: <class 'pyarrow.lib.Table'>
.. python3.10/site-packages/keplergl/keplergl.py:221, in KeplerGl.add_data(self, data, name, use_arrow)
220 try:
--> 221 gdf = geopandas.read_file(data, driver='GeoJSON')
222 copy.update({name: gdf})

Environment (please complete the following information):

  • Python version: python3]
  • keplergl Widget version : 0.3.4a3

Additional context
Any example avaialable for loading GeoArrow points and linestring available that we can follow?
Thank you

@teawithoney teawithoney added the jupyter keplergl for Jupyter label Aug 8, 2024
@lixun910 lixun910 self-assigned this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jupyter keplergl for Jupyter
Projects
None yet
Development

No branches or pull requests

3 participants