petedodd / fort

R package for TB projections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fort

R-CMD-check

R package to forecast TB notifications, incidence, mortality, and prevalence

License

License: CC BY 4.0

Usage

While not public, the easiest approach is to clone the repository, and then use:

devtools::install('fort')

assuming the working directory is one level up from the repository clone.

API

A plumber API is now defined in inst/plumber.

This can be run using:

library(plumber)
root <- plumb_api(package='fort',name='tbstatisticalserver')
pr_run(root)

The server can be tested using the json data in the same folder:

curl -X "POST" "http://127.0.0.1:8021/projection" -H 'Content-Type: application/json' -d @projection.json

Docker

fort can be packaged as a Docker image. The relevant files are in the /docker folder.

The files are cloned (indirectly) from the GitHub repo, for historial reasons.

To build the Docker image, use:

docker build -t fort .

To (optionally) push to the Docker image to the Avenir Health container registry (permissions required), use:

docker tag fort swtoolscr.azurecr.io/tbstatisticalserver:beta
docker push swtoolscr.azurecr.io/tbstatisticalserver:beta

To launch a Docker container from the image, use:

docker run -d -p 8080:8080 --name fort fort

About

R package for TB projections

License:Creative Commons Attribution 4.0 International


Languages

Language:C++ 69.9%Language:R 29.6%Language:Dockerfile 0.3%Language:C 0.2%