A simple example of an SEIRS epidemiological model using the FAIR Data Pipeline.
Follow Instructions to install the CLI in the CLI GitHub repository, then follow the instructions to install the Data Registry via the CLI.
Install the rDataPipeline
package, in R:
install.packages("devtools")
devtools::install_github("FAIRDataPipeline/rDataPipeline")
library(rDataPipeline)
Then install rSimpleModel:
devtools::install_github("FAIRDataPipeline/rSimpleModel")
library(rSimpleModel)
At the terminal, in some suitable directory, clone the git repo:
At this point you can configure fair
to run in this repo. Either run:
And fill in your own details, or simply run:
In this case the CLI will initialise the repo with dummy values that are used for continuous integration testing.
This is easy. The user configuration script for running the R SEIRS model can be found inside this repo - inst/extdata/SEIRSconfig.yaml - and for this self-contained example, it includes all of the information to register the input data that the model needs, so that you don’t have to be connected to a registry that already knows about it. The code can be executed by first ensuring that all of the input data is available in the local registry (using fair pull
) and then running the code (using fair run
). So:
That’s it! If you go to the local registry in your browser now (by default at http://localhost:8000), you should see the input and output data recorded in the registry.