unit_data <- function(division_numeric_code) {
fpemdata::divisions %>%
dplyr::filter(!is.na(sub_region_numeric_code)) %>% # why do we need to filter this here??? when is it ever NA???
dplyr::mutate(is_developed_region = factor(is_developed_region, levels = c("Y", "N"))) %>% # why does this need to be a factor? can we change it in the data instead
dplyr::filter(division_numeric_code == !!division_numeric_code) #%>%
#mutate(unit_numeric_code = 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.