1  Economic Growth

Contributing to national economic growth

Author

SN

Published

April 21, 2026

1.1 Context

This chapter tracks indicators related to the West of England’s contribution to national economic growth. Up to 10 indicators can be included, covering metrics like GVA, productivity, business growth, innovation, and employment.

1.2 Worked Example: Sample Economic Indicator

This example demonstrates how to create an indicator using R. It loads data, processes it, creates a chart with WECA branding, and presents findings.

Load required packages
# Load required packages
library(tidyverse)

# Source shared helpers (theme, helpers, fact_helpers, collate_fact)
source(here::here("scripts", "R", "_common.R"))
Load example data
# Load example indicator data
# In your actual analysis, replace this with your real data source
data <- load_csv(here::here("data", "examples", "example_indicator.csv"))

# Preview the data structure
head(data)
# A tibble: 6 × 6
  area     year indicator_name  indicator_value target_value national_average
  <chr>   <dbl> <chr>                     <dbl>        <dbl>            <dbl>
1 Bristol  2015 Employment Rate            72.3           75             73.1
2 Bristol  2016 Employment Rate            73.5           75             73.8
3 Bristol  2017 Employment Rate            74.2           75             74.2
4 Bristol  2018 Employment Rate            75.1           75             74.9
5 Bristol  2019 Employment Rate            76.3           75             75.4
6 Bristol  2020 Employment Rate            73.8           75             74.1
Process and summarize data
# Filter and process the data
# This example calculates the latest value and year-on-year change
processed <- data %>%
  filter(indicator_name == "Sample Economic Metric") %>%
  arrange(year) %>%
  mutate(
    # Calculate year-on-year change
    yoy_change = indicator_value - lag(indicator_value),
    yoy_pct = (yoy_change / lag(indicator_value)) * 100
  )

# Get the latest value for summary
latest <- processed %>%
  filter(year == max(year)) %>%
  pull(indicator_value)

latest_year <- processed %>%
  filter(year == max(year)) %>%
  pull(year)

1.2.1 Latest Value

The most recent value for this indicator is **** (as of ).

Create trend chart
# Create a line chart showing the trend over time
ggplot(processed, aes(x = year, y = indicator_value)) +
  geom_line(colour = weca_palette["forest_green"], linewidth = 1.2) +
  geom_point(colour = weca_palette["forest_green"], size = 3) +
  scale_y_continuous(labels = scales::comma) +
  labs(
    title = "Sample Economic Indicator Trend",
    x = "Year",
    y = "Indicator Value",
    caption = "Source: Example data"
  ) +
  theme_weca()
Error in `weca_palette["forest_green"]`:
! object of type 'closure' is not subsettable

1.2.2 Key Findings

  • The indicator has shown [describe trend - increasing/decreasing/stable]
  • Latest year-on-year change: [insert value]
  • Policy implications: [describe what this means for the priority area]

1.3 Indicator 1: [Your Indicator Name]

Data source: [Specify source] Last updated: [Date] Refresh schedule: [Annual/Quarterly/Monthly]

1.3.1 Overview

[Describe what this indicator measures and why it matters for economic growth]

Indicator 1 analysis
# Your code here
# Follow the pattern from the worked example above:
# 1. Load data
# 2. Process/filter/aggregate
# 3. Create visualization with theme_weca()
# 4. Calculate key statistics

1.3.2 Findings

[Your narrative findings here]


1.4 Indicator 2: [Your Indicator Name]

Data source: Last updated: Refresh schedule:

[Repeat structure above - add up to 10 indicators total]


1.5 Summary

[Summary of key findings across all indicators in this chapter. What is the overall picture for economic growth?]


1.6 Python Example (Alternative)

The example below shows how to achieve the same analysis using Python instead of R.

Python alternative for data analysis
# import pandas as pd
# import matplotlib.pyplot as plt
# from pathlib import Path
#
# # Load data with project-relative path
# project_root = Path(__file__).parent.parent.parent  # Navigate to project root
# data_path = project_root / "data" / "examples" / "example_indicator.csv"
# df = pd.read_csv(data_path)
#
# # Filter and process
# economic_data = df[df['indicator_name'] == 'Sample Economic Metric'].copy()
# economic_data = economic_data.sort_values('year')
#
# # Calculate year-on-year change
# economic_data['yoy_change'] = economic_data['indicator_value'].diff()
# economic_data['yoy_pct'] = (economic_data['yoy_change'] /
#                              economic_data['indicator_value'].shift(1)) * 100
#
# # Create chart (matplotlib - theme_weca for Python to be added later)
# fig, ax = plt.subplots(figsize=(10, 6))
# ax.plot(economic_data['year'], economic_data['indicator_value'],
#         marker='o', linewidth=2, color='#1D4F2B')
# ax.set_xlabel('Year')
# ax.set_ylabel('Indicator Value')
# ax.set_title('Sample Economic Indicator Trend')
# plt.show()