πŸ‡ΊπŸ‡Έ

Statmerica

AboutData Sources

Data Sources & Methodology

Transparent documentation of all data sources, processing scripts, and methodologies used to create the charts and comparisons in Statmerica.

Data Sources

Consumer Price Index (CPI)
Consumer price level (CPI-U) used to measure inflation over each term

Source

Organization: FRED (CPIAUCNS)
Homepage:fred.stlouisfed.org/series/CPIAUCNS
Series: CUUR0000SA0
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:cpi
data/cpi.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch CPI-U, all items, NSA (CUUR0000SA0, published on FRED as CPIAUCNS)
  • Use the December index as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Inflation card: total price rise over the term, yearly inflation in chart
Nonfarm Payroll Jobs
Total jobs on U.S. nonfarm payrolls, December of each year

Source

Organization: FRED (PAYEMS)
Homepage:fred.stlouisfed.org/series/PAYEMS
Series: PAYEMS
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:jobs
data/jobs.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch FRED PAYEMS (monthly, seasonally adjusted, thousands)
  • Use the December value as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Jobs card: percent growth over the term
Grocery Prices (CPI Food at Home)
Price index for food bought at grocery stores

Source

Organization: FRED (CUUR0000SAF11)
Homepage:fred.stlouisfed.org/series/CUUR0000SAF11
Series: CUUR0000SAF11
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:groceries
data/groceries.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch FRED CUUR0000SAF11 (monthly, not seasonally adjusted)
  • Use the December index as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Grocery Prices card: total price rise over the term
Real Disposable Income per Person
After-tax income per person, including government payments, adjusted for inflation

Source

Organization: FRED (A229RX0)
Homepage:fred.stlouisfed.org/series/A229RX0
Series: A229RX0
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:disposable-income
data/disposable_income.json
Attribution: U.S. Bureau of Economic Analysis via FRED

Methodology

  • Fetch FRED A229RX0 (monthly, chained 2017 dollars, SAAR)
  • Use the December value as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Disposable Income card: percent growth over the term
Housing Affordability
Mortgage payment on a median-priced new home as a share of median household income

Source

Organization: FRED (MSPUS)
Homepage:fred.stlouisfed.org/series/MSPUS
Series: MSPUS, MORTGAGE30US, MEHOINUSA646N
Coverage: 1979–2025
Frequency: Annual (Q4 price, December rate)

Credibility & Impartiality

Processing

pnpm run fetch:housing-affordability
data/housing_affordability.json
Attribution: U.S. Census Bureau and HUD; Freddie Mac; via FRED

Methodology

  • Q4 median sales price of new houses sold (MSPUS)
  • December average 30-year fixed mortgage rate (MORTGAGE30US)
  • Payment: 80% loan, 30 years, principal and interest only
  • Divide by monthly median household income (MEHOINUSA646N; Census Table H-5 before 1984)

Chart Usage

  • Housing Affordability card: change in percentage points of income
Homeownership
Quarterly Census homeownership rate; annualized with Q4 and latest quarter

Source

Organization: FRED (RHORUSQ156N)
Homepage:fred.stlouisfed.org/series/RHORUSQ156N
Series: RHORUSQ156N
Coverage: 1979–2025
Frequency: Quarterly, annualized by Q4 value

Credibility & Impartiality

Processing

pnpm run fetch:homeownership
data/homeownership.json
Attribution: U.S. Census Bureau via FRED

Methodology

  • Fetch FRED RHORUSQ156N (quarterly)
  • Use the Q4 value as each year's value
  • Keep the newest quarter of an unfinished year as a partial point, not scored

Chart Usage

  • Homeownership card: change in percentage points
Life Expectancy at Birth (US)
Annual life expectancy at birth, in years

Source

Organization: World Bank
Homepage:data.worldbank.org/indicator/SP.DYN.LE00.IN
Series:
Coverage: 1979–2024
Frequency: Annual

Credibility & Impartiality

Processing

pnpm run fetch:life-expectancy
data/life_expectancy.json
Attribution: World Bank Open Data

Methodology

  • Fetch World Bank SP.DYN.LE00.IN (USA)
  • Filter to 1979+

Chart Usage

  • Life Expectancy card: change in years
Real GDP (Chained 2017 $, SAAR)
Real GDP, Q4 levels in chained 2017 dollars

Source

Organization: FRED (GDPC1)
Homepage:fred.stlouisfed.org/series/GDPC1
Series: GDPC1
Coverage: 1979–2025
Frequency: Quarterly, annualized by Q4 value

Credibility & Impartiality

Processing

pnpm run fetch:gdp
data/gdp.json
Attribution: U.S. Bureau of Economic Analysis via FRED

Methodology

  • Fetch FRED GDPC1 quarterly real GDP
  • Use the Q4 value as each year's value
  • Keep the newest quarter of an unfinished year as a partial point, not scored

Chart Usage

  • GDP Growth card: percent growth over the term
Federal Debt Held by the Public to GDP
Federal debt held by the public as a percent of GDP, Q4 values

Source

Organization: FRED (FYGFGDQ188S)
Homepage:fred.stlouisfed.org/series/FYGFGDQ188S
Series: FYGFGDQ188S
Coverage: 1979–2025
Frequency: Quarterly, annualized by Q4 value

Credibility & Impartiality

Processing

pnpm run fetch:debt-to-gdp
data/debt_to_gdp.json
Attribution: Federal Reserve Bank of St. Louis; U.S. Treasury

Methodology

  • Fetch FRED FYGFGDQ188S, debt held by the public as % of GDP (quarterly)
  • Excludes debt the government owes itself, such as trust fund holdings
  • Use the Q4 value as each year's value
  • Keep the newest quarter of an unfinished year as a partial point, not scored

Chart Usage

  • Debt / GDP card: change in percentage points
Real Median Household Income
Real median household income in constant dollars

Source

Organization: FRED (MEHOINUSA672N)
Homepage:fred.stlouisfed.org/series/MEHOINUSA672N
Series:
Coverage: 1979–2025
Frequency: Annual

Credibility & Impartiality

Processing

pnpm run fetch:household-income
data/household_income.json
Attribution: U.S. Census Bureau via FRED; 1979-1983 from Census Historical Income Table H-5

Methodology

  • Fetch FRED MEHOINUSA672N real median household income (1984+)
  • Fill 1979–1983 from Census Historical Income Table H-5, scaled to match FRED in 1984

Chart Usage

  • Household Income card: percent growth over the term
Real Average Hourly Earnings
Real average hourly earnings (production & nonsupervisory), CPI-adjusted

Source

Organization: FRED (AHETPI)
Homepage:fred.stlouisfed.org/series/AHETPI
Series:
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:wages
data/wages.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch FRED AHETPI and CPIAUCSL (monthly)
  • Deflate AHE by CPI to get real hourly earnings
  • Use the December value as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Wages card: percent growth over the term
Gas Prices (Regular, Retail)
Average retail gasoline price; annual averages with latest observation

Source

Organization: FRED (APU000074714)
Homepage:fred.stlouisfed.org/series/APU000074714
Series: APU000074714
Coverage: 1979–2025
Frequency: Monthly, annualized by average

Credibility & Impartiality

Processing

pnpm run fetch:gas
data/gas_prices.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch BLS average price of regular unleaded gasoline (APU000074714) via FRED
  • Adjust each month for inflation with CPI-U to dollars of the latest CPI month
  • Average the 12 monthly prices for each year; pump prices kept as nominal
  • Show the year-to-date average of an unfinished year as a partial point, not scored

Chart Usage

  • Gas Prices card: inflation-adjusted percent change over the term
Income Gap (Top 10% / Bottom 50%)
Average pre-tax income of the top 10% divided by that of the bottom 50%

Source

Organization: World Inequality Database (derived)
Homepage:wid.world/
Series:
Coverage: 1979–2023
Frequency: Annual

Credibility & Impartiality

Processing

pnpm run fetch:income-gap
data/income_gap.json
Attribution: Derived from WID sptincj992 (adults, equal split), groups p90p100 and p0p50

Methodology

  • Read top 10% and bottom 50% pre-tax income shares (sptincj992) from the WID export
  • Ratio = (top 10% share / 0.10) / (bottom 50% share / 0.50)
  • No extrapolation: years WID has not published are left empty

Chart Usage

  • Income Gap card: percent change in the ratio
S&P 500 Index
Year-end closing level of the S&P 500 price index

Source

Organization: FRED (SP500)
Homepage:fred.stlouisfed.org/series/SP500
Series: SP500
Coverage: 1980–2025
Frequency: Daily, annualized by last December close

Credibility & Impartiality

Processing

pnpm run fetch:sp500
data/sp500.json
Attribution: S&P Dow Jones Indices LLC via FRED; pre-2016 year-end closes from Stooq

Methodology

  • Fetch FRED SP500 (daily, last ten years)
  • Keep earlier year-end closes from the stored file (originally Stooq ^spx)
  • Use the last December close as each year's value; newest close is a partial point
  • Adjust for inflation with CPI-U to dollars of the latest CPI month; quoted levels kept as nominal

Chart Usage

  • S&P 500 card: inflation-adjusted percent growth over the term
Federal Deficit (% of GDP, FY)
Federal deficit as a share of GDP by fiscal year. Surpluses are negative.

Source

Organization: FRED (FYFSGDA188S, FYFSD)
Homepage:fred.stlouisfed.org/series/FYFSGDA188S
Series:
Coverage: 1979–2025
Frequency: Annual (FY)

Credibility & Impartiality

Processing

pnpm run fetch:deficit
data/deficit.json
Attribution: Federal Reserve Bank of St. Louis; U.S. Office of Management and Budget

Methodology

  • Fetch FRED FYFSGDA188S, surplus or deficit as a percent of GDP
  • Flip the sign so deficits are positive and surpluses negative
  • Also store the dollar amount from FYFSD, converted from millions to billions

Chart Usage

  • Federal Deficit card: change in percentage points of GDP
Unemployment Rate (U-3, SA)
Monthly unemployment rate, December value for each year

Source

Organization: FRED (UNRATE)
Homepage:fred.stlouisfed.org/series/UNRATE
Series: LNS14000000
Coverage: 1979–2025
Frequency: Monthly, annualized by December value

Credibility & Impartiality

Processing

pnpm run fetch:unemployment
data/unemployment.json
Attribution: U.S. Bureau of Labor Statistics via FRED

Methodology

  • Fetch the CPS unemployment rate (LNS14000000, SA, published on FRED as UNRATE)
  • Use the December value as each year's value
  • Keep the newest month of an unfinished year as a partial point, not scored

Chart Usage

  • Unemployment card: change in percentage points

Data Processing Scripts

fetch:all
Runs every fetch script below, then validates the results

Command

pnpm run fetch:all

File

scripts/fetch-all.mjs

Output

data/*.json
validate:data
Checks ranges, signs, gaps, duplicate years and staleness for every dataset

Command

pnpm run validate:data

File

scripts/validate-data.mjs

Output

Pass or fail report
fetch:cpi
CPI-U, all items, NSA from FRED (CPIAUCNS)

Command

pnpm run fetch:cpi

File

scripts/fetch-cpi.mjs

Output

data/cpi.json
fetch:unemployment
Unemployment rate from FRED (UNRATE)

Command

pnpm run fetch:unemployment

File

scripts/fetch-unemployment.mjs

Output

data/unemployment.json
fetch:wages
Real hourly earnings: AHETPI deflated by CPIAUCSL

Command

pnpm run fetch:wages

File

scripts/fetch-wages.mjs

Output

data/wages.json
fetch:gdp
Real GDP (GDPC1), Q4 values

Command

pnpm run fetch:gdp

File

scripts/fetch-gdp.mjs

Output

data/gdp.json
fetch:debt-to-gdp
Federal debt to GDP (GFDEGDQ188S), Q4 values

Command

pnpm run fetch:debt-to-gdp

File

scripts/fetch-debt-to-gdp.mjs

Output

data/debt_to_gdp.json
fetch:deficit
Federal deficit as % of GDP (FYFSGDA188S) plus dollar amount (FYFSD)

Command

pnpm run fetch:deficit

File

scripts/fetch-deficit-fred.mjs

Output

data/deficit.json
fetch:homeownership
Homeownership rate (RHORUSQ156N), Q4 values

Command

pnpm run fetch:homeownership

File

scripts/fetch-homeownership.mjs

Output

data/homeownership.json
fetch:household-income
Real median household income with 1979–83 backfill

Command

pnpm run fetch:household-income

File

scripts/fetch-household-income.mjs

Output

data/household_income.json
fetch:gas
Regular gas price (APU000074714), yearly averages

Command

pnpm run fetch:gas

File

scripts/fetch-gas-prices.mjs

Output

data/gas_prices.json
fetch:sp500
S&P 500 year-end closes (FRED SP500 plus stored history)

Command

pnpm run fetch:sp500

File

scripts/fetch-sp500.mjs

Output

data/sp500.json
fetch:life-expectancy
Life expectancy at birth from the World Bank

Command

pnpm run fetch:life-expectancy

File

scripts/fetch-life-expectancy.mjs

Output

data/life_expectancy.json
fetch:jobs
Nonfarm payroll jobs (PAYEMS), December values

Command

pnpm run fetch:jobs

File

scripts/fetch-jobs.mjs

Output

data/jobs.json
fetch:groceries
CPI food at home (CUUR0000SAF11), December values

Command

pnpm run fetch:groceries

File

scripts/fetch-groceries.mjs

Output

data/groceries.json
fetch:disposable-income
Real disposable income per person (A229RX0), December values

Command

pnpm run fetch:disposable-income

File

scripts/fetch-disposable-income.mjs

Output

data/disposable_income.json
fetch:housing-affordability
Mortgage payment share of income from MSPUS, MORTGAGE30US and MEHOINUSA646N

Command

pnpm run fetch:housing-affordability

File

scripts/fetch-housing-affordability.mjs

Output

data/housing_affordability.json
fetch:income-gap
Builds the top 10% / bottom 50% income ratio from WID income shares

Command

pnpm run fetch:income-gap

File

scripts/fetch-income-gap.mjs

Output

data/income_gap.json
Data Update Process
How to refresh data sources and maintain data quality

Update Workflow

  1. Run pnpm run fetch:all to refresh every dataset. No API keys are needed.
  2. For the income gap, replace data/wid/WID_data_US.csv with a newer WID export when one is published
  3. Review the validate:data report, then rebuild the application

Data Quality

  • All raw data sources are preserved in their original format
  • Processing scripts are deterministic and repeatable
  • Data transformations are documented and version controlled
  • No values are extrapolated. Partial years are shown but never scored.
  • Both sides of a comparison are measured over the same number of complete years
AboutData SourcesContact

Data from BLS, BEA, Census, OMB, World Bank and WID