get_test_data: Get tests from different sources (Selenium, fetch, and...

View source: R/test-data.R

get_test_dataR Documentation

Get tests from different sources (Selenium, fetch, and manual) and combine them. Using the parameter days, all files in automated/merged/ are updated for the last dates given the input number.

Description

Input: Daily test data scraped via Selenium and "R fetch functions" from automated/fetch and automated/selenium directories.

Output:

  • automated-tests.json

  • countries-error.csv

which are then deployed by CI to the automated/merged/ directory in the finddx/FINDCov19TrackerData repo.

Usage

get_test_data(days = 1, write = TRUE)

Arguments

days

days to combine. It should always be bigger than 0.

write

if csv files should be written. Default TRUE.

Details

#' When manual countries have not been updated, coronavirus_cases_new.csv has NA for tests_cumulative and new_tests. When selenium or fetch process failed and those values have not been corrected manually, coronavirus_cases_new.csv might have negative values or NA in new_tests and new_tests_corrected variables.

Countries with negative values or NA are listed as well given the days input in the folder issues/.

Parameter days allows to update past dates using manual files in manual/processed/; except for dates on "2021-02-18" or before. It allows to update from "2021-02-19" when the automatic workflow was implemented. To update data on 2021-02-18 or previous days, changes should be made using the specific date in the folder automated/merged/.

Examples

get_test_data(write = FALSE)


dsbbfinddx/FINDCov19Tracker documentation built on Nov. 23, 2022, 11:01 p.m.