Skip to content
Milestone 1 essentially complete · live sample inside

Every SPP & PJM document.
One clean metadata index.

A reusable Python collector built to the letter of LaReg's ISO collection brief. It walks the 50 SPP folders and 39 PJM pages, downloads every file since Jan 1, 2025 at one request every two seconds, expands every zip, and writes one combined documents.csv. Re-runs only fetch what's new.

Files in sample
1,123
Data collected
1.05GB
Download errors
0

Collector run

healthy
spp.org50 folderspjm.com39 pages + libraryCollector2 s throttleSHA-256 ledgerdocuments.csvSPP/ · PJM/Supabase · AI

198

SPP files

925

PJM files

70

zip members

posting dates 2025-01-13 → 2026-11-18

Your acceptance criteria, built in

Six checks from the brief. Each one is a command you can run.

See how each is verified →

Idempotent incremental mode

A second incremental run downloads nothing and changes no rows. A ledger of URL + SHA-256 makes it so.

Every row has its file

The verify command re-hashes each local_path. content_sha256 is unique per distinct file.

Zips expanded, zip kept

Each member becomes its own row with parent_zip set. Nested zips are opened too and zip-slip is blocked.

Counts and sizes reconcile

Per-site file count and total bytes from the CSV match the folder tree on disk.

10-row live spot-check

spot-check -n 10 re-reads the live listing for title, posting date and source_url.

Throttle + robots.txt in code

One request every 2 s per host with jitter, Retry-After honoured, pjm.com robots.txt and sitemap respected.

Two very different sites · one codebase

Numbered folders and dated committee pages, flattened into the same 15 columns.

Each ISO is a small adapter that only knows how to list documents. Throttling, retries, hashing, zips, revisions, the CSV and the ledger are shared. Adding MISO or ERCOT later is one new adapter plus a config block.

SPP

Southwest Power Pool

50 root folders
  • Folder pages turned out to be server-rendered, so plain HTTP + lxml works and no headless browser is needed (≈10× lighter, Playwright kept as a fallback).
  • Recursive walk of every subfolder. doc_id is the unique key and the breadcrumb becomes container_path.
  • Tariff Studies 18372 rule: direct DPA- files plus the two ATSS subfolders only.
  • Meeting zips are downloaded, kept, and expanded (nested too), one row per member.
PJM

PJM Interconnection

39 pages + 4 library sections
  • Committee pages only show recent meetings, so the collector calls the page's own year selector to reach every 2025 and 2026 meeting.
  • meeting_date comes from the /YYYY/YYYYMMDD/ path segment, and the full /-/media/… path is the key.
  • robots.txt and sitemap.xml honoured, and www2.pjm.com is never requested.
  • Filings and Orders read through the library's JSON feed, paged by date.

Sample activity by posting month

What the sample folders published since Jan 2025

SPPPJM
2025-012026-11

Latest documents in the sample

Open the explorer →

Ready for the step your team runs next

The CSV is the contract. The same rows can also flow into Snowflake, Google Sheets or a vector index.

Postgres catalog

Versioned documents table with immutable revisions, coverage and run history (Supabase).

Snowflake

One COPY INTO from the CSV, or a nightly stage. DDL included.

Google Sheets

A live IMPORTDATA tab or an Apps Script refresh for analysts.

AI / RAG

pgvector chunks table ready for embeddings and new-document alerts.