us-water-quality-data
v2026.3.29
Published
U.S. water quality data for all 41,344 residential ZIP codes. Violations, lead/copper levels, radon zones, and Home Safety Scores from 20+ federal sources (EPA, FEMA, Census, USGS). Updated weekly.
Maintainers
Readme
us-water-quality-data
U.S. water quality data by ZIP code, packaged for Node.js. Includes violation history, lead/copper levels, radon zone classification, historical score trends, and Home Safety Scores for 41,344 ZIP codes, sourced from 20 federal data sources including the EPA Safe Drinking Water Information System (SDWIS).
Install
npm install us-water-quality-dataUsage
const water = require('us-water-quality-data');
// Lookup a specific ZIP code
const nyc = water.lookup('10001');
console.log(nyc);
// {
// zip: '10001', city: 'New York', state: 'NY',
// home_safety_score: 36, home_safety_grade: 'F',
// total_violations: 7, lead_level_mg_l: 0.01, ...
// }
// All ZIP codes in California
const ca = water.getState('CA');
console.log(`${ca.length} ZIP codes in CA`);
// 10 worst scores in the country
const worst = water.getWorst(10);
worst.forEach(z => console.log(`${z.zip} ${z.city}, ${z.state}: ${z.home_safety_score}`));
// 10 best scores
const best = water.getBest(10);
// All states in the dataset
console.log(water.states()); // ['AK', 'AL', 'AR', ...]
// Total ZIP codes
console.log(water.count()); // 41344
// Search by city
const chicago = water.searchCity('chicago');
// Dataset metadata
console.log(water.meta.updated); // '2026-03-24'
console.log(water.meta.total_zips); // 41344
console.log(water.meta.states_covered); // 51ESM / TypeScript
import water, { WaterQualityRecord } from 'us-water-quality-data';
const record: WaterQualityRecord | null = water.lookup('90210');Data Fields
| Field | Type | Description |
|-------|------|-------------|
| zip | string | 5-digit U.S. ZIP code |
| city | string | City name |
| state | string | 2-letter state abbreviation |
| home_safety_score | integer|null | Composite score 0-100 |
| home_safety_grade | string | Letter grade: A / B / C / D / F |
| total_violations | integer | Total violations in past 5 years |
| health_violations | integer | Health-based violations in past 5 years |
| unresolved_violations | integer | Currently unresolved violations |
| contaminant_count | integer | Distinct health-based contaminants |
| health_contaminant_names | string | Semicolon-separated contaminant names |
| lead_level_mg_l | float|null | 90th percentile lead level (mg/L) |
| copper_level_mg_l | float|null | 90th percentile copper level (mg/L) |
| radon_zone | integer|null | EPA radon zone: 1 (highest) to 3 (lowest) |
| water_source | string | SW = Surface Water, GW = Groundwater |
| system_name | string | Primary water system name |
| pwsid | string | EPA Public Water System ID |
| population | integer|null | Population served |
| latitude | float | ZIP centroid latitude |
| longitude | float | ZIP centroid longitude |
Coverage
- ZIP codes: 41,344
- States: All 50 U.S. states + D.C.
- Data sources: 20 federal sources
- Violation window: Rolling 5 years
- Historical trends: Score history backfilled 2021--2025 with violation timeline data
- Update frequency: New npm versions published with each dataset refresh
Data Source
Data is derived from 20 federal sources including the EPA Safe Drinking Water Information System (SDWIS), FEMA NFIP, Census ACS, EPA ECHO, and others. Lead and copper levels come from EPA Lead and Copper Rule (LCR) sampling. Radon zones are county-level EPA classifications.
Home Safety Score is a composite 0-100 score that penalizes health-based violations, unresolved violations, lead exceedances, and contaminant count. Methodology: zipcheckup.com/about/home-safety-score/
Related
- Live site: zipcheckup.com — free water quality reports by ZIP
- Open dataset (CSV/JSON): zipcheckup.com/data/
- API: api.zipcheckup.com/v1/
License
Data: CC BY 4.0. Code: MIT.
Data by ZipCheckup.com — sourced from EPA SDWIS.
