Jacinda’s Heat Map
We look at recent heat maps in the news and work with some publicly available Ministry of Health data on Covid.
In a recent Covid-19 update, the Prime Minister showed us a “heat map” of Covid-19 contacts.
Be still my beating heart! Maps to the rescue! Imagine if she had read out a list of all those locations? No nearly the same impact, I would argue. I have to admit that my first thought was that that wasn’t a heat map per se, so I tried to dig a bit deeper. The map (or rather an image of the map) turned up on Stuff the next day:
Let’s be very clear about what this map shows. These are the locations where close contacts are self-isolating – NOT where cases have been found. As I said above, my first impression was that this wasn’t a true heat map but more something just showing locations. Upon seeing this image, I felt that, yes, this was probably a heat map, albeit a fairly simple one.
You could use a heat map to show something like crimes, amongst others, to more easily pick out places with higher or lower levels of crime, like this:
The MOE map is a much more low-key heat map – the depth of colour relates to density of contacts – light colours (e.g. on the West Coast) relate to low density while deeper blues signify higher densities (Tamaki Makaurau north anyone?).
(Ed. shouldn’t we say something about the choice of colours? Why not use a standard green-orange-red stoplight schema? Eh?)
It’s a fairly limited colour palate, three at most (and likely only two) but it does clearly show 1) the geographic spread of contacts, and 2) areas where there are high densities of contacts. While it doesn’t give us any magnitudes, it’s pretty effective at reminding us that we can not be complacent about Delta. We’ll be very lucky if those contacts turn out to be negative.
So I’m presuming that each of those points on the map relates to a contact, or a group of contacts. We’ll probably never see a version of that as a webmap or freely available data because of privacy issues, and rightfully so. What we can get our hands on, though, is the list of “locations of interest” from the Ministry of Health’s website:
Sure looks like someone was on a road trip to Wellington… Clicking on a point gives us more detail about that location:
My guess about how these points came to life was that some human collected data on each location, including the address, which was then geocoded and mapped. There’s an intriguing piece of clickable text at the bottom of this map:
We’ve talked a little about JSON files previously – they are light-weight, sort of human readable text files for transferring data, sometimes spatial data. If I click that link and open it in a new tab, I can see the contents of the file:
Lots of gobbledygook, yes, (and this is only one small part) but with a little bit of time we can make some sense of it.
The file opens with a curly bracket. The “type” tells us what kind of data it contains (features) and the file name is repeated next. Inside the square brackets are the data associated with each point: its name, address, city…all those entries we saw in the pop up window above, and finally the spatial payoff:
These are the coordinates of the point (in longitude and latitude respectively) which we can use for mapping. How do we do this? From the browser tab, I can save this file, changing its extension to “.json”, and then use the JSON to Feature tool (I can’t add the JSON file directly to the map but the tool honours it):
Clicking Run gets me the points on the map:
I could use these now to create my own heat map of locations of interest, which I’ll leave for you as a homework task.
We’re very much in the territory of pictures telling a thousand words with these maps. For many, this would be an easier way to decide if it’s time for a Covid test or not. There are enough points on this map already; let’s hope they don’t multiply.
Don’t forget to scan!