download_acns: Download Current ACNS Data

Description Usage Arguments Value

View source: R/download_acns.R

Description

download_acns() downloads data from both the address and texting ACNS files and merges the two using common columns. It uses the address data as reference; any data in the SMS dataset not matching the address data is dropped. This is because address data is necessary for some downstream functions.

Usage

1
2
3
4
5
6
download_acns(
  primary = c("sms", "addr"),
  addr_creds = Sys.getenv(c("acns_usr", "acns_pwd")),
  sms_creds = Sys.getenv(c("sftp_usr", "sftp_pwd")),
  date = NULL
)

Arguments

primary

Which data source should be used as the primary table? Choices are "sms" or "addr"; defaults to "sms".

addr_creds

Character. A length 2 vector containing the credentials for accessing the ACNS address data. The username should appear first, then the password.

sms_creds

Character. A length 2 vector containing the credentials for accessing the ACNS SMS data. The username should appear first, then the password.

date

The date to assign to the date_tbl; if NULL, this will be calculated from the data

Value

A tibble containing the joined data


jesse-smith/covidsms documentation built on Dec. 25, 2021, 4:24 a.m.