House Price Indices with Python
Project description
hpiPy 
hpiPy simplifies and standardizes the creation of house price indices in Python.
The package provides tools to evaluate index quality through predictive accuracy, volatility, and revision metrics—enabling meaningful comparisons across different methods and estimators. It focuses on the most widely used approaches: repeat sales and hedonic pricing models, with support for base, robust, and weighted estimators where applicable. The package also includes a random forest–based method with partial dependence plots for post-model interpretability, as well as a neural network approach that separates property-specific and market-level effects to jointly estimate quality and index components from property-level data. Based on hpiR.
Quick Start
To install hpiPy from PyPI using pip:
pip install hpipy
Example
A basic example of creating a house price index:
import altair as alt
import pandas as pd
from hpipy.datasets import load_ex_sales
from hpipy.price_index import RepeatTransactionIndex
from hpipy.utils.plotting import plot_index
# Load prepared data.
df = load_ex_sales()
# Create an index.
hpi = RepeatTransactionIndex.create_index(
trans_data=df,
prop_id="pinx",
trans_id="sale_id",
price="sale_price",
date="sale_date",
periodicity="M",
estimator="robust",
log_dep=True,
smooth=True,
)
# Visualize the index.
with alt.renderers.enable("browser"):
plot_index(hpi, smooth=True).properties(title="Example Index").show()
Documentation
An installation guide, API documentation, and examples can be found in the documentation.
Running the Tests
- Create a virtual environment (we recommend
uv):
uv venv
- Install base and development dependencies:
uv pip install --requirements pyproject.toml --extra dev
- Run the test suite:
pytest
Acknowledgements
Based on the hpiR package.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hpipy-0.1.2.tar.gz.
File metadata
- Download URL: hpipy-0.1.2.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0811a2262323b61500108727f38eb8eb2ac305a165adb33f9fc6da3d1d59aec4
|
|
| MD5 |
5cbaacdea523b480e8b11561a4717f99
|
|
| BLAKE2b-256 |
a6e99f19bb3b2309b02d45cd54d2682bd7313816de3b398003b5bf7d3a677835
|
Provenance
The following attestation bundles were made for hpipy-0.1.2.tar.gz:
Publisher:
publish.yml on reidjohnson/hpipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hpipy-0.1.2.tar.gz -
Subject digest:
0811a2262323b61500108727f38eb8eb2ac305a165adb33f9fc6da3d1d59aec4 - Sigstore transparency entry: 197292717
- Sigstore integration time:
-
Permalink:
reidjohnson/hpipy@1a1dd234b245f6757fe3bde8f37e51acead23313 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/reidjohnson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a1dd234b245f6757fe3bde8f37e51acead23313 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hpipy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: hpipy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1edccb5b52080fa83c004a73ea469f08113d998147409ffea97231e83a99f2a5
|
|
| MD5 |
4e569750896a5191688860795d5b10a7
|
|
| BLAKE2b-256 |
1c59e6d567392bc1bf6c45b7d8fb62eff24e785f6e84babe0b075a5a8108eae7
|
Provenance
The following attestation bundles were made for hpipy-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on reidjohnson/hpipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hpipy-0.1.2-py3-none-any.whl -
Subject digest:
1edccb5b52080fa83c004a73ea469f08113d998147409ffea97231e83a99f2a5 - Sigstore transparency entry: 197292720
- Sigstore integration time:
-
Permalink:
reidjohnson/hpipy@1a1dd234b245f6757fe3bde8f37e51acead23313 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/reidjohnson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a1dd234b245f6757fe3bde8f37e51acead23313 -
Trigger Event:
push
-
Statement type: