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. It also includes a random forest–based method paired with partial dependence plots to derive index components, 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
from hpipy.datasets import load_seattle_sales
from hpipy.price_index import RepeatTransactionIndex
from hpipy.utils.plotting import plot_index
# Load prepared data.
df = load_seattle_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", width=600).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:
uv run pytest
Acknowledgements
Based on the hpiR package.
Metadata
Release files for hpipy 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hpipy-0.1.5.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hpipy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.5 MB
Release files / hpipy-0.1.5.tar.gz
| Download URL | hpipy-0.1.5.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01bdcd8d28b2be93c4605846b4019b0bdcf7628936dd507bf679a3313eb43d24
|
|
BLAKE2b-256 checksum How to use checksums |
893060f4b932ecb0d97f54f0dc8630ee331192f1061866fe5aa29e31318bd850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2025.
Transparency logRelease files / hpipy-0.1.5-py3-none-any.whl
| Download URL | hpipy-0.1.5-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bb8211733db1cf3ada1b1e4806d9f98de44c2e221ec58eb36dfe5d5c022ffbc
|
|
BLAKE2b-256 checksum How to use checksums |
5a8e2e3ab2940d9ea80e25e3bb4024e28e24ce27fe939cd737ffe29c3bc101b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2025.
Transparency log