Coder Social home page Coder Social logo

yannickoswald / covpol Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 82.66 MB

COVPOL: An agent-based model of the international COVID-19 policy response

Python 6.22% Jupyter Notebook 93.78%
agent-based-modeling data-assimilation data-science pandemic-analysis pandemic-data particle-filter policy-analysis covid19

covpol's Introduction

COVPOL: An agent-based model of the international COVID-19 policy response

This repository is for the publication

Oswald, Malleson, Suchak (2023). An agent-based model of the 2020 international policy diffusion in response to the COVID-19 pandemic with particle filter

available as preprint at https://arxiv.org/abs/2302.11277

This work has been implemented using the Python Anaconda distribution and the agent-based model package MESA in particular. It is provided with a .yml file specifying a conda environment which contains the required packages. In order to set up the environment, run the following command from the terminal/conda prompt:

conda env create -f env.yml

This will create a new conda environment titled cov-pol. The environment can then be activated using the following command:

conda activate cov-pol

To reproduce the full body of work, take the following steps:

  1. Run the script file run_base_model_and_filter_with_plotting.py in the covpol directory as follows:

    cd covpol
    python run_base_model_and_filter_with_plotting.py
    

    This reproduces a substantial amount of the above paper including Figure 2, 4 and 5. To reproduce Figure 4 exactly, the notebook has to take the parameter no_of_iterations = 100. To reproduce Figure 5 exactly, the notebeook has to take the parameter no_of_iterations = 1000.

  2. To reproduce Figure 6 in full several intermediate steps are necessary (time-expensive):

    1. Run the script file number_of_particles_experiment_MSE.py to reproduce the data points where iterations = 20.

    2. To reproduce the datapoints where iterations = 1, run the following:

      1. particle_filter_only.py and collect the data.
      2. run_base_model_only_parallelized.py and collect the data.
    3. Alternatively Figure 6 can be reproduced exactly in a time-cheap manner as it is from the script file graph_mse_number_of_particles_experiment.py.

    Best run from anaconda command prompt.

  3. To reproduce Figure 7 run the script experiment_da_window_size.py (time-expensive). Best run from anaconda command prompt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.