Daanalytics

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

In my last blogpost I showed how to plot F1 Circuit Locations into a map using Folium on Streamlit. The idea is to switch between the World, a possible Continent and a possible Country. Check the video below.

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

Streamlit Cloud

Next step would be setting things up in Streamlit Cloud. At time of writing my previous blogpost I ran into issues, which I was able to solve with the help of some experts on the forum.

Following the steps from the Streamlit documentation makes setting things up relatively straightforward.

Get started

First we have to create an account (or login to an existing account). Get started or log in. I connected my Github-account with Streamlit Cloud. This way I can upload my apps to Github. Changes to an app in Github are automatically reflected in Streamlit Cloud.

Deploy an app

Deploying an app is almost as easy as pointing to the right code on Github.

The connection to Snowflake from Streamlit Cloud are a little bit different. The connection details are in the Streamlit Cloud ‘Advanced settings’.

I slightly changed the code compared to my last blogpost. In the Python code the connection details are called as followed:

Special attention to the requirements.txt-file. Make sure you have the right (and in my case the latest) versions of the libraries you use in your code. I had a problem with my first version of the app because of a wrong version of the streamlit-folium library. Thanks to the experts on the forum. I was able to solve the problem and make the app work in the Streamlit Cloud.

Closing Statements

In the previous example(s) I provided the steps to plot F1 Circuit Locations into a map using Folium; a Python library used for visualizing Geospatial Data.

In the first example it was a very static version where I plotted the F1 Circuit Locations either for the World, Europe or France. These options were hardcoded in the notebook and showed after each other.

In the second example I added some interactivity with Streamlit. The idea was to switch between the World, a possible Continent and a possible Country based on selected radio buttons in the sidebar.

The third example shows the same setup but then from the Streamlit Cloud. The code is on GitHub.

Till next time.

Daan Bakboord – DaAnalytics

Bekijk ook:

Snowflake Data Cloud Summit - Wrap Up

Snowflake Snowflake Data Cloud Summit — Wrap Up

Snowflake Data Cloud Summit proved that after all this years the core idea remains the same and is still strong. Technology should serve and Snowflake makes things simple. One Single Unified Platform, one product and one engine. Ease of use and Govenance. Maximum efficiency and maximum simplicity.

Bring the processing of data to the data instead of the other way around. Snowflake as a Platform where you build and share your Data, Apps and AI Products. Your data never has to leave the Platform and Snowflake takes care of this Platform.

Lees verder »
Snowflake Data Cloud Summit - Day II

Snowflake Data Cloud Summit – Day II

The second day of Snowflake Summit in the Moscone Center in San Francisco started with Platform Keynote packed with announcements and demo’s. The announcements were not necessarily completely new, but a continuation of things Snowflake was already working on. Lot’s of Developments and Previews have made it to GA status and are now Generally Available to the public. A few announcements were made as wel.

This blogpost a summarization of my notes with were possible a link to Snowflake publications or documentation.

Lees verder »
Snowflake Data Cloud Summit - Day I

Snowflake Data Cloud Summit – Day I

The first day of Snowflake Summit in the Moscone Center in San Francisco was a day with the first two announcements made during the Opening Keynote. These two announcements built upon the theme for this years Summit; “The Era of Enterprise AI”

Lees verder »