https://vehicle-simulator.herokuapp.com/
door2door is analysing and visualising mobility data to find the optimal solution to improve public transportation in cities and rural areas, and working on finding the most efficient solutions to stakeholder's problems. One of the ways the team evaluates a potential Ridepooling service is by simulating said service. The mission is to integrate it in a solution that enables users to trigger a simulation and see its results visualized in some way accessible through a webpage.
- Analysis of Simulator module
- Creating an API/wrapper around the Simulator module
- Get the results by triggering the API
- Transformation and mapping the data
- Render the map by plotting the location coordinates for each mobility data
- Visualize the cluster on a map on click of a button
- Python 3.8
- Flask
- Heroku
-
Create Flask API (GET)
- An API/wrapper around the simulator module
- Calculates the radius based on bounding box coordinates
- Plots the location coordinates for each simulator data within the boundaries of Berlin
- Generates a map for the visualization and stores in an html page
-
Create webpage for visualization
- A simple webpage to visualize simulation results on a map by click of a button
-
Web app is hosted on Heroku (URL given below in the solution section)
- app.py -- An API/wrapper function for the Simulator module
- simulator.py -- Provides a class Simulator that returns some mock simulation results
- templates/index.html -- An html page for the visualizing simulation results on a map
- templates/visual_map.html -- A rendered html page after plotting location coordinates on a map
- berlin_stops.geojson -- A geojson file which contains dropoff and pickup points data
- Procfile -- A file which is used to run a web app deployed on Heroku
- requirements.txt -- Dependency libraries for the project
- runtime.txt -- A file which contains runtime version on which the app is running
- Python 3.7 or Python 3.8
- Flask
- Heroku
-
Folium -- A python package for visualizing maps that makes it easy to visualize data that's been manipulated in Python on an interactive leaflet map. It enables both the binding of data to a map for choropleth visualizations as well as passing rich vector/raster/HTML visualizations as markers on the map.
-
Flask -- A lightweight WSGI web application framework to build a web application
-
GeoPandas -- A python library to work with geospatial data that extends the datatypes used by pandas to allow spatial operations on geometric types.
-
Shapely -- A Python package for manipulation and analysis of planar geometric objects
Visualize the simulation results on a map (in any browser) by clicking the below web URL.
URL --> https://vehicle-simulator.herokuapp.com/
PS: DEMO screenshots of the app are available here