View source: R/calc_fp_aggregate.R
aggregate_fp_multilevel | R Documentation |
aggregate_fp_multilevel
aggregate_fp_multilevel(
posterior_samples,
division_level_data,
population_data
)
posterior_samples |
posteriors samples from |
division_level_data |
data frame with country codes and corresponding aggregate level |
population_data |
population data, union and years of the samples |
dimnames(posterior_samples) <- list(division_numeric_code, NULL, NULL, NULL) #provide corresponding division numeric codes in posterior_samples attributes
population_data <- population_counts %>%
dplyr::filter(is_in_union == union) %>%
dplyr::filter(mid_year <= last_year) %>%
dplyr::filter(mid_year >= first_year)
division_level_data <- divisions %>%
mutate(division_level = region_numeric_code)%>%
select(division_numeric_code, division_level)
posterior_samples_list <- weight_samples(division_level_data, population_data, posterior_samples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.