Check the Setup
- Python 3.10 or newer
- An internet connection
- The requests Python package
EPA Safe Drinking Water Act public-system and violation bulk tables for reproducible compliance analysis.
Report a ProblemFrom Source to Product Signal
HouseHunter pins EPA's 2026Q2 SDWIS bulk ZIP, not the ECHO web-service response. Start with a bounded byte range from the current official archive to verify its ZIP member and submission quarter. The current URL may advance; do not use a later quarter as if it were HouseHunter's pinned input.
Install the packages, then run the notebook cell.
python -m pip install requests
import csv
import io
import struct
import zlib
import requests
response = requests.get(
"https://echo.epa.gov/files/echodownloads/SDWA_latest_downloads.zip",
headers={"Range": "bytes=0-131071"}, timeout=30,
)
response.raise_for_status()
assert response.status_code == 206, "Server did not honor bounded byte range"
chunk = response.content
header = struct.unpack_from("<IHHHHHIIIHH", chunk)
assert header[0] == 0x04034B50 and header[3] == 8
start = 30 + header[-2] + header[-1]
name = chunk[30:30 + header[-2]].decode()
text = zlib.decompressobj(-15).decompress(chunk[start:]).decode()
rows = csv.DictReader(io.StringIO("\n".join(text.splitlines()[:3])))
print(name, [(row["SUBMISSIONYEARQUARTER"], row["PWSID"]) for row in rows])Test a Useful Signal
Verify the archive's reported quarter before combining public-system tables.
U.S. Environmental Protection Agency is a government source. Last verified 2026-09-28. Temporal coverage: quarterly submissions, with HouseHunter pinned to 2026Q2.