National Household Model
Source: data.gov.uk (2017-10-30)

The National Household Model (NHM) is delivered by the Department for Business, Energy and Industrial Strategy (BEIS). It was developed on behalf of BEIS by the Centre for Sustainable Energy (CSE) as an open-source tool for projecting the effects of policy and other legislative changes on the energy and emissions of the UK domestic housing stock by the Department of Energy and Climate Change (DECC).  In order to be able to set up scenarios model users need to learn a specialist scenario language based on S-expressions (such as those used in the Lisp language) using the instruction manual found on the BEIS GitHub site.  This will allow them to run the model which acts on the data in the various UK housing surveys. UK Data Archive stores the datasets for this model on behalf of the Department for Communities and Local Government (DCLG). Users need to register at UK Data Archive in order to access the raw data and run a conversion program to create a full dataset. The NHM team encourages feedback on all aspects of the model and documentation.

Navigation Menu

GitHub CopilotWrite better code with AI

GitHub SparkBuild and deploy intelligent apps

GitHub ModelsManage and compare prompts

MCP RegistryNewIntegrate external tools

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start
- Why GitHub (https://github.com/why-github)
- Documentation (https://docs.github.com)
- Blog (https://github.blog)
- Changelog (https://github.blog/changelog)
- Marketplace (https://github.com/marketplace)
View all features (https://github.com/features)
- Enterprises (https://github.com/enterprise)
- Small and medium teams (https://github.com/team)
- Startups (https://github.com/enterprise/startups)
- Nonprofits (https://github.com/solutions/industry/nonprofits)
- App Modernization (https://github.com/solutions/use-case/app-modernization)
- DevSecOps (https://github.com/solutions/use-case/devsecops)
- DevOps (https://github.com/solutions/use-case/devops)
- CI/CD (https://github.com/solutions/use-case/ci-cd)
- View all use cases (https://github.com/solutions/use-case)
- Healthcare (https://github.com/solutions/industry/healthcare)
- Financial services (https://github.com/solutions/industry/financial-services)
- Manufacturing (https://github.com/solutions/industry/manufacturing)
- Government (https://github.com/solutions/industry/government)
- View all industries (https://github.com/solutions/industry)
View all solutions (https://github.com/solutions)
- AI (https://github.com/resources/articles?topic=ai)
- Software Development (https://github.com/resources/articles?topic=software-development)
- DevOps (https://github.com/resources/articles?topic=devops)
- Security (https://github.com/resources/articles?topic=security)
- View all topics (https://github.com/resources/articles)
- Customer stories (https://github.com/customer-stories)
- Events & webinars (https://github.com/resources/events)
- Ebooks & reports (https://github.com/resources/whitepapers)
- Business insights (https://github.com/solutions/executive-insights)
- GitHub Skills (https://skills.github.com)
- Documentation (https://docs.github.com)
- Customer support (https://support.github.com)
- Community forum (https://github.com/orgs/community/discussions)
- Trust center (https://github.com/trust-center)
- Partners (https://github.com/partners)
GitHub SponsorsFund open source developers
- Security Lab (https://securitylab.github.com)
- Maintainer Community (https://maintainers.github.com)
- Accelerator (https://github.com/accelerator)
- Archive Program (https://archiveprogram.github.com)
- Topics (https://github.com/topics)
- Trending (https://github.com/trending)
- Collections (https://github.com/collections)
Enterprise platformAI-powered developer platform

GitHub Advanced SecurityEnterprise-grade security features

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support
- Pricing (https://github.com/pricing)
Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Cancel Submit feedback

Saved searches

Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our documentation (https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax).

Cancel Create saved search

Sign in (/login?return_to=https%3A%2F%2Fgithub.com%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator)

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

UKGovernmentBEIS (/UKGovernmentBEIS) / national-household-model-stock-files-creator (/UKGovernmentBEIS/national-household-model-stock-files-creator) Public
- Notifications (/login?return_to=%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator) You must be signed in to change notification settings
- Fork 2 (/login?return_to=%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator)
Star 2 (/login?return_to=%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator)

2 stars (/UKGovernmentBEIS/national-household-model-stock-files-creator/stargazers) 2 forks (/UKGovernmentBEIS/national-household-model-stock-files-creator/forks) Branches (/UKGovernmentBEIS/national-household-model-stock-files-creator/branches) Tags (/UKGovernmentBEIS/national-household-model-stock-files-creator/tags) Activity (/UKGovernmentBEIS/national-household-model-stock-files-creator/activity)

Star (/login?return_to=%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator)

Notifications (/login?return_to=%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator) You must be signed in to change notification settings
- Code (/UKGovernmentBEIS/national-household-model-stock-files-creator)
- Issues 2 (/UKGovernmentBEIS/national-household-model-stock-files-creator/issues)
- Pull requests 0 (/UKGovernmentBEIS/national-household-model-stock-files-creator/pulls)
- Actions (/UKGovernmentBEIS/national-household-model-stock-files-creator/actions)
- Projects 0 (/UKGovernmentBEIS/national-household-model-stock-files-creator/projects)
Uh oh!

There was an error while loading. Please reload this page.
- Insights (/UKGovernmentBEIS/national-household-model-stock-files-creator/pulse)
- Code (/UKGovernmentBEIS/national-household-model-stock-files-creator)
- Issues (/UKGovernmentBEIS/national-household-model-stock-files-creator/issues)
- Pull requests (/UKGovernmentBEIS/national-household-model-stock-files-creator/pulls)
- Actions (/UKGovernmentBEIS/national-household-model-stock-files-creator/actions)
- Projects (/UKGovernmentBEIS/national-household-model-stock-files-creator/projects)
- Security (/UKGovernmentBEIS/national-household-model-stock-files-creator/security)
- Insights (/UKGovernmentBEIS/national-household-model-stock-files-creator/pulse)
UKGovernmentBEIS/national-household-model-stock-files-creator

master

Branches (/UKGovernmentBEIS/national-household-model-stock-files-creator/branches)Tags (/UKGovernmentBEIS/national-household-model-stock-files-creator/tags)

(/UKGovernmentBEIS/national-household-model-stock-files-creator/branches) (/UKGovernmentBEIS/national-household-model-stock-files-creator/tags)

Go to file

Open more actions menu

Folders and files

Last commit message

Last commit date

Latest commit

History

(/UKGovernmentBEIS/national-household-model-stock-files-creator/commits/master/)

data (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/data)

data (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/data)

ehcs (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/ehcs)

ehcs (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/ehcs)

scotland (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/scotland)

scotland (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/scotland)

wales (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/wales)

wales (/UKGovernmentBEIS/national-household-model-stock-files-creator/tree/master/wales)

.gitignore (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/.gitignore)

.gitignore (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/.gitignore)

.gitmodules (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/.gitmodules)

.gitmodules (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/.gitmodules)

README.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/README.md)

README.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/README.md)

accessing_housing_stock_data.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/accessing_housing_stock_data.md)

accessing_housing_stock_data.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/accessing_housing_stock_data.md)

combinestock.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/combinestock.R)

combinestock.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/combinestock.R)

install-dependencies.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/install-dependencies.R)

install-dependencies.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/install-dependencies.R)

main.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/main.R)

main.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/main.R)

makefile (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/makefile)

makefile (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/makefile)

runsedbuk.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/runsedbuk.R)

runsedbuk.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/runsedbuk.R)

testcompare.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/testcompare.R)

testcompare.R (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/testcompare.R)

update-dependencies.sh (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/update-dependencies.sh)

update-dependencies.sh (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/update-dependencies.sh)

windows_installation.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/windows_installation.md)

windows_installation.md (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/windows_installation.md)

View all files

Repository files navigation
- README (#)
Synopsis

A series of R scripts that can be used to create structured zip file known as the 'Default Import Package' that can be imported by the National Household Model (https://github.com/UKGovernmentBEIS/national-household-model-core-components) as a housing stock. For more information on the content and structure of files within the 'Default Import Package' please see the Stock section within the application manual.

#Small edit: updated data series reference

Synopsis

A series of R scripts that can be used to create structured zip file known as the 'Default Import Package' that can be imported by the National Household Model (https://github.com/UKGovernmentBEIS/national-household-model-core-components/releases/tag/v-6.5.5) as a housing stock. For more information on the content and structure of files within the 'Default Import Package' please see the Stock section within the NHM documentation (https://github.com/UKGovernmentBEIS/national-household-model-documentation/releases).

The source files from which the stock files are created cannot be distributed via this public repository, however details for how these files can be obtained can be found here (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/accessing_housing_stock_data.md). Once downloaded these files should be added to their respective directories in the '/data folder' as follows:
- Copy the contents of SN 8068 into folder data/EHS_2014
- Create a folder called 'fuel_poverty' within data/EHS_2014 and Copy the contents of SN 8069 into it
- Copy the contents of both the Living in Wales:Property Survey and Living in Wales:Household Survey into data/LiW-2008
- Copy the Scottish survey data file into data/SHCS_11-13, ensure the file is re-named external_cse_data.sav
Installation

The scripts for creating the stock files have been written in R (https://cran.r-project.org/), which will need to be downloaded and installed.

Installation for Windows (/UKGovernmentBEIS/national-household-model-stock-files-creator/blob/master/windows_installation.md)

Running the script
- Ensure you have downloaded the required source survey files as previously mentioned.
- Start the R command line application or R studio
- Switch your workspace to the location you have downloaded this repository to using setwd("[PATH TO THE DIRECTORY]")
- Execute the stock creation scripts by entering 'source("main.R")'.
- Check the console for the status of the import, if succesful and output dirtory should be created your workspace directory, this should include sub directories for scotland, england and wales and uk. Each of these sub-directories should include the structured csv files and a zip file which can be imported into the NHM standalone as a stock.
License

[Open Government License] (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)

About

No description, website, or topics provided.

Resources

Readme (#readme-ov-file)

Uh oh!

There was an error while loading. Please reload this page.

Activity (/UKGovernmentBEIS/national-household-model-stock-files-creator/activity)

Custom properties (/UKGovernmentBEIS/national-household-model-stock-files-creator/custom-properties)

Stars

2 stars (/UKGovernmentBEIS/national-household-model-stock-files-creator/stargazers)

Watchers

5 watching (/UKGovernmentBEIS/national-household-model-stock-files-creator/watchers)

Forks

2 forks (/UKGovernmentBEIS/national-household-model-stock-files-creator/forks)

Report repository (/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FUKGovernmentBEIS%2Fnational-household-model-stock-files-creator&report=UKGovernmentBEIS+%28user%29)

Releases (/UKGovernmentBEIS/national-household-model-stock-files-creator/releases)

Packages 0 (/orgs/UKGovernmentBEIS/packages?repo_name=national-household-model-stock-files-creator)

No packages published

Contributors 6 (/UKGovernmentBEIS/national-household-model-stock-files-creator/graphs/contributors)

Uh oh!

There was an error while loading. Please reload this page.

Languages
- R 99.9% (/UKGovernmentBEIS/national-household-model-stock-files-creator/search?l=r)
- Other 0.1%
Footer

(https://github.com) © 2026 GitHub, Inc.

Footer navigation
- Terms (https://docs.github.com/site-policy/github-terms/github-terms-of-service)
- Privacy (https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
- Security (https://github.com/security)
- Status (https://www.githubstatus.com/)
- Community (https://github.community/)
- Docs (https://docs.github.com/)
- Contact (https://support.github.com?tags=dotcom-footer)
- Manage cookies
- Do not share my personal information
You can’t perform that action at this time.