Information

MATH2404 Assignment 3 | Created by Michael Davis S4273884 | December 2026

Column

About this visualisation:

This dashboard shows which Victorian schools and early childhood services carry a bushfire risk category, and their locality. By connecting the Bushfire At-Risk Register (BARR) and Category 4 list with statewide enrolments to show that at-risk services and students are concentrated in the Central fire ban district around Melbourne, and that Yarra Ranges has the most at-risk schools (59) of any local government area.

How to read the risk levels:

CAT 0 is the highest risk. CAT 0–3 services are on the Department’s Bushfire At-Risk Register (BARR).
CAT 4 services are not on the BARR, but still have some risk, mostly from grassfires. Detailed info here
The dashboard has combined the datasets for the BARR and CAT 4 services. CAT 5–6, lower risk, services are not shown.

Definitions and Limitations:

Data currency: Service counts use bushfire risk categories for the 2026–27 fire season. Student counts use 2025 enrolments.

At-Risk Services: All facilities appearing on either the Bushfire At-Risk Register (BARR, Categories 0–3) or the Category 4 list. Services can be co-located - for example, an outside school hours care (OSHC) service and a kindergarten may share the same physical site as a primary school, but are counted separately as they operate at different hours for different cohorts.

At-Risk Schools: Schools whose main or largest campus has a bushfire risk category of 0–4 for the 2026–27 fire season (appearing on either the BARR or Category 4 list). Each school is counted once per school ID so that school and student counts align with 2025 enrolment data and avoid double-counting.

Column

* Exclusions from At-Risk Schools and enrolment counts: Satellite campuses (including single-year-level or small-cohort specialist campuses), standalone outdoor education campuses, and school camps or farms without a dedicated full-time student cohort are retained in the At-Risk Services total, but are excluded from At-Risk Schools and student enrolment counts (even if a satellite campus is listed on the BARR or Category 4 list while its main campus is not).

Data Sources from Data Vic:

Department of Education Data:
BARR Schools (Victorian Department of Education, 2026a)
Category 4 Schools (Victorian Department of Education, 2026c)
2025 Victorian School Enrollments (Victorian Department of Education, 2025)

Mapping Data from Vicmap:
Total Fire Ban Districts (Country Fire Authority, 2026)
Local Government Areas (Department of Transport and Planning, 2026)

How to use this dashboard:

Information: this page. It explains the data, the risk categories and the definitions used.

Demographics: compares at-risk services and students by fire ban district, education sector and risk level. Hover over any bar or cell to see its exact value. Click a risk level in a chart legend to hide or show it.

Mapping: use the layer control on the map to switch between Total Fire Ban Districts and Local Government Areas (LGAs). Hover over an area to see its metadata.

Filter by LGA: use the box on the left of the Mapping page to pick one or more LGAs. The bubble chart then shows only the schools in those areas. (Leave it empty to show all schools.)

Chart tools: the toolbar above each chart lets you zoom, pan, reset the view or download the chart as an image.

Demographics

Row

Number of at-risk services for the 2026-27 fire season, by Total Fire Ban District and risk level (CAT 0 = highest risk)

Row

Early childhood services and government schools make up almost nine in ten at-risk services Number of at-risk services by education sector and risk level

Nine in ten students in at-risk schools attend CAT 3–4 schools, most of them in Central TFB District Students enrolled in at-risk schools in 2025, by Total Fire Ban District and 2026-27 risk level

Mapping

Column

At-risk services by Total Fire Ban District. Tick “Local Government Areas” to switch layers and view at-risk schools and students by LGA.

Column

Combined Primary/Secondary schools are the largest at-risk schools, with two enrolling over 2,000 students, both at CAT 4 (grassfire risk)

---
title: "Danger Close: Victorian Schools at Elevated Fire Risk Cluster Around Melbourne"
output: 
  flexdashboard::flex_dashboard:
    storyboard: true
    social: menu
    source: embed
---

```{r setup, include=FALSE}
# 0.1. install required packages
library(flexdashboard)
library(ggplot2)
library(plotly)
library(crosstalk)
library(leaflet)
library(tidyverse)
library(dplyr)
library(knitr)
library(sf)
library(htmltools)

# 0.2. import, clean and wrangle data from three data vic sources 
barr_df <- read_csv("data/BARR_register.csv")

cat4_df <- read_csv("data/Category_4_register.csv")

schoolcensus_df <- read_csv("data/AllSchoolsEnrolments_2025.csv")

allservices_df <- bind_rows(barr_df, cat4_df)

census_lookup <- schoolcensus_df %>%
 filter(!is.na(School_No), !is.na(Entity_Type)) %>%
 mutate(School_Key = paste(School_No, trimws(as.character(Entity_Type)), sep = "-"),
        Grand_Total = round(Grand_Total)) %>%
 select(School_Key, School_Type, Grand_Total)

allservices_df <- allservices_df %>%
 left_join(census_lookup, by = "School_Key", na_matches = "never") %>%
 rename(Students_2025 = Grand_Total)

allservices_df <- allservices_df %>%
 mutate(Fire_weather_district = str_to_upper(str_trim(as.character (Fire_weather_district))),
 `Category_2026-27` = factor(`Category_2026-27`, 
   levels = c("CAT 0", "CAT 1", "CAT 2", "CAT 3", "CAT 4")),
  Education_sector = factor(Education_sector, 
   levels = c("Government","Catholic", "Independent", "Early Childhood Services",
              "Early Learning Victoria")),
   School_Type = factor(School_Type,
                        levels = c("Pri/Sec", "Primary", "Secondary", "Special")))

allservices_df <- allservices_df %>%
 mutate(Fire_weather_district = factor(Fire_weather_district,
        levels = c("CENTRAL", "EAST GIPPSLAND", "MALLEE", "NORTH CENTRAL",
                   "NORTH EAST", "NORTHERN COUNTRY", "SOUTH WEST",
                   "WEST AND SOUTH GIPPSLAND", "WIMMERA")))

# 0.3. load and prep shapefiles including dropping out of state LGAs
tfbdistricts_shp <- st_read("data/CFA_TFB_DISTRICT.shp", quiet = TRUE) %>%
 st_transform(4326)
tfbdistricts_shp <- st_simplify(tfbdistricts_shp, dTolerance = 100,
                                preserveTopology = TRUE)

lga_shp <- st_read("data/VMLITE_LGA.shp", quiet = TRUE) %>%
 st_transform(4326) %>%
 mutate(LGA_CODE = str_trim(as.character(LGA_CODE))) %>%
 filter(!is.na(LGA_CODE) & LGA_CODE != "")

# 0.4. filter out rows without School_Key to count valid schools
valid_schools <- allservices_df %>%
 filter(!is.na(School_Key))

# 0.5. calculate distinct school count per risk category for each LGA_CODE
lga_categories <- valid_schools %>%
 group_by(LGA_CODE, `Category_2026-27`) %>% 
 summarise(school_count = n_distinct(School_Key), .groups = "drop") %>%
 pivot_wider( names_from = `Category_2026-27`, values_from = school_count)

# 0.6. calculate overall LGA totals for number of schools and students attending
lga_totals <- valid_schools %>%
 distinct(LGA_CODE, School_Key, Students_2025) %>%
 group_by(LGA_CODE) %>%
 summarise(total_affected_schools = n_distinct(School_Key),
           total_students_2025 = sum(Students_2025, na.rm = TRUE), 
           .groups = "drop")

# 0.7. combine total and risk category columns into an aggregate table
lga_summary <- lga_totals %>%
 left_join(lga_categories, by = "LGA_CODE")

# 0.8. join aggragate table to the LGA shape file
lga_map_data <- lga_shp %>% mutate(LGA_CODE = as.character(LGA_CODE)) %>%
 left_join(lga_summary %>% mutate(LGA_CODE = as.character(LGA_CODE)), 
           by = "LGA_CODE")

# 0.9. calculate distinct service count per risk level & total per TFB district
allservices_df <- allservices_df %>%
 mutate(Fire_weather_district = as.character(Fire_weather_district) %>% 
        str_trim() %>% str_to_upper())

tfb_totals <- allservices_df %>%
 filter(!is.na(Fire_weather_district)) %>%
 group_by(Fire_weather_district) %>%
 summarise(total_properties = n(), .groups = "drop")

tfb_categories <- allservices_df %>%
 filter(!is.na(Fire_weather_district)) %>%
 group_by(Fire_weather_district, `Category_2026-27`) %>%
 summarise(entry_count = n(), .groups = "drop") %>%
 pivot_wider(names_from = `Category_2026-27`, values_from = entry_count,
             names_expand = TRUE)

# 0.10. count of services per education sector each TFB district
tfb_sectors <- allservices_df %>%
 filter(!is.na(Fire_weather_district)) %>%
 group_by(Fire_weather_district, Education_sector) %>%
 summarise(sector_count = n(), .groups = "drop") %>%
 pivot_wider(names_from = Education_sector, values_from = sector_count,
              names_expand = TRUE)

# 0.11. combine totals, sector counts, and risk level columns into an aggregate table
tfb_summary <- tfb_totals %>%
 left_join(tfb_categories, by = "Fire_weather_district") %>%
 left_join(tfb_sectors, by = "Fire_weather_district")

# 0.12. join aggregate table to the TFB shape file
tfb_map_data <- tfbdistricts_shp %>%
  mutate(TFB_DIST = str_to_upper(str_trim(as.character(TFB_DIST)))) %>%
  left_join(tfb_summary, by = c("TFB_DIST" = "Fire_weather_district"))
```

# Information

#### MATH2404 Assignment 3 \| Created by Michael Davis S4273884 \| December 2026 

## Column {data-width="600"}

**About this visualisation:**

This dashboard shows which Victorian schools and early childhood services carry a bushfire risk category, and their locality. By connecting the Bushfire At-Risk Register (BARR) and Category 4 list with statewide enrolments to show that at-risk services and students are concentrated in the Central fire ban district around Melbourne, and that Yarra Ranges has the most at-risk schools (59) of any local government area.

**How to read the risk levels:**

CAT 0 is the highest risk. CAT 0–3 services are on the Department's Bushfire At-Risk Register (BARR). \
CAT 4 services are not on the BARR, but still have some risk, mostly from grassfires. [Detailed info here](https://www2.education.vic.gov.au/pal/bushfire-and-grassfire-preparedness/policy#bushfire-risk-assessment-and-categorisation-of-schools)\
The dashboard has combined the datasets for the BARR and CAT 4 services. CAT 5–6, lower risk, services are not shown.

**Definitions and Limitations:**

**Data currency:** Service counts use bushfire risk categories for the 2026–27 fire season. Student counts use 2025 enrolments.

**At-Risk Services:** All facilities appearing on either the Bushfire At-Risk Register (BARR, Categories 0–3) or the Category 4 list. Services can be co-located - for example, an outside school hours care (OSHC) service and a kindergarten may share the same physical site as a primary school, but are counted separately as they operate at different hours for different cohorts.

**At-Risk Schools:** Schools whose main or largest campus has a bushfire risk category of 0–4 for the 2026–27 fire season (appearing on either the BARR or Category 4 list). Each school is counted once per school ID so that school and student counts align with 2025 enrolment data and avoid double-counting.

## Column

**\* Exclusions from At-Risk Schools and enrolment counts:** Satellite campuses (including single-year-level or small-cohort specialist campuses), standalone outdoor education campuses, and school camps or farms without a dedicated full-time student cohort are retained in the **At-Risk Services** total, but are excluded from **At-Risk Schools** and student enrolment counts (even if a satellite campus is listed on the BARR or Category 4 list while its main campus is not).

**Data Sources from Data Vic:**

Department of Education Data: \
[BARR Schools](https://discover.data.vic.gov.au/dataset/de-2025-2026-bushfire-at-risk-register-february-2026) (Victorian Department of Education, 2026a)\
[Category 4 Schools](https://www.vic.gov.au/category-4-list) (Victorian Department of Education, 2026c)\
[2025 Victorian School Enrollments](https://discover.data.vic.gov.au/dataset/all-schools-fte-enrolments-feb-2025-victoria) (Victorian Department of Education, 2025)

Mapping Data from Vicmap: \
[Total Fire Ban Districts](https://discover.data.vic.gov.au/dataset/vicmap-admin-country-fire-authority-cfa-total-fire-ban-district-polygon) (Country Fire Authority, 2026)\
[Local Government Areas](https://discover.data.vic.gov.au/dataset/vicmap-admin-local-government-area-lga-polygon-aligned-to-property) (Department of Transport and Planning, 2026)

**How to use this dashboard:**

**Information:** this page. It explains the data, the risk categories and the definitions used.

**Demographics:** compares at-risk services and students by fire ban district, education sector and risk level. Hover over any bar or cell to see its exact value. Click a risk level in a chart legend to hide or show it.

**Mapping:** use the layer control on the map to switch between Total Fire Ban Districts and Local Government Areas (LGAs). Hover over an area to see its metadata.

**Filter by LGA:** use the box on the left of the Mapping page to pick one or more LGAs. The bubble chart then shows only the schools in those areas. (Leave it empty to show all schools.)

**Chart tools:** the toolbar above each chart lets you zoom, pan, reset the view or download the chart as an image.

# Demographics {data-orientation="rows"}

## Row {data-height="400"}

### **Number of at-risk services for the 2026-27 fire season, by Total Fire Ban District and risk level (CAT 0 = highest risk)**

```{r}
# 1.1. swap all caps TFB district names to original format for readability
tfbdistrict_levels <- c("Central", "East Gippsland", "Mallee", "North Central",
                        "North East", "Northern Country", "South West",
                        "West and South Gippsland", "Wimmera")

allservices_df1 <- allservices_df %>%
 mutate(Fire_weather_district = factor(toupper(Fire_weather_district),
                                       levels = toupper(tfbdistrict_levels),
                                       labels = tfbdistrict_levels))
# 1.2. construct bar chart of total properties by TFBD with faceting by risk category
chart1 <- allservices_df1 %>%
 filter(!is.na(Fire_weather_district)) %>%
 count(Fire_weather_district, `Category_2026-27`, name = "n") %>%
 complete(Fire_weather_district, `Category_2026-27`, fill = list(n = 0)) %>%
 ggplot(aes(x = Fire_weather_district, y = n,
           fill = `Category_2026-27`,
           text = paste0("Count of Services: ", n,
                         "<br>Risk Level: ", `Category_2026-27`,
                         "<br>Total Fire Ban District: ", Fire_weather_district))) +
 geom_col(position = "dodge", colour = "grey30", linewidth = 0.2) +
 scale_fill_brewer(palette = "YlOrRd", direction = -1,
                   name = "Risk Level") +
 scale_x_discrete(labels = scales::label_wrap(12)) +
 labs(x = NULL, y = NULL) +
 theme_minimal()

# 1.3. add interactivity with ggplotly and force legend to bottom of page
ggplotly(chart1, tooltip = "text") %>%
 layout(legend = list(orientation = "h", x = 0, y = -0.3))

```

## Row {data-height="500"}

### **Early childhood services and government schools make up almost nine in ten at-risk services** Number of at-risk services by education sector and risk level

```{r}
# 2.1. fix education sector factor levels to include school and fold early learning vic into early childhood services due to small number of results in category
allservices_df2 <- allservices_df1 %>%
  mutate(Education_sector = fct_recode(Education_sector,
                                       "Government Schools"  = "Government",
                                       "Catholic Schools"    = "Catholic",
                                       "Independent Schools" = "Independent",
                                       "Early Childhood Services" = "Early Learning Victoria"))

# 2.2. construct bar chart of services at risk in each sector faceted by risk level
chart2 <- allservices_df2 %>%
 filter(!is.na(Education_sector)) %>%
 count(Education_sector, `Category_2026-27`, name = "n") %>%
 complete(Education_sector, `Category_2026-27`, fill = list(n = 0)) %>%
 ggplot(aes(x = Education_sector, y = n, fill = `Category_2026-27`,
            text = paste0("Count of Services: ", n,
                          "<br>Risk Level: ", `Category_2026-27`,
                         "<br>Education Sector: ", Education_sector))) +
 geom_col(position = "dodge", colour = "grey30", linewidth = 0.2) +
 scale_fill_brewer(palette = "YlOrRd", direction = -1,
                   name = "Risk Level") +
 scale_x_discrete(labels = scales::label_wrap(14)) +
 labs(x = NULL, y = NULL) +
 theme_minimal()

# 2.3. add interactivity with ggplotly
ggplotly(chart2, tooltip = "text")

```

### **Nine in ten students in at-risk schools attend CAT 3–4 schools, most of them in Central TFB District** Students enrolled in at-risk schools in 2025, by Total Fire Ban District and 2026-27 risk level

```{r}
# 3.1. construct heat map showing number of school students attending at risk properties by risk level and TFBD
chart3 <- allservices_df2 %>%
filter(!is.na(Students_2025), !is.na(Fire_weather_district)) %>%
 group_by(Fire_weather_district, `Category_2026-27`) %>%
 summarise(students = sum(Students_2025), .groups = "drop") %>%
 complete(Fire_weather_district, `Category_2026-27`,
          fill = list(students = 0)) %>%
 ggplot(aes(x = `Category_2026-27`,            y = fct_rev(Fire_weather_district),
            fill = students,
            text = paste0("Total Fire Ban District: ", Fire_weather_district,
                          "<br>Risk Level: ", `Category_2026-27`,
                          "<br>Students (2025): ", scales::comma(students)))) +
 geom_tile(colour = "white", linewidth = 0.5) +
 geom_text(aes(label = scales::comma(students),
           colour = students > max(students) * 0.36),
           size = 3, show.legend = FALSE) +
 scale_colour_manual(values = c("TRUE" = "white", "FALSE" = "grey20")) +
 scale_fill_distiller(palette = "Purples", direction = 1,
                      transform = "sqrt",
                      labels = scales::comma,
                      breaks = c(0, 1000, 5000, 20000, 40000),
                      name = "Students\n(2025)") +
 labs(x = NULL, y = NULL) +
 theme_minimal(base_size = 10) +
 theme(panel.grid = element_blank())

# 3.2. add interactivity with ggplotly
ggplotly(chart3, tooltip = "text") %>%
 layout(showlegend = FALSE)

```

# Mapping

## Column {data-width="600"}

### **At-risk services by Total Fire Ban District. Tick "Local Government Areas" to switch layers and view at-risk schools and students by LGA.**

```{r}
# 4.1. color palettes for both layers
pal_tfb <- colorNumeric("Purples", domain = tfb_map_data$total_properties, 
                        na.color = "#cccccc")
pal_lga <- colorNumeric("Purples", domain = lga_map_data$total_affected_schools, 
                        na.color = "#cccccc")

# 4.2. TFB district hover tooltip for total properties by sector, risk breakdown
tfb_labels <- sprintf(
  "<strong>%s</strong><br/>
   Total At Risk Services: <strong>%s</strong><br/>
   <hr style='margin: 4px 0;'>
   <u>By Sector:</u><br/>
   Government Schools: %s<br/>
   Catholic Schools: %s<br/>
   Independent Schools: %s<br/>
   Early Childhood Services: %s<br/>
   Early Learning Victoria: %s<br/>
   <hr style='margin: 4px 0;'>
   <u>By Risk Level (2026-27):</u><br/>
   CAT 0: %s | CAT 1: %s | CAT 2: %s<br/>
   CAT 3: %s | CAT 4: %s",
  tfb_map_data$TFB_DIST,
  tfb_map_data$total_properties,
  tfb_map_data$Government,
  tfb_map_data$Catholic,
  tfb_map_data$Independent,
  tfb_map_data$`Early Childhood Services`,
  tfb_map_data$`Early Learning Victoria`,
  tfb_map_data$`CAT 0`,
  tfb_map_data$`CAT 1`,
  tfb_map_data$`CAT 2`,
  tfb_map_data$`CAT 3`,
  tfb_map_data$`CAT 4`) 
tfb_labels <- lapply(tfb_labels, HTML)

# 4.3. LGA hover tooltip for total at-risk schools, number of students, risk breakdown
lga_labels <- sprintf(
  "<strong>LGA Name: %s</strong><br/>
   At-Risk Schools*: <strong>%s</strong><br/>
   Students Enrolled (2025)*: %s<br/>
   <hr style='margin: 4px 0;'>
   <u>By Risk Level (2026-27):</u><br/>
   CAT 0: %s | CAT 1: %s | CAT 2: %s<br/>
   CAT 3: %s | CAT 4: %s",
  lga_map_data$LGA_NAME,
  lga_map_data$total_affected_schools,
  scales::comma(lga_map_data$total_students_2025),
  lga_map_data$`CAT 0`,
  lga_map_data$`CAT 1`,
  lga_map_data$`CAT 2`,
  lga_map_data$`CAT 3`,
  lga_map_data$`CAT 4`)
lga_labels <- lapply(lga_labels, HTML)

# 4.4. generate map with switchable layers and autohide legends
leaflet() %>% addProviderTiles(providers$Esri.WorldGrayCanvas) %>%
  
# layer 1: TFB Districts
addPolygons(data = tfb_map_data, group = "Total Fire Ban Districts",
            fillColor = ~pal_tfb(total_properties), fillOpacity = 0.7,
            color = "white", weight = 1, label = tfb_labels,
            highlightOptions = highlightOptions(weight = 2, color = "#333",
                                                bringToFront = TRUE)) %>%
  
addLegend(pal = pal_tfb, values = tfb_map_data$total_properties,
          title = "# At Risk Services",
          group = "Total Fire Ban Districts",
          position = "bottomleft") %>%
  
# layer 2: LGA
addPolygons(data = lga_map_data, group = "Local Government Areas",
            fillColor = ~pal_lga(total_affected_schools), fillOpacity = 0.7,
            color = "white", weight = 1, label = lga_labels,
            highlightOptions = highlightOptions(weight = 2, color = "#333",
                                                bringToFront = TRUE)) %>%
  
addLegend(pal = pal_lga, values = lga_map_data$total_affected_schools,
          title = "# At Risk Schools",
          group = "Local Government Areas",
          position = "bottomleft") %>%
  
# enable layer switching so each legend follows linked layer
addLayersControl(overlayGroups = c("Total Fire Ban Districts", "Local Government Areas"), options = layersControlOptions(collapsed = FALSE)) %>%
  
# start with TFB Districts layer and legend showing and LGA hidden
hideGroup("Local Government Areas")

```

## Column {data-width="500"}

### **Combined Primary/Secondary schools are the largest at-risk schools, with two enrolling over 2,000 students, both at CAT 4 (grassfire risk)**

```{r}
# 5.1. set up dataset to filter by LGA  
schools_df <- allservices_df1 %>%
  filter(!is.na(Students_2025), !is.na(LGA))

sd <- SharedData$new(schools_df)

# 5.2. generate bubble chart to show school size by school  type and risk level  
pal_4 <- setNames(rev(RColorBrewer::brewer.pal(5, "YlOrRd")),
                  levels(allservices_df1$`Category_2026-27`))

chart4 <- ggplot(sd, aes(x = School_Type, y = Students_2025,
                         size = Students_2025,
                         fill = `Category_2026-27`,
                         text = paste0(Facility_name,
                                       "<br>LGA: ", LGA,
                                       "<br>Risk level: ", `Category_2026-27`,
                                       "<br>Students (2025): ",
                                       scales::comma(Students_2025)))) +
 geom_point(shape = 21, colour = "grey30", stroke = 0.3, alpha = 0.85,
            position = position_jitter(width = 0.2, height = 0, seed = 1)) +
 scale_fill_manual(values = pal_4, name = "Risk Level", drop = FALSE) +
 scale_size_area(max_size = 10, guide = "none") +
 scale_y_continuous(labels = scales::comma) +
 labs(x = NULL, y = NULL) +
 theme_minimal(base_size = 10)

# 5.3. add interactivity with ggplotly
ggplotly(chart4, tooltip = "text") %>%
  layout(margin = list(b = 80),
         annotations = list(x = 0, y = -0.15, xref = "paper", yref = "paper",
                 text = "Each bubble is one school, sized by 2025 enrolment",
                 showarrow = FALSE, xanchor = "left", font = list(size = 10)))

```

## Column {.sidebar data-width="220"}

```{r lga-list, fig.width=1.8, fig.height=3.7, dpi=96, fig.retina=2, out.width="195px", out.height="400px"}
# 5.4. deploy filter as side bar to interact with bubble chart
filter_select("lga", "Select LGA(s) to show affected schools and students in bubble chart", sd, ~LGA, multiple = TRUE)

#6.1. generate list of top 15 lgas by count of at risk schools from aggregated table
top15_lgas <- lga_map_data %>%
 st_drop_geometry() %>%
 slice_max(total_affected_schools, n = 15, with_ties = TRUE) %>%
 mutate(lga = str_to_title(LGA_NAME),
        highlight = total_affected_schools == max(total_affected_schools))

chart6 <- ggplot(top15_lgas, aes(y = reorder(lga, total_affected_schools))) +
 geom_text(aes(x = 0, label = lga, colour = highlight),
          hjust = 0, size = 3) +
geom_text(aes(x = 0.80, label = total_affected_schools, colour = highlight),
           hjust = 0, size = 3, fontface = "bold") +
 scale_colour_manual(values = c(`TRUE` = "#4A1486", `FALSE` = "grey30")) +
 scale_x_continuous(limits = c(0, 1), expand = c(0, 0)) +
 labs(title = "Top 15 LGAs by number\nof at-risk schools", x = NULL, y = NULL) +
 theme_void(base_size = 9) +
 theme(legend.position     = "none", plot.title.position = "plot",
       plot.title = element_text(face = "bold", hjust = 0, size = 10,
                                 margin = margin(b = 6)),
    plot.margin = margin(4, 6, 4, 4))

chart6
```