Aggregates transition counts and weights by specified grouping variables.
Usage
summarize_transitions(
model_data,
by = c("sector", "region"),
weight = "transition_weighted_count"
)Value
A tibble with grouped transition summaries including total transitions and total weighted transitions.
Details
This function groups the model_data by the specified variables and calculates: - n_transitions: count of transitions - total_weight: sum of the weight column
Examples
if (FALSE) { # \dontrun{
result <- load_cmap_data(base_path = "~/cmap_data")
summary <- summarize_transitions(result$model_data, by = c("sector", "region"))
} # }
