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

Keplergl problem in Streamlit #1

Closed
mcharles96 opened this issue Jul 28, 2021 · 4 comments
Closed

Keplergl problem in Streamlit #1

mcharles96 opened this issue Jul 28, 2021 · 4 comments

Comments

@mcharles96
Copy link

I can't deploy keplergl map in Streamlit when I use geopandas and movingpandas in my dataframe. When I only use original dataframe, with latitude and longitude data, works well, but when I use these libraries to analysis stop points and trajectories, I get an error.

Obs.: I used Jupyter to test and visualize the map, but the app is .py file made in VS Code.

20210727_225154

@chrieke
Copy link
Owner

chrieke commented Aug 2, 2021

Hey @mcharles96 thanks for opening this issue! Looking through the additional screenshots you sent me on Twitter, I'm not sure if this in issue of this streamlit-keplergl component, but rather an issue of movingpandas + keplergl working together. Were you successful in running your example in the Jupyter notebook environment?
If not, I think it would be better to ask for help in the movingpandas or keplergl communities. Maybe this article also helps to clarify the behaviour.

@chrieke
Copy link
Owner

chrieke commented Aug 9, 2021

@mcharles96 Were you able to solve the problem? Closing, please feel free to reopen if new info.

@chrieke chrieke closed this as completed Aug 9, 2021
@bhupinders
Copy link

Hi @chrieke Thanks for the package. I am also getting the same error.

The following renders without any issues.
map_1 = KeplerGl(height=400)

But on adding any data, it fails.
map_1 = KeplerGl(height=600, data={ "gps": data })

Where data is a pandas dataframe with lat/lon columns. the map_1 loads in jupyter without using streamlit.

The main error is:
AttributeError: 'str' object has no attribute '_geom'

Which leads to:
TypeError: fig argument has to be a keplergl map object of type keplergl.KeplerGl!

Any idea what might be going on here? (It doesn't work on first loading of the page also and not just reloading)

Thanks!

@bhupinders
Copy link

Somehow it works If I save the data to disk and read again. Maybe modified dataframes are not working due to some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants