Nikhilesh423's picture
Update README.md
180ee2e verified
---
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
1. **Clone the repo**
```bash
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