JDihlmann / isomap

β±πŸ—Ί isochrone map generator for any location and region featuring a regression model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Isochron Map Generator

Featuring an example for the region TΓΌbingen, Germany and a Regressor

An ischron map is an elegant tool to visualize how long one would travel starting from an origin to every sorounding destinations. It is helpfull to grasp how travel time changes by means of transportation but can also be used to see how transportation time changes during different times of day. This project features a full pipline to collect the data, visualize the data points, plot the isochronmap and additionally train a regression model for aquired data. In the following and the source code we use this pipeline on the region TΓΌbingen Germany, but one can use this pipeline on any region.

Contents

In order to understand how the pipeline is structured you can simply look at the following jupyter notebooks, which will comment on how to aquire, save, load and plot the data, generate an isochrone map and train the regressor.

.
β”œβ”€β”€ 01_RegionMapper.ipynb            # Collect samples in a region by querying the Google APIs
β”‚
β”œβ”€β”€ 02_RegionDisplayer.ipynb         # Plot samples collected and generate the correspondin isochrone maps
β”‚
β”œβ”€β”€ 03_DataAggregation.ipynb         # Load the data and store it into a pandas csv format
β”‚
β”œβ”€β”€ 04_RegressionAnalyisis.ipynb     # Regress travel times per mean of transport
β”‚
└── 05_RegressionPlots.ipynb         # Plot regression models

The following directories and files provide the code structure and data for the python notebooks aboth. If you want to dive deeper and modify scripts presented in the notebooks or reuse data we already collected you will find them in these directories.

.
β”œβ”€β”€ docs                             # Written report
β”‚   └── Data_Literacy_Project.pdf      # Report about project results
β”‚
β”œβ”€β”€ data                             # Collected datasets
β”‚   β”œβ”€β”€ bicycling.json                 # TΓΌbingen Bicycling data sampled from Google Directions API
β”‚   β”œβ”€β”€ driving.json                   # TΓΌbingen Driving data sampled from Google Directions API
β”‚   β”œβ”€β”€ walking.json                   # TΓΌbingen Walking data sampled from Google Directions API
β”‚   β”œβ”€β”€ elevation.json                 # TΓΌbingen Elevation data sampled from Google Elevation API
β”‚   β”œβ”€β”€ combined_data.csv              # TΓΌbinger Bicycling/Driving/Walking/Elevation data combined
β”‚   └── combined_data_residuals.csv    # Combined data updated with model residuals
β”‚
β”œβ”€β”€ maps                             # Interactive maps
β”‚   β”œβ”€β”€ bicycling.html                 # TΓΌbingen sample map for bicycling
β”‚   β”œβ”€β”€ driving.html                   # TΓΌbingen sample map for driving
β”‚   β”œβ”€β”€ elevation.html                 # TΓΌbingen sample map for elevation
β”‚   └── walking.html                   # TΓΌbingen sample map for walking
β”‚
β”œβ”€β”€ models                           # Trained regression models
β”‚   β”œβ”€β”€ fit_combi_abs.pickle           # Combined model
β”‚   └── fit_horiz.pickle               # Horizontal model
β”‚
β”œβ”€β”€ doc                              # Created Plots
β”‚   β”œβ”€β”€ bibliography.bib               # Citations
β”‚   β”œβ”€β”€ fig                            # Created Plots
β”‚   β”œβ”€β”€ main.tex                       # Report for Data Literacy course
β”‚   └── neurips_2021.sty               # Styles
β”‚
β”œβ”€β”€ misc                             # Miscelenious Objects
β”‚   └── title.png.                     # Title image for Github
β”‚
└── src                              # Source code for data agregation and visualization
    β”œβ”€β”€ RegionElevatioDisplayer         # Plot samples and interpolation for elevation
    β”œβ”€β”€ RegionElevationMapper           # Queries the Google Elevation API
    β”œβ”€β”€ RegionTimeDistanceDisplayer     # Plot samples and isochrone map for transportation types
    └── RegionTimeDistanceMapper        # Queries the Google Direction API

Misc

This project was part of the Data Literacy lecture WS 21/22 held by Prof. Hennig. It includes parts of the lecture in a practical fashion, such as data collection, data processing, data visualisation, data intpretation, data estimation and hypothesis testing. Big thanks to Nicholas KrΓ€mer for creating the Tueplots libary, which helps to find better matplotlib settings. We got inspired to conduct this project by the reddit post [OC] Minimum travel time from Paris by train & bike and comparison to car. Feel free to fork, this is a non commercial students project.

About

β±πŸ—Ί isochrone map generator for any location and region featuring a regression model


Languages

Language:Jupyter Notebook 74.7%Language:HTML 25.3%Language:Python 0.0%Language:Shell 0.0%