Description Usage Arguments Value Examples
A wrapper to googledrive
functions to retrieve datasets from the DoH Data
Drop folders.
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 80 | datadrop_get(
tbl,
fn,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_changelog(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_sheets(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_fields(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_cases(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_tests(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_cdaily(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_cweekly(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_qdaily(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
datadrop_get_qweekly(
tbl,
path = NULL,
keep = FALSE,
overwrite = FALSE,
verbose = TRUE
)
|
tbl |
A tibble output produced by |
fn |
A character string composed of a word or words that can be used to
match to the name of a file within a particular DoH Data Drop
Google Drive folder listed in |
path |
A character value for path for output file. If NULL, the default file name used in Google Drive is used and the default location is the working directory. |
keep |
Logical. Should file be saved locally? Default to FALSE. If TRUE,
file is kept in the location specified in |
overwrite |
Logical. If |
verbose |
Logical. Should operation progress messages be shown? Default to TRUE. |
A tibble of any of the following datasets:
Metadata - Sheets;
Metadata - Fields;
Case Information;
DOH Data Collect - Daily Report;
DOH Data Collect - Weekly Report;
Testing Aggregates;
Quarantine Facility Data - Daily Report;
Quarantine Facility Data - Weekly Report;
DOH Data Collect v3 - Baseline;
DOH Data Collect v4 - Baseline; and,
DDC TTMF Tracker v1.
For Changelog, a named list of two tibbles - List of Changes and
Most Common Changes. If keep
is TRUE, a copy of the specified
DoH Data Drop Google Drive file is saved in the location specified by
path
.
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 | ## Not run:
library(googledrive)
## Authentication
googledrive::drive_auth_configure(api_key = Sys.getenv("GOOGLEDRIVE_TOKEN"))
## Deauthorise
googledrive::drive_deauth()
## Get tbl for files in latest Data Drop
library(magrittr)
x <- datadrop_id() %>% datadrop_ls()
## Retrieve case information data
datadrop_get(tbl = x, fn = "Case Information", path = tempfile())
## Retrieve latest changelog information
datadrop_get_changelog(tbl = x, path = tempfile())
## Retrieve latest metadata - sheets information
datadrop_get_sheets(tbl = x, path = tempfile())
## Retrieve latest metadata - fields information
datadrop_get_fields(tbl = x, path = tempfile())
## Retrieve latest cases information (same results as first example)
datadrop_get_cases(tbl = x, path = tempfile())
## Retrieve latest daily hospital beds and mechanical ventilators information
datadrop_get_cdaily(tbl = x, path = tempfile())
## Retrieve latest weekly PPE and other related equipment information
datadrop_get_cweekly(tbl = x, path = tempfile())
## Retrieve latest testing aggregates information
datadrop_get_tests(tbl = x, path = tempfile())
## Retrieve latest daily quarantine facility beds and mechanical ventilators
datadrop_get_qdaily(tbl = x, path = tempfile())
## Retrieve latest weekly quarantine facility PPE and other related equipment
datadrop_get_qweekly(tbl = x, path = tempfile())
## End(Not run)
#datadrop_get_collectV3(tbl = x, path = tempfile())
#datadrop_get_collectV4(tbl = x, path = tempfile())
#datadrop_get_tracker(tbl = x, path = tempfile())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.