powered by
Generate heat map data frame count information by date and location given an input frame of count-by-location-and-date data.
generate_heatmap_data( data, end_date = NULL, locations = NULL, baseline_length = 90, test_length = 7, guard = 0, break_points = c(-1, 2, 4, 9, 19, Inf), break_labels = c("0-1", "2-4", "5-9", "10-19", "20+") )
a data frame of heat map data
data frame with (at least) three columns: location, date, count
date indicating end of test interval; if not provided the last date in `dt` will be used
a vector of locations to subset the table; if none provided then all locations will be used
numeric (default=90) number of days in baseline interval
numeric (default=7) number of days in test interval
numeric (default=0) number of days between baseline and test interval
break points for the discrete groups (default = c(-1,2,4,9,19,Inf))
c(-1,2,4,9,19,Inf)
string vector of labels for the groups (default = c("0-1", "2-4", "5-9", "10-19", "20+"))
c("0-1", "2-4", "5-9", "10-19", "20+")
generate_heatmap_data( data = example_count_data )
Run the code above in your browser using DataLab