I’ve always wondered if there was a relationship between the density of fast food outlets in an area and the health outcomes in that area. There are many studies linking the number of fast food outlets in neighbourhoods to obesityrates, Type 2 Diabetes, and cardiovascular outcomes. But these seem to have been done in small areas and not utilising large open data sources.
Openstreetmap (OSM) is a free, open, community-driven mapping initiative which powers many other applications. It has data which is available to download, and updated daily. Geofabrik.de maintains daily mirrors of OSM data that can be downloaded. These include details of all sorts of points of interest, like roads, parks, buildings, etc. Importantly for our purposes, it contains the latitude and longitude codes for fast food outlets! We download the shapefiles for England from here, and I filter out the layer for points of interest, select the fast food outlet coordinates then convert them to a GeoJSON file on QGIS before manipulating them in R.
The reason I convert to GeoJSON is that I previously did this for the CCG maps, when I looked at Critical Care beds, and since I’m going to use them again here, converting to GeoJSON in QGIS saves me the hassle of having to line-up the projections of the spatial dataframes.
Now let’s load up the spatial data.
Now that we have the spatial data loaded up we can join them to see how many fast food outlets are in each CCG.
Now we have a dataframe of fast food outlets per population in each CCG. We can link them to health outcomes.
NHS England tracks a collection of CCG outcomes in the CCG Outcomes Indicator Set (CCGOIS). We can look at the following indicators to start off with:
In both cases the relationship doesn’t look very strong. We may have to look at the types of fast food outlets there are, and also the OSM data does seem to have some deficits. In the Barking and Dagenham CCG area, for example, there seems to be too few fast food outlets for it to be believable. I’m sure there is an error in the data there!