"""fred-release-brief-2026-09-05-revisions.py - how the August 2026 jobs report was revised: the payroll first print against the two later ALFRED vintages, and every 2026 month's first, second and third print. Input : datasets/fred-release-brief-2026-09-05-revisions.csv, one row per (series, observation month, vintage): series PAYEMS (thousands), CES0500000003 (dollars), UNRATE (percent), CIVPART (percent) observation_date first day of the month the value describes vintage_date the day ALFRED's archive dates that version of the series (a release day) value the value as published in that vintage PAYEMS: every vintage from 2026-02-11 (the January 2026 report) to 2026-11-06 (the October report). The other three series: the vintages 2026-09-04, 2026-10-02 and 2026-11-06. Observations from 2024-12. Source: ALFRED (Federal Reserve Bank of St. Louis), retrieved 2026-11-28; the data are from the U.S. Bureau of Labor Statistics, and the four FRED series pages carry "Public Domain: Citation Requested". Re-download with --download (two public endpoints, no API key, a pause between requests): https://alfred.stlouisfed.org/series/downloaddata?seid= (lists every vintage date) https://alfred.stlouisfed.org/graph/alfredgraph.csv?id=,&vintage_date=, Method: monthly payroll change in vintage v = PAYEMS_v(m) - PAYEMS_v(m-1). The k-th print of month m is that change in the k-th vintage that contains m (BLS revises the two prior months in each release, so the third print is the last monthly revision before the annual benchmark). Earnings growth = 100 * (AHE_v(m) / AHE_v(m-12) - 1). Run : python code/fred-release-brief-2026-09-05-revisions.py [--download] Needs : Python 3.10 or later, standard library only. """ import csv import os import re import sys import time import urllib.request ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) CSV = os.path.join(ROOT, "datasets", "fred-release-brief-2026-09-05-revisions.csv") UA = {"User-Agent": "prismdatalab-research/1.0"} VINTAGES = {"PAYEMS": ("2026-02-11", "2026-11-06"), "CES0500000003": ("2026-09-04", "2026-11-06"), "UNRATE": ("2026-09-04", "2026-11-06"), "CIVPART": ("2026-09-04", "2026-11-06")} OBS_FROM = "2024-12-01" BRIEF = "2026-09-04" # the vintage the 2026-09-05 brief read def get(url): time.sleep(3) with urllib.request.urlopen(urllib.request.Request(url, headers=UA), timeout=120) as r: return r.read().decode("utf-8") def download(): out = [] for sid, (lo, hi) in VINTAGES.items(): page = get(f"https://alfred.stlouisfed.org/series/downloaddata?seid={sid}") block = re.search(r'