Compare metro price levels with BEA RPPs in Python

Compare all-items and housing-service price levels in Raleigh-Cary and New York using genuine BEA Regional Price Parities for 2024.

A market comparison often needs a geographic price benchmark alongside wages or income. BEA Regional Price Parities (RPPs) provide that context: they compare price levels across places for a given year. This example compares the New York-Newark-Jersey City metro with Raleigh-Cary for all items and housing services in 2024.

Sample data

price_levels.csv below is a genuine subset of the paid main table: the two selected metros, all-items and housing indexes, and 2024, with all 14 fields unchanged. The optional input.csv contains the two actual metro codes and their reference/comparison roles. The same selections appear in the places list in the Python code below. No household, price quote or spending record has been invented.

Save the sample as price_levels.csv in your working folder. The geographic codes refer to whole metropolitan statistical areas, not just Raleigh and New York City.

Code example

The code selects the same year and component for both areas, checks that each value is reported, and calculates (comparison RPP / reference RPP − 1) × 100. It uses Python’s standard library.

Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.

Python 3.10+ · Jupyter, IPython or a script
"""Compare 2024 metro price levels from the actual BEA RPP observations."""
import csv
from decimal import Decimal

# These are genuine metropolitan area identifiers, not invented households.
# Change these two codes and the year for your own comparison.
places = [
    {'role': 'reference', 'bea_area_code': '39580'},
    {'role': 'comparison', 'bea_area_code': '35620'},
]
year = '2024'
components = ['all_items', 'housing']
with open('price_levels.csv', newline='', encoding='utf-8') as file:
    rows = [row for row in csv.DictReader(file)
            if row['geography_type'] == 'metropolitan' and row['year'] == year
            and row['bea_area_code'] in {p['bea_area_code'] for p in places}
            and row['component'] in components]
lookup = {}
for row in rows:
    key = (row['bea_area_code'], row['component'])
    if key in lookup:
        raise ValueError('Duplicate area/component: ' + str(key))
    lookup[key] = row

results = []
for component in components:
    reference = lookup[(places[0]['bea_area_code'], component)]
    comparison = lookup[(places[1]['bea_area_code'], component)]
    if any(row['rpp_status'] != 'reported' for row in (reference, comparison)):
        raise ValueError('This comparison has an unavailable RPP.')
    difference = (Decimal(comparison['rpp_index']) / Decimal(reference['rpp_index']) - 1) * 100
    results.append({
        'component': component,
        'reference_area': reference['area_name'],
        'comparison_area': comparison['area_name'],
        'reference_rpp': reference['rpp_index'],
        'comparison_rpp': comparison['rpp_index'],
        'price_difference_pct': f'{difference:.2f}',
    })

print(f'{year}: {results[0]["comparison_area"]} compared with {results[0]["reference_area"]}')
print(f'{"Component":<12} {"Reference RPP":>12} {"Comparison RPP":>13} {"Difference":>12}')
for row in results:
    print(f'{row["component"]:<12} {row["reference_rpp"]:>12} '
          f'{row["comparison_rpp"]:>13} {row["price_difference_pct"]:>11}%')

Analysis of the output

2024: New York-Newark-Jersey City, NY-NJ (Metropolitan Statistical Area) compared with Raleigh-Cary, NC (Metropolitan Statistical Area)
Component    Reference RPP Comparison RPP   Difference
all_items          98.157       112.563       14.68%
housing           103.476       148.616       43.62%

In BEA’s 2024 comparison, New York’s metro all-items price level is 14.68% higher than Raleigh-Cary’s. Its housing-services price level is 43.62% higher. The housing contrast is larger than the overall contrast, giving an analyst a reason to examine housing separately in a regional brief.

Housing services are rent-based: BEA estimates price levels for tenant-occupied housing and uses spending weights that include imputed owner rents. These indexes are not dollar rents, house-sale prices or a personalized moving budget. A household’s actual costs also depend on what it buys and where it lives within the metro.

Reading the national benchmark

The source rpp_index is retained exactly. The national all-items RPP is 100, but national component RPPs need not be 100. For example, the 2024 U.S. housing-services benchmark is 100.629. The separate relative_to_us_index divides by the matching national component and multiplies by 100. Comparing the two metros’ original indexes, as above, avoids confusing the component’s scale with a national percentage difference.

Comparing years

An RPP change is a change relative to the national price level; it is not local inflation by itself. BEA’s implicit regional price growth combines RPPs with national PCE price changes. Do not label a percentage change in these RPPs “metro inflation,” sum component indexes, or treat them as spending shares. The source does not provide standard errors in these tables.

Using the full dataset

After purchase, replace the sample with price_levels.csv from the download. Change the codes in places, the year, or the component selection. For a file of locations, load your text identifiers with csv.DictReader in place of the inline list. To compare states, also change the filter from metropolitan to state and use the BEA state codes in areas.csv.

The unique observation key is geography_type + bea_area_code + year + component. Join areas.csv on geography type and BEA code, and components.csv on component. State FIPS and metro CBSA codes are separate text fields. The metro delineation follows July 2023 OMB definitions in this release; verify the same geography before joining wage or income files.

Enid, Twin Falls and Kiryas Joel-Poughkeepsie-Newburgh have unavailable earlier observations. Those 100 cells remain blank with rpp_status=not_available; the example stops if a selected observation is unavailable. Use coverage.csv and the area notes to review your selection rather than filling gaps with zero.

Explore spending, inflation and regional price data for related tasks. National CPI describes price change; Consumer Expenditure tables describe group spending. Neither provides a direct local spending estimate or an automatic category crosswalk to these RPP components.

Sources and versions

Source: BEA Regional Price Parities, SARPP and MARPP tables. The February 19, 2026 release adds 2024 and revises 2008–2023. It was retained November 18, 2026 UTC. This is one revised historical edition, not a collection of original annual publication vintages.

BEA makes the source data available free. Actually Clean Data sells the prepared tables, documentation, checks and reproducible edition. Processing improvements and publisher error corrections to the purchased edition are included; a genuinely new source edition can be a separate purchase. See the release notes and BEA’s methodology.

Example checked November 18, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.