bolster.data_sources.nisra.work_quality
NISRA Work Quality in Northern Ireland Module.
This module provides access to Work Quality statistics for Northern Ireland, covering seventeen indicators of job quality for employees aged 18 and over.
The publication draws on two main sources: - Labour Force Survey (LFS): subjective and contractual indicators - Annual Survey of Hours and Earnings (ASHE): earnings-based indicator
- Work quality indicators covered:
Real Living Wage: proportion earning above the Real Living Wage
Zero-hours contracts: proportion not on zero-hours contracts
Secure employment: permanent or preferred temporary contracts
Job satisfaction: satisfied or very satisfied with job
Career progression: opportunities for career progression
Decision making: involvement in workplace decisions
Meaningful work: performing work perceived as meaningful
Flexible work: access to flexible working arrangements
Line manager support: positive line manager relationship
Bullying & harassment: not bullied or harassed at work
Skills match: has the skills required for current duties
Workplace accidents: no accident reported at work
Underemployment: employees who are underemployed
Overemployment: employees who are overemployed
Trade union membership: member of a trade union
Training participation: participated in training (last 13 weeks)
Overtime working: reported working overtime
- Data Source: NISRA Labour Market and Social Welfare statistics.
Index page: https://www.nisra.gov.uk/statistics/labour-market-and-social-welfare/work-quality
Update Frequency: Annual (published in spring for the preceding calendar year).
- Data Coverage:
Most indicators: 2020 to present (calendar year)
Line manager support, bullying & harassment, skills match: 2022 to present (reported as rolling 12-month periods, e.g., “July 2024 to June 2025”)
- Breakdowns available per indicator:
Overall (NI)
By sex (Male / Female)
By age group (18-39 / 40 and over)
By deprivation quintile (most deprived / least deprived)
By skill level (low skilled / high skilled)
Examples
>>> from bolster.data_sources.nisra import work_quality
>>> df = work_quality.get_latest_work_quality()
>>> 'indicator' in df.columns
True
>>> 'value' in df.columns
True
>>> url, year = work_quality.get_work_quality_publication_url()
>>> url.startswith('https://')
True
>>> year >= 2025
True
- Publication Details:
Frequency: Annual
Published by: NISRA
Coverage: Employees aged 18 and over in Northern Ireland
Source surveys: Labour Force Survey (LFS) and ASHE
Attributes
Functions
Get the URL of the latest Work Quality Excel file and publication year. |
|
|
Parse a Work Quality Excel file into a tidy long-format DataFrame. |
|
Download and parse the latest Work Quality publication. |
Validate a Work Quality DataFrame for expected structure and values. |
Module Contents
- bolster.data_sources.nisra.work_quality.WORK_QUALITY_INDEX_URL = 'https://www.nisra.gov.uk/statistics/labour-market-and-social-welfare/work-quality'[source]
- bolster.data_sources.nisra.work_quality.get_work_quality_publication_url()[source]
Get the URL of the latest Work Quality Excel file and publication year.
Scrapes the NISRA work quality index page to discover the most recent publication link, then follows to the publication page to find the Excel file.
- Returns:
Tuple of (excel_url, year) e.g. (”https://www.nisra.gov.uk/system/files/…/work-quality-2025.xlsx”, 2025)
- Raises:
NISRADataNotFoundError – If unable to find the publication or Excel file
- Return type:
Example
>>> url, year = get_work_quality_publication_url() >>> url.startswith('https://') True >>> year >= 2025 True
- bolster.data_sources.nisra.work_quality.parse_work_quality_file(file_path, year)[source]
Parse a Work Quality Excel file into a tidy long-format DataFrame.
Extracts the overall NI proportion for each of the 17 work quality indicators. One row per (indicator, year_label) combination.
- Parameters:
file_path (str | pathlib.Path) – Path to the Work Quality Excel (.xlsx) file.
year (int) – Publication year (e.g. 2025 for the 2025 publication).
- Returns:
indicator: str — snake_case indicator name (e.g. “job_satisfaction”)
year_label: str — year as printed in the source (e.g. “2025” or “July 2024 to June 2025” for rolling-period indicators)
year: int — latest calendar year in the period
value: float — proportion (percentage, 0-100)
geography: str — always “Northern Ireland” for this dataset
- Return type:
DataFrame with columns
- Raises:
NISRADataNotFoundError – If the file cannot be opened or no data is found.
Example
>>> url, yr = get_work_quality_publication_url() >>> path = download_file(url, cache_ttl_hours=90 * 24) >>> df = parse_work_quality_file(path, yr) >>> sorted(df.columns.tolist()) ['geography', 'indicator', 'value', 'year', 'year_label'] >>> len(df) > 0 True
- bolster.data_sources.nisra.work_quality.get_latest_work_quality(force_refresh=False)[source]
Download and parse the latest Work Quality publication.
Automatically discovers the current publication URL by scraping the NISRA index page, downloads the Excel file (caching for 90 days), and returns a tidy long-format DataFrame.
- Parameters:
force_refresh (bool) – If True, bypass cache and re-download the file.
- Returns:
indicator: str (e.g. “job_satisfaction”)
year_label: str (e.g. “2025” or “July 2024 to June 2025”)
year: int
value: float (percentage, 0-100)
geography: str (“Northern Ireland”)
- Return type:
DataFrame with columns
- Raises:
NISRADataNotFoundError – If the publication or file cannot be found.
Example
>>> df = get_latest_work_quality() >>> 'indicator' in df.columns True >>> df['year'].max() >= 2025 True
- bolster.data_sources.nisra.work_quality.validate_work_quality_data(df)[source]
Validate a Work Quality DataFrame for expected structure and values.
- Parameters:
df (pandas.DataFrame) – DataFrame returned by parse_work_quality_file or get_latest_work_quality.
- Returns:
True if all checks pass.
- Raises:
NISRAValidationError – If any validation check fails.
- Return type:
Example
>>> df = get_latest_work_quality() >>> validate_work_quality_data(df) True