View source: R/library--analysis_tools--time_offset--Offset_Analysis.R
OffsetDFMaker | R Documentation |
Returns a dataframe with the multiple ways to analyze how offset the Wastewater is from cases data
OffsetDFMaker(
length,
startdate,
enddate,
casesdf,
wastedf,
N1_column = N1,
N2_column = N2,
site_column = site,
date_column = date,
case_column = conf_case
)
length |
The length of the time window for the results / 2 |
startdate |
First day for both data sets |
enddate |
Last day for both data sets |
casesdf |
DF with case data columns needed(data,conf_case) |
wastedf |
DF with Wastewater data columns needed(date,N1,N2) |
N1_column |
name of N1 column |
N2_column |
name of N2 column |
site_column |
name of site column |
date_column |
name of date column |
case_column |
name of case column |
DF with the columns: number of days wastewater is offset, geo mean of(n1,n2) / confirmed cases,previous with rolling case average, MSE rolling average,Pearson correlation, Kendall correlation, Spearman correlation, R squared.
data(WasteWater_data, package = "Covid19Wastewater")
data("Case_data", package = "Covid19Wastewater")
#Will output a df from -10 to +10 days using all of the data from 2020-08-01 to 2023-01-01
OffsetDFMaker(10,as.Date("2020-08-01"), as.Date("2023-01-01"), Case_data, WasteWater_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.