# NOT RUN {
library(dplyr)
df <- create_test_data()
parent <- "PAC11"
top_names <- c("C001", parent)
ordered_levels <- c("Better",
"Similar",
"Worse",
"Not compared")
df_ca <- df %>%
filter(IndicatorName == "Indicator 3",
(AreaCode %in% top_names |
ParentAreaCode == parent))
p <- compare_areas(df_ca, AreaCode, Value,
fill = Significance,
lowerci = LCI,
upperci = UCI,
order = "desc",
top_areas = top_names,
title = "Compare the local areas")
p
# }
Run the code above in your browser using DataLab