Local Lockdown Lookup


The UK started (as far as I remember) using nationally-mandated localised coronavirus restrictions with Leicester, back at the start of July. It did this with Statutory Instrument 2020/685, laid under the powers of the Public Health (Control of Disease) Act 1984, and it defined the area of restriction with a huge list of postcodes – and particular addresses where only some addresses in a postcode were included – at the end of the Statutory Instrument. Perhaps they thought they would not have to do many of them(!), but as this proved not to be the case, from then on in England restricted areas have been defined by council and ward areas.

By the end of the summer, some or all of Blackburn, Bradford, Luton, Greater Manchester, Lancashire and Yorkshire all had various nationally imposed restrictions, and by mid September they had been joined by parts of the West Midlands and the North East of England, the central belt of Scotland, a couple of Welsh councils, and a variety of postcodes covering areas of Northern Ireland.

None of this was accompanied by an official postcode lookup of any sort. Leicester council created an online map showing the area covered, and I am sure others did similar, but it seemed obvious to me that the national body setting these restrictions should also provide a simple way to look up what restrictions applied to you or somewhere you were interested in.

Like an egg

Instead, we had manually written pages of content, that as the areas grew and the restrictions changed, got more and more complicated. Others had set up websites, such as LockdownAPI (now gone), and I did not really want to get involved as I knew it would be Yet Another task to keep running, but by 18th September I had had enough (I cannot remember precisely what the trigger was), cracked and wrote a postcode lookup which consisted of three files – a CSV of data (area ID, URL for more info, and start date for things in the future), a data file of Northern Ireland postcodes, and a single PHP file that took in a postcode, looked up its areas in MapIt and worked out if it needed to display anything about restrictions.

I put it all on GitHub so others could potentially contribute, and from then on, I kept it up to date with any announcements, pretty much as soon as they were announced. I also had to keep it up with GOV.UK moving things around (e.g. at one point the page with Oldham in the URL, linked to from Oldham Council’s website, no longer mentioned Oldham or provided any way to get to the page that now included Oldham). When Wales announced only Llanelli in Carmarthenshire was entering restrictions, the council did provide a lookup tool but it could not handle the load and crashed. Big GIS tools have not always adapted well to the public-facing internet.

New features

As well as the data, I also found time to add things to the service (always easier than doing something else, I find!). So since launch I added:

On that last point – under the Public Sector Mapping Agreement, the public sector has access to address level data for free from Ordnance Survey, which to me would cost many thousands of pounds. They could use this data to provide accurate information as to e.g. when a postcode splits across a council or constituency boundary, asking you to pick your precise address to get an accurate result. My own council, Birmingham, manages to do this perfectly well for its councillor lookup. But neither GOV.UK nor parliament.uk perform this fundamental task for finding out your MP or your local council, thereby providing incorrect results for a small number of postcodes. Come on, please get this sorted, someone.

Official output

At the start of October, Parliament (the House of Commons Library) launched an interactive map of restrictions along with a comprehensive report. A lot of work clearly went into their summarising of restriction information, so I worked out where this information was stored and liberally borrowed it with credit (thanks Parliament!).

Meanwhile, the lack of an official postcode lookup tool was getting more noticeable; such that my tool was mentioned in a written question in Parliament on 10th October! And indeed, an official GOV.UK postcode lookup was launched a few days later, on 13th October. It sadly did not handle split postcodes, but was otherwise nice and simple, just what was wanted. The only real issue I have had with it since launch is that from the point of view of whoever is in charge, the website is clearly not seen as of first-tier importance; by that I mean that e.g. when Tier 4 restrictions are announced for some of the country as they were today, I think your tool and any associated content needs to be updated at the same time, as there will be many, many people turning to it for information.


So here we are, three months since I put it live. It has not taken much effort, I kept it very simple and changes are mostly adding new lines to a CSV file. The bit that takes the longest is finding the right area ID for any new area, which I could have done something about but never felt like it was worth the time. I can but hope that at some point next year the whole tool will prove to be unneeded, and I can legitimately use a 410 Gone response…