Two weekends ago, I did my first Parkrun - Parkrun is a initiative which is 100% volunteer run & takes place in a whole host of communities across the UK. I've been aware of it for sometime, but the trigger for me to actually go and take part in one was, of course, triggered by competition.
So - The workflow for the .gpx files like this overall:
Let's break this down..
First up, I've configured the Input to read .gpx files like this:
This is followed by three Data Prep tools - They're relatively self-explanatory, but for reference, the formula I've used to split out the "T" and the "Z" (which come with the native .gpx file in the "time" field) is this:
Now I'm not fit at all. Like not even slightly. Anyone who has done any kind of sport with me can testify to this.
And since doing an impromptu 10k last summer (which bloody hurt) I've not done a long run for a while, especially after buying a road bike in January.
Anyway - Parkrun. It's a 5k route, and in Ipswich, it runs on Saturdays at 9:00am. So I got out of bed, cycled down (first mistake) and did a short warm up (second mistake) before deciding to start with a slow pace, before randomly speeding up midway through (third mistake).
At the end, I was aching, but I made it up the final hill to the finish & I was glad I did. I then cycled home (which also hurt) (The centre of Ipswich is fairly hilly, and the last leg before I get home is a steepish hill)
Parkrun e-mail you your time, and you can compare yourself to other runners - I also use the Strava app, so I used that to track my run during the event as well. Now, of course, I wanted to visualise this. You can export Strava activities into .gpx files, and I simply copied and pasted the finisher table from the Parkrun Ipswich website.
The table was fine; the tricky part was the .gpx file, and whether it played nicely with Alteryx. To Google!
I found that to use .gpx files, Alteryx needed to read it in as .xml files, and then you simply had to return the child values. (XML files seem scary, but once you understand them, they're actually kinda beautiful...)
So - The workflow for the .gpx files like this overall:
Let's break this down..
First up, I've configured the Input to read .gpx files like this:
This is followed by three Data Prep tools - They're relatively self-explanatory, but for reference, the formula I've used to split out the "T" and the "Z" (which come with the native .gpx file in the "time" field) is this:
Substring([time],0,10) + ' ' + Substring([time],11,8)
The next part is creating the spatial points with lat-lons - we're able to create the map without this using a hub and spoke, but using the spatial "create points" tool we can use the Centroid output to calculate the distance using the spatial tool which you can see here.
I wasn't actually aware that you were able to integrate spatial formulas within an Alteryx workflow - so this was a great exercise to try new things. The running total & re-join is to add tags for the "start", "finish" and middle points on the way.
Finally, I added time as a factor to my dataset using seconds from the datetime field created from the formula tool which got rid of the T and the Z's
The multi-row formula tool I used to split out the seconds was this
When it came to visualising the data, I had a few ideas in my head - but this is where I have to give kudos to Ben Moss, Peter "Bambi" Gamble-Beresford, Lorna Eden, Ian Baldwin & Elnisa Marques for the feedback and thoughts, even for the ideas I rejected.
Check out the various iterations below (I lost one of the most radical ones as I forgot to screencap it!)
Check out the finished visualisation below, or on Tableau Public here (
I wasn't actually aware that you were able to integrate spatial formulas within an Alteryx workflow - so this was a great exercise to try new things. The running total & re-join is to add tags for the "start", "finish" and middle points on the way.
Finally, I added time as a factor to my dataset using seconds from the datetime field created from the formula tool which got rid of the T and the Z's
The multi-row formula tool I used to split out the seconds was this
The VisualisationIF [RecordID]=1 THEN 0 ELSEDateTimeDiff([DateTime],[Row-1:DateTime],"seconds") ENDIF
When it came to visualising the data, I had a few ideas in my head - but this is where I have to give kudos to Ben Moss, Peter "Bambi" Gamble-Beresford, Lorna Eden, Ian Baldwin & Elnisa Marques for the feedback and thoughts, even for the ideas I rejected.
Check out the various iterations below (I lost one of the most radical ones as I forgot to screencap it!)
Check out the finished visualisation below, or on Tableau Public here (
0 comments:
Post a Comment