Skip to content

Computes the distribution of mileage of private cars in Switzerland in 2015, based on the data of the Transport and Mobility Microcensus. 70% of private cars with the lowest mileage in the last 12 months travel 41% of the total mileage of private cars.

Notifications You must be signed in to change notification settings

antonindanalet/car-mileage-in-Switzerland-in-2015

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distribution of the mileage of private cars in Switzerland in 2015

This code computes the distribution of mileage of private cars in Switzerland in 2015, based on the data of the Transport and Mobility Microcensus (MTMC, www.are.admin.ch/mtmc). As an example, 70% of private cars with the lowest mileage in the last 12 months travel 42% of the total mileage of private cars. This code generates a figure (available in French, German and English) presenting the results and the results as a CSV-file containing the cumulative proportion of total mileage for each group of 10% of the vehicles (in increasing order of mileage).

The sample basis is similar to the one used in figure G 3.3.2.3 in the main report of the MTMC (p.31, in French and in German). It is slightly higher here than in the main report, because we don't decompose the mileage between "in Switzerland" and "abroad". Consequently, we don't remove observations without this information.

The figure has been published on Mastodon in French, German and English and on Linkedin in English.

Getting Started

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.

Prerequisites

To run the code itself, you need python 3, pandas, numpy, matplotlib and seaborn.

For it to produce the results, you also need the raw data of the Transport and Mobility Microcensus 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".

Run the code

Please copy the file fahrzeuge.csv that you receive from the Federal Statistical Office in the folder "data/input". Then run run_car_mileage_in_Switzerland_in_2015.py.

DO NOT commit or share in any way the CSV-file fahrzeuge.csv! These are personal data.

About

Computes the distribution of mileage of private cars in Switzerland in 2015, based on the data of the Transport and Mobility Microcensus. 70% of private cars with the lowest mileage in the last 12 months travel 41% of the total mileage of private cars.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published