Interaction of pair of granularities, categorised as harmony and clash. harmony () screens out harmony pairs from list of all possible pairs of granularities.
harmony( .data, ugran = "year", lgran = NULL, hierarchy_tbl = NULL, filter_in = NULL, filter_out = NULL, facet_h = NULL, ... )
.data | A tsibble object. |
---|---|
ugran | Typically set as the most coarse unit required in the analysis. Default is "year". |
lgran | For "regular" tsibble, lgran is the interval of the tsibble. It needs to be specified for "irregular" time intervals. Typically serves as the finest unit required for analysis. |
hierarchy_tbl | A hierarchy table specifying the hierarchy of units and their relationships. |
filter_in | Choices of temporal units to be kept. Can be column names if #' required granularity already exists in the tsibble. For example, a column with public holidays which needs to be treated as granularity, can be included here for checking how it interacts with other granularities. |
filter_out | Choices of temporal units to be discarded. |
facet_h | highest level of facets allowed. |
... | added arguments to be passed. |
A tibble of harmonies and their levels.The levels can be used to decide which granularities to be plotted across x-axis/facets for exploratory aid.
#> # A tibble: 2 x 4 #> facet_variable x_variable facet_levels x_levels #> <chr> <chr> <int> <int> #> 1 day_week hour_day 7 24 #> 2 hour_day day_week 24 7