Skip to content

Estimate heat pump costs across different housing archetypes

License

Notifications You must be signed in to change notification settings

nestauk/asf_heat_pump_affordability

Repository files navigation

asf_heat_pump_affordability

Description

This repo contains the functions and run script to generate a dataframe of the costs of installing Air Source Heat Pumps (ASHP) in 8 different types of home at a series of percentiles given by the user. The 8 housing archetypes are: flats; semi-detached & terraced houses and maisonettes; detached houses; and bungalows; with each group split into pre- and post-1950 construction. Costs are adjusted for inflation against a chosen base year.

Setup

  • Clone the repo
  • Meet the data science cookiecutter requirements, in brief:
    • Install: direnv and conda
  • Run make install to configure the development environment. This will:
    • Setup the conda environment
    • Configure pre-commit
  • Navigate to your local copy of the repo
  • Activate the conda environment with conda activate asf_heat_pump_affordability

Recreate cost policy analysis dataset

To recreate the data used in the Q1 2024 cost policy analysis, run the following lines in your terminal:

pip install jupytext
jupytext --to notebook asf_heat_pump_affordability/notebooks/investigate_effect_of_room_number.py

Run all lines of the resulting investigate_effect_of_room_number.ipynb notebook. The analytical output dataset will be saved into the asf-heat-pump-affordability bucket on S3.

Data sources - Q1 2024 cost policy analysis

NB: the URLs used by getter functions to load source data can be found and updated in asf_heat_pump_affordability/config/base.yaml

Repo structure

Key directories and files:

asf_heat_pump_affordability
├───config
│    base.yaml - core variables, including source URLs used by getter functions
│    schema.json - data types for loading flat files
├───getters
│    get_data.py - functions to retrieve data from external sources
├───notebooks
│    identify_and_review_analytical_sample.py - notebook to explore impact of applying exclusion criteria on core MCS-EPC dataset
│    investigate_effect_of_room_number.py - notebook using quantile regression models to estimate installation costs by archetype and room number
├───pipeline
│    archetypes.py - functions to classify housing archetypes
│    generate_cost_percentiles.py - functions to generate cost percentiles by archetype
│    preprocess_cpi.py - functions to preprocess Consumer Price Index dataset
│    preprocess_data.py - functions to preprocess MCS-EPC dataset to produce sample used to calculate cost distributions
│    produce_costs_dataset.py - run script with main() function

Contributor guidelines

Technical and working style guidelines


Project based on Nesta's data science project template (Read the docs here).

About

Estimate heat pump costs across different housing archetypes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published