Free school meals in Scottish primary schools – data visualisation

We’ve helped scrape data on free school meals in Scottish schools for The Scotsman’s new data blog.

As the percentage of pupils registered for free school meals is an indicator of deprivation (although it has notable flaws*) it provides one visual picture of poverty across Scotland.

View Free school meals in Scottish primary schools in a full screen map

The raw data can be found here. Note that free school meals data is missing for just over 300 schools, either because the numbers of pupils registered was so slow that publication of data could lead to the identification of individuals, because the school does not provide meals, or because data is not reported by the school.

Also note that placement of markers is based on postcodes, and so may not be particularly accurate.

The data was obtained by scraping the data from over 3,000 pages on the Education Scotland website, using Scraperwiki (you can see the scraper here). As the page for each school had its own URL based on the school’s ID, the scraper had to generate URLs for each school from a list of codes obtained by Jennifer O’Mahoney of The Scotsman. You can read more about this process and how it can also be done using Google Refine on the Online Journalism Blog.

Initial visualisations using the free online mapping service batchgeo placed some of the markers in England or Europe, so Google Refine was used to fetch latitude and longitude data for each postcode. (Instructions on how to do this can also be found on OJB here and here).

Another problem encountered was poor colour-coding of markers when schools with no data were included, so these were removed from the dataset pasted into batchgeo.

Note also that the free version of batchgeo has a limit of 2,500 rows, so if you wanted to map more schools, you would have to pay for the Pro version, or use another free service.

There’s more to be done with this data. For example, instead of basing the visualisation on the percentage of free school meals you could do it on the basis of variation from each school’s local authority rate of free school meal registration. Whereas the map above provides a national picture, this would give a picture of local variation, e.g. which parts of an authority are much lower than the LEA average, and which are higher.

*More on poverty indicators for children and historical trends can be found at The Poverty Site.This research paper (PDF) looks at the reliability of free school meals data and concludes that it is “coarse and unreliable” while policy consultant Patrick Watson points out that the formula used to calculate it is “all or nothing”, with those earning above or below a particular threshold (around £16,000 at the time of writing in 2011) either eligible or not. “It is also a purely economic indicator,” he adds, “and does not take into account that certain communities are culturally rather than financially deprived.”

About Paul Bradshaw

Founder of Help Me Investigate. I'm a visiting professor at City University London's School of Journalism, and run an MA in Online Journalism at Birmingham City University. I publish the Online Journalism Blog, and am the co-author of the Online Journalism Handbook and Magazine Editing (3rd edition). I have a particular interest in Freedom of Information and data journalism.
This entry was posted in Data and tagged , , , , , , , , , , . Bookmark the permalink.

6 Responses to Free school meals in Scottish primary schools – data visualisation

  1. Tony Hirst says:

    If you publish the Google spreadsheet data, it would be possible to generate URLs to a CSV version of the file. At the moment, to get CSV, I think you have to export the file? (I’m still trying to get my head round how the various permission/publish states around Google docs work…)

  2. Pingback: A new Scottish datablog (and a treemap in Liverpool) | Online Journalism Blog

  3. Pingback: SFTW: Scraping data with Google Refine | Online Journalism Blog

  4. Pingback: Step by step: how to start in a data journalist role | Online Journalism Blog

  5. Pingback: How to think like a computer: 5 tips for a data journalism workflow part 3 | Online Journalism Blog

  6. Pingback: Step by step: how to start in a data journalist role | Online Journalism Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>