Saving public food-safety inspections before they disappear
An automatic weekly backup of France's public restaurant hygiene inspections, which the government deletes after 12 months.
The need
France publishes the results of hygiene inspections in restaurants and food shops as open data — but only keeps the last 12 months. Once a record is gone from the source, it is lost unless someone saved it.
The idea
The most valuable part of this data is its history, and history can't be rebuilt afterwards. An archive started today is worth more than a perfect app started next year.
What I built
- A check first: the 18 known re-uses of the dataset, GitHub and the Wayback Machine — I found no copy of the full history (August 2026).
- A scheduled job that downloads the complete file every Monday at 6:00 UTC, checks it isn't truncated, compresses it and stores it under the week's date.
- Running the same week twice never creates a duplicate.
- A second copy on a machine I control, replicated to OneDrive — an archive that lives in a single place isn't an archive.
The result
- 72,688inspections saved in the first snapshot
- 45 → 9.9 MBafter compression
- Every Mondayautomatically, since 16 Aug 2026
- 0users as of October 2026 — stated plainly
The archive grows by itself every week. It has no interface and no users yet: it is the foundation of a larger idea — turning these inspections into information you can read before choosing a restaurant.
In pictures
What I learned
Check that the need is real before building: here the research decided the project, not the other way round. And automation only counts if it can be trusted — every run checks its own output before saving it.
Technical details Stack, architecture and decisions — for technical readers
Stack
- GitHub Actions
- opendatasoft API
- cron
- Windows scheduled task
- OneDrive
How it works
- Weekly GitHub Actions workflow (Monday 06:00 UTC): full CSV download, size and header validation, compression, idempotent commit per ISO week.
- The pitfall that cost the first run: the opendatasoft API answers in gzip even without negotiation, so the file was unreadable until curl --compressed was added.
- Second copy outside GitHub, on a machine I control, replicated to OneDrive.
- No back-filling is possible: a week that isn't captured is lost for good — hence the validation on every run.
Still missing
- No user interface yet
- No users yet