Data Engineering · Databricks Free Edition

Texas drinking water compliance, 2021–2025

EPA public records turned into a quality-checked model and a compliance dashboard.

Compliance snapshot

Source: EPA ECHO, SDWA data download (release 2026-10-14) · Violations that began 2021–2025

How many violations?

All violations · Texas
66,847
Health-based · about 13%
8.88K

Who is served? How fast is it fixed?

People served*
9.86M
By systems with a health-based violation
Median time to compliance
91 days

What stands out?

Peak year · 2024
~16,780
Highest share · 10+ systems
80%+
Palo Pinto · Starr

* Regulatory compliance, not water safety. "People served" is each active community system's population, counted once, not people exposed to a problem.

Pipeline

Medallion architecture on Unity Catalog · Lakeflow Job, monthly · Full run ~5 min on serverless

Landing
~558 MB

Original EPA files, unchanged.

/Volumes/…/landing
Bronze
1,073,753 rows

Texas rows plus lineage.

sdwa_bronze
Silver
296,146 rows

Unique, typed, no personal data.

sdwa_silver
Gold
66,847 rows

Star schema for analytics.

sdwa_gold
Consume
AI/BI

Dashboard with county filter.

Lakeview

Engineering decisions

Preventing misleading numbers mattered more than any chart.

Deduplication

Violation + enforcement pairs inflated rows ~3.6×. 1,073,753 rows became 296,146 unique violations.

Quality checks

10,212 enforcement rows had no violation ID. They were kept out of violation counts.

Fair rankings

Counties need 10+ active systems to be ranked, so one system can't show 100%.

No double counting

Population counts each system once. Aggregations run before joins to avoid fan-out.

One county per system

4 systems serve more than one county. A fixed rule (MIN county) assigns each to one, so none is counted twice.

Databricks AI/BI dashboard

Annual trend · Category heatmap · County bubbles · County ranking

Databricks AI/BI dashboard with KPIs, violations by year, county bubble chart, category heatmap and county ranking
DatabricksPySparkSQL Delta LakeUnity CatalogLakeflow Jobs AI/BI DashboardsGitHub

Next: Genie Q&A · household plumbing access (Census ACS) · wastewater compliance (EPA ICIS-NPDES).