Skip to main content

Ratio Study for Computer Assisted Mass Appraisal (CAMA) models

Ratio-Study is software package for Python developed by the Municipal Property Assessment Corporation (MPAC) of Ontario, Canada. It has been developed and is maintained by ASMA-DS: the Data Science team within the Assessment Standards and Mass Appraisal Department at MPAC.

This package provides a comprehensive suite of functions for evaluating Computer Assisted Mass Appraisal (CAMA) real estate valuation models. These functions comprise but are not limited to the International Association of Assessing Officers (IAAO)' Standard on Ratio Studies, as well as recent advances in this area.

Backend support (pandas / polars / pyarrow)

The package is backend-agnostic thanks to narwhals. Public functions (ratios, rts_calculator, asr_median, cod, prd, prb, rmse, mae, CoC, CoV_adj, vei_analysis, vem, gini_stats, gini_decomp, gini_factors, bo_decompose, bo_multi_decomposition, compare_ratios, etc.) accept any of the following:

  • pandas.DataFrame (default)
  • polars.DataFrame
  • pyarrow.Table
  • A narwhals-wrapped frame (narwhals.DataFrame / narwhals.LazyFrame)
  • 1D values can be any of: numpy.ndarray, pandas.Series, polars.Series, narwhals.Series, or a plain list.

Where the input is a polars / pyarrow / narwhals frame, the result is returned in the same backend so you can keep your pipeline native.

A few third-party libraries remain pandas-only, so the package converts at the function boundary where needed:

  • seaborn (used in graphs.py)
  • xlsxwriter via pd.ExcelWriter (used in reporting.py)
  • statsmodels.formula.api.ols (used in gini_factors)
import polars as pl
from ratio_study import ratios, load_sample_dataset

# Load a polars DataFrame from the bundled parquet sample
df = load_sample_dataset("polars")

# Compute IAAO ratio indicators — result is a polars.DataFrame
result = ratios(
    df,
    market_value_header="time_adjusted_sale_price",
    assessment_header="assessment_value_new",
    list_of_indicators=["Median", "Mean", "CoD", "PRD", "PRB"],
    group_by="property_type",
)
print(result.to_dicts())

References

IAAO's Standard on Ratio Studies available at https://www.iaao.org/media/standards/Standard_on_Ratio_Studies.pdf

Thomas J. DiCiccio. Bradley Efron. "Bootstrap confidence intervals." Statist. Sci. 11 (3) 189 - 228, August 1996. https://doi.org/10.1214/ss/1032280214

Quintos, C. (2020). A Gini measure for vertical equity in property assessments. Journal of Property Tax Assessment & Administration, 17(2). Retrieved from https://researchexchange.iaao.org/jptaa/vol17/iss2/2

Quintos, C. (2021). A Gini decomposition of the sources of inequality in property assessments. Journal of Property Tax Assessment & Administration, 18(2). Retrieved from https://researchexchange.iaao.org/jptaa/vol18/iss2/6

Formulas on article by David Zaslavsky, retrieved from https://www.ellipsix.net/blog/2012/11/the-gini-coefficient-for-distribution-inequality.html

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ratio_study-0.4.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ratio_study-0.4.2-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file ratio_study-0.4.2.tar.gz.

File metadata

  • Download URL: ratio_study-0.4.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for ratio_study-0.4.2.tar.gz
Algorithm Hash digest
SHA256 769c64472f371bfaed74bec06795a8ea4689c94778455d630065af77d5c37565
MD5 4c73d339e1756525e9cbeaa5c8d13276
BLAKE2b-256 c6e865cda13692f495136479d56400fd63d10df5c4cec3dc5b519c5575551af6

See more details on using hashes here.

File details

Details for the file ratio_study-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: ratio_study-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for ratio_study-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0872803f0e7e617aa2022370a5ead66f0dc0593a056ce99f2bd2654f9b792bde
MD5 1ea0ad177a1b9826c57f05689a4a3ce9
BLAKE2b-256 136d28268b0f995e9ff1e190b079d6776585a557e2527c4af5b87d6c3d1e096f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1.1

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page