Time series plot of ARGO applied on CDC's ILI data
This function is used to reproduce the ARGO plot.
plot_argo(GFT_xts, GC_GT_cut_date, model_names, legend_names, zoom_periods)
GFT_xts
: dataframe with all predicted valuesGC_GT_cut_date
: cutting date for switching datasetsmodel_names
: name of predicting modelslegend_names
: legend for predicting modelszoom_periods
: vector of periods to zoom intoa graph on the default plot window
GFT_xts = xts::xts(exp(matrix(rnorm(1000), ncol=5)), order.by = Sys.Date() - (200:1)) names(GFT_xts) <- paste0("col", 1:ncol(GFT_xts)) names(GFT_xts)[1] <- "CDC.data" zoom_periods = c() for (i in 0:5){ zoom_periods = c( zoom_periods, paste0(zoo::index(GFT_xts)[i*30+1], "/", zoo::index(GFT_xts)[i*30+30]) ) } plot_argo( GFT_xts = GFT_xts, GC_GT_cut_date = zoo::index(GFT_xts)[50], model_names = colnames(GFT_xts)[-1], legend_names = paste0(colnames(GFT_xts)[-1], "legend"), zoom_periods = zoom_periods )
Useful links