Poorer children are more likely to be fat.
As we move further to the right of the chart into schools in more deprived areas, the share of children in the grey and black parts of the chart – showing overweight and very overweight kids – gets bigger.
This means that a class of year six children in inner-city Manchester will likely have bigger waistlines than one in leafy Hampshire.
A combination of bad diets and a lack of exercise means poorer children are sadly more likely to be fat at just 10 or 11 years old, with all the health problems that brings now and stores up for the future.
About the data
The data comes from the National Child Measurement Programme (NCMP), which takes the height and weight of children in reception and year six classes each year.
If you have someone’s height and weight you can measure their Body Mass Index (BMI). This is a good way of measuring overall body shape and therefore obesity.
NHS Digital have published the entire dataset for the past two years. The latest file for 2014/15 contains the anonymised records of more than one million children.
(NB: I tried this link this morning and it wasn’t working. NHS Digital is changing its website so hopefully this should be fixed soon).
R is powerful enough to handle all this data, and it’s what I used to make this chart.
Deprivation
The chart only works because the data contains part of the Index of Multiple Deprivation.
Each record contains the deprivation score for a child’s school on a 10-point scale, where one is the most deprived and 10 the least.
We’re assuming that if a school is in a deprived area, most of the pupils there will be as well.
Using R and ggplot2 to make the histogram
Like before, I created this in RStudio with the ggplot2 and scales packages loaded.
The first thing to do is to select which year group to analyse. I chose year six.
# filter the data to get year six year.six <- grep("6", ncmp$schoolyear) year.six.data <- ncmp[year.six, ]
The ‘grep’ function here is a regular expression. Explaining what regular expressions (regex) is a post in itself, so I won’t do that here.
The NHS groups children’s BMI scores into four categories: ‘underweight’, ‘healthy weight’, ‘overweight’ and ‘very overweight’. We need to tell R that these aren’t just random, they go in order. We do that using a factor, like this:
# factor the BMI scores year.six.data$bmiclinicalcategory <- factor(year.six.data$bmiclinicalcategory, levels = c("underweight", "healthy weight", "overweight", "very overweight", ordered=TRUE))
Next up, we’ll choose some colours for our chart rather than letting R choose them for us. There are some useful palettes here – I chose one that had the relatively small underweight section in a bold colour so you can see it.
# make a colour palette BMI_fill <- scale_fill_brewer("BMI Category", palette = "RdGy")
Plotting the chart:
# draw the plot with the school deprivation index on the x axis ggplot(year.six.data, aes (x = schoolindexofmultipledepriv, fill= factor(bmiclinicalcategory))) # draw the histogram, making the y axis into percentages + geom_histogram(binwidth = 1, aes(y = ..count../sum(..count..)), position = "fill") # reverse the scale so that one (most deprived) appears on the right (this requires the scales package) + scale_x_reverse(breaks=NULL)
At this point your chart should look something like this:
Everything from here on out is just decoration:
# add a white background and our colour palette +BMI_fill + theme_classic() # label axes and title, including giving % icons + labs(y = "% in each weight class", x = "Schools in more deprived areas ->", size = 4) + ggtitle("How Poor Children Are More Likely To Be Fat") + scale_y_continuous(labels = scales::percent) +theme(axis.title = element_text(size=34), axis.text = element_text(size = 18), plot.title = element_text(size = 44), legend.title = element_text(size = 28), legend.text = element_text(size = 20))
There you have it…
…a clear link between deprivation and child obesity, in one chart.