Create a data pipeline that fetches water quality reports from the EPA ECHO API (https://echo.epa.gov/). The pipeline should: 1. Fetch facility-level discharge and compliance data for a given state 2. Parse and normalize the response into a standard schema (facility name, lat/lng, contaminant type, violation status, date) 3. Store results in a PostgreSQL table 4. Handle pagination and rate limiting 5. Include error handling for API downtime Use TypeScript. Write it as a standalone module that can be imported and called with a state code parameter.
No contributions yet.