the dream of hopping on a bike, tent in pannier, and riding off in whatever direction i fancy, never needing to come home because the tent is home, will likely never die. which is a shame, because it’d be nice not to have to reckon with the regret that comes with not pursing a dream. i can’t imagine not being jealous of those who have cycled a long way fast, or for a long time slow[1][2][3]. whether it’s a lifetime a-wheel; or only[4] a few years; diligently[5] chasing arbitrary goals; blasting across a continent, or around the world. i am in awe[6]. reading about a stranger’s week-long picnic along a bit of the rhine, where the cycling is largely incidental, evokes the same[7] bucket of feelings and emotions as hearing about the automaton who rises before midnight to do intervals in their living room[8]: i sort of wish i was doing that.
# brief aside that deserves to be higher placed than a footnote
when writing the above intro, i went looking for emily chappell’s old blog (thatemilychappell.something-or-other [dot] com.?) to use as an example of either a lifetime a-wheel, or blasting across a continent, but couldn’t find it. i did however come across unfinished journeys[9]. and in this post, emily discusses jealously (of those who race) and nostalgia (about having raced). and it resonates. a lot. and i never even raced. just went a bit audax bonkers for a few years[10], in addition to having drawn a few lines across europe.
i too miss the “pavement picnics” and “endless café-bars you’ll find dotted across Italy“. these feelings of jealously[11] tinged with regret[12] could be thought of as “overpowering nostalgia”, and it would be (probably) be healthy[13] to do so. however, and as emily suggests, these feelings are perhaps a sign that there is a need to spin the wheels and rough it for a bit. couldn’t agree more.
the below analysis[14] provides me with some guidance and inspiration on where to spin those wheels and rough it. and hopefully, the requisite motivation to do so.
# what this post was supposed to be about
as usual, the content warning applies.
my long-term, overarching, goal for my cycling life is to have all of my rides linked[15]. on the scale of zero to trivial this scores a commendable trifling. every ride has to share a point with at least one other ride. the result: a spatially contiguous record. no gaps. in an ideal world[16], this network of rides would form a (balanced?) directed graph[17]. on such a network, it would be possible to pick any point visited on a ride, and get to any other point on the network whilst respecting the direction that i’d travelled (fig 1). this would be the gold standard (🥇).

this is impractical. i am, therefore, willing[18] to relax this constraint, and (ugh) compromise. the second tier (🥈) would be to be able to get from any point on the network to any other point, whilst travelling either wholly in the direction originally travelled (that’d be 🥇), or wholly in the opposite direction. such a network might look like fig 2.

both of these are tricky to accomplish over the course of a lifetime’s worth of purposefully and aimlessly cruising round. so instead we have to settle for less (🥉). direction is casually ignored, and all that matters is that the network is contiguous.
as things currently stand. with the data that i have. things are looking pretty okay. not great. but ok. but there are some gaps. and they need filling.
# the clusters

# boat note
they’re allowed. trains. they are not. because you could be riding. apart from when chugging across the strait of messina it seems i tend to turn the recording device off. so in this throw-together analysis, there are ‘gaps’ that aren’t, e.g., the red is connected to the light green and the pink (via dover-calais and newhaven-dieppe respectively). similarly, the two little violet lines in the baltic states correspond to a ferry to/from vormsi island, and a ferry across the klaipėdos sąsiauris that separates the curonian spit from lithuania.
# home turf
that big red spider’s web: it’s connected. from st davids (which happens to be the westernmost point of wales) to lowestoft (the easternmost point of england), and from the falls of tarf to somewhere near swanage. all my (recorded) rides are linked. that errant little purple line from penzance to bodmin parkway speaks to tantrum and a plan abandoned.
# away turf
# the light green
calais –> budapest –> nova gorica (slovenia) / gorizia (italy). that was a good trip.
# the dark yellow
estonia, latvia and lithuania. that was magic.
# the pink
long weekends in northern france, courtesy of the newhaven-dieppe ferry. i’ve said it before, and i’ll say it again: the best thing about living on the south coast of england is france.
# the cyan
the hub of this cluster is the italian village where my great-grandfather lived before berkshire. i’ve done some loops from the village; cycled up to the village after mucking about in tuscany (that was also magic); from the village west for the torino-nice rally (2017); and to paris…where a train then took us out of the city hence the gap to the pink.
# the light brown
just south of rome –> palermo. over new year 2015-16. that was exceptional.
# the purple, the light blue and dark pink
a ctc holiday from bagnères-de-luchon; that week when i was a ride leader for a luxury cycling holiday in rioja; majorca for a few days between at the tail end of 2016.
# the gaps
this, admittedly[19], rough analysis provides a handy where to ride next list:
- link up the west country
two of the following, although, ideally[20] all of them
- dieppe (fr) to calais (fr) (light green & pink)
- paris (fr) to mantes-la-jolie (fr) (pink & cyan )
- venice (it) to lake garda (it) (light green & cyan)
and
- (just south of) bonn (de) to vilnius (lt) (light green & dark yellow)
- laguardia (es) to chèze (fr) (light blue & purple)
- foix (fr) to nice (fr) (purple & cyan)
- a boat to/from majorca (dark pink & ?)[21]
- montalcino (it) to cisterna di latina (it) (cyan & light brown)
that last one. that’s why i started putting this piece together. because the perfect opportunity[22] arose to link montalcino with cisterna di latina[23]. however. i chose not to bring the folding bike because excuses. oh well.
and then there’s these:
- anywhere on this network to ulaanbaatar
- 平遥古城 to 桂林市
# the really fun stuff
the how of fig 3 was thoroughly enjoyable.
- read lots of
.gpx
files usinggeopandas
- create an
R-tree
- find all unique intersections within the tree
- treat each intersecting pair as an edge[24] & construct an undirected
graph
- identify
connected components
, i.e., the clusters
bingo. done.
each track was buffered by 20 metres prior to intersecting. this was done as there were several instances[25] where rides that should be connected weren’t.
once created. the network (should) allow you to find routes between random points on the network fig 4

at first glance[26], this seems to be working. but it isn’t. not quite.
# the problems
- it isn’t segmenting each ride at every intersection with every other ride
- see the weird fork near york
- it isn’t taking the shortest route
- for that i need to get the distances (weights) of each segment.
- and for that i need it segment each ride at every intersection.
attempts were made.
and i will continue to make attempts. but that is as good as it gets for now.
# some learnings
- my network has more gaps than i thought it had (and i haven’t included hikes and runs here – which will create more disconnected groups)
- snapping a lot of linestrings, whilst preserving detail is tricky, and involves many heuristics
- route finding with
networkx
is surprisingly fast - i need to get out more[27]
- how to effectively split lots of linestrings at lots of points. for some reason
shapely.ops.split()
only gives one intersection per linestring in a multilinestring. i haven’t learnt this. this is unresolved
neither momepy
nor movingpandas
were not used in the above. but i’m quite sure they both contain utilities that would improve things. i made do with geopandas
, shapely
, and networkx
.
the code isn’t on github yet.
# missing data / excuses
this is not a complete record. i first got a tracker in early 2010. things before that, like my first tour across france[28]. or that ride to exeter[29]. or those rides around exeter, and up to dulverton. these are not present. some others are missing because, despite having a tracker, i didn’t have the means to keep it charged on multi-day affairs, such as the two days spent grunting around devon pushing 44×17, before then hopping on a train and spinning freely around the somerset levels. or the heavily laden trip from swansea to holyhead, diligently following route 8. or that week in slovenia and then down to venice.
and, believe it or not, there have been days – or even months – when i haven’t wanted to be a slave to the data and have chosen to not record. i’m capable of both (a) regretting not having a complete record and (b) understanding that few things are more trivial than this. and look – i still remember crossing the menai bridge[30] – i’ve been to anglesey – please believe me.
i’ve also casually omitted the mongolia → china → different bit of china → vietnam journey.
# footnotes
and everything between ↩︎
special hat tip to amanda coker, steve abraham, tommy godwin and all the others who cycled for a long time, fast ↩︎
and an extra special hat tip to flat-landers and artists, who spend a few minutes not really going anywhere. but with incredible skill ↩︎
still, wow ↩︎
obsessively. guiltily. pointlessly ↩︎
and a bit jealous ↩︎
-ish. near enough ↩︎
or another three score and ten laps of regents park ↩︎
i signed up to the mailing list, and apparently now have a few gift links to give-away. just ask ↩︎
and i’ve got the brevet cards and patches sewn onto a carradice saddlebag to prove it ↩︎
of those out there getting it done ↩︎
for not having done more since i last did some ↩︎
as in, bringing me a peace, of sorts ↩︎
ridiculous ↩︎
because having fun, seeing the world, and keeping fit just aren’t enough ↩︎
hate to break it to you, but this one ain’t. fingers crossed for HIP 65426 b 🤞 ↩︎
stopping myself right now from going further down the graph theory rabbit hole. i think balanced is the correct term. if not, i am confident that there is a term for this type of graph. if you know it, substitute the correct term. if you don’t, imagine you do and substitute that. regardless whether it is a(n un)directed hypergraph multigraph pseudograph, i
don’tdon’t care (ed. the author clearly cares more than is reasonable) (also ed. the author did not stop himself. in fact, he showed remarkably little restraint, and threw himself gladly down the rabbit hole) ↩︎not really. but yeah ↩︎
unfortunately. regrettably ↩︎
still keeping the faith for HIP 65426 b ↩︎
across to sardinia and corsica and then to mainland italy at livorno. oh. that’d be lovely. could do this whilst i’m at it. and whatever the equivalent is in sardinia ↩︎
a course in rome; permission to tab a bit of holiday on beforehand; and paid for train travel ↩︎
the etymology of cisterna is what you think it is. and my mind needlessly throws an ‘r’ into latina ↩︎
this isn’t quite the correct method. i think whatevery
momepy.gdf_to_nx()
does, it’s what i should be doing. but ain’t ↩︎especially on point-to-point tours or near train stations that have been ridden to/from only a handful of times, or when i’ve started riding before acquiring signal, or stopped riding before actually stopping. or, in some cases a short stretch of road ridden once in one direction, once in the other but without the routes crossing. whether they should be connected…well. probably not. fuck. ↩︎
provided you’re sloppy and hasty with your first glance. if not. it looks pants from the get go ↩︎
knew that already ↩︎
the route was traced on a paper map during pavement picnics and in the tent in the evenings. i’ll digitize it at some point ↩︎
which included a terrifying bit of dual carriageway that i should not have been on ↩︎
there were kayakers larking about in the eddies at the base of the towers ↩︎