University of Bonn WS 20/21 Effective Programming Practices for Economists Course Final Project by Bahar Coskun, Timo Haller and Anto Marcinkovic
We analyze the changes in peoples mobility during Covid-19 pandemic. We look at how people change their movement with changing Covid-19 case numbers and different polices to this crisis. We look at European countries and in particular Germany which we analyze also in state level. We rely on mobility data made accessible by Google, stringency index and infection numbers which we collected from Our World in Data.
In order to run this project in your local machine you need to have a release of Python which is the programming language we relied on, a modern LaTex distribution in order to compile .tex documents, estimagic for graphics, geckodriver for webscraping. The project is created and run on MacOS Big Sur version 11.2.
- We recommend to download Anaconda Navigator for getting started with Python: https://www.anaconda.com
- LaTex distribution such as TeXLive, MacTex, or MikTex
- Geckodriver can be downloaded from https://github.com/mozilla/geckodriver/releases and geckodriver.exe should be added to the PATH on a macbook this can simply be done by moving .exe in to usr/bin/local.
- Install Estimagic by $ conda config --add channels conda-forge $ conda install -c opensourceeconomics estimagic : https://estimagic.readthedocs.io/en/latest/getting_started/installation.html
- Before running the project create and activate the envrionment by: $ conda env create -f environment.yml and then $ conda activate covid_19_mobility
- We rely on pytask to run the project once the project is cloned and all above steps are completed $ conda develop . and the $ pytask
- Webscrapping relies on having a Firefox browser. This can be adjusted by changing the 38th line in src/data_management/task_get_data. If Safari is decided to be used remote control needs to be allowed.
src folder includes all the necessary code needed for the analysis:
- data_management folder includes the code to scrape the data, clean and format it for analysis
- analysis folder includes the code for plots and regressions
- documentation folder is where you can find the information on our code
- paper folder is where we present our findings, figures and tables
- sandbox is where we include an interactive Jupyter notebook for data management and results
- utils.py includes the the small function we use accross the project.
- test_moving_avg.py tests whether we calculate forward moving average correctly. As we use forward moving averages of data for our analysis, this step is taken to ensure there are no calculation mistakes.