generate_time_series_data: Generate time series data

View source: R/summary_functions.R

generate_time_series_dataR Documentation

Generate time series data

Description

Function returns a time series of counts-by-location-and-date data, given length of baseline and test intervals, and an end date for the test-interval

Usage

generate_time_series_data(
  data,
  end_date = NULL,
  locations = NULL,
  baseline_length = 90,
  test_length = 7,
  guard = 0
)

Arguments

data

data frame with (at least) three columns: location, date, count

end_date

date indicating end of test interval; if not provided the last date in 'dt' will be used

locations

a vector of locations to subset the table; if none provided then all locations will be used

baseline_length

numeric (default=90) number of days in baseline interval

test_length

numeric (default=7) number of days in test interval

guard

numeric (default=0) number of days between baseline and test interval

Value

a dataframe of time series data

Examples

generate_time_series_data(
  data = example_count_data
)

gsClusterDetect documentation built on July 27, 2026, 5:09 p.m.