Repository dedicated to my notes and analysis of population dynamics, focusing on the propagation of CoViD19.
Main reference file for this project is PopulationDynamics.ipynb, it contains all relevant information and points to other relevant files.
While the primary focus is the propagation of CoViD19, the model is general and easy to apply to any population whose growth is governed by a first order differential equation relating the rate of change of population to a function of both time (t) and population (n). The (initial) scope was restricted to separable functions of t and n, but we are now in the process of relaxing this restriction, by introducing further generalizations.
Important note to the readers: I am neither an epidemiologist or virologist! I'm just a curious physicist trying to understand and make some sense of the vast amounts of data on CoViD19 available online, and willing to share it for other curious minds to explore as well. It should go without saying, but I will still state the obvious advice nonetheless: ** None of information made available in this repository serves as credible source of information on COVID19 ** .
We collected our data from two sources. First data source, used up to 2020-05-13 is the European Centre for Disease Prevention and Control (ECDC). Second data source, used from 2020-05-13 until present is the datahub.io dataset on CoViD19. This is sourced from this upstream repository maintained by the team at Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE)
Primary reason to changing to the JHU CSSE data set was the absence of recovered data in the ECDC dataset.
Data is publicly available at:
- datahub.io/covid-19 available at github repository
- the original dataset from JHU CSSE is available at github repository
- ECDC site Copyright information available in the respective urls.
Datasets identifiers
- datahub.io/covid-19 (commit hash)
- 3df63747aeab5d03936459ccfdd536970a9db164 collected on 2020-06-08
- ECDC (checksums available in sha256sums file)
- aRnzjSwT collected on 2020-04-17T21:29
- 6u83xREK collected on 2020-04-25T16:41
- Models under consideration
- the model
- Time-dependent environment: m- steady state model
- General time-dependent rates and decay times
- Coupled differential equations (SIR like models)
- application and discussion
- Korea
- Denmark
- Portugal
- the model
- Review of the differential equations
- Constant environments
- exponential growth
- logistic equation
- growth rate coefficient
- Time dependent environments
- m- transitions between steady states
- smooth transitions
- the Gamma distribution
- Constant environments
As this project grew in size, I decided to move all code to external files, thus dedicating this primary notebook to theory and discussion. The results discussed in this file are generated by the following notebooks
- Korea.ipynb
- Denmark.ipynb
- Portugal.ipynb
that can be found in the root folder for this project.
User defined auxiliary function are made available via two modules
- MyFunctions.jl: general purpose user defined functions;
- Mrate.jl: dedicated to m-steady state model and SIR like model functions.
All code was written with Julia 1.4.x, for reference see the official documentation. Additional required packages and modules (for Julia only):
- SpecialFunctions
- MyFunctions, Mrate (local modules provided in the repository)
- DataFrames, Query, CSV, Dates
- LsqFit (logistic model only)
- DifferentialEquations, DiffEqParamEstim, Optim
- Plots, LaTeXStrings A python 3.x version is in the pipeline, but priority is given to project development using Julia.
Coupled differential equations are integrated numerically using the open source suite DifferentialEquations.jl provided by https://sciml.ai/. The parameter estimation is performed with DiffEqParamEstim.jl which in turn uses Optim.jl. The above-mentioned software packages are written in Julia and are available for Julia, Python and R.