Write a function that calculates a water quality risk score (0-100) for a given ZIP code based on nearby facility violations. Input: ZIP code string. Output: { score: number, factors: string[], nearbyViolations: number }.
The score should factor in:
Use the Haversine formula for distance calculations. Write unit tests with at least 3 test cases.
No contributions yet.