Skip to main content

Local Authority Covid-19 Dashboard

It has been quite the year for data and dashboards. In the months following the start of the first lockdown in the UK we have created UK-wide graphs and timelines of COVID-19 data (now deprecated as data changed) as well as a series of Local Authority hex maps to visualise COVID-19-related data. These timelines and choropleth maps give a quick national - sometimes UK, sometimes England, sometimes England & Wales - view of Local Authority-level data relating to the pandemic. But every visualisation has its strengths and weaknesses.

Back in the summer, we were asked to make a West-Yorkshire-specific covid-19 dashboard to make it easy to see an overview specifically for West Yorkshire.The aim was to show quick summary statistics for each of the five local authorities. The data we had available at local authority level are the daily/cumulative confirmed cases by specimen date from Public Health England's API and weekly death statistics from the ONS. We decided to keep it fairly simple and stick with mostly numbers in panels. And a couple of simple graphs to show trends.

However, once we'd made a dashboard for West Yorkshire we inevitably had people asking for versions for Greater Manchester and North Yorkshire, so we made it customisable. As Public Health England gradually improved coverage of their API, we've been able to show local authorities from Northern Ireland, Scotland and Wales too (at least for cases, if not deaths).

Customise which local authorities you'd like to show.

Coding it up

The dashboard is some fairly basic HTML, CSS and Javascript. We have some code that runs twice a day that grabs the latest data from PHE (for each Local Authority), the latest ONS death data, and the latest restrictions published by the House of Commons Library. The code generates SVG graphs of cases for every UK Local Authority and updates JSON summary files for each Local Authority. For instance, the Leeds JSON file looks like this:

	"population": 795565,
		"src": "",
		"updated": "2020-11-24T08:22:45Z",
		"url": {"local":"","national":""},
		"local": {},
		"national": {
			"alcoholsalesrestrictions": true,
			"businessclosures": true,
			"raves": true,
			"socialgatherings": true,
			"stayinghome": true
		"src": "",
		"updated": "2020-11-24",
		"all": 6520,
		"cov": 922,
			{"txt":"Week 46","all":171,"cov":58},
			{"txt":"Week 45","all":159,"cov":54},
			{"txt":"Week 44","all":161,"cov":41},
	"cases": {
		"n": 270,

And the graph looks like this:

The dashboard looks at the query string to find out which local authorities have been selected and then loads the appropriate JSON and SVG files from our server. Those files are also available to be re-used elsewhere so please let us know if you do.