An interactive web map showing the closest metro stations to any location, with adjustable "spider legs" (1-8 stations) and the ability to toggle between Euclidean (straight-line) and actual walking distances using OpenStreetMap routing.
This project is an open-source, enhanced version of Carlos Enrique Vázquez Juárez's original work. It significantly builds upon the original by introducing pedestrian network routing and a high-performance backend for ultra-fast network analysis.
Try it now: https://spidermap.steinberg.nu/
- Multi-City Support: Explore metro networks in various cities worldwide.
- Interactive Map: Simply click anywhere to instantly find the closest metro stations.
- Adjustable Spider Legs: Easily choose to display between 1 to 8 closest stations using a slider.
- Flexible Distance Modes: Switch between Euclidean (straight-line) and OSM Network (actual walking) distances.
- Route Visualization: When using OSM Network mode, see the precise walking routes to stations.
- Ultra-High Performance: Powered by a NetworKit backend for lightning-fast network analysis and distance calculations.
- Optimized Frontend: Features spatial indexing and caching for instant Euclidean distance calculations on the map.
- Mexico City, Mexico
- Berlin, Germany
- Beijing, China
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.8+
- All other dependencies are listed in
requirements.txt.
-
Clone the repository:
git clone [https://github.com/your-repo/spider-map.git](https://github.com/your-repo/spider-map.git) # Replace with your actual repo URL cd spider-map
-
Install Python dependencies:
pip install -r requirements.txt
-
Download city data: You can download data for a specific city or all supported cities.
python download_data.py --city mexico_city # or berlin, beijing # To download all cities: # python download_data.py --all # To list available cities: # python download_data.py --list-cities
-
Start the backend service:
python walking_service.py
-
Open the map in your browser: Visit
http://localhost:8080
map.html- The interactive web interface with frontend optimizations.walking_service.py- The ultra-fast NetworKit backend service. ⭐download_data.py- Script to download and build city network data.requirements.txt- Lists all project dependencies.CityData/- Directory containing network graphs and station data for all cities.{city}_walking_graph.pkl- NetworKit graph cache for each city.{city}_stations.geojson- Metro station data for each city.
Contributions are welcome! If you have suggestions for improvements, new features, or bug fixes, please open an issue or submit a pull request.
Lior Steinberg - steinberg.nu
Urban planner and co-founder of Humankind