@@ -369,14 +369,14 @@ fc <- bind_rows(k_week_ahead(x, ahead = 7, as_of = TRUE),
369
369
# Plot them, on top of latest COVID-19 case rates
370
370
ggplot(fc, aes(x = target_date, group = time_value, fill = as_of)) +
371
371
geom_ribbon(aes(ymin = fc_lower, ymax = fc_upper), alpha = 0.4) +
372
+ geom_line(data = x_latest, aes(x = time_value, y = case_rate),
373
+ inherit.aes = FALSE, color = "gray50") +
372
374
geom_line(aes(y = fc_point)) + geom_point(aes(y = fc_point), size = 0.5) +
373
375
geom_vline(aes(xintercept = time_value), linetype = 2, alpha = 0.5) +
374
376
facet_grid(vars(geo_value), vars(as_of), scales = "free") +
375
377
scale_x_date(minor_breaks = "month", date_labels = "%b %y") +
376
378
labs(x = "Date", y = "Reported COVID-19 case rates") +
377
- theme(legend.position = "none") +
378
- geom_line(data = x_latest, aes(x = time_value, y = case_rate),
379
- inherit.aes = FALSE, color = "gray50")
379
+ theme(legend.position = "none")
380
380
```
381
381
382
382
We can see that these forecasts, which come from training an ARX model jointly
0 commit comments