betaFeedback

WorksMathematics

Statistical and Machine Learning Approaches for Estimating Visitation to Natural Spaces in the UK

Abstract

Natural spaces support health and well-being, but increasing recreational use can put pressure on ecologically sensitive sites. Understanding when, where and why people visit is important for planning, site management and evaluating interventions. Building on work by the Office for National Statistics, we developed statistical and machine learning models to predict visitor numbers at points located in natural spaces. We trained on automated people counter data across a range of green and blue spaces in England and Wales and tested the models' ability to generalise to unseen counter locations. Our models offer a scalable approach for predicting visitor numbers in natural spaces, reducing reliance on surveys and physical counters.

Introduction

Green spaces (e.g., woodlands, grasslands, and nature reserves) and blue spaces (e.g., rivers, wetlands, and coasts) serve not only as important ecological settings but also as essential spaces for recreation, social interaction, and the promotion of mental and physical health. Previous research [7, 38, 39] has highlighted the benefits provided by green and blue spaces, spanning economic, social, and environmental dimensions, and has shown that time spent in natural spaces is positively correlated with improvements in residents’ health and well-being. Empirical studies further link exposure to green and blue spaces in residential areas with improved lung function [16], child emotional and behavioural development [37], and sleep quality [35]. Recognising this value, the UK’s Department for Environment, Food and Rural Affairs (Defra) set out a 25-Year Environment Plan in 2018 [10] aiming to maximise the benefits of natural spaces by improving their accessibility, especially for urban residents, children, and those in disadvantaged areas. Building on this commitment, the UK government’s Environmental Improvement Plan (2023, 2025) sets out the ambition for everyone to have access to green or blue spaces within a fifteen-minute walk of their home. Despite this, our understanding of visitation to natural spaces at a broad scale remains limited, and high-quality, accurate visitor estimates to natural spaces across the UK are critical to improving land management and environmental policy, enabling informed decisions to support human and environmental health. Building on a feasibility study carried out by the Office for National Statistics (ONS) Data Science Campus (2023), we address this gap by applying statistical and Machine Learning (ML) techniques to predict visitor counts across green and blue spaces in the UK.

Snapshots of visitor behaviour can be gathered through surveys (e.g., People and Nature Survey (2020; 2026)), but these are often associated with high costs, slow data collection, and low accuracy in capturing small-scale changes [19]. Low response rates and sampling challenges further contribute to biases in the survey results [1, 33]. Newer approaches, such as the use of location data from mobile devices, can generate continuous, high-resolution spatio-temporal data for tracking how people move from site to site and how visitor numbers change over time [17, 40]. However, such data are associated with challenges, including the fact that they may not be representative of the entire population, poor signals in rural areas, geolocation errors, and differences between devices and data collection systems [2]. Targeted deployment of sensor technologies such as laser counters or automated pedestrian counters can provide accurate and continuous monitoring of overall visitor patterns at specific locations with high temporal resolution [30, 32].

Despite improvements in visitation monitoring technologies, a detailed understanding of visitor numbers across space and time remains lacking. Introducing an affordable and versatile data-driven method for predicting visitor numbers would contribute to the evaluation of citizen engagement with natural spaces. Specifically, the ability to estimate visitor numbers at sites without a continuous monitoring counter would help inform planning and policy decisions. Whilst implementing large-scale monitoring of this kind using physical monitoring equipment would be unfeasible and costly to deploy, existing monitoring data can be leveraged to provide estimates of visitation through the application of statistical and ML algorithms. Previous research using machine learning approaches with automated pedestrian counter data has focused on specific sites or trails [21, 31]. Nevertheless, the spatial generalisability and performance of such models between individual locations across a large area (e.g., country-level) remains unevaluated. The current research addresses this gap by training statistical and ML models on automated footplate counter data from various locations across England and Wales. This study aims to estimate the number of visitors to natural spaces using multi-sourced open datasets and statistical and ML models, supporting green infrastructure planning and Natural England’s strategic objectives on access to nature. Building on existing research from the ONS (2023), we used open data sources to capture a range of factors that affect how people use natural spaces, including temporal, mobility, meteorological, socio-demographic, nature engagement and dog ownership. To ensure a sufficient number of counts to preserve anonymity, we work with monthly averages. We then evaluate the ability of statistical and ML models to generalise to unseen locations and forecast temporal visitor patterns over time, demonstrating how such tools can provide data to support government commitments, and inform decisions that can lead to more effective green and blue space planning and improved quality of life for residents.

The remainder of this paper is structured as follows: Section 2 outlines the datasets used in this study and the locations of the automated footplate counters. Section 3 provides methodological details, including the linear regression, generalized linear model, Bayesian additive regression trees, random forest and XGBoost employed, and the model training and testing structures. Section 4 provides the results of the study for each model, including a comparison of performance metrics between the tested algorithms and models. Finally, the findings of the research are discussed in Section 5, where limitations, future directions, and the wider research context are considered.

Study Area and Data

In this study, the research area extends across a range of natural environments in England and Wales, including national parks, nature reserves and national trails, as shown in Figure 1. England contains a remarkably varied mix of green and blue landscapes, ranging from country parks and river valleys to coastal paths and wetlands. Wales is characterised by its upland landscapes, national parks and expansive coastal environments. The North Downs Way is one of England’s well-known National Trails, beginning in Farnham, Surrey, and running east through the Kent Downs Area of Outstanding Natural Beauty to its terminus in Dover, Kent. Along the chalk ridge of the North Downs, this trail connects woodlands, open downland, river corridors and historic rural settlements.

A map of the geographical distribution of people counters

Figure 1. A map of the geographical distribution of people counters, showing the respective data providers and the total number of sites managed by each provider.

Ground truth data used in this study were obtained from automated people counters installed in natural spaces managed by Natural England, the Kent Downs National Landscape Team, Natural Resources Wales, Oxford City Council, and Yorkshire Dales National Park Authority. These counters are installed at specific points on footpaths, referred to as “sites” throughout the paper, and record each instance of a pedestrian moving past the sensor. Each detection is automatically recorded with location coordinates and a timestamp, enabling the data to be aggregated into monthly counts. This approach provides a continuous and systematic dataset for analysing how people use paths in natural spaces, identifying peak periods of use, and supporting decision-making in areas such as planning infrastructure improvements, prioritising maintenance, allocating resources and assessing the impact of interventions. To ensure a sufficient number of counts to preserve anonymity, we work with monthly averages.

Temporal data

We included several time-related predictors, namely month number, the running number of monthly records at each site (time index), and the number of school-holiday, bank-holiday, and weekend days within each study period. These predictors help us capture seasonal patterns, longer-term changes, and differences in visitor numbers in natural spaces during holidays and weekends. Specifically, the month number accounts for seasonal variation in visitor numbers across the year, while the time index represents how far each count is recoded from the beginning of the study and was used to capture gradual changes in visitor numbers over time. The reason for considering school holidays, bank holidays, and weekend days in each study period is that the number of visitors may vary during these periods due to changes in people’s availability, routines, and leisure activities.

Mobility data

The mobility data used in this study were obtained from Strava Metro activity data (2026) and covered counter locations during the period from January 2021 to January 2026. Strava Metro activity data aggregates anonymised GPS traces generated by users’ mobile phones during walking, running, and hiking. Strava Metro provides high spatial resolution and dense coverage on frequently used trails, allowing us to use it as a proxy for actual people counts and capture spatiotemporal patterns in people’s use of natural spaces where a counter is not installed. To further protect individual privacy, it applies a binning rule in which activity counts for each trail are rounded to the nearest multiple of five, with counts of three or fewer recorded as zero [29]. Therefore, we used monthly footfall data to minimise the loss of information caused by the binning rules.

Meteorological data

Previous studies have shown that weather conditions can substantially affect the number of people visiting natural spaces [34][41]. For example, air temperature alone has been shown to affect visitation in approximately 95% of national parks, highlighting the strong relationship between weather and recreational behaviour [15]. Our meteorological data were obtained from the HadUK-Grid available through the UK Met Office Open Data Portal at a spatial resolution of 1 km and monthly temporal resolution [18]. We included variables such as monthly average temperature, precipitation, sunshine hours, wind speed, days of ground frost and monthly average vapour pressure to capture the influence of weather conditions on visitor number.

Socio-Demographic and Nature Engagement data

We derived socio-demographic and nature engagement data from the 2021 Census [25] and Rural-Urban Classification [26] datasets. These data were used to describe the physical, social and environmental contexts within a 5 km buffer of each counter. Socio-demographic variables are important for capturing conditions that may affect outdoor recreation demand and willingness to visit nearby natural spaces. The Rural-Urban Classification obtained from the ONS was used to categorise small statistical areas (LSOAs) by settlement type (e.g., urban, larger rural and smaller rural), population size, address density and relative access to major towns and cities. Given that population density, accessibility, and the availability of natural spaces vary between rural and urban settings and may affect visitor numbers, we used the Rural–Urban Classification to investigate differences in people’s engagement with natural spaces.

To capture outdoor recreational activity and quantify accessibility to nearby natural spaces, we collected spatial data on amenities and points of interest (POIs), including bars, beer gardens, bus stations, cafés, coach parking, food courts, holiday parks, parking facilities, restaurants, taxi stations, toilets, and pubs. These amenities are key components of the recreational service environment, reflecting both the attractiveness of a particular site and the supporting infrastructure that facilitates visitation. Such facilities can influence site accessibility, visitor convenience, dwell time, and overall destination appeal. Therefore, incorporating POI and amenity information can provide a more comprehensive representation of the built and service environments surrounding natural spaces. We collected POI and amenity data from OpenStreetMap (2026) within a 5 km buffer of each counter location, and processed them using the Python package OSMnx [5].

Dog ownership data

Dog walking is a common reason for visiting natural spaces and contributes to regular and repeated use of natural spaces. Hence, dog ownership is a behavioural proxy for potential demand for natural spaces, particularly where visits are motivated by routine walking activities rather than occasional recreation. We followed the ONS approach to estimating dog ownership, using the People and Nature Survey on visit locations and whether visitors reported owning dogs. These data were then used to analyse the variation in visitor numbers that may be linked to dog walking. We assume that areas with a higher proportion of dog owners may place greater demand on nearby natural spaces, particularly those that are suitable for walking and easily accessible from residential areas.

Geographical data

We used latitude, longitude and elevation variables to capture the relationship between the geographical environment and visitor numbers in natural spaces. Latitude is closely associated with variations in temperature and seasonal conditions, which helps explain regional differences in climate across England and Wales, and how seasonal variations in daylight hours and temperature may influence the timing and popularity of visits. Meanwhile, longitude helps to identify the geographical distribution of visitor attractions, which may influence their accessibility and attractiveness. Elevation provides an additional dimension by reflecting differences in the physical landscape and terrain. This is particularly relevant to areas such as the Yorkshire Dales and Snowdonia, where higher elevations, mountainous landscapes and distinctive natural environments attract visitors interested in hiking, outdoor recreation and nature-based activities. However, the lower-lying areas may attract visitors through cultural attractions or seaside activities. Consequently, we included the geographic coordinates of each counter location, together with corresponding 1m resolution elevation data derived from the NERC EDS Environmental Information Data Centre [3].

METHODOLOGY

Our methodological framework integrates multiple open datasets, as mentioned in § 1.1, to predict monthly visitor numbers for each site of special scientific interest. Overall, we use five statistical and ML models to predict the number of visitors to natural spaces across England and Wales, namely Linear Regression, Generalized Linear Model, Bayesian Additive Regression Trees, Random Forests and XGBoost. We refer to these models as Recreation and Engagement Activity Monitoring (REAM) models herein. For each site, the actual visitor number is denoted as yty_t, where tt represents a specific month. The objective of this study is to develop a scalable tool that can estimate how many people visit natural spaces where visitor numbers are not currently tracked. We defined the predicted visitor numbers at month tt as:

y^t=f(xt),(1)\hat{y}_t = f(\mathbf{x}_t), \tag*{(1)}

where xt\mathbf{x}_t represents the set of predictors observed at month tt.

The function f(xt)f(\mathbf{x}_t) can be estimated using different approaches, ranging from simpler and easy-to-interpret modelling to more flexible methods. Each of them has a unique way to identify the relationship between visitor numbers and predictors. Rather than relying on a single modelling approach, we evaluate five REAM models to investigate which approach provides the most accurate estimates of monthly visitor numbers. All models are trained using the same input variables and evaluated under the same leave-one-location-out cross-validation framework to test the model’s ability to generalise when predicting monthly people counts at unseen sites of special scientific interest. Figure 2 shows the overall framework and workflow of the prediction model, while the REAM models are described in the following sections.

Overview diagram of the proposed REAM model framework

Figure 2. Overview diagram of the proposed REAM model framework, showing the main workflows from model training to the final generation of predicted monthly visitor numbers.

Linear Regression

Linear regression [22] provides a simple and easy-to-interpret way to understand how different predictors are related to monthly visitor numbers. It predicts monthly visitor numbers by simply adding together the estimated effects of different predictors. For each unseen site ii, monthly visitor numbers were estimated from the selected predictors using the following linear model:

y^it=β^0+∑j=1nβ^jxitj+ϵij,(2)\hat{y}_{it} = \hat{\beta}_0 + \sum_{j=1}^{n} \hat{\beta}_j x_{itj} + \epsilon_{ij}, \tag*{(2)}

where y^it\hat{y}_{it} represents the predicted monthly visitor numbers for ithi^{\mathrm{th}} unseen site at month tt; xitjx_{itj} denotes the jthj^{\mathrm{th}} predictor for unseen site ii at month tt; β^0\hat{\beta}_0 is the estimated intercept; β^j\hat{\beta}_j is the estimated linear effect of each predictor; nn is the total number of predictors included in the model, and ϵij\epsilon_{ij} denotes noise term associated with jthj^{\mathrm{th}} predictor at ithi^{\mathrm{th}} unseen site, which is assumed to be independently and identically normally distributed with mean 0 and variance σ2\sigma^2, ϵij∼N(0,σ2)\epsilon_{ij} \sim N(0, \sigma^2). Note, the model could easily be made more complex by including, for example, quadratic and interaction terms. We have chosen to stay with the simplest form of the model.

Generalized Linear Model

Although linear regression is simple and easy to interpret, it assumes a linear relationship between the expected value of the monthly visitor numbers and predictors, and that the residuals are normally distributed with constant variance. To make the modelling framework more flexible, we introduce a generalized linear model [13], which extends the linear regression by allowing the monthly visitor numbers to follow a non-Gaussian distribution and by linking the expected value of the monthly visitor numbers to a linear combination of predictors through a specified link function. In this study, we used a quasi-Poisson generalized linear model (GLM) with a log link because monthly visitor numbers varied considerably across sites, with some sites having very few visitors and others many more. The standard Poisson model assumes that the mean and variance of the number of monthly visitors are approximately the same. As the monthly visitor numbers showed greater variation than expected under a standard Poisson model, we therefore used the GLM to account for this additional variation in the data, and defined the predicted monthly people counts for ithi^{\mathrm{th}} unseen site at month tt as follows:

y^it=g−1(β^0+∑j=1nβ^jxitj)+ϵij,(3)\hat{y}_{it} = g^{-1}\left(\hat{\beta}_0 + \sum_{j=1}^{n} \hat{\beta}_j x_{itj}\right) + \epsilon_{ij}, \tag*{(3)}

where y^it\hat{y}_{it} represents the predicted monthly visitor numbers for ithi^{\mathrm{th}} unseen site at month tt; g−1(.)g^{-1}(.) represents the inverse of the log link function; xitjx_{itj} denotes the jthj^{\mathrm{th}} predictor for unseen site ii at month tt; β^0\hat{\beta}_0 is the estimated intercept; β^j\hat{\beta}_j is the estimated linear effect of each predictor, nn is the total number of predictors included in the model, and ϵij\epsilon_{ij} denotes noise term associated with jthj^{th} predictor at ithi^{th} unseen site, which is assumed to be independently and identically normally distributed with mean 0 and variance σ2\sigma^2, ϵij∼N(0,σ2)\epsilon_{ij} \sim N(0, \sigma^2). In addition, we assumed that the observed monthly people count yity_{it} was modelled as E(yit)=μitE(y_{it}) = \mu_{it} and Var(yit)=ϕμitVar(y_{it}) = \phi\mu_{it}, where ϕ\phi is the dispersion parameter accounting for extra variation in the count data.

Bayesian Additive Regression Trees

While a GLM relaxes the limitations of linear regression, it still rely on a predefined linear structure in the predictors. In contrast, Bayesian Additive Regression Trees (BART) [9] automatically learns nonlinear effects and interactions in the data by combining many small regression trees, and defined as:

y^it=∑j=1Lhj(xit,Tj;Mj)+ϵij,(4)\hat{y}_{it} = \sum_{j=1}^{L} h_j(x_{it}, T_j; M_j) + \epsilon_{ij}, \tag*{(4)}

where LL is the number of trees; function hj(.)h_j(.) is the prediction function of the jthj^{th} regression tree; TjT_j represents the structure of the jthj^{th} tree; MjM_j is the set of leaf prediction values for the jthj^{th} tree, and ϵij\epsilon_{ij} denotes noise term associated with jthj^{th} predictor at ithi^{th} unseen site, which is assumed to be independently and identically normally distributed with mean 0 and variance σ2\sigma^2, ϵij∼N(0,σ2)\epsilon_{ij} \sim N(0, \sigma^2).

Random Forest

Random Forest [6] is a commonly used machine learning method. It is similar to BART in that both use a combination of trees, but they differ in how the trees are fitted and combined. Random forest provides a measure of the importance of each input feature by evaluating how much each feature decreases the prediction error across all trees. Each tree is trained on a bootstrap sample of the observations, and at each split, a random subset of the PP input features is considered. We defined the predicted monthly visitor counts for ithi^{th} unseen site as the average of the predictions from all individual trees:

y^it=1N∑j=1Nhj(xit)+ϵij,(5)\hat{y}_{it} = \frac{1}{N} \sum_{j=1}^{N} h_j(x_{it}) + \epsilon_{ij}, \tag*{(5)}

where NN is the total number of trees in the forest; hj(xit)h_j(x_{it}) is the prediction of the JthJ^{th} tree, and ϵij\epsilon_{ij} denotes noise term associated with jthj^{th} predictor at ithi^{th} unseen site, which is assumed to be independently and identically normally distributed with mean 0 and variance σ2\sigma^2, ϵij∼N(0,σ2)\epsilon_{ij} \sim N(0, \sigma^2).

XGBoost

Compared with random forest, which grows trees largely independently and averages their predictions, and BART, which jointly estimates an additive ensemble of trees within a Bayesian framework, XGBoost [8] gradually improves its predictions by sequentially adding new decision trees, with each new tree correcting the errors of the current ensemble. We defined the predicted monthly people counts for ithi^{th} unseen site at month tt as follows:

y^it=∑j=1Nhj(xit)+ϵij,(6)\hat{y}_{it} = \sum_{j=1}^{N} h_j(x_{it}) + \epsilon_{ij}, \tag*{(6)}

where hj(xit)h_j(x_{it}) is the contribution of the jthj^{th} decision tree, and ϵij\epsilon_{ij} denotes the noise term associated with the jthj^{th} predictor at the ithi^{th} unseen site, which is assumed to be independently and identically normally distributed with mean 0 and variance σ2\sigma^2, ϵij∼N(0,σ2)\epsilon_{ij} \sim N(0, \sigma^2). Each new tree sequentially helps explain the variation in visitor numbers that has not been captured by the previous trees.

Data Preprocessing

Following the model specifications outlined above, the data were preprocessed to ensure consistency across all estimation procedures. We first removed the top and bottom 1% of counts to reduce the effect of temporary counter malfunctions and outliers. Since our goal is to predict the number of visitors, the counter data is treated as the closest available proxy for actual visitor numbers. We removed data where the number of Strava Metro counts is greater than the corresponding automated people counter count, as the Strava Metro count is assumed to represent a subset of total visitors within the same spatial and temporal scope, meaning the number of Strava Metro activity records should not exceed the total visitor count for the same location and time period. Incorporating these unusual records into the training data could introduce noise and bias into the REAM models, reducing their ability to learn the true relationship between Strava Metro activity and visitor number. We then transformed the dependent people count variable using a logarithmic transformation, defined as log⁡(yit+1)\log(y_{it} + 1), to reduce skewness and limit the influence of extreme values. This transformation was used for the linear regression, random forest, XGBoost, and BART models. Model predictions from these models were subsequently back-transformed to the original count scale using exp⁡(y^it)−1\exp(\hat{y}_{it}) - 1. The GLM modelled the original people count directly using a quasi-Poisson log-link function, with predictions obtained on the original people count scale. In order to capture the effect of deviations in observed weather from the average weather for the corresponding month across all counter locations, we calculated weather anomalies for rainfall, sunshine duration and temperature, defined as:

Weather anomaly=Xi−Xˉi,(7)\mathrm{Weather\ anomaly} = X_i - \bar{X}_i, \tag*{(7)}

where XiX_i represents the observed value of rainfall, sunshine duration, or temperature, and Xˉi\bar{X}_i is the mean value of the corresponding weather variable for the same month in the training data. We also imputed missing values in the available predictor variables using the corresponding means calculated from the training data. To avoid data leakage in the test set, we used the means calculated from the training data for both the training and test sets. We then removed observations with missing values in the required variables after imputation. Locations were not included in the analysis if fewer than five observations remained in either the training or test set after preprocessing. This resulted in 35 individual sites remaining in the dataset. Finally, we used leave-one-location-out cross-validation to evaluate spatial generalisation and reduce overfitting. Each location was sequentially held out as an unseen test site, while observations from all remaining locations were used for model training. Model performance was evaluated at each held-out location and subsequently aggregated across all locations.

Results

Model Performance

This section presents the performance of the proposed REAM models on monthly people counts discussed in § 1.2. The performance of the REAM models was evaluated using Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE). These metrics provide complementary perspectives on model performance, where RMSE penalises large errors, and MAE provides an interpretable average error magnitude:

RMSE=1n∑t=1n(yit−y^it)2;(8)\mathrm{RMSE} = \sqrt{\frac{1}{n}\sum_{t=1}^{n}(y_{it}-\hat{y}_{it})^2}; \tag*{(8)}
MAE=1n∑t=1n∣yit−y^it∣,(9)\mathrm{MAE} = \frac{1}{n}\sum_{t=1}^{n}|y_{it}-\hat{y}_{it}|, \tag*{(9)}

where yity_{it} denotes the observed monthly people count for ithi^{\mathrm{th}} unseen site at month tt, and y^it\hat{y}_{it} the predicted monthly people count. Overall, our results demonstrate that the REAM models are able to reflect variability in monthly visitor numbers well at many sites. Figure 3 shows the relationship between the observed and model predicted people counts across all test sites.

Scatter plot showing the predicted people counts against observed counts during the leave-one-location-out cross-validation for all test sites, where each model is represented by a different colour.

Figure 3. Scatter plot showing the predicted people counts against observed counts during the leave-one-location-out cross-validation for all test sites, where each model is represented by a different colour.

We found that model performance differed substantially across sites under leave-one-location-out cross-validation, and there is no single model that consistently outperformed the others. The best model varied by site, showing that the dynamics of the visitor numbers were spatially heterogeneous and visitor numbers were not based on a uniform predictive structure across the study sites. For some sites, statistical models produced the most accurate predictions, whereas for others, machine learning methods performed better. Figure 4 presents a representative subset of the leave-one-location-out cross-validation results, showing the comparison between actual and predicted monthly people count for selected sites. For example, at sites Byrness (Figure 4 (a)) and Garsdale (Figure 4 (e)), the XGBoost model closely reproduced temporal variations in visitor numbers, with better performance when there were a moderate number of visitors. At the remaining sites, statistical models (LM, GLM and BART) performed better. The predictions were least accurate when visitor numbers were high, at which point the REAM models tended to underestimate peak visitor numbers. This site-specific variation demonstrates that the drivers of visitation differed among locations. Locations with stronger seasonal variation tended to benefit from more flexible tree-based models, such as random forest, XGBoost, and BART, which can capture nonlinear relationships between predictors. In contrast, locations with more stable visitor numbers were often predicted reasonably well by simpler regression-based models. Therefore, model comparison was interpreted at the site level rather than by selecting a single best-performing model for all sites.

Comparison plot between actual and predicted visitor numbers for selected sites

Figure 4. A comparison plot between actual and predicted visitor numbers for selected sites under leave-one-location-out cross-validation. Each panel shows one site, with observed monthly people count compared against predictions from the REAM models. The solid black lines represent the actual monthly people counts from the counters, while the coloured lines show predictions from different REAM models, and the coloured shaded areas show the corresponding REAM models’ prediction uncertainty.

Model-Specific Interpretation

The input features used to develop the REAM models are described in Section 2. The following analyses focus on interpreting how these features contribute to the model predictions of monthly visitor numbers to natural spaces. Each model is interpreted using a method that fits its underlying structure, where estimated regression coefficients are used to interpret the linear and generalized linear models, variable inclusion proportions are used to interpret the BART model, permutation importance is used to interpret the random forest model, and SHAP values are used to interpret the XGBoost model. These methods describe how input features are associated with model predictions within each fitted model. Such associations reflect the predictive patterns learned by the models from the data and should not be interpreted as evidence of causal relationships between the input features and monthly visitor numbers to natural spaces.

Linear Regression

After comparing predictive performance, we conducted model interpretation using model-specific approaches. For the linear regression model, coefficient estimates indicated whether each predictor was positively or negatively associated with the log-transformed monthly people count. The linear regression model showed that temporal, spatial, environmental, amenity-related, and socio-demographic predictors statistically significantly affect the monthly people count in natural spaces. With respect to temporal predictors, both the month number (β=−0.011\beta= -0.011, p=0.10p = 0.10) and the time index (β=−0.0001\beta= -0.0001, p=0.03p = 0.03) were negatively associated with the log-transformed monthly people count, suggesting that the number of visitors decreased over the study period. The linear regression results also showed that the Strava Metro activity predictor (log-transformed total trip count on the path where the people counter is located) was significantly positively associated with the log-transformed monthly people count (β=0.78\beta= 0.78, p=2×10−16p = 2 \times10^{-16}), with each one-count increase in the Strava Metro activity predictor corresponding to an estimated 118% increase in monthly visitor count.

In terms of environmental and spatial predictors, latitude was positively associated with the log-transformed monthly people count with a coefficient of 0.042 and a pp-value of 0.31. Longitude and elevation were significant positive predictors with coefficients of 0.35 and 0.0033, and pp-values of 3.2×10−163.2 \times10^{-16} and 1.4×10−71.4 \times10^{-7}, showing spatial heterogeneity across the study area. In comparison, ground frost showed a significant negative effect on the log-transformed monthly people count (β=−0.035\beta= -0.035, p=1.2×10−14p = 1.2 \times10^{-14}), demonstrating that more days when the grass minimum temperature is below 0°C were linked to fewer visitors. In addition, sunshine anomaly showed a positive effect on the monthly people count (β=0.0036\beta= 0.0036, p=9.3×10−5p = 9.3 \times10^{-5}), showing that locations receiving more sunshine than the overall average tend to have more visitors. However, the rainfall anomaly, surface wind speed, and temperature anomaly were not statistically significant as main effects. Predictors related to amenities and tourism also showed significant associations. More specifically, cafe density, hotel density, and parking density were positively associated with the monthly visitor numbers. In contrast, restaurant density and campsite density were negatively associated with the monthly visitor numbers. In our study, urban natural spaces were associated with lower monthly visitor counts than rural natural spaces, but this estimate may be less stable because most of our study areas were rural and relatively few observations were available for urban areas.

We also found that several socio-demographic predictors were statistically significant for the monthly people counts. For example, economic activity, unemployment rate, population density, and Asian ethnicity were positively associated with the monthly people counts. Conversely, smaller household size, younger age groups, population in good health, and White ethnicity were negatively associated with the monthly visitor numbers. Our model showed a significant negative interaction between rainfall anomaly and picnic site density (β=−0.15\beta= -0.15, p=2×10−5p = 2 \times10^{-5}). In natural spaces with more picnic sites, visitor numbers tended to be lower when rainfall was above the average across all sites. We omitted the bad health predictor from our model because perfect multicollinearity caused a singularity. Overall, the linear regression model fit well, achieving an adjusted R-squared of 0.8 and indicating that the predictors explained approximately 80% of the variation in the monthly people count. The overall linear regression model was also statistically significant (F-statistic: 109.2 on 38 and 960 DF, p<2.2×10−16p < 2.2 \times10^{-16}), showing that the predictors collectively explained a significant proportion of variance in the monthly people counts.

Generalized Linear Model

Since the visitor numbers vary a lot from one site to another, we fitted a GLM to assess the robustness of the coefficient direction and statistical significance of each predictor’s relationship identified in the linear regression model. The GLM produced results that were broadly consistent with those from the linear regression model, where its estimated regression coefficients were expressed on the log scale of the expected value of the monthly people count. More specifically, the log-transformed total trip count remained the strongest positive predictor of the visitor numbers, while ground frost and rural-urban classification remained significant negative predictors. Sunshine anomaly, school holiday days, cafe density, hotel density, parking density, economic activity, unemployment rate, and population density were also positively associated with the visitor numbers in both models. Restaurant density, campsite density, younger age groups, population in good health, and White ethnicity are also consistently negatively associated with the monthly visitor numbers.

However, some differences were observed between the linear regression and generalized linear models. For example, latitude, weekend days, and dog occupancy were not statistically significant in the linear regression model but became significant in the GLM. Conversely, longitude, elevation, and the negative interaction between rainfall anomaly and picnic site density were significant in the linear regression model, but only marginally significant in the GLM. The difference in statistical significance between the linear regression model and the GLM is because they make different assumptions about the monthly visitor numbers. Visitor numbers are count data and show substantial overdispersion. A linear regression model does not fully account for this count data structure, which may lead to underestimated standard errors and overly optimistic significance results. In contrast, the GLM adjusts the standard errors for overdispersion. The dispersion parameter was estimated at 853, indicating substantial overdispersion in visitor numbers. This proves that a quasi-Poisson model is more appropriate than a standard Poisson model, as it accounts for overdispersion by adjusting the standard errors and statistical inference.

Bayesian Additive Regression Trees

As the regression models assume relatively simple additive relationships, nonlinear tree-based models were further fitted to identify predictors that contributed most to predictive accuracy. For the BART model, predictor importance was assessed by measuring how often each predictor was used in regression tree splitting rules across the posterior samples. The predictors were ranked in descending order of Variable Inclusion Proportion [4], as shown in Figure 5. The highest posterior variable usage was the Strava Metro activity predictor log-transformed total trip count, followed by temporal predictors (time index and month number), spatial predictors (longitude and elevation), and dog ownership. Other frequently used predictors included demographic predictors (White and Asian ethnicity, Age groups, population density and household size), socioeconomic predictors (economically active and unemployment rate), bank holiday days, cafe density, etc. These results demonstrate that the BART model relied on a combination of temporal, mobility, spatial, demographic, socioeconomic, and built-environment predictors rather than a single dominant predictor.

The twenty most important predictors in the BART model

Figure 5. The twenty most important predictors in the BART model, ranked by the frequency with which they were used to split trees across posterior samples, with higher values indicating greater importance.

Random Forest

To interpret the random forest model, we evaluated predictor importance using permutation importance [6] [14]. This approach quantifies the contribution of each predictor by randomly permuting its values and measuring the corresponding increase in prediction error. Predictors associated with greater increases in prediction error were considered to have a stronger influence on model performance. As shown in Figure 6, the permutation importance plot ranks the predictors according to their relative importance in the model. Strava Metro activity predictor had the highest permutation importance, which shows it contributed most strongly to the predicted monthly people count of the random forest model. Socio-demographic features (such as ethnic group, age group 0-24 and 25-64, population density, good and bad health, unemployment rate, and household composition), spatial effect (longitude and latitude) and nearby amenities (parking, cafe, bus stop) also showed relatively high importance, demonstrating that they were important predictors. In contrast, bank holidays and weekend days had slightly lower importance values, showing a smaller contribution to model prediction.

The twenty most important predictors in the random forest model

Figure 6. The twenty most important predictors in the random forest model, ranked by permutation importance. The permutation importance values are consistently positive across all predictors, with higher values indicating a greater contribution to the model’s prediction of monthly people counts.

XGBoost

Finally, we used SHapley Additive exPlanations (SHAP) [20] to improve the interpretability of the XGBoost model by providing more detailed explanations of feature contributions to the predicted monthly visitor numbers. The mean absolute SHAP value was used to quantify global feature importance, while the sign of the SHAP value showed whether a predictor increased or decreased the predicted monthly visitor number. This allowed both the overall importance and the direction of predictor effects to be assessed within the XGBoost model. Since the monthly people count was log-transformed as log⁡(yit+1)\log(y_{it} + 1), the SHAP values were interpreted on the logarithm scale rather than directly on the original count scale. Global feature importance was first assessed using the mean absolute SHAP value, as shown in Figure 7.

Global SHAP feature contribution plot

Figure 7. Global SHAP feature contribution plot showing the 20 features that had the greatest effect on predicted visitor numbers in the XGBoost model. Features are ranked by the mean absolute SHAP value, with higher-ranked features having a greater overall influence on model output. Each point represents the SHAP value of one observation for a given feature. Positive SHAP values indicate that the feature increases the predicted log⁡(yit+1)\log(y_{it} + 1), whereas negative SHAP values indicate that the feature decreases the prediction. The colour of each point represents the corresponding feature value, with purple indicating higher values and blue indicating lower values.

In order to better understand how the model used each predictor, we classified the contribution of each predictor into two types: its own main effect and its interaction effect with other predictors. Specifically, the main effect reflects how much a predictor contributed to the prediction by itself, while the interaction effect reflects how much its contribution depended on the values of other predictors. In practice, we may find that some predictors contribute independently, whereas others may become important only in combination with related predictors. Figure 8 provides a visually intuitive way to show whether a predictor works mostly independently or in combination with other predictors.

Comparison plot of SHAP main effects and interaction effects for the top 20 features in the XGBoost model

Figure 8. Comparison plot of SHAP main effects and interaction effects for the top 20 features in the XGBoost model. The main effect represents the independent contribution of each feature, whereas the interaction effect represents the additional contribution arising from interactions with other features.

Discussion and Future work

This paper demonstrated the feasibility of integrating multi-source open datasets with statistical and machine learning approaches to estimate monthly visitor numbers to green and blue spaces at the individual site level. We used mobility, meteorological, environmental, demographic, and amenity predictors to study spatial variation in visitor activity across monitoring sites. Mobility predictors derived from Strava Metro activity data, the availability of nearby amenities, weather conditions, demographic and socio-economic factors, and dog ownership had significant effects on REAM model predictions, explaining variation in visitor numbers and contributing to our understanding of recreational and nature-engagement activities in natural spaces.

The results show that combining different types of location-based data can help us estimate visitor numbers in sites of special scientific interest and improve our understanding of where and when people take part in outdoor recreation. We developed and compared several REAM models for estimating monthly visitor numbers at green and blue spaces, demonstrating that statistical and machine learning models can be useful tools for predicting visitor numbers in natural spaces. Linear Regression provided a simple and interpretable baseline, while tree-based models were able to capture more complex relationships between visitor numbers and their influencing factors. From a practical perspective, our REAM models can support tourism planning and visitor management. More accurate visitor forecasts may help land managers prepare for seasonal demand changes, allocate resources more efficiently, and improve crowd management at popular sites. Further, understanding how natural spaces are used for recreation purposes is valuable for protecting ecologically important locations.

Using a leave-one-location-out cross-validation framework, we assessed the performance of REAM linear regression, GLM, BART, random forest, and XGBoost models. Our results show that the REAM models can reproduce seasonal trends and relative differences in visitation between natural spaces at sites where automated people counters are not available. Compared with traditional survey-based monitoring approaches, which are often limited by cost, temporal frequency, and spatial coverage, the REAM modelling framework provides a scalable tool for estimating visitor numbers across a wide range of natural spaces. This demonstrates the potential of data-driven approaches to complement existing automated people counters and to generate spatially comprehensive evidence for understanding how people use green and blue spaces.

However, model performance varies across locations. At some monitoring sites, predicted visitor numbers closely follow observed people counter data, while at others, we found that some extremely unusual peaks in visitor numbers could not be captured. These differences likely reflect local factors that are difficult to capture through national-scale spatial datasets, such as temporary access restrictions, variations in path conditions, site-specific management practices, or short-term events. In addition, anomalies in the automated counter data, including maintenance interruptions or battery failures, may also contribute to mismatches between predicted and observed people counts. Finally, the mobility data sources may not represent all visitor groups equally, as participation in digital activity platforms tends to vary across demographics and types of recreational activity.

Future research could improve the model by including more detailed and dynamic predictors, such as Google search trends, social media activity, and local event information. One limitation of this study is the lack of sites in the Midlands. Future research should include sites from this region to improve the spatial coverage of the dataset and assess the robustness and generalisability of the models across a broader range of environmental and geographical contexts. We could also test the models on a larger number of sites and over longer time periods to improve the generalisability of the findings.

In future work, Generalized Additive Models (GAM) [42] could be considered as an alternative modelling approach. Compared with current REAM models, GAM offers a better balance between predictive flexibility and interpretability by using smooth functions to capture nonlinear relationships while providing partial effect plots for each predictor to visualise how individual predictors affect visitor numbers in natural spaces, together with confidence intervals and statistical significance measures.

Another important direction is to explore how many counters are needed to achieve the desired level of accuracy and where they should be placed to provide reliable measurements. This will also involve further development of the current REAM models to extend the estimation from the number of people passing at a point along the path to the total number of visitors across the entire site, allowing capture of how visitors are distributed throughout the site of special scientific interest rather than only at individual locations. Overall, the REAM modelling framework offers a scalable tool for generating point estimates of natural space use in locations without people counters. Such data can support evidence-based decision-making by local authorities and land managers, including visitor management, trail planning, habitat protection, and the development of green infrastructure strategies.

AUTHOR CONTRIBUTIONS

Peter Challenor and Pippa Langford conceived the ideas and acquired the funding; Yueyue Chai, Elizabeth Galloway, Peter Challenor and Pippa Langford collected the data, designed the methodology, analysed the data and led the writing of the manuscript. All authors contributed critically to the drafts and gave final approval for publication.

ACKNOWLEDGMENTS

This work was supported by Natural England, the Department for Environment, Food and Rural Affairs, the Kent Downs National Landscape Team, Natural Resources Wales, the Office for National Statistics, NERC RENEW programme, and the University of Exeter funded by Natural England’s Protected Site Strategies R&D Programme.

CONFLICTS OF INTEREST STATEMENT

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this article.

DATA AVAILABILITY STATEMENT

The mobility data used in this study were provided by Strava Metro. Access to the data requires users to apply for a data licence through the Strava Metro Dashboard at https://metro.strava.com/. Meteorological data were obtained from the HadUK Grid available through the UK Met Office Open Data Portal (https://www.metoffice.gov.uk/research/climate/maps-and-data/data/haduk-grid/datasets). We derived socio-demographic data from the 2021 Census, which is openly available through the Office for National Statistics portal (https://www.ons.gov.uk/census). Nature Engagement data were obtained from OpenStreetMap and downloaded using the OSMnx package [5]. Dog ownership data were estimated using the Office for National Statistics methodology (2023), based on the People and Nature Survey data (2020; 2026) on places visited and whether visitors reported having a dog. Our elevation data were derived from the NERC EDS Environmental Information Data Centre [3]. The people counter data used in this study were provided by Natural England, the Kent Downs National Landscape Team, and Natural Resources Wales. The code used in this study is available upon reasonable request from the corresponding author. This study contains public sector information licensed under the Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

References

  1. [1]Andrade, C. (2020). The limitations of online surveys. Indian journal of psychological medicine, 42(6), 575–576.DOI
  2. [2]Bähr, S., Haas, G.-C., Keusch, F., Kreuter, F., & Trappmann, M. (2022). Missing data and other measurement quality issues in mobile geolocation sensor data. Social Science Computer Review, 40(1), 212–235.
  3. [3]Barbedo, R., Chambers, L., Tso, C., Cooper, H., Smith, R., Barr, A., Samreen, F., Brown, M., Rudd, A., & Fry, M. (2026). Merged lidar based digital terrain model (dtm) and digital surface model (dsm) for england and wales. NERC EDS Environmental Information Data Centre. Retrieved from https://doi.org/10.5285/34443359-64c0-4909-9f27-bb5d47f1153f doi: 10.5285/34443359-64c0-4909-9f27-bb5d47f1153f
  4. [4]Bleich, J., Kapelner, A., George, E. I., & Jensen, S. T. (2014). Variable selection for bart: an application to gene regulation. The Annals of Applied Statistics, 1750–1781.DOI
  5. [5]Boeing, G. (2021). OSMnx: Python tools for downloading and analyzing street networks from OpenStreetMap. Retrieved from https://osmnx.readthedocs.io
  6. [6]Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32. doi: 10.1023/A:1010933404324DOI
  7. [7]Byrne, J., & Sipe, N. (2010, 01). Green and open space planning for urban consolidation-A review of the literature and best practice. Urban Research Program.
  8. [8]Chen, T., & Guestrin, C. (2016). Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining (pp. 785–794).DOI
  9. [9]Chipman, H. A., George, E. I., & McCulloch, R. E. (2010). BART: Bayesian additive regression trees. Annals of Applied Statistics, 4(1), 266–298. doi: 10.1214/09-AOAS285DOI
  10. [10]Curnow, J. (2019). Environmental economics in uk environmental policy: Defra’s 25 year environment plan. Journal of Environmental Economics and Policy, 8(4), 353–358.DOI
  11. [13]Dobson, A. J., & Barnett, A. G. (2018). An introduction to generalized linear models. Chapman and Hall/CRC.
  12. [14]Fisher, A., Rudin, C., & Dominici, F. (2019). All models are wrong, but many are useful: Learning a variable’s importance by studying an entire class of prediction models simultaneously. Journal of machine learning research, 20(177), 1–81.
  13. [15]Fisichelli, N. A., Schuurman, G. W., Monahan, W. B., & Ziesler, P. S. (2015). Protected area tourism in a changing climate: Will visitation at us national parks warm up or overheat? PloS one, 10(6), e0128226.
  14. [16]Fuertes, E., Markevych, I., Thomas, R., Boyd, A., Granell, R., Mahmoud, O., Heinrich, J., Garcia-Aymerich, J., Roda, C., Henderson, J., & Jarvis, D. (2020). Residential greenspace and lung function up to 24 years of age: The alspac birth cohort. Environment International, 140, 105749. Retrieved from https://www.sciencedirect.com/science/article/pii/S0160412019342790 doi: https://doi.org/10.1016/j.envint.2020.105749
  15. [17]Ghahramani, M., Zhou, M., & Wang, G. (2020). Urban sensing based on mobile phone data: Approaches, applications, and challenges. IEEE/CAA Journal of Automatica Sinica, 7(3), 627–637.
  16. [18]Hollis, D., McCarthy, M., Kendon, M., Legg, T., & Simpson, I. (2019). HadUK-Grid-A new UK dataset of gridded climate observations. Geoscience data journal, 6(2), 151–159.
  17. [19]Lefever, S., Dal, M., & Matthíasdóttir, Á. (2007). Online data collection in academic research: advantages and limitations. British journal of educational technology, 38(4), 574–582.
  18. [20]Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. In I. Guyon et al. (Eds.), Advances in neural information processing systems (Vol. 30). Curran Associates, Inc. Retrieved from https://proceedings.neurips.cc/paper_files/paper/2017/file/8a20a8621978632d76c643dfd28b67767-Paper.pdf
  19. [21]Madden, K., Lukoseviciute, G., Ramsey, E., Panagopoulos, T., & Condell, J. (2023). Forecasting daily foot traffic in recreational trails using machine learning. Journal of Outdoor Recreation and Tourism, 44, 100701.
  20. [22]Montgomery, D. C., Peck, E. A., & Vining, G. G. (2021). Introduction to linear regression analysis (6th ed.). John Wiley & Sons.
  21. [25]Office for National Statistics. (2021a). Census 2021. Retrieved from https://www.nomisweb.co.uk/sources/census_2021
  22. [26]Office for National Statistics. (2021b). Rural Urban Classification (2021) of LSOAs in EW. Retrieved from https://geoportal.statistics.gov.uk/datasets/ons::rural-urban-classification-2021-of-lsoas-in-ew/about
  23. [29]Raturi, V., Hong, J., McArthur, D. P., & Livingston, M. (2021). The impact of privacy protection measures on the utility of crowdsourced cycling data. Journal of transport geography, 92, 103020.
  24. [30]Ryan, D., & Benton, J. (2023). Using automated active infrared counters to estimate footfall on urban park footpaths: behavioural stability and validity testing. International journal of behavioral nutrition and physical activity, 20(1), 49.
  25. [31]Ryu, S., Jung, S.-H., Kim, G.-H., & Lee, S. (2025). Visitor number prediction for daegwallyeong forest trail using machine learning. Sustainability, 17(13), 6061.
  26. [32]Schägner, J. P., Maes, J., Brander, L., Paracchini, M.-L., Hartje, V., & Dubois, G. (2017). Monitoring recreation across european nature areas: A geo-database of visitor counts, a review of literature and a call for a visitor counting reporting standard. Journal of outdoor recreation and tourism, 18, 44–55.
  27. [33]Scottish Government. (2024). Mixed mode research report to inform the Scottish government long-term survey strategy (Research Report). Scottish Government. Retrieved from https://www.gov.scot/publications/mixed-mode-research-report-inform-scottish-government-long-term-survey-strategy/
  28. [34]Song, Y., & Wei, Q. (2024). Impact of apparent temperatures on park visitation behavior: A comprehensive analysis using large-scale mobility data. Science of the Total Environment, 940, 173388.DOI
  29. [35]Stenfors, C. U., Stengård, J., Magnusson Hanson, L. L., Kecklund, L. G., & Westerlund, H. (2023). Green sleep: Immediate residential greenspace and access to larger green areas are associated with better sleep quality, in a longitudinal population-based cohort. Environmental Research, 234, 116085. Retrieved from https://www.sciencedirect.com/science/article/pii/S0013935123008770 doi: https://doi.org/10.1016/j.envres.2023.116085
  30. [37]Vanaken, G.-J., & Danckaerts, M. (2018). Impact of green space exposure on children’s and adolescents’ mental health: A systematic review. International Journal of Environmental Research and Public Health, 15(12). Retrieved from https://www.mdpi.com/1660-4601/15/12/2668 doi: 10.3390/ijerph15122668DOI
  31. [38]White, M. P., Alcock, I., Grellier, J., Wheeler, B. W., Hartig, T., Warber, S. L., Bone, A., Depledge, M. H., & Fleming, L. E. (2019). Spending at least 120 minutes a week in nature is associated with good health and wellbeing. Scientific reports, 9(1), 7730.DOI
  32. [39]White, M. P., Elliott, L. R., Grellier, J., Economou, T., Bell, S., Bratman, G. N., Cirach, M., Gascon, M., Lima, M. L., Lõhmus, M., & Nieuwenhuijsen, M. (2021). Associations between green/blue spaces and mental health across 18 countries. Scientific reports, 11(1), 8903.DOI
  33. [40]Whitney, P., Rice, W. L., Sage, J., Thomsen, J. M., Wheeler, I., Freimund, W., & Bigart, E. (2023). Developments in big data for park management: a review of mobile phone location data for visitor use management. Landscape Research, 48(6), 758–776.DOI
  34. [41]Wilkins, E. J., Howe, P. D., & Smith, J. W. (2021). Social media reveal ecoregional variation in how weather influences visitor behavior in us national park service units. Scientific Reports, 11(1), 2403.DOI
  35. [42]Wood, S. N. (2025). Generalized additive models. Annual Review of Statistics and Its Application, 12, 497-526. Retrieved from https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-112723-034249 doi: https://doi.org/10.1146/annurev-statistics-112723-034249

Paper details

vlnc:W_7d559yj8
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents