Plotting F1 Circuit Locations into a map on Streamlit Cloud using Folium

Hi I am trying to plot F1 Circuit Locations into a map on Streamlit using Folium. I have it working on a local installation of Streamlit. The challenge comes when I move things to Streamlit Cloud. Instead of the map on the local installation, it shows a black bar?

I have the code and the requirements.txt on GitHub.

Any suggestions?

Daan

Hi all,

Any suggestions on the above?

Thanks.

Daan

@StreamlitTeam I posted a question last month but there was no answer. What can I do to get this one answered?

Read the guidelines on posting questions, in particular this bit:

  1. Include a minimal, reproducible code example in your question. In other words, include just enough code (not the whole app :wink:) to enable others to reproduce the problem. Check out StackOverflow’s guide to creating a minimal, complete, and verifiable example. Ensure that your example works by running it yourself before posting.

If you are getting the right data from snowflake, you should be able to reproduce the problem without a snowflake connection, using hardcoded data or a data file that you can share. I tried to reproduce your issue when you posted it for the first time but the snowflake connection was a showstopper because I couldn’t get the data.

If the data coming from snowflake is not what you expect, then probably you don’t even need a streamlit application to reproduce it and you would have better chances in a snowflake-specific site.

1 Like

Thanks for you answer @Goyo and sorry for the late reply.

I created a different app based on a .csv file here; https://daanalytics-snowf-pythonstreamlitscl-csvf1foliumcircuits-seoimu.streamlit.app

Still I cannot get it to work. I am able to load the data from the .csv because the dropdowns in the sidebar are based on this .csv.

I am not sure whether this is a minimal, complete, and verifiable example. I got it to work on Streamlit Cloud, although the map doesn’t load.

Any thoughts?

Hi @daanalytics, can you try upgrading the version of streamlit-folium you are using to the latest release? You’ll need to change it in requirements.txt and upload that new version to the cloud to see it reflected there. If it still doesn’t work, could you post an issue on the streamlit folium github issues and I’ll take a look at it?

1 Like

Thanks for the support @blackary. Changing the streamlit-folium to the latest version did the trick.

1 Like

Can you provide a legend regarding existing circuit points by color to make it easier for users?