This is the repo for Next Stop: Insights! How Streamlit and Snowflake Power Up Deutsche Bahn Data Adventures.
In this blog post, we're getting hands-on. We're building a data app using Streamlit directly from Snowflake on a dataset of the Deutsche Bahn. So, hold onto your seats โ it's time to explore the world of data apps with Deutsche Bahn.
- Data
- The
./data/preprocessed_wifi_data.csv
file contains sample data related to Wifi usage on Deutsche Bahn trains. It includes information on averaged data rate consumption per logged-in device for different routes.
- The
- Script
- The
./app/wifi_on_ice_app.py
script is the main Python script for the Streamlit app.
- The
To run the Streamlit app in Snowsight, make sure you have a Snowflake account with appropriate permissions (CREATE STRAMLIT privilege) As we plan to use Streamlit integration, the Snowflake account is required to be located in an Amazon Web Services (AWS).
Firstly, upload the ./data/preprocessed_wifi_data.csv
file in Snowsight.
Follow these steps:
- Navigate to the โDataโ tab on the left in Snowsight
- Choose a database or create one
- Click on "Create" -> "Table" -> "From file" to upload the csv-file from your local source
- Adjust data formats and other settings to ensure accurate ingestion
- Optionally, you might need to select a specific warehouse based on your requirements
For more detailed information and guidance, refer to the Snowsight documentation.
Secondly, paste the ./app/wifi_on_ice_app.py
in the Snowsight's Python editor
Follow these steps:
- Navigate to the โStreamlitโ tab on the left in Snowsight.
- Click on โ+ Streamlit Appโ and provide a name โWIFI on ICEโ for the app
- Chose the previous warehouse and app location
- Click on โCreateโ
- Paste the content of
./app/wifi_on_ice_app.py
in the Edior - Start the app by clicking on "Run"
The used dataset is provided under the Creative Commons Attribution 4.0 International License (CC BY 4.0), see Wifi on ICE Dataset.