CodeForPhilly / clean-and-green-philly

Dashboard to target Philly vacant properties for anti-gun violence interventions
https://www.cleanandgreenphilly.org/
MIT License
32 stars 58 forks source link

Task: Add quality check for initial vacant properties dataset #855

Open nlebovits opened 1 month ago

nlebovits commented 1 month ago

Describe the task

Implement functionality to check that the initial dataset of vacant properties is no more than 5% smaller than the previous run or, if there was no previous run, no smaller than 30,000 records. If this condition is not met, send an alert via Slack and email. This will involve modifying the script to query the previous record count from the PostgreSQL database and compare it with the current record count. Changes will need to be made to ./data/src/script.py and ./data/src/classes/diff_report.py.

Acceptance Criteria

Additional context

zigouras commented 1 month ago

related to #848. Any quality failure should raise an exception and get caught and reported to Slack.