ParkrunUKFinder App

Nathalie Descusse-Brown
29th April 2019

What is Parkrun?


Parkrun is a series of 5k runs held on Saturday mornings in areas of open space around the UK. They are open to all, free, and are safe and easy to take part in. They are so popular than a phenomenon appeared in the form of the ParkRun alphabet where participants try and run ParkRuns in different towns starting with each letter of the alphabet. This app is designed to make it easier for them to find a nearby ParkRun starting by the letter of their choice!


How does the ParkrunFinder app work?

  • Scrapes https://en.wikipedia.org/wiki/List_of_Parkruns_in_the_United_Kingdom website. Before doing so, a check was performed with the R package robotstxt to ensure scraping of this site was allowed.
  • Returns the list of all parkruns.
  • Interrogates their associated hyperlinks (town's page in wiki) to look up associated latitude and longitude.
  • Looks up latitude and longitude of user-entered postcode by looking it up in the table downloaded from https://www.freemaptools.com/download-uk-postcode-lat-lng.htm.
  • Calculates harversine ('as-the-crow-flies') distance between Parkrun location and user postcode.
  • Returns a list of Parkruns ordered by distance from the user postcode.
  • User can filter further by selecting first letter of the Parkrun location, in order to tick it off own Parkrun alphabet!

What the app looks like


The left hand side gives instructions for use and has a box for free text input of postcode and dropdown menu for selection of first letter of ParkRun event town.

How to use the app

  1. Enter your postcode.
  2. Enter the letter of interest (if you want to return all ParkRuns then just select 'All').
  3. Maximise the app window to ensure you can view the results that will appear on the right hand side.
  4. Wait for about 10-15 seconds for the results to be returned.
  5. Once the results are returned, you can filter them further by using the search function at the top right hand side of the results table.“).



Please note that some towns will not have latitudes and longitudes associated with them in the original wikipedia page used for this app, making it impossible to calculate the distance from the user postcode. These ParkRuns locations are nevertheless returned at the bottom of the results table. Please also note distances are calculated as as-the-crow-flies distances.

The back end of the app


The example of code below shows some of the results displayed by the app, and in particular what is returned by the main app function, findParkrunUKplusdistance.R. For clarity in this presentation, only the Parkrun location name and distance from user-entered postcode for the closest 10 locations is shown, but the app returns additional information related to each Parkrun.

source('C:/Users/natha/Developing_Data_Products/ParkRunFinderPlus/findParkrunUKplusdistance.R')
results <- findParkrunUKplusdistance("SW15 3TR")
head(results[order(results[,6]),c(1,6)],10)
                       Name Distance in miles
130   Fulham Palace parkrun          1.620577
118       Brockwell parkrun          5.244188
121           Bushy parkrun          5.286177
383         Nonsuch parkrun          5.691658
127         Dulwich parkrun          6.490548
120         Burgess parkrun          6.789088
126  Crystal Palace parkrun          7.111698
361       Hazelwood parkrun          8.585694
114 Beckenham Place parkrun          9.300725
116   Bedfont Lakes parkrun          9.486126