TEF 2017 Data Exploration App

A break from physics to show something which might be actually useful to some people. Normal service will resume shortly.

TEF stands for the ‘Teaching Excellence Framework‘, a new scheme in the UK for recognising excellent teaching quality in higher education institutions, primarily from England. (Institutions from Scotland, Wales, and Northern Ireland are able to take part if they wish, but higher education policy is a devolved matter there.)

Participating institutions receive a TEF award, either Gold, Silver, or Bronze. The Higher Education Funding Council (HEFCE) make the data easily available on their website, helpfully providing a fat .csv file for the terminally interested:


This file is a bit large and unwieldy for most people though, so as a responsible member of the UK higher education system I thought it might be useful to present it in a more digestible form.

Part of the TEF award arises from student feedback in the form of the National Student Survey, other components from official statistics (e.g. employment of students) and submissions from institutions themselves.

Dash by Plotly

Not entirely coincidentally, I had just heard about Dash by Plotly, a new Python web framework for building interactive data visualisation applications. Dash builds on Flask (for serving pages), React.js (for interactivity), and Plotly (for displaying interactive plots).

I like Python, I like data viz, and I like not looking at giant .csv files, so this was a fun project to put together.

TEF 2017 Data Explorer

You can access the live app here:


It’s currently hosted on the free tier of Heroku, which may buckle under moderate load.

The business ends look something like this:

Screen Shot 2017-07-28 at 16.15.58.png
No bias here.

Here I’ve used a horrible combination of pandas, numpy and scipy to extract the data from the .csv file and create a kernel density estimate of the distribution of scores across institutions. This all happens on the server, the user is delivered a nice, lightweight and interactive plot. With this method it is very clear to see exactly where one institution lies in terms of the scores from other institutions.

Thanks to the interactivity provided by Dash, it is also possible to plot the various scores awarded by the TEF against one another for different institutions, and select institutions directly by binding to click events from the plot. Hovering over points also pops up a custom tooltip.

Screenshot 2.png
The colours represent TEF awards.

There’s a lot more that can be done here, in particular there are many more sub-categories which it would be interesting to drill down into. However, as a first stab at building something with Dash, this was very quick indeed and I would recommend having a play with it.


The code behind this app can be found on my blog repository here:



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s