Blog

Heatmapping my Movements

As I mentioned last year, for several years I’ve collected pretty complete historic location data from GPSr devices I carry with me everywhere, which I collate in a personal μlogger server.

Going back further, I’ve got somewhat-spotty data going back a decade, thanks mostly to the fact that I didn’t get around to opting-out of Google’s location tracking until only a few years ago (this data is now also housed in μlogger). More-recently, I now also get tracklogs from my smartwatch, so I’m managing to collate more personal location data than ever before.

Inspired perhaps at least a little by Aaron Parecki, I thought I’d try to do something cool with it.

Heatmapping my movements

The last year

Heatmap showing Dan's movements around Oxford since moving house in 2020. There's a strong cluster around Stanton Harcourt with heavy tendrils around Witney and Eynsham and along the A40 to Summertown, and lighter tendrils around North and Central Oxford.
My movements over the last year have been relatively local, but there are some interesting hotspots and common routes.

What you’re looking at is a heatmap showing my location over the last year or so since I moved to The Green. Between the pandemic and switching a few months prior to a job that I do almost-entirely at home there’s not a lot of travel showing, but there’s some. Points of interest include:

  • The blob around my house, plus some of the most common routes I take to e.g. walk or cycle the children to school.
  • A handful of my favourite local walking and cycling routes, some of which stand out very well: e.g. the “loop” just below the big blob represents a walk around the lake at Dix Pit; the blob on its right is the Devils Quoits, a stone circle and henge that I thought were sufficiently interesting that I made a virtual geocache out of them.
  • The most common highways I spend time on: two roads into Witney, the road into and around Eynsham, and routes to places in Woodstock and North Oxford where the kids have often had classes/activities.
  • I’ve unsurprisingly spent very little time in Oxford City Centre, but when I have it’s most often been at the Westgate Shopping Centre, on the roof of which is one of the kids’ favourite restaurants (and which we’ve been able to go to again as Covid restrictions have lifted, not least thanks to their outdoor seating!).

One to eight years ago

Let’s go back to the 7 years prior, when I lived in Kidlington. This paints a different picture:

Heatmap showing Dan's movements around Kidlington, including a lot of time in the village and in Oxford City Centre, as well as hotspots at the hospital, parks, swimming pools, and places that Dan used to volunteer. Individual expeditions can also be identified.
For the seven years I lived in Kidlington I moved around a lot more than I have since: each hotspot tells a story, and some tell a few.

This heatmap highlights some of the ways in which my life was quite different. For example:

  • Most of my time was spent in my village, but it was a lot larger than the hamlet I live in now and this shows in the size of my local “blob”. It’s also possible to pick out common destinations like the kids’ nursery and (later) school, the parks, and the routes to e.g. ballet classes, music classes, and other kid-focussed hotspots.
  • I worked at the Bodleian from early 2011 until late in 2019, and so I spent a lot of time in Oxford City Centre and cycling up and down the roads connecting my home to my workplace: Banbury Road glows the brightest, but I spent some time on Woodstock Road too.
  • For some of this period I still volunteered with Samaritans in Oxford, and their branch – among other volunteering hotspots – show up among my movements. Even without zooming in it’s also possible to make out individual venues I visited: pubs, a cinema, woodland and riverside walks, swimming pools etc.
  • Less-happily, it’s also obvious from the map that I spent a significant amount of time at the John Radcliffe Hospital, an unpleasant reminder of some challenging times from that chapter of our lives.
  • The data’s visibly “spottier” here, mostly because I built the heatmap only out of the spatial data over the time period, and not over the full tracklogs (i.e. the map it doesn’t concern itself with the movement between two sampled points, even where that movement is very-guessable), and some of the data comes from less-frequently-sampled sources like Google.

Eight to ten years ago

Let’s go back further:

Heatmap showing Dan's movements around Oxford during the period he lived in Kennington. Again, it's dominated by time at home, in the city centre, and commuting between the two.
Back when I lived in Kennington I moved around a lot less than I would come to later on (although again, the spottiness of the data makes that look more-significant than it is).

Before 2011, and before we bought our first house, I spent a couple of years living in Kennington, to the South of Oxford. Looking at this heatmap, you’ll see:

  • I travelled a lot less. At the time, I didn’t have easy access to a car and – not having started my counselling qualification yet – I didn’t even rent one to drive around very often. You can see my commute up the cyclepath through Hinksey into the City Centre, and you can even make out the outline of Oxford’s Covered Market (where I’d often take my lunch) and a building in Osney Mead where I’d often deliver training courses.
  • Sometimes I’d commute along Abingdon Road, for a change; it’s a thinner line.
  • My volunteering at Samaritans stands out more-clearly, as do specific venues inside Oxford: bars, theatres, and cinemas – it’s the kind of heatmap that screams “this person doesn’t have kids; they can do whatever they like!”

Every map tells a story

I really love maps, and I love the fact that these heatmaps are capable of painting a picture of me and what my life was like in each of these three distinct chapters of my life over the last decade. I also really love that I’m able to collect and use all of the personal data that makes this possible, because it’s also proven useful in answering questions like “How many times did I visit Preston in 2012?”, “Where was this photo taken?”, or “What was the name of that place we had lunch when we got lost during our holiday in Devon?”.

There’s so much value in personal geodata (that’s why unscrupulous companies will try so hard to steal it from you!), but sometimes all you want to do is use it to draw pretty heatmaps. And that’s cool, too.

Heatmap showing Dan's movements around Great Britain for the last 10 years: with a focus on Oxford, tendrils stretch to hotspots in South Wales, London, Cambridge, York, Birmingham, Preston, Glasgow, Edinburgh, and beyond.

How these maps were generated

I have a μlogger instance with the relevant positional data in. I’ve automated my process, but the essence of it if you’d like to try it yourself is as follows:

First, write some SQL to extract all of the position data you need. I round off the latitude and longitude to 5 decimal places to help “cluster” dots for frequency-summing, and I raise the frequency to the power of 3 to help make a clear gradient in my heatmap by making hotspots exponentially-brighter the more popular they are:

SELECT ROUND(latitude, 5) lat, ROUND(longitude, 5) lng, POWER(COUNT(*), 3) `count`
FROM positions
WHERE `time` BETWEEN '2020-06-22' AND '2021-08-22'
GROUP BY ROUND(latitude, 5), ROUND(longitude, 5)

This data needs converting to JSON. I was using Ruby’s mysql2 gem to fetch the data, so I only needed a .to_json call to do the conversion – like this:

db = Mysql2::Client.new(host: ENV['DB_HOST'], username: ENV['DB_USERNAME'], password: ENV['DB_PASSWORD'], database: ENV['DB_DATABASE'])
db.query(sql).to_a.to_json

Approximately following this guide and leveraging my Mapbox subscription for the base map, I then just needed to include leaflet.js, heatmap.js, and leaflet-heatmap.js before writing some JavaScript code like this:

body.innerHTML = '<div id="map"></div>';
let map = L.map('map').setView([51.76, -1.40], 10);
// add the base layer to the map
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
  maxZoom: 18,
  id: 'itsdanq/ckslkmiid8q7j17ocziio7t46', // this is the style I defined for my map, using Mapbox
  tileSize: 512,
  zoomOffset: -1,
  accessToken: '...' // put your access token here if you need one!
}).addTo(map);
// fetch the heatmap JSON and render the heatmap
fetch('heat.json').then(r=>r.json()).then(json=>{
  let heatmapLayer = new HeatmapOverlay({
    "radius": parseFloat(document.querySelector('#radius').value),
    "scaleRadius": true,
    "useLocalExtrema": true,
  });
  heatmapLayer.setData({ data: json });
  heatmapLayer.addTo(map);
});

That’s basically all there is to it!

× × × ×

Dan Q performed maintenance for GC9EXXX Church Micro 14129…Sutton

This checkin to GC9EXXX Church Micro 14129...Sutton reflects a geocaching.com log entry. See more of Dan's cache logs.

Visited to check on this new cache: especially as the container is a new design I wanted to do an early checkin to ensure it’s bedded in nicely. Glad to say all is well! Also dropped off Paul The Sea Horse, a Travel Bug I found up in Derbyshire who’s still got a couple of years exploring left in him before he completes his ten year mission! Please help him move along if you can.

Dan Q performed maintenance for GC9EXX4 The Bisected Footpath of Blackditch Fields

This checkin to GC9EXX4 The Bisected Footpath of Blackditch Fields reflects a geocaching.com log entry. See more of Dan's cache logs.

Dropped by to check in on this new cache (always worth checking that a new cache is settling in alright!) and to dip a TB. All is well. Also discovered that through the kissing gate on the opposite side of the road there’s a crop of the plumpest and brightest sloes I’ve seen in years. So if you’re in the vicinity and fancy a lip-curling snack (or you’ve plans to adulterate some gin!) take a look!

Geohashing expedition 2021-08-19 51 -1

This checkin to geohash 2020-08-19 51 -1 reflects a geohashing expedition. See more of Dan's hash logs.

Location

Field alongside Cote Ditch, West Oxfordshire.

Participants

Plans

If I get out early, before I start work, I (Dan Q) might be able to make it to the hashpoint by bike before about 9am. Most of the fields round here have already been harvested and so nobody’s likely to object if I step into this one for a couple of minutes (it looks like there’s a promising looking gate at N 51°43.2′, W 1°29.722′).

Expedition

I was out and about anwyay, dropping my kids off at rehearsals for a play they’re in later this week, so I figured it’d do no harm to swing by Cote – the settlement nearest the hashpoint – this morning. Cote turns out to be a delightful and quaint little hamlet, and when I passed through everybody and their dog seemed to be out on a morning constitutional and I got a few odd looks from the locals who are, on account of their hamlet’s location, probably unused to “through” traffic and so may well have been wondering who exactly I was visiting!

Round here most of the farms grow wheat, and it’s harvest season. I had to pull aside on one of the narrow roads that criss-cross this part of Oxfordshire to allow a combine harvester – fully the width of the entire road! – to pass in the opposite direction. It was followed closely by a line of impatient drivers crawling along behind the enormous mechanical beast, and I was glad to be going the other way! When I first saw that the hashpoint appeared to be in a field I was optimistic that it might be one that had been recently harvested, like all the ones near my house, or else left fallow, and I’d be able to get close to the hashpoint without causing any disruption.

Unfortunately, the field with the hashpoint was very-much still growing, full of corn for harvesting later in the season, so my expedition ended abruptly at the gate. I took a sad-face photo and attached a “The Internet Was Here” sign to the gate, for good measure (and perhaps as an explanation to the locals who looked at me curiously as I passed!), then continued my journey home.

Tracklog

My GPSr keeps a tracklog:

Tracklog showing expedition 2021-08-19 51 -1

Photos

×

“Perfect Fit” cheap & easy post topper geocache

For GC9EXXX Church Micro 14129…Sutton, a geocache I recently set up, I wanted to use a “pole topper” style cache. I’ve always felt slightly let down by finding yet another magnetic nano stuck inside a pipe, so I wanted to do something better. You can watch the video here or on YouTube, or scroll down for written instructions.

You will need:

Steps:

  1. Sand down the lid and the inside of the pole topper so the glue adheres to it better.
  2. Mix up your 2-part epoxy in the pole topper. Don’t use too much or it’ll overflow and block the lid from closing.
  3. Put the lid into the pole topper and press down firmly and evenly to squeeze out any air bubbles.
  4. While you’re waiting for the epoxy to set, file off the flange around the edge of the tub. It’s there to catch drips but you’re not going to be storing food anyway! The lid is easier to take on and off with the flange filed away.
  5. Finally, roughen the bottom edge of the tub with some sandpaper to make it easier to grip when opening and closing the container.

Music:

For Lorilyn by Casey LaLonde, used under a CC-NC Creative Commons License.

Holidays in the Age of COVID

We’ve missed out on or delayed a number of trips and holidays over the last year and a half for, you know, pandemic-related reasons. So this summer, in addition to our trip to Lichfield, we arranged a series of back-to-back expeditions.

1. Alton Towers

The first leg of our holiday saw us spend a long weekend at Alton Towers, staying over at one of their themed hotels in between days at the water park and theme park:

2. Darwin Forest

The second leg of our holiday took us to a log cabin in the Darwin Forest Country Park for a week:

3. Preston

Kicking off the second week of our holiday, we crossed the Pennines to Preston to hang out with my family (with the exception of JTA, who had work to do back in Oxfordshire that he needed to return to):

4. Forest of Bowland

Ruth and I then left the kids with my mother and sisters for a few days to take an “anniversary mini-break” of glamping in the gorgeous Forest of Bowland:

(If you’re interested in Steve Taylor’s bathtub-carrying virtual-Everest expedition, here’s his Facebook page and JustGiving profile.)

5. Meanwhile, in Preston

The children, back in Preston, were apparently having a whale of a time:

6. Suddenly, A Ping

The plan from this point was simple: Ruth and I would return to Preston for a few days, hang out with my family some more, and eventually make a leisurely return to Oxfordshire. But it wasn’t to be…

Screenshot from the NHS Covid App: "You need to self-isolate."
Well that’s not the kind of message you want to get from your phone.

I got a “ping”. What that means is that my phone was in close proximity to somebody else’s phone on 29 August and that other person subsequently tested positive for COVID-19.

My risk from this contact is exceptionally low. There’s only one place that my phone was in close proximity to the phone of anybody else outside of my immediate family, that day, and it’s when I left it in a locker at the swimming pool near our cabin in the Darwin Forest. Also, of course, I’d been double-jabbed for a month and a half and I’m more-cautious than most about contact, distance, mask usage etc. But my family are, for their own (good) reasons, more-cautious still, so self-isolating at Preston didn’t look like a possibility for us.

Ruth and Dan in a car, in a car park.
Ruth and I went directly to a drive-through PCR testing facility.

As soon as I got the notification we redirected to the nearest testing facility and both got swabs done. 8 days after possible exposure we ought to have a detectable viral load, if we’ve been infected. But, of course, the tests take a day or so to process, so we still needed to do a socially-distanced pickup of the kids and all their stuff from Preston and turn tail for Oxfordshire immediately, cutting our trip short.

The results would turn up negative, and subsequent tests would confirm that the “ping” was a false positive. And in an ironic twist, heading straight home actually put us closer to an actual COVID case as Ruth’s brother Owen turned out to have contracted the bug at almost exactly the same time and had, while we’d been travelling down the motorway, been working on isolating himself in an annex of the “North wing” of our house for the duration of his quarantine.

Barricade with signs reading "Quarantine: Zombie Outbreak"
I set up a “yellow zone” between Owen’s quarantine area and the rest of the house into which we could throw supplies. And I figured I’d have fun with the signage.

7. Ruth & JTA go to Berwick

Thanks to negative tests and quick action in quarantining Owen, Ruth and JTA were still able to undertake the next part of this three-week holiday period and take their anniversary break (which technically should be later in the year, but who knows what the situation will be by then?) to Berwick-upon-Tweed. That’s their story to tell, if they want to, but the kids and I had fun in their absence:

8. Reunited again

Finally, Ruth and JTA returned from their mini-break and we got to do a few things together as a family again before our extended holiday drew to a close:

9. Back to work?

Tomorrow I’m back at work, and after 23 days “off” I’m honestly not sure I remember what I do for a living any more. Something to do with the Internet, right? Maybe ecommerce?

I’m sure it’ll all come right back to me, at least by the time I’ve read through all the messages and notifications that doubtless await me (I’ve been especially good at the discipline, this break, of not looking at work notifications while I’ve been on holiday; I’m pretty proud of myself.)

But looking back, it’s been a hell of a three weeks. After a year and a half of being pretty-well confined to one place, doing a “grand tour” of so many destinations as a family and getting to do so many new and exciting things has made the break feel even longer than it was. It seems like it must have been months since I last had a Zoom meeting with a work colleague!

For now, though, it’s time to try to get the old brain back into work mode and get back to making the Web a better place!

× × ×

Dan Q archived GC8YZKJ Sunken Bunker

This checkin to GC8YZKJ Sunken Bunker reflects a geocaching.com log entry. See more of Dan's cache logs.

When I first placed this cache I failed to accommodate for how high the river might get during summer floods. I’d chained it to the bridge to help stop it from disappearing, but that instead introduced a new problem: after a flood it’d be left hanging in a highly-visible spot and attract muggle vandalism. The net result is I’ve had to retire this cache.

Dan Q archived GC86MHH Top of the Footpath

This checkin to GC86MHH Top of the Footpath reflects a geocaching.com log entry. See more of Dan's cache logs.

Visited to check on this container and can confirm that it’s completely seized and unopenable. The end cap that used to provide it with cover (and a hiding place for a pencil) is gone, too, and this (combined with the fact that I no longer live around the corner) feels like a sign that this one needs archiving.

Dan Q archived GC86MTH Yarnton Lane

This checkin to GC86MTH Yarnton Lane reflects a geocaching.com log entry. See more of Dan's cache logs.

Following a run of DNFs I drove over here to check on this cache but it is indeed missing. As this location is no longer in walking distance of my home I’m retiring it to free up what is a pretty convenient hook for some other cacher!

Empty hook where the geocache used to hang.

×

Dan Q archived GC7QG1Z Oxford’s Wild Wolf Three

This checkin to GC7QG1Z Oxford’s Wild Wolf Three reflects a geocaching.com log entry. See more of Dan's cache logs.

One final visit to retrieve the container from this increasingly inaccessible multi. Braved copious nettle stings to get there and back the “short way”, then began a quick tour of Kidlington to retrieve any surviving clue stages. Sad to see this one go, but the epic container will live on in a future cache, someday!

Dan with Oxford's the Wild Wolf 3 final stage cache container.

×

Dan Q found GC95GZY Fairhaven South 2

This checkin to GC95GZY Fairhaven South 2 reflects a geocaching.com log entry. See more of Dan's cache logs.

Nice easy find for fleeblewidget and I while on the way to pick up our kids from my mother’s house and take them home to Oxfordshire. A beautiful day for an explore around the dunes but sadly we can’t stop, we’ve places to be! Nice to see the lake, though. TFTC.

Dan Q found GC56XWR Pendle 12

This checkin to GC56XWR Pendle 12 reflects a geocaching.com log entry. See more of Dan's cache logs.

Coming back down from our walk, this was fleeblewidget and I’s last cache of the morning. The shadow of the hill disrupted my GNSS signals and threw us off by a few metres, but fleeblewidget soon spotted the right hiding place and we had the cache in hand. TFTC.

Dan Q found GC1BQK0 Pendle Summit

This checkin to GC1BQK0 Pendle Summit reflects a geocaching.com log entry. See more of Dan's cache logs.

A very easy find (with spot-on coordinates fed good sky views to ensure a solid lock) for fleeblewidget and I late this morning, after a hot hit satisfying ascent up the Big End. TFTC.

Shortly afterwards we met Steve Taylor (pictured) carrying a bathtub up the hill! Turns out he’s planning to do this 45+ times over the course of the next few weeks in order to raise money to fight Cystic Fibrosis! We promised to sponsor a couple of rubber ducks for hours bathtub upon our return to our accommodation.

Steve Taylor climbing Pendle Hill carrying a bathtub for at least the second time this morning.

×