# NOT RUN {
library(tsibbledata)
library(ggplot2)
library(tsibble)
library(lvplot)
library(dplyr)
smart_meter10 %>%
filter(customer_id %in% c("10017936")) %>%
prob_plot(
gran1 = "day_week", gran2 = "hour_day",
response = "general_supply_kwh", plot_type = "quantile",
quantile_prob = c(0.1, 0.25, 0.5, 0.75, 0.9),
symmetric = TRUE,
outlier.colour = "red",
outlier.shape = 2, palette = "Dark2"
)
cricket_tsibble <- cricket %>%
mutate(data_index = row_number()) %>%
as_tsibble(index = data_index)
hierarchy_model <- tibble::tibble(
units = c("index", "over", "inning", "match"),
convert_fct = c(1, 20, 2, 1)
)
cricket_tsibble %>%
prob_plot("inning", "over",
hierarchy_tbl = hierarchy_model,
response = "runs_per_over",
plot_type = "lv"
)
# }
Run the code above in your browser using DataLab