Level 4 Exercise
We use a bit of network analysis to set the extent of exercise during lockdown.
So you now know that part of my coping strategy for lockdown is Stuff quizzes, but to be honest, the main strategy for me is exercise, and running in particular. I’d be lost without it, as those in my bubble well know. We are encouraged to get out and exercise so long as we keep it local, but what exactly does that mean? Is it my block? Is it my suburb? Is it my little South Island bach out in the middle of nowhere (which I of course went to before level 4, right?). It hasn’t been that explicit during this lockdown but in the previous one I do seem to recall a 5 kilometre distance being put on distances away from home that were acceptable. You might not be too surprised that I was thinking about how I would use maps to help figure this out. So here goes!
To demonstrate (and to protect my privacy…) I’ll created three points on a map to use for this – one in Beckenham, one in Governors Bay and one at the uni:
5 kilometres is a pretty distinct value to work with. If I know that I’m okay running within that distance from home, my first thought might be to just buffer around the point is my start:
This gives me something to work with – sort of my running bubbles. To be fair, this is an as-the-kereru-flies distance, and, well, last time I tried to run through my neighbours back yard, he called the police. (I’m reminded of John Cheever’s short story, The Swimmer, where the protagonist decides to make his way home by swimming through all his neighbours’ pools to get there.) The reality is that we are constrained to use the road network for things like walking and running (and hopefully driving, too). So how do we take that into account?
Here’s where Network Analysis (NA) comes in to play. With the right input data, I can use NA to find the 5 k distances I can realistically travel along the road network from a starting point. To get this to work in Pro we first need a dataset that’s been prepared for network analysis, meaning that, in the case of roads, each line segment has connectivity information which ties it into the rest of the network, so that a pathway can be found from one point to another. There’s one in J:\Data\NetworkAnalysisData called RoadsNA_ND. Feel free to play along at home if you like.
Next I created a new point feature class for my starting points, added them to my map and created the three points you see above. What really matters in this layer is the geographic location so it really doesn’t need any attributes.
Once I’ve got these layers added to my map, there’s now a Network Analysis button under the Analysis tab with a whole bunch of options beneath:
Routes is the same sort of thing you might do in Google Maps to get directions. I won’t go into the others this time, but for our purposes, what we’re after is Service Areas. We’ve seen these before here at GIS Central. Selecting that adds a new layer to my map:
In this new layer, Facilities are my starting points, the Polygon and Lines layers are my two potential output layers and the different barriers are ways of limiting connectivity – like road blocks. Next I need to set the layer that I’m using as my start points, here called (creatively) Facilities. The Import Facilities button allows me to set this to my Facilities layer:
A few of the other key settings:
- Direction is “Away from Facilities”
- The Cutoffs are where I set the distances. Here I’m using 5,000 (metres) but I can set multiple cutoffs if need be.
- Outputs are set to Polygons and Lines.
Note that if my network dataset has times of travel over each line segment I can just as easily create drive-time areas or walking-time areas (e.g. what areas are accessible within half an hour’s drive of my facilities?). We’re just interested in distance in this analysis. Once set, click Run, et volia!
Bummer – our Governors Bay and Beckenham friends could just barely meet up given these starting points…assuming each of them could make it up their respective hills.
At least this will allow them to remain socially distanced (they’re actually about 260 m apart).
I’m showing both the line and polygon outputs here, but everything that’s purple is basically at or within 5 k of my three starting points. Note how they compare to my 5 k buffer – all are generally smaller in extent, which shouldn’t be too surprising – only a road running straight from a starting point out 5 k would reach the buffer edge.
One important thing to note is that walking tracks are not included in my network dataset; it’s only roads. If I were to incorporate walking tracks it would probably make a biggish difference.
Anyway, let’s look at things in more detail – here’s Lincoln (just the lines this time):
And Governors Bay:
And Beckenham:
Of course the Beckenhamite has a lot more options than the Governors Bayesian (that one’s for all you statisticians out there – you know who you are), at least along the roads, but arguably much better views. Our friend in Lincoln will spend a lot of time looking at paddocks.
Now I don’t know if we want to get all philosophical around the real world limiting our potentials but my aim here is to show how Network Analysis helps us to get better senses of distances and times along a linear network, such as road, or walking tracks, or wasterwater pipes, or fibre optic networks and any network connected together. Buffers are nice and easy but NA allows us to make outputs like this be a bit more realistic.
So, with this task done, it feels like a good time for a run.
C
Postscript: in the figure showing all three service areas and buffers, note that the Beckenham and Governors Bay buffers overlap, but the figures lower down only show each buffer and network lines separately. Wondering how I did that? Check out definition queries – they can be very handy.)