Description Usage Arguments Examples
compute distances and groups from algorithm based on raw distributions
1 2 3 4 5 6 7 |
.data |
a tsibble |
gran1 |
one granularity e.g. hour_day, day_week, wknd_wday |
gran2 |
one granularity distinct from gran1 |
response |
measured variable |
quantile_prob_val |
values of probability for which distances between quantiles would be computed |
1 2 3 4 5 6 7 8 9 10 11 12 | library(gravitas)
library(tidyverse)
sm <- smart_meter10 %>%
filter(customer_id %in% c("10006704", "10017936", "10006414", "10018250"))
gran1 <- "hour_day"
gran2 <- NULL
response <- "general_supply_kwh"
dist_gran(sm, "hour_day")
dist_gran(sm, "month_year")
sm %>%
scale_gran(method = "robust") %>%
dist_gran("hour_day")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.