Skip to content

jorisvdstraten/streamlit_folium_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit + Folium Demo

This repository contains a demonstration of how Streamlit can be combined with Folium to create interactive geographic visualizations within a web application.

🛠 Features

The demo includes three different scripts, each showcasing a specific integration of Streamlit and Folium:

  1. demo.py
    A basic example of displaying a simple map using Folium inside a Streamlit application.

  2. demo2.py
    Demonstrates user interaction via Streamlit widgets. Users can select coordinates, and a custom marker is added to the map accordingly.

  3. demo3.py
    Shows how to use Folium to display multiple layers or custom markers, including using GeoJSON coordinates from the Eindhoven open data API and dynamically modifying the map.

🧰 Technologies Used

📍 Folium

Folium is a powerful Python library built on Leaflet.js for creating interactive maps. In this demo, Folium is used to:

  • Display maps with markers.
  • Add interactive layers (e.g., GeoJSON, popups).
  • Dynamically generate map elements based on user input.

📊 Streamlit

Streamlit is a Python framework for building web apps for data science and machine learning. In this project, Streamlit is used to:

  • Quickly create a user interface without HTML/CSS.
  • Enable interaction via sliders, text fields, and file uploads.
  • Embed Folium maps as HTML iframes within the Streamlit app.

▶️ How to Use

  1. Install Requirements
    First, install the necessary Python packages:

    pip install streamlit folium
    
  2. Run the Streamlit App Start one of the demos with:

    streamlit run demo.py
    
  3. View in Your Browser Streamlit will automatically open the app in your default browser (usually at http://localhost:8501).

About

Small demo of usage of streamlit and folium to draw Eindhoven neighborhoods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages