-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.Rmd
80 lines (52 loc) · 6.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# Infectious Disease Model Library and Utilities <img src="man/figures/logo.png" align="right" alt="" width="120" />
[](https://cran.r-project.org/package=idmodelr)
[](https://github.com/idmodelr)
[](https://www.samabbott.co.uk/idmodelr/)
[](https://www.samabbott.co.uk/idmodelr/dev)
[](https://mybinder.org/v2/gh/seabbs/idmodelr/master?urlpath=rstudio)
[](https://travis-ci.org/seabbs/idmodelr)
[](https://ci.appveyor.com/project/seabbs/idmodelr)
[](https://codecov.io/github/seabbs/idmodelr?branch=master)
[](https://cran.r-project.org/package=idmodelr)
[](https://cran.r-project.org/package=idmodelr)
Explore a range of infectious disease models in a consistent framework. The primary aim of `idmodelr` is to provide a library of infectious disease models for researchers, students, and other interested individuals. These models can be used to understand the underlying dynamics and as a reference point when developing models for research. `idmodelr` also provides a range of utilities. These include: plotting functionality; a simulation wrapper; scenario analysis tooling; an interactive dashboard; tools for handling mult-dimensional models; and both model and parameter look up tables. Unlike other modelling packages such as [`pomp`](https://kingaa.github.io/pomp/), [`libbi`](http://libbi.org) and [`epimodel`](http://www.epimodel.org), `idmodelr` serves primarily as an educational resource. After users have explored model dynamics with `idmodelr` they may then implement their model using one of these packages in order to utilise the model fitting tools they provide. For newer modellers, this package reduces the barrier to entry by containing multiple infectious disease models, providing a consistent framework for simulation and visualisation, and signposting towards other, more research, focussed resources.
## Installation
You can install idmodelr from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("seabbs/idmodelr")
```
## Quick start
## Dashboard
A shiny application has been developed that showcases some of the functionality of the `idmodelr` package. This application allows the parameter spaces of a range of models built into `idmodelr` to be explored in an interactive session. It is designed to be used as a teaching aid when introducing people to the concepts behind infectious disease models without requiring them to interact with the underlying code. The code for the dashboard can be found [here](https://github.com/seabbs/exploreidmodels). It can be run locally using the following (*Note: this will install required packages to your system*),
```{r run-dash, eval = FALSE}
#install.packages("shiny")
shiny::runGitHub("exploreidmodels", "seabbs")
```
or accessed [online](http://www.seabbs.co.uk/shiny/exploreidmodels) (*Note: This version may not be fully up to date*).

## Contributing
### Contributing a model
Additional models are extremely welcome!
To add models in the same family as those already implemented (i.e [`SIR_ode`](https://github.com/seabbs/idmodelr/blob/master/R/SIR.R)) please follow the implemented coding style closely (alternatively open an [issue](https://github.com/seabbs/idmodelr/issues) explaining why this style needs updating). Models should be named using their compartments in capitals followed by lower case model details, and finally the model type. An example of this is the `SIR_demographics_ode` model. For highly complex models only the most major model details should be listed (aim for less than 40 characters). An entry for `model_details` is also required (see [`model_details.R`](https://github.com/seabbs/idmodelr/blob/master/data-raw/model_details.R for help with this)). Please consider also adding to the testing suite for your new model.Models can either be added via a pull request (i.e make all desired changes and then run `make`) or via an issue.
To add a new family of models (i.e stochastic models (*Note: These are currently planned in the current development cycle*)) please open an [issue](https://github.com/seabbs/idmodelr/issues) outlining your proposed approach. A new family of models is likely to require at least its own `solve_` (equivalent to [`solve_ode`](https://github.com/seabbs/idmodelr/blob/master/R/solve.R)) function and may also require other package changes.
### Other contributions
File an issue [here](https://github.com/seabbs/idmodelr/issues) if there is any other feature, that you think is missing from the package, or better yet submit a pull request!
Please note that the `idmodelr` project is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
### Docker
This packge was developed in a docker container based on the [tidyverse](https://hub.docker.com/r/rocker/tidyverse/) docker image. To run the docker image run:
```{bash, eval = FALSE}
docker run -d -p 8787:8787 --name idmodelr -e USER=seabbs -e PASSWORD=seabbs seabbs/idmodelr
```
The rstudio client can be found on port `:8787` at your local machines ip. The default username:password is seabbs:seabbs, set the user with `-e USER=username`, and the password with ` - e PASSWORD=newpasswordhere`. The default is to save the analysis files into the user directory. Alternatively, access the development environment via [binder](https://mybinder.org/v2/gh/seabbs/idmodelr/master?urlpath=rstudio).