This code computes the modal shares in Switzerland:
-
by agglomeration, by categories of agglomerations & in and out of agglomerations
- for 2021 with a definition of agglomerations of 2012,
- for 2015 with a definition of agglomerations of 2012,
- for 2015 with a definition of agglomerations of 2000,
- for 2010 with a definition of agglomerations of 2000.
The results (until 2015, not including 2021) have been published in the report Parts modales dans les agglomérations: Résultats 2015 (en français) / Modalsplit in den Agglomerationen: Ergebnisse 2015 (auf Deutsch) (ARE, 2018), in chapter 2. This document is not available in English.
-
by a user defined list of communes, with the example of the agglomeration of Zurich here, for 2010 and 2015. You can change the list of communes in the file run_modal_split_in_Switzerland.py. The Swiss official commune number can be found on the website of the Federal Statistical Office.
These instructions will get you a copy of the project up and running on your local machine for reproducing the result and understanding how it has been generated.
To run the code itself, you need python 3 and pandas.
For it to produce the results, you also need the raw data of the Transport and Mobility Microcensus 2005, 2010 & 2015, not included on GitHub. These data are individual data and therefore not open. You can however get them by filling in this form in German, French or Italian. The cost of the data is available in the document "Mikrozensus Mobilität und Verkehr 2015: Mögliche Zusatzauswertungen"/"Microrecensement mobilité et transports 2015: Analyses supplémentaires possibles".
Please copy the files etappen.dat, Haushalte.dat and zielpersonen.dat of 2005 and etappen.csv, haushalte.csv and zielpersonen.csv of 2010 and 2015 that you receive from the Federal Statistical Office in the folders data/input/2005/mtmc05, data/input/2010/mtmc10 and data/input/2015/mtmc15. Then run run_modal_split_in_Switzerland.py.
DO NOT commit or share in any way the CSV files etappen.dat, Haushalte.dat, zielpersonen.dat, etappen.csv, haushalte.csv or zielpersonen.csv! These are personal data.