Up-And-Down

RProgramming
analysis
history
mathematics
statistics
statisticalModelling
conjecture
sport
snooker
geography
health
Author

The usual

Published

May 17, 2025

Reading Advice: If you only want to spend 10 seconds only, read “my working walking theory”.

Disclaimer: This is a rather free-form, idea-laden post, some of the claims I make may not be accurate (and that’s a good thing, you need to risk being incorrect in order to learn things about the world by the scientific method).

Quality Rating: 5/10

I recently went to the Crucible Theatre in Sheffield (See here for the title image, it hasn’t changed all that much since) to watch some of the World Snooker Championship and engage in some other activities. I would like to remark on some of the fun maths from the fine sport of snooker, but instead in this blog I’m going to talk about exercise, loosely speaking.

I’m not talking about exercise in snooker1, instead I’m remarking about the remarkable hilliness of the “steel city”, Sheffield2.

My Working Walking Theory

As part of my day-job, I often come up with theories that might explain something about the world, that should be tested with experiments/data. Often I find that we do not have the data to test the theory, but a key part of science is working out what data you might need. As my legs began to scream from trekking for hours up and down some of Sheffield’s steep streets, the theory that came to me was this:

There should be a correlation between the hilliness and the healthiness of the people who live there.

“Hilliness”

A curious pastime of mine is looking at topographical maps of various places. Here is one of Sheffield: Sheffield elevation map.

And here are a couple more cities on a similar colour scale3. Birmingham: Birmingham elevation map

And Newcastle: Newcastle elevation map

I think to the eye it’s reasonably clear that Sheffield is a hillier city than the others, but can we pin that down in mathematical language? Here are some definitions of “hilliness” you might consider, but dear reader please think through how you’d try and quantify it before reading on4:

  • Absolute difference between highest and lowest point on the map
  • Average gradient (fun maths questions, if a person takes a walk and ends where they started, what is the average gradient over their journey? Is it true that there must be a point in their journey where they’re walking on flat ground?)
  • Average squared gradient
  • Average absolute gradient
  • Maximum and/or minimum gradient
  • Number of local maximums/minimums in gradient
  • Average second derivative (i.e. how often does the gradient change?)
  • Average squared second derivative5
  • etc.
  • Average curvature
  • Any of the above where the statistics are weighted according to where people typically walk (so the range of altitudes experienced for a typical person’s day in that city, the average gradient they typically experience), or even weighted by energy exerted walking6.

Hilliness and Health - Statistical Concerns

There has been a vast amount of research time and effort spent on what leads to better health. We know that exercise improves fitness and health, and we know that walking up hills exerts more energy than walking a similar distance on the flat (or the downhill). Unfortunately, without walking trends data (which would either take a large citizen-science experiment rather like the BBC Pandemic, or an organisation like Google to take on the challenge of testing the theory) I suspect you wouldn’t be able to test the theory properly.

A large majority of the world’s population either lives near the sea or a river, and those are likely to be flatter areas than most parts of the Earth’s surface. I think it’s also true that the largest cities tend to be nearer seas and large rivers than smaller settlements. Therefore there might be selection biases and confounding factors about the people who live in flatter and hilly areas. These could be geographical - those living at higher altitudes live longer for some reason (Not sure this extends to altitudes like Sheffield’s, mind you!), but one fun theory of mine is economical: for a hilly city to come into being or grow large, there was probably some natural-resource or industrial reason. Those kinds of places (like Sheffield) are likely to have undergone industrial decline in large parts of Europe and the USA, and that could well be simultaneously leading to poorer health outcomes. It could also be the case that having a topography that is unsuitable for easy walking encourages the residents to live a more sedentary lifestyle. It could also be the case that younger people tend to live in larger cities/towns (and they tend to be flatter than smaller settlements?).

Goodbye!

Thank you for reading my thought process, I think it’s a fun creative task generating hypotheses that can be tested with data, and if you’ve read this far, I hope I’ve convinced you of that.

Show the code
library(ggplot2)
set.seed(91)

# TODO: Write your own code if you get data inputs of city-wide health inputs

Footnotes

  1. Although I did once in my teenage years calculate the minimum distance that darts players walked over the course of their matches and tournaments, based on the geometry of the paths they have to take. I think it would be a fun side-project to calculate the distances that a snooker player has to walk around the table to effectively execute their game - if someone supplied the appropriate tracking data I hypothesise that the players with the fastest shot times also walk less distance, and that would explain a large portion (50%?) of the variance in the shot time data.↩︎

  2. It turns out that there are lots of “steel cities” around the world: https://en.wikipedia.org/wiki/Steel_City . I did have a chuckle to see the only other entries from the UK to the wikipedia article are Middlesbrough and Port Talbot,,, which are towns. There’s a nice song called “steel river” by Middlesbrough musician, Chris Rea: https://www.youtube.com/watch?v=OgoMsc7PseY . One of my grandparents would disown me at this point if I did not remark that her father was one of the Middlesbrough steelworkers who made the steel for the Sydney Harbour Bridge.↩︎

  3. Personally, I detest this “rainbow” colour scheme as it is not perceptually uniform, or colour-blind-friendly, check out the viridis colour maps if you have the option to in your work/life.↩︎

  4. And if you have another suggestion or strongly disagree with any/all of mine, feel free to email me.↩︎

  5. For reasons that I’ve not thought deeply about, the mgcv package in R that fits generalised additive models (GAMs) has a penalty on the integral of the squares of the second derivatives of the smooth function, known as “wiggliness”. I suspect the reason is computational rather than conceptual (because taking a 3/2 power of something that involves more FLOPs), but have never bothered to contact the author or other GAM experts/users about it, I could be wrong.↩︎

  6. By these kinds of metrics I have a vague suspicion that lots of mountainous countries like Nepal would turn out to not actually be that hilly as very few people actually climb the high mountains, and most live in the river valleys and on plateaus. I would love to be disproved.↩︎