home / aphis

Inspection Trends by Year

Annual inspection counts with violation breakdowns.

Custom SQL query returning 13 rows (hide)

SELECT CAST(strftime('%Y', inspection_date) AS INTEGER) AS year, COUNT(*) AS inspections, SUM(CASE WHEN critical_count > 0 THEN 1 ELSE 0 END) AS with_critical, SUM(critical_count) AS total_critical, SUM(noncritical_count) AS total_noncritical, SUM(direct_count) AS total_direct FROM inspections WHERE inspection_date IS NOT NULL GROUP BY year ORDER BY year DESC

Edit SQL

This data as json, CSV

yearinspectionswith_criticaltotal_criticaltotal_noncriticaltotal_direct
2026 5239 94 107 1554 58
2025 8419 188 217 2329 100
2024 9851 243 299 3464 136
2023 10094 254 303 4497 195
2022 10065 194 235 3362 199
2021 8883 184 218 2881 264
2020 4419 57 63 795 81
2019 9358 67 75 1549 82
2018 9704 64 69 1505 66
2017 10760 132 151 3949 198
2016 11047 154 187 4959 222
2015 10491 147 210 5874 324
2014 10120 122 182 5293 323
Powered by Datasette · Queries took 45.033ms · Privacy