download_integrated_data | R Documentation |
download_integrated_data
connects to the Integrated Data Tool REDcap
project via an API token and downloads the data currently available in the
case interviews report.
download_integrated_data( date = Sys.Date(), api_token = Sys.getenv("redcap_NIT_token"), directory = paste0("V:/EPI DATA ANALYTICS TEAM/COVID SANDBOX REDCAP DATA/", "Integrated data tool Case Interviews/data/"), new_file = paste0("integrated_data_", date, ".csv"), force = FALSE )
date |
A |
api_token |
The API token for accessing the Data for Regions REDcap project. This should be stored in an .Renviron file; see env_vars for details. |
directory |
A string specifying the save directory; this should usually be left alone |
new_file |
A string specifying the save file name; this should always end in .csv and should usually be left alone |
force |
A logical indicating whether to ignore any existing files
matching |
download_integrated_data
downloads data as above and saves to the file
directory and file specified in directory
and new_file
(by
default, it saves to directory
V:/EPI DATA ANALYTICS TEAM/COVID SANDBOX REDCAP DATA/Integrated data
tool Case Interviews/
and file integrated_data_YYYY-MM-DD.csv
.) Only
change this if you're doing some custom analysis; by default,
load_integrated_data
will look here for data to import.
To use download_integrated_data
you'll need an API access key for the
associated REDcap project. Please contact
jesse.smith@shelbycountytn.gov or
karim.gilani@shelbycountytn.gov for more information.
Best practice is to save this API access token in a separate file; see env_vars for details.
Invisibly returns the path to the new data file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.