Skip to content
Final project in the Scripting Module CAS_INFE_19.8
Branch: master
Clone or download
Simon Staeheli
Simon Staeheli Polishing README.md
Latest commit 9765435 Nov 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
example.png
public_transport_travel_time_analysis.ipynb
public_transport_travel_time_analysis.py

README.md

Public Transport Travel Time <> GA / HalbTax Correlator

Data Sources

Script

  1. The script checks if required data sources are locally available, if not they get downloaded
  2. Some data cleaning tasks are executed
  3. Correlation and aggregation of data sets
  4. Plotting three graphs:
    • GA distribution per canton
    • Public transport travel time <> GA / HT correlation
    • Travel time to the next center (Zürich, Bern, Basel, Genf, Lausanne, Lugano) per municipality

How to run the script

Either you run the script with your local python interpreter:

$ python3 public_transport_travel_time_analysis.py

Or you run public_transport_travel_time_analysis.ipynb in a Jupyter notebook.

Be aware that downloading the data sources takes some time. Especially fetching ga_besitzer.csv (~ 350 MB) uses to abort every now and then. Just delete the file and rerun the script should that happen.

Script requirements

Following Python modules are required:

import zipfile
import geopandas as gpd
import pandas as pd
import urllib.request
import os
import time
import shutil

Example Output

Example Output Script

You can’t perform that action at this time.