Description Usage Arguments Value Note Examples
Calculates for the number of instruments with at least 1 test in the prior 3 months (calculated for each instrument version as well as all instruments combined). Additionally calculates the number of respiratory panel (or other as supplied by target_PouchTitle) tests on a given date, as well as the number of all tests on that date.
1 2 3 4 5 | calc_active_instruments(
df,
window = 91,
target_PouchTitle = "Respiratory_Panel"
)
|
df |
dataframe of daily site level testing data. Columns must include "RunDataID", "SiteID", "date", "InstrumentSerialNumber", "InstrumentVersion", and "PouchTitle" |
window |
number of days to look back when calculating number of active of active instruments (default is 3 months (91 days)) |
target_PouchTitle |
Name of the PouchTitle of interest |
Dataframe with columns "SiteID", "date", "daily_TUR_rp" (number of tests that day–for target_PouchTitle), "daily_TUR_all" (number of all tests for that day), "n_active" (number of active instruments in past 3 months (default is 3 months)), and "InstrumentVersion" (either the name of the instrument, or 'all', for all instrument versions combined)
This function may take at least several minutes to run when large dataframe is used.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.