Compare output growth and capacity utilization in Python
Compare machinery and transportation equipment using Federal Reserve G.17 real output growth and capacity utilization.
Compare output growth with capacity use
A manufacturing analyst wants to know whether rising activity is accompanied by tighter capacity. This example compares the machinery and transportation equipment groups from December 2024 to December 2025 using Federal Reserve G.17 estimates. It puts real output growth beside the share of capacity in use, so a similar growth rate does not hide different operating conditions.
The optional input.csv contains two genuine Federal Reserve group choices: machinery (G333) and transportation equipment (G336). The same choices appear in the selections list in the Python code below. No observations are invented.
Download monthly_observations.csv into your working folder. This is a genuine subset of the purchased table: 192 monthly observations for these two groups during 2024–2025, with all 21 fields unchanged. It includes adjusted and unadjusted production, plus adjusted capacity and utilization. The full $29 edition supplies 309,408 observations across 760 series, with 323 production groups and 57 capacity/utilization groups. Inspect the complete product.
Code example
This standard-library code runs in a notebook cell, IPython or a script. It selects seasonally adjusted values, verifies the needed periods and measures, then prints output growth, capacity use and the change in utilization.
Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.
"""Compare actual output changes with capacity use in two manufacturing groups."""
import csv
from decimal import Decimal
# These selections also appear in input.csv; observations are genuine.
selections = [{'group_code':'G333'}, {'group_code':'G336'}]
start_month, end_month = '2024-12', '2025-12'
selected = {r['group_code'] for r in selections}
observations = {}
with open('monthly_observations.csv', newline='', encoding='utf-8') as f:
for row in csv.DictReader(f):
if (row['group_code'] in selected and row['seasonal']=='SA'
and row['month'] in {start_month,end_month}):
key = row['group_code'], row['measure_code'], row['month']
if key in observations:
raise ValueError('Duplicate observation: '+str(key))
if row['availability']!='reported':
raise ValueError('Selected observation is unavailable: '+str(key))
observations[key] = row
results = []
for selection in selections:
code = selection['group_code']
required = [(code,m,t) for m in ['IP','CAP','UTL'] for t in [start_month,end_month]]
if any(k not in observations for k in required):
raise ValueError('Selected period/measure coverage is incomplete: '+code)
def value(measure,month):
return Decimal(observations[code,measure,month]['value'])
growth = (value('IP',end_month)/value('IP',start_month)-1)*100
utilization = value('UTL',end_month)
change = utilization-value('UTL',start_month)
results.append(dict(group_code=code,group_name=observations[code,'IP',end_month]['group_name'],
output_change_percent=f'{growth:.2f}',capacity_utilization_percent=f'{utilization:.2f}',
utilization_change_percentage_points=f'{change:.2f}'))
print(f'{start_month} to {end_month}; seasonally adjusted')
for row in results:
print(f"{row['group_name']}: output {row['output_change_percent']}%; "
f"capacity utilization {row['capacity_utilization_percent']}%; "
f"change {row['utilization_change_percentage_points']} percentage points")
Analysis of the output
2024-12 to 2025-12; seasonally adjusted
Machinery: output 4.23%; capacity utilization 80.24%; change 3.31 percentage points
Transportation equipment: output 4.16%; capacity utilization 67.06%; change 2.32 percentage points
Machinery output rose 4.23% between the two Decembers. Its utilization rate reached 80.24%, up 3.31 percentage points. Transportation equipment output grew at a similar rate, 4.16%, while its December 2025 utilization rate was 67.06%, up 2.32 percentage points.
The production index measures changes in real output, rather than sales dollars. Utilization describes output relative to the Federal Reserve’s estimated sustainable capacity. In this comparison, similar output growth accompanies different utilization levels. That is useful context for an industry activity report, though utilization alone does not establish profitability, efficiency or a universal capacity constraint.
The example calculates percentage growth from production indexes and percentage-point changes from utilization rates. Comparing the two production index levels would not tell you which industry is larger: each is scaled to its own 2017 output.
Add context for a manufacturing analysis
The manufacturing collection connects this real-output history with Census M3 orders and shipments, producer prices, payroll jobs and annual productivity. Those products answer related questions with different populations and definitions. Review their industry directories before aligning observations; matching labels alone do not establish a valid join or deflator.
Using the full dataset
Extract the purchased ZIP and replace the sample with its complete monthly_observations.csv. The example runs unchanged. Change start_month, end_month and the inline selections, or load your own CSV of Federal Reserve group codes. Keep identifiers as text. The unique observation key is series_id + month.
series.csv records actual first and last reported months. groups.csv supplies original labels and indicates which groups have capacity and utilization data. Production covers 323 groups, but capacity and utilization cover only 57; selecting another group may therefore require a production-only comparison. coverage.csv identifies absent source years without turning them into zeros.
measures.csv explains the units and bases. Production is indexed to 2017=100. Capacity uses the same output basis, so its base is 2017 actual output, not 2017 capacity. Utilization is a percentage. Most production groups use value-added weights; four stage-of-process groups use gross-value weights.
Original NAICS expressions can include partial codes, ranges and combinations. Preserve them as text rather than treating them as a universal NAICS crosswalk. Broader manufacturing (SIC) includes logging and publishing beyond NAICS manufacturing. Avoid adding overlapping aggregates or splicing revised series codes without reviewing the source definitions.
Sources and versions
Source: Federal Reserve G.17 data files, October 16, 2026 release, captured November 7, 2026 UTC. This edition contains January 1992–December 2025 where published, as revised in that release. Earlier history and partial 2026 are excluded. Observation dates, source release dates and ACD preparation dates describe different things.
The Federal Reserve’s production notes and capacity notes explain the methods. The source can revise history and change codes during annual revisions; this is one retained source edition, not an archive of what each original monthly release said.
The Federal Reserve supplies the source files free. ACD sells preparation, checks, documentation and delivery. Processing improvements and publisher error corrections to your purchased edition are included; new source publications may be sold separately. Read the source and preparation record.
Example checked November 7, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.