Help st.map please!

Can anyone please help me to add maps created from geojson to my app?? The result is fine in python but show errors in streamlit … Any advice would be nice
image

couche = gpd.read_file(“C:/Users/Amira/chambre/carte.geojson”)
fig44=couche.plot(column = ‘ZONE_2022’ ,cmap = ‘cool’, legend = True, figsize = (5,5))
plt.title(“zones climatiques 2022”)
st.pyplot(fig44)

CRSError: Invalid projection: epsg:4326: (Internal Proj Error: proj_create: SQLite error on SELECT name, type, coordinate_system_auth_name, coordinate_system_code, datum_auth_name, datum_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM geodetic_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)

I don’t quite understand what you are trying to say, streamlit runs in python… :thinking:

I suspect that is a problem with the pyproj library, which geopandas relies on as far as I know.
I would first try to update geopandas to the latest version.

Can you provide a link to your public github repo?

Thanks for your reply,
I was trying to say that i can simply see the maps in spyder but get an error when runing the app.
Currently using 0.10.2 gpd can this version be causing an issue?
I’m a new streamlit user so maybe i’m missing something in the code also …

Ok, so you are just watching the geojson file itself in spyder?

Maybe. You could try to upgrade to the latest version 0.11.0 of geopandas. But no guarantee.

  • Where does your code exactly crashes? At gpd.read_file(...) or somewhere else?
  • Where do you run streamlit? Which OS? Python Version?
  • Can you share a link to your public github repo? Otherwise without seeing the code, it is a lot of guessing… :neutral_face:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.