Skip to content

kiliantscherny/smiley-ratings

Repository files navigation

tipscout logo

😊 Danish Smiley Ratings

Visualizing food safety ratings in Denmark.

Deployment status pre-commit GitHub stars

ℹ️ About this project

Smileys: what they're all about

This project's purpose is to retrieve the food safety ratings of every food retail business in Denmark 🇩🇰. Denmark uses a system called the "Smiley system" to rate food retail businesses on their compliance with food safety laws.

The system is easy to understand: a smiley (🙂) is what you want. Businesses which don't fully comply with the regulations will be given a 😐, a ☹️ or even a 😡, with additional repercussions like fines or being forced to close. This system is designed to protect consumers from harm and ensure a high standard of food safety nationwide.

The Smiley data

The full data of the results of inspections is publicly available from the Danish government in XML or Excel format – in this project I am using the .xlsx file.

The data contains, among other things, the top-level result of the inspection (as well as the second-, third- and fourth-last inspections) as well as a link to a web page with all of the historical reports for the business. The data is updated at least daily, with new inspection reports being appended to the existing results.

I have created this project in order to:

  1. Provide some interesting insights into Smiley ratings throughout Denmark
  2. Show how you can build fully-fledged data project with a few simple (and entirely free) tools like Evidence and DuckDB

✳️ Getting started

Head straight to the static website to read more about Fødevarestyrelsen's (The Danish Veterinary and Food Administration) "Smiley" ratings scheme for retail food businesses.

Note

As this is a static website with a lot of queries and elements, it might take a few seconds for the web page to render with all the visualizations.

Here you can learn about the context of the data, read some key takeaways and explore a map of Denmark with all1 the retail food establishments and their ratings.

⚙️ Tech stack

This project is built using:

⤵️ Data source

The data is freely available from Fødevarestyrelsen's website.

The report is refreshed once per day at 09:00 UTC with the latest data from the source.

👐 See also

If you enjoyed exploring this project, check out Anders Bruun Nørring's https://smileydata.dk/, which also does a great job of providing insights into this data.

Footnotes

  1. One of the limitations of the dataset is that only a portion of the rows are geocoded (i.e. they have geographic coordinates for the address supplied). Cleaning the data to geocode the missing coordinates is possible with tools like geopy, but this can take a while with the rate limits of the API as a free user

About

Data about food safety ratings from The Danish Veterinary and Food Administration

Topics

Resources

License

Stars

Watchers

Forks

Contributors