Data health
Stoop mirrors NYC HPD's housing complaint data. Here is how fresh it is, what the pipeline has done recently, and the checks that keep bad data out.
Data sources
- HealthyHPD housing complaintsdata.cityofnewyork.us/resource/ygpa-z7cr
Up to date as of 5 min ago.
Synced through the city's Nov 10, 10:04 AM update · last successful contact 5 min ago
- HealthyHPD building registrydata.cityofnewyork.us/resource/kj4p-ruqc
Fills BIN and BBL the complaint feed leaves out. Last lookup worked 5 min ago.
Recent syncs
Last 24 hours: 96 runs (95 caught up, 1 failed). 34,546 rows read, 34,546 written, 0 rejected. Re-reading unchanged rows writes nothing, and a run that runs out of time saves its place for the next one.
| Started | Result | Read | Written | Rejected | Took |
|---|---|---|---|---|---|
| Nov 10, 1:30 PM | caught up | 0 | 0 | 0 | 5.4s |
| Nov 10, 1:15 PM | caught up | 0 | 0 | 0 | 3.7s |
| Nov 10, 1:00 PM | caught up | 0 | 0 | 0 | 3.8s |
| Nov 10, 12:45 PM | caught up | 0 | 0 | 0 | 8.5s |
| Nov 10, 12:30 PM | caught up | 0 | 0 | 0 | 6.7s |
| Nov 10, 12:15 PM | caught up | 0 | 0 | 0 | 3.5s |
| Nov 10, 12:00 PM | caught up | 0 | 0 | 0 | 16.0s |
| Nov 10, 11:45 AM | caught up | 0 | 0 | 0 | 3.0s |
| Nov 10, 11:30 AM | caught up | 0 | 0 | 0 | 7.2s |
| Nov 10, 11:15 AM | caught up | 0 | 0 | 0 | 4.6s |
| Nov 10, 11:00 AM | caught up | 16,546 | 16,546 | 0 | 1.2m |
| Nov 10, 10:45 AM | failed | 18,000 | 18,000 | 0 | 1.2m |
How bad data is kept out
- Validated before it lands
Every row is checked in one database transaction: IDs numeric, borough real, required fields present. Rows that fail go to a private quarantine table with the reason, never into the app.
- Constraints the database enforces
BBL and BIN formats, coordinates inside NYC, open ≤ total, a closed report must have a resolved date. Bad values are impossible to store, not just unlikely.
- No duplicates, no going backwards
Each complaint is keyed by HPD's problem ID. An older city update can never overwrite a newer one, so re-running a sync is always safe.
- Freshness you can see
We record the city's publish time and our own sync time separately, and an outage of the city's API is shown as one, not as a broken pipeline. Every page of a sync saves its place in the same transaction as its rows, so an interrupted sync resumes exactly where it stopped.
- Watched by Sodabase
10 recurring rules (valid statuses, unique IDs, coordinates in NYC, counts that add up) plus freshness and volume monitors on every table.
- Fixed at the source
Sodabase flagged buildings missing a BBL and a BIN. The city feed omits them on some rows, so the pipeline derives BBL from block and lot, treats the city's placeholder BINs (1000000, 2000000, …) as missing, and fills real BINs from HPD's building registry. Missing BBL: 0. Missing BIN: 119 (not published by the city for those buildings).