The UK is opening back up and I for one am looking forward to going out for a meal with friends and family. Now that all my favourite restaurants are back open, where should I eat? To make sure I got the best (safest) food, I thought I would use my data geek skills to see what the state of food hygiene is like in the UK
The Food Standards Agency has an API which is accessible to the public to pull information. To take advantage of this, I used Qlik Sense to connect to the API and retrieve all food hygiene ratings for the last 10 years. To do this, I needed to be a little more creative with the connection. The API only allows 150 results a time and must be looped through multiple pages. To do this I used the “WITH CONNECTION” functionality to specify the API connection and loop through each page of the API. This means I can use the automatic concatenation feature in Qlik when the tables are the same to build a much larger dataset and leave the connection running for a few hours (sorry FSA)
Now that I have all this data, I can explore the findings and crucially now I have historical data for the entire of the UK, I can see what the overall trends are. As a country, the food hygiene standards over the last ten years have slowly been dropping. The average rating in 2010 was 4.71, whereas in 2021 its 4.47.
As the data is provided by Local Authority, I can then slice and dice this data to see how the trend is affected per LA. Selfishly, I can choose Newcastle Upon Tyne and see that ratings have indeed dropped in my area and that the average rating over the entire period is still a respectable 4.64.
But which Local Authority has the lowest rating over the last 10 years? That would be Waltham Forest with a rating of 4 and decreasing year on year
In fact, geographically most of the lowest scoring local authorities are all in London
And as most the tests provide the details of where the premises is located, we can see this on Qliks native mapping functionality
Concentrating on Waltham Forest, I can then look at which premises and classifications make up this score. As you can see from the map below, there are a number of 0 rated establishments in Waltham Forest scatted across the authority.
We can also use different types of charts to see the business type classification and determine that schools and supermarkets are among the cleanest premises in the area, however takeaways, distributors and importers are among the lowest.
And in terms of the largest organisations, Tesco, Subway and Costa make up the largest 3 organisations in the area, each with very respectable scores. Dixy Chicken however is the 7th most checked retailer and an average score of less than 3.
If we remove the filters but just look at takeaways, we can see this is also the case nationally. Dixy Chicken has a national score of 3.56
Jumping back to the national view, we can also look at this data to look at the performance of each LA and compare against each other. One of my favourite charts in all visualisation software is the scatter chart. Using the scatter chart and some median reference lines, I have created my own Gartner Magic Quadrant for food hygiene. In the top right are all the local authorities that are above median and improving, whereas in the bottom corner we have all LAs that are below median for hygiene and getting worse each year.
This visual allows me to see outliers in the data and confirms that Waltham is indeed the lowest scoring LA, whereas Bassetlaw is the safest place to eat in England by far
So, if you are going out for a meal… it might be a bit of a trek, but try Bassetlaw!