Data and analysis to support the 2025 Environment Plan.
Keywords
Carbon Reduction, Energy Efficiency, Regional Emissions
Show/Hide Code
# Pacman simplifies library loading by installing and loading in one step.pacman::p_load( tidyverse, janitor, readxl, glue, fs, duckdb, arrow, DBI, gt, gtExtras, treemapify, openair, ggtext, patchwork, showtext, fs, ragg, timetk)
Show/Hide Code
## AMENDED: Created a function to avoid repeating the JSON parsing logic.# This function fetches a colour palette from the WECA brand guidelines.fetch_weca_palette <-function(palette_type) { jsonlite::read_json("https://raw.githubusercontent.com/westofengland-ca/weca_templates/refs/heads/main/General_branding/brand_guidelines.json" ) |>pluck(3, "colors", palette_type) |>map_chr("hex") |>unname()}weca_primary_palette <-fetch_weca_palette("primary_colors")weca_secondary_palette <-fetch_weca_palette("secondary_colors")
1 Introduction
This document brings together data and analysis to support the West of England Combined Authority’s 2025 Environment Plan. It includes information on regional emissions, energy use and home heating.
North Somerset council is included in the West of England data throughout this document. The intention is for North Somerset to join the Mayoral Combined Authority in due course.
Show/Hide Code
# Connect to the EPC databasecon_epc <-dbConnect(duckdb::duckdb("../mca-data/data/ca_epc.duckdb"))invisible(dbExecute(con_epc, "INSTALL spatial"))invisible(dbExecute(con_epc, "LOAD spatial"))# Query necessary tablesca_la_tbl <-dbGetQuery(con_epc, "FROM ca_la_tbl")ghg_emissions_tbl <-dbGetQuery(con_epc, "FROM ghg_emissions_tbl")emissions_tbl <-dbGetQuery(con_epc, "FROM emissions_tbl")epc_domestic_lep_tbl <-dbGetQuery(con_epc, "FROM epc_domestic_lep_vw")epc_non_domestic_tbl <-dbGetQuery(con_epc, "FROM epc_non_domestic_vw")# Get names and codes for WECA and North Somerset local authoritiesweca_ns_la_codes <- ca_la_tbl |>filter(cauthnm =="West of England") |>pull(ladcd)weca_ns_la_names <- ca_la_tbl |>filter(cauthnm =="West of England") |>pull(ladnm)# Create a named vector of 4 colours for plotsweca_palette_4 <- weca_primary_palette[2:5] |>set_names(weca_ns_la_names)
Show/Hide Code
# Connect to the energy databasecon_env <-dbConnect(duckdb::duckdb("data/regional_energy.duckdb"))invisible(dbExecute(con_env, "LOAD SPATIAL"))# Query electricity tableelectricity_la_tbl <-dbGetQuery(con_env, "FROM electricity_la_tbl")energy_data_all_la_tbl <-dbGetQuery(con_env, "FROM energy_la_year_fuel_sector_long_vw")
Show/Hide Code
# Determine the most recent year available in the energy datasetmax_year <-max(energy_data_all_la_tbl$calendar_year)# The original if/else was overly complex and used a non-existent function.latest_epc_date <-as.Date(max(epc_domestic_lep_tbl$LODGEMENT_DATE))# Format the date for use in plot titles and textepc_date <-strftime(latest_epc_date, format ="%B %Y")
Photovoltaics dominate renewable energy generation in the West of England, followed by onshore wind. The chart below shows renewable energy generation by source and local authority for the most recent year available, which is 2024. Total renewable generation in the West of England in that year was approximately 414 GWh.
There is one fossil fuel power station in the West of England, at Avonmouth. It is a combined cycle gas turbine (CCGT) plant with a capacity of 1234 MW operated by Seabank Power Ltd. Generation data for 2024 were retrieved from the Elexon API for each settlement period in 2024. The total generation from the plant in 2024 was approximately 3,597 GWh.
So in 2024, renewable generation in the West of England was approximately 10% of the total electricity generated.
Show/Hide Code
seabank_plotly <- seabank_tbl |>plot_time_series(.date_var = date,.value = generation_mwh,.color_var = bmunit,.smooth =FALSE,.facet_vars = bmunit,.facet_ncol =2,.title ="Seabank Power Station Generation by Generating Unit",.x_lab ="Date",.y_lab ="Generation (MWh)" )seabank_gg <- seabank_tbl |>ggplot(aes(x = date, y = generation_mwh, color = bmunit)) +geom_line() +facet_wrap(~bmunit, ncol =1) +labs(title ="Seabank Power Station",subtitle =glue("Daily total generation by generating unit in {year_fossil}"),x ="Date",y ="Generation (MWh)",color ="Generating Unit" ) +scale_color_manual(values = weca_primary_palette[2:3]) +theme_minimal()
The plot below shows the daily generation from each of the two generating units at Seabank Power Station in 2024.
Show/Hide Code
seabank_gg
5 Energy Consumption and Fuel Types
Transport uses the largest share of energy in the West of England, closely followed by domestic and then industry, commercial and other users. The data below is for all energy consumption in the West of England in 2023. Almost all transport energy use is from petroleum products.
Total energy consumption in the West of England in 2023 was approximately 21,514 GWh. This is a drop of 19% since 2005.
Sector
Contribution (2023)
Transport
41%
Domestic
32%
Industrial commercial and other
28%
A pie chart representation of the energy consumption by end user sector is shown below.
Show/Hide Code
## AMENDED: URL updated to download Font Awesome v4.7.0 as required.# This ensures the correct font version is used for reproducibility.fa_font_path <-"fontawesome/fontawesome-webfont.ttf"if (!file.exists(fa_font_path)) {dir_create("fontawesome")download.file("https://raw.githubusercontent.com/FortAwesome/Font-Awesome/v4.7.0/fonts/fontawesome-webfont.ttf",destfile = fa_font_path,mode ="wb" )}font_add(family ="fontawesome", regular = fa_font_path)# Enable showtext for this chunkshowtext_auto()# Prepare data for plottingpie_data_tbl <- energy_data_weca_max_year_all_fuels_tbl |>select(sector, pct_sector) |>mutate(value =round(pct_sector *100),icon =case_when( sector =="Domestic"~"\uf015", # fa-home sector =="Industrial commercial and other"~"\uf275", # fa-industry sector =="Transport"~"\uf1b9"# fa-car ) ) |># Arrange for consistent plotting orderarrange(match(sector, c("Industry commercial and other", "Transport", "Domestic"))) |>mutate(y_pos =cumsum(value) -0.5* value,label_text =paste0(value, "%") )# Define colours for the plotbg_color <-"#1A2A3A"line_color <-"#A8B820"# Create the plotpie_chart <-ggplot(pie_data_tbl, aes(x =2, y = value)) +geom_col(width =1.8, color = line_color, fill = bg_color, linewidth =0.5) +geom_text(aes(x =3.1, y = y_pos, label = label_text), color = line_color, fontface ="bold", size =14) +geom_text(aes(x =2, y = y_pos, label = icon), family ="fontawesome", size =15, color = line_color) +coord_polar(theta ="y", start = pi /2, direction =-1) +xlim(c(0.5, 3.2)) +theme_void() +theme(plot.background =element_rect(fill = bg_color, color =NA),panel.background =element_rect(fill = bg_color, color =NA) )# Disable showtext after the plot is createdshowtext_auto(enable =FALSE)pie_chart
6 Energy Consumption by Fuel Type
Most energy consumed in the West of England is from petroleum products. The data below is for all energy consumption in the West of England in 2023.
Fuel
Contribution (2023)
Percentage of total energy
Petroleum
43
Gas
33
Electricity
19
Other
5
7 Home Heating: Fuel Types
Analysis of the main heating fuel type in homes with an Energy Performance Certificate (EPC) in the West of England. The data is current to August 2025. Only around 70% of homes in the West of England have an EPC. The main heat classification in the data is not always precisely defined, so the categories below are broad groupings and classified from the original data using a large language model. In the visualisations and table below the “Two or more fuels” category has been excluded as the numbers are very small and uncertain, and all renewable heating types (biomass, solar, heat pumps) have been grouped together.
Show/Hide Code
fuel_types_homes_plot <- fuel_types_homes_plot_tbl |>ggplot(aes(x = n, y = category)) +## AMENDED: Swapped x and y aesthetics, removed coord_flip() for simplicity.geom_col(fill = weca_primary_palette[1], show.legend =FALSE) +scale_x_continuous(labels = scales::comma) +scale_y_discrete(labels =function(x) str_wrap(x, width =20)) +labs(title ="Main heating fuel type in homes with an EPC",subtitle =glue("West of England homes with an EPC to {epc_date}"),x ="Number of homes",y =NULL,caption ="Source: MHCLG" ) +theme_weca_bar()fuel_types_homes_plot
Show/Hide Code
fuel_types_homes_single_bar <- fuel_types_homes_plot_tbl |>ggplot(aes(x =1, y = n, fill = category)) +geom_col(position ="stack", show.legend =TRUE) +## AMENDED: Explicitly set position = "stack" for clarity.coord_flip() +scale_y_continuous(labels = scales::comma) +scale_fill_manual(values = weca_palette_6) +guides(fill =guide_legend(reverse =TRUE)) +labs(title ="Main heating fuel type in homes with an EPC",subtitle =glue("Homes in the West of England with an EPC to {epc_date}"),x =NULL,y ="Number of homes",fill ="Fuel type",caption ="Source: MHCLG" ) +theme_weca_bar() +theme(axis.text.y =element_blank(),axis.ticks.y =element_blank(), ## AMENDED: Also remove ticks for a cleaner look.plot.title.position ="plot", ## AMENDED: Better way to align title than manual hjust.plot.subtitle =element_text(hjust =0) ## AMENDED: Simpler alignment. )fuel_types_homes_single_bar
Main heating fuel type in homes with an EPC
West of England homes with an EPC to August 2025
Main heating fuel type
Number of homes
Percentage of homes
Mains gas
294,942
80%
Electricity
47,486
13%
Community heating scheme
13,778
4%
Oil
7,349
2%
Renewable (inc. heat pumps)
4,088
1%
Other and unknown
2,781
1%
Source: MHCLG
8 Energy Consumption Over Time by Local Authority
Show/Hide Code
energy_weca_plot <- energy_weca_plot_tbl |>ggplot(aes(x = calendar_year, y = gwh, fill = ladnm)) +geom_col() +scale_y_continuous(labels = scales::comma) +scale_x_continuous(breaks =seq(start_year, max_year, by =1)) +scale_fill_manual(values = weca_palette_4) +labs(title ="Total energy consumption (GWh)",subtitle =glue("West of England local authorities, {start_year}-{max_year}"),x ="Year",y ="GWh",fill ="Local authority",caption ="Source: Sub-national total final energy consumption" ) +coord_flip() +theme_weca_bar()energy_weca_plot
9 Emissions by Local Authority
The treemap below shows the total territorial emissions in Kilotonnes of CO2 equivalent (KtCO2e) for each local authority in the West of England for the most recent year available, which is 2023.
Show/Hide Code
emissions_treemap_plot <- emissions_data_weca_max_year_tbl |>ggplot(aes(area = total_emissions,fill = local_authority,label =glue("{round(total_emissions, 0)}\n{local_authority}") )) +geom_treemap() +geom_treemap_text(colour ="white",place ="topleft",min.size =4,grow =FALSE,reflow =TRUE ) +scale_fill_manual(values = weca_palette_4) +labs(title =glue("Total territorial emissions by local authority, {max_year} (KtCO2e)"),caption ="Source: UK local authority and regional greenhouse gas emissions statistics",fill ="Local authority" ) +theme_minimal() +theme(legend.position ="none",plot.title =element_text(size =20, face ="bold", hjust =0.5, margin =margin(b =10)) )emissions_treemap_plot
10 Emissions Over Time by Local Authority
Show/Hide Code
emissions_weca_plot <- emissions_weca_plot_tbl |>ggplot(aes(x = calendar_year, y = total_emissions, fill = local_authority)) +geom_col() +scale_y_continuous(labels = scales::comma) +scale_x_continuous(breaks =seq(start_year, max_year, by =1)) +scale_fill_manual(values = weca_palette_4) +labs(title ="Total territorial emissions (greenhouse gases)",subtitle =glue("West of England local authorities, {start_year}-{max_year}"),x ="Year",y ="KtCO2e", fill ="Local authority",caption ="Source: UK local authority and regional greenhouse gas emissions statistics" ) +coord_flip() +theme_weca_bar()emissions_weca_plot