npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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.

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).

npm License: CC BY 4.0

Install

npm install us-water-quality-data

Usage

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); // 51

ESM / 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

License

Data: CC BY 4.0. Code: MIT.

Data by ZipCheckup.com — sourced from EPA SDWIS.