Data in the data/
directory is organized by the apps that use them.
covid19
testdir.csv
: test directoryselftests.csv
: directory of selftestseqa_covid_testdir
: EQA test directorymoneypox
mpx_testdir.csv
: monkeypox test directoryntd
chagas_testdir.csv
: Chagas test directoryThere are two versions of each data set: A regularly refreshed 'preview' version and an approved 'main' version. Each refresh of 'preview' automatically triggers an update of a pull request.
https://raw.githubusercontent.com/dsbbfinddx/FINDtestdirData/main/data/covid19/testdir.csv
With latest shinyfind, the 'main' set can read into R, using:
shinyfind::get_data("testdir", app = "covid19")
shinyfind::get_data("mpx_testdir", app = "monkeypox")
The 'preview' dataset:
shinyfind::get_data("testdir", app = "covid19", version = "preview")
where covid19
is the name of the folder in this repo and also the name of the app's folder in shinytestdir
Alternatively, use options()
to set the version. This is useful in shiny apps, if you want to maintain a main and a preview version of an app.
options(find.data.version = "preview")
shinyfind::get_data("testdir", "covid19")
These functions are memoised. By default, they download the data once a day, at 7am UTC.
Same use for other dataset:
shinyfind::get_data("selftests", "covid19")
shinyfind::get_data("selftests", "covid19", "preview")
Data is updated locally by running:
source("script/update-all.R")
This processes all downloads and pushes the data to the preview
branch. GHA will automatically open an PR afterwards.
If the updated data (on the preview-
branch) differs from main, an automated pull request is generated. This PR can be assigned to any colaborator of this repo.
myname
Add an R script, updata-myname.R
, to prepare the data. The script writes data/myname.csv
.
Copy .github/workflows/testdir-pull-request.yml
and rename to .github/workflows/myname-pull-request.yml
. Substitute all testdir
by myname
.
Update update-all.R
data/testdir_data.csv
is there because a production app is using it. Remove once the app switches to using shinyfind::get_data("testdir")
.