Hiking with Tobler: Tracking Movement and Calibrating a Cost Function for Personalized 3D Accessibility

Findings This paper analyzes the author’s travel trajectories to calibrate a bespoke walking cost function based on Tobler’s Hiking Function (THF) and uses it to estimate personalized accessibility on a 3D network in Hong Kong. Compared to the THF, the calibrated cost function reflects slower walking speeds on flatter ground and higher speeds on more sloped terrain. This latter effect is likely due to the presence of staircases that enable increased walking speeds on steeper slopes. Accessibility results using the calibrated function are slightly lower than those from the THF and highlight the importance of slope-aware cost functions in modelling walkability. of that can occur when assuming networks are flat. My results also suggest the potential for to under-estimate walking speeds on steeper slopes in more


QUESTIONS
Hong Kong is an intensely three-dimensional city, not only in terms of its complex 'volumetric' built environment (Bruyns, Higgins, and Nel 2020) but also its mountainous terrain. While working at the Hong Kong Polytechnic University, I took up hiking on the city's extensive trail network. But as a quantitative geographer with a general interest in the potential of sensors for personalized urban data analysis, I could not help but to combine work and leisure activities and utilized my mobile phone and smartwatch to capture data on my physical performance. On a personal level, I became interested in how closely my captured travel trajectories align with the speeds predicted by Tobler's (1993) 'hiking function.' On the professional side, I am also broadly interested in the use of cost functions for accessibility analysis. Modelling pedestrian accessibility on a 3D network requires the use of an anisotropic cost function and while Tobler's Hiking Function (THF) has a long history of applications in the field of archaeology, Goodchild (2020) comments on the increasing usefulness of hiking functions in a variety of topic areas in geographical analysis (and includes an early graph of this paper's data). Indeed, the THF is increasingly utilized as a cost function in 3D surface (e.g. water access in Páez et al. (2020)) and linear network (e.g. access to rapid transit stations in Higgins (2019)) analysis. Other researchers have used new sources of activity data to calibrate different cost functions (Brundson 2018;Campbell et al. 2019;Irmischer and Clarke 2017;Pingel 2010). Some type of hiking function also appears to underpin routing suggestions on sloped terrain in Google Maps (Goodchild 2020). However, the original THF was calibrated to coarse isoline data from Imhof (1950) and while its predicted speeds may be suitable for modelling movement on unimproved terrain, it is not clear how well its predictions extend to walking in an urban 3D network context. Alternative cost functions could be calibrated for urban walking specifically, but obtaining accurate GPS trajectories is challenging in "urban canyon" contexts like Hong Kong (Ji et al. 2010). In response, this research utilizes trajectory data captured on trails that exhibit terrain types similar to what would be found in more urban walking environments to calibrate a bespoke cost function. I then use the function to estimate personalized accessibility to an urban amenity on a 3D network.

METHODS
I collected trajectory data over 4 hikes on the trails around Lung Fu Shan peak and the Pinewood Battery behind the University of Hong Kong in Central and Western District in 2018. The trails themselves feature dirt footpaths, segments finished with stone/concrete pavers and pavement, and stairs at the steepest sections, making them a useful proxy for more urban walking. Data were collected using an Apple iPhone 8 and Apple Watch Series 1 through the 'Outdoor Walk' tracking in the Fitness application. This device combination captures latitude and longitude positioning using the iPhone's GPS receiver, height from sea level using the barometer (precision of 0.1m), and heart rate readings using from Apple Watch. The phone applies some smoothing algorithm to the GPS data and can also use the accelerometer and gyroscope in the watch to augment positional accuracy in areas with poor or no GPS signal, although these features are opaque to the user. Readings were captured from the sensors at 1-second intervals. The resulting workouts were exported as .gpx files using the Run Gap app for iOS. The trajectories were cleaned to remove the beginning of the walk to the trail (where the accuracy of GPS readings is compromised by tall buildings) and a handful of stops to rest during the hikes. Figure 1 shows the trajectories and a combined terrain (derived from Google Street View) and elevation profile for one of the hikes.
To model travel speeds, Tobler's (1993) hiking function uses an exponential function to estimate the connection between velocity and slope: Where is walking velocity in km/h, is a constant that controls the maximum velocity, is the gradient of the terrain measured as the tangent of the angle of the slope in the direction of travel, controls the rate of decline as the gradient increases, and offsets the gradient by some amount to capture how walking speeds are highest on a slight downward slope. In Tobler's original formulation, , , and so that the maximum walking velocity of 6 km/h is achieved at a gradient of -5%. I use nonlinear least squares to fit the generalized hiking function to the trajectory data and compare my walk speeds with that predicted by Tobler's formulation. To test the sensitivity of the estimated results to the temporal scale of the trajectory data, I employed two aggregation strategies including collapsing the trajectories into 3s, 5s, and 10s time intervals and calculating average speeds at 1% gradient intervals.
For the accessibility analysis, a 3D pedestrian network (LandsD 2021; Sun, Webster, and Zhang 2019) is prepared in a similar manner to that outlined in Higgins (2019), including splitting links into 10m or less segments to improve the accuracy of slope-based travel times and specifying anisotropic travel costs. For simplicity, the travel speed of any mechanized links (e.g. travelator, elevator) is set to 2km/h and the maximum gradient is capped at %. To estimate the effects of the bespoke cost function on personalized accessibility analysis, a simple scenario is crafted wherein I examine the spatial distribution of buildings within a 15 min walk of the Kinwick Centre. This building houses a grocery store and gym and is an interesting destination due to its location in the topographically-rich SoHo neighbourhood about halfway up the 800m Central-Mid-Levels escalator system. Using ArcGIS Pro, travel times are calculated three times: using the fit function and the THF to account for slope and a third time assuming the network is 2D with a constant walk speed of 5km/h. Data and code notebooks for reproducing the analysis are available in a GitHub repository.

FINDINGS
Results of the NLS models are presented in Table 1 and graphed in Figure  2. The sensitivity analysis suggests that the models are reasonably stable in parameters across all model specifications. The exception is the offset parameter which is insignificant in all binned models, indicating the cost curves in this category are estimated to be symmetric around a 0% gradient. Recognizing that neither AIC nor BIC are useful for comparing model fit across different sample sizes, I focus on the results for the original raw 1s data. Results indicate that my maximum walking speed of about 4.6km/h occurs on about a -3.3% gradient rather than the -5% in Tobler's formulation. My average flat-ground walking speed is also a bit slower than what Tobler (1993) would predict at about 4.4 km/h. On the other hand, I tend to be faster on higher slopes than predicted by the original THF, likely due to the prevalence of staircases on the steepest sections of the trail.
Accessibility results for the three travel cost scenarios reveal that the function fit to my travel performance leads to 2,287 buildings within a 15 min walk to the Kinwick Centre, which is 1.7% less than the number estimated using the original THF. This similarity suggests some trade-offs are occurring between my lower speeds on flatter ground and higher speeds on steeper slopes compared to the THF when routing on the network. For comparison, assuming the network was 2D would result in 2,502 buildings within a 15 min walk which would overestimate my accessibility by about 9.4% and 7.6% compared to the 3D network using my fit function and the THF respectively. To highlight these differences, Figure 3 shows 15 min isochrones calculated to the Kinwick Centre for the three cost scenarios.
While the data uncertainty caveats outlined in Goodchild (2020) apply in the calibration of the bespoke cost function and propagate to the accessibility analysis, these findings indicate the strong role of cost functions in calculating accessibility on 3D networks and the overestimation of access that can occur when assuming networks are flat. My results also suggest the potential for the THF to under-estimate walking speeds on steeper slopes in more urban  contexts where stairs are common. However, while the trails used to calibrate my cost function are arguably more reflective of urban walking conditions than the unimproved terrain used to calibrate the original THF, confirming this hypothesis and increasing confidence in the generalizability of the results Hiking with Tobler: Tracking Movement and Calibrating a Cost Function for Personalized 3D Accessibility Findings will require further research with a sample size . Nevertheless, the proliferation of sensors on consumer-grade smart devices and the suite of movement data they collect offer exciting new opportunities for calibrating cost functions that can be utilized for accessibility research and to personalize suggestions for routing on networks rich in topography. Hiking with Tobler: Tracking Movement and Calibrating a Cost Function for Personalized 3D Accessibility Findings