Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.55.0
metadata
title: India Map Visualizer
emoji: ๐
colorFrom: green
colorTo: blue
sdk: streamlit
app_file: app.py
pinned: false
๐ฎ๐ณ India Map Visualizer
An interactive Streamlit application that lets you:
- Visualize Indian states or districts on a map
- Select specific regions to highlight
- Display connection lines between selected regions
- Add target coordinates manually by clicking
- Render interactive maps with coloring and hover tooltips using
folium
๐ธ Features
- โ Select between State-to-State or District-to-District mode
- โ Optional target points input (e.g., from Google Maps)
- โ Draw lines (Straight, Dashed, Curved) between regions
- โ Show/hide full India boundaries
- โ Interactive mode with colored regions based on attributes
- โ Hover tooltips with extra information (e.g., name, population)
๐ Directory Structure
state-map-app/ โ โโโ app.py # Main Streamlit App โโโ utils.py # Map drawing and tooltip logic โโโ requirements.txt # All Python dependencies โโโ README.md # This file โโโ data/ โโโ in.json # GeoJSON for Indian States โโโ output.geojson # GeoJSON for Indian Districts
๐ง Setup Instructions
- Clone the repo
git clone https://github.com/yourusername/state-map-app.git
cd state-map-app
#Make sure you are in a virtual environment:
python -m venv venv
source venv/bin/activate # on Windows use venv\Scripts\activate
pip install -r requirements.txt
#Run the app
streamlit run app.py
#โ ๏ธ Ensure GDAL dependencies are installed if running on Linux. You can install them via:
sudo apt install gdal-bin libgdal-dev