diff --git a/index.html b/index.html index 3938d48..3c2c8f0 100644 --- a/index.html +++ b/index.html @@ -65,6 +65,1074 @@ h6 {font-size: 12px;} code {color: inherit; background-color: rgba(0, 0, 0, 0.04);} pre:not([class]) { background-color: white } + + + +
plot_step_ahead_model_output(projection_data, truth_data, show_plot = TRUE)
+
+
-truth_data <- dplyr::filter(truth_data,
- time_idx < min(projection_data_ab$target_date) ,
- time_idx > "2023-06-01")
-plot_step_ahead_model_output(projection_data_ab, truth_data,
+
+By Location
+
+projection_data <- dplyr::filter(projection_data_all, age_group ==default_age_group, target == default_target,
+ #model_id == default_model
+ )
+truth_data <- dplyr::filter(truth_data_all, age_group ==default_age_group, target == default_target,
+ time_idx < min(projection_data$target_date) ,
+ time_idx > "2023-08-01")
+plot_step_ahead_model_output(projection_data, truth_data,
use_median_as_point = TRUE,
facet = "location", facet_scales = "free_x",
- facet_nrow = 4, facet_title = "top left", show_legend = FALSE)
-
-
-
-Layout update
+ facet_nrow = 7,facet_ncol = 2, facet_title = "top left", show_legend = TRUE)
+
+
+
+
+By Age group (cannot run)
+##{r plot_us_facet_byagegroup, fig.height=32, include=FALSE} #projection_data <- dplyr::filter(projection_data_all, location ==default_location, target == default_target, # #model_id == default_model # ) #projection_data$age_group <- as.character(projection_data$age_group) # #truth_data <- dplyr::filter(truth_data_all, location == default_location, target == default_target, # time_idx < min(projection_data$target_date) , # time_idx > "2023-08-01") #truth_data$age_group <- as.character(truth_data$age_group) #plot_step_ahead_model_output(projection_data, truth_data, # use_median_as_point = TRUE, # facet = "age_group", facet_scales = "free_x", # facet_nrow = 7,facet_ncol = 2, facet_title = "top left", show_legend = TRUE) #
+
+
+Other Layouts
Multiple layout update are possible:
- Not showing the truth data in the plot:
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
+plot_step_ahead_model_output(projection_data, truth_data,
plot_truth = FALSE)
-
-
+
+
@@ -2441,35 +3531,28 @@ Layout update
RColorBrewer::display.brewer.all()
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
- pal_color = "Dark2")
-
-
+#plot_step_ahead_model_output(projection_data, truth_data,
+ # pal_color = "Dark2")
It is possible to use only blues for all models, by setting the
pal_color
parameter to NULL
. This might be
especially useful when used for many models in conjunction with
highlighting the ensemble forecast using the ens_name
and
ens_color
argument.
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
- intervals = 0.8,
- ens_name = "hub-ensemble", ens_color = "black",
- pal_color = NULL, use_median_as_point = TRUE)
-
-
+#plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
+ # intervals = 0.8,
+ # ens_name = "hub-ensemble", ens_color = "black",
+ # pal_color = NULL, use_median_as_point = TRUE)
The default blue color can be changed with the one_color
parameter
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
- intervals = 0.8, one_color = "orange",
- ens_name = "hub-ensemble", ens_color = "black",
- pal_color = NULL, use_median_as_point = TRUE)
-
-
+#plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
+ # intervals = 0.8, one_color = "orange",
+ # ens_name = "hub-ensemble", ens_color = "black",
+ # pal_color = NULL, use_median_as_point = TRUE)
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
- interactive = FALSE)
-
+#plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
+ # interactive = FALSE)
- Column Names:
@@ -2477,19 +3560,66 @@ Layout update
information. In this case, the two x_col_name
and
x_truth_col_name
parameters can be used to indicate the
variables that should be mapped to the x-axis.
-names(truth_data_us)[names(truth_data_us) == "time_idx"] <- "time"
-names(projection_data_A_us)[names(
- projection_data_A_us) == "target_date"] <- "date"
-plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
- x_col_name = "date", x_truth_col_name = "time")
-
-
+#names(truth_data_us)[names(truth_data_us) == "time_idx"] <- "time"
+#names(projection_data_A_us)[names(
+# projection_data_A_us) == "target_date"] <- "date"
+#plot_step_ahead_model_output(projection_data_A_us, truth_data_us,
+ # x_col_name = "date", x_truth_col_name = "time")
+
+