Introduction

To make cities more sustainable and liveable, it is of utmost importance to reduce vehicular traffic and associated car harm1,2, and to promote active mobility like walking and cycling3. Active mobility can, for example, be fostered through implementing 15-minute cities, low-traffic neighborhoods, or by improving bicycle infrastructure4,5,6,7,8,9. However, such efforts are only effective if people find the street environment safe and comfortable. An important factor for safety and comfort, apart from low vehicular traffic, is protection from high temperatures and sun exposure. The climate crisis unfortunately comes with global warming and growing temperature variations that create an increasingly hostile outdoor environment10. Cities are especially prone to heat island effects which cause excess deaths from heat exposure11. To combat these effects, preventing the causes of the climate crisis should be the top priority12. Nevertheless, ensuring acceptable standards of living in cities amid rising global temperatures and increasing urbanization also calls for the urgent exploration of adaptation strategies.

One such adaptation strategy is the provision of shade, to allow pedestrians to avoid time spent in direct sunlight. Shade provision is frequently overlooked in urban planning and climate change mitigation strategies, despite being one of the most efficient and cost-effective ways to reduce heat-related health risks outdoors13. Improving shade provision has the dual benefit of minimizing the harmful impacts of a changing climate while stimulating sustainable modes of mobility that do not contribute to further climate change14. Although there is a growing body of research addressing active mobility15,16, the provision of shade for active mobility is barely explored. In this paper, we start addressing this gap by studying the complex relation between shade distributions and the geometry of buildings and street networks, shedding light on the built environment’s effect on shade availability for pedestrians.

The cooling benefits from shade in cities have previously been covered from a variety of perspectives such as urban planning14,17, engineering18,19,20, or public health21,22. The latter has established that shade provides relief for temperature-related health issues and contributes strongly to a decrease in physiological equivalent temperature13,23,24, increasing the subjective well-being when traveling. Furthermore, behavioral data from pedestrian routing in heat has been studied25, and localized mobile phone app prototypes have been developed that implement shade-optimized routing, showcasing the feasibility for solving a practical routing problem for concrete users26,27,28. These are valuable user-focused case studies that aim for measuring concrete benefits to potential users of an app with a fixed start and end point of a planned trip.

In particular, Ref.26 propose and study a pedestrian-tailored navigation application based on path attributes. The study is important pioneering research in this context: It develops a system architecture, database model, routing algorithm, and more, for implementing a mobile phone app with shadow as a tour quality parameter. This app is then evaluated between one particular start and end point in the city of Vienna, comparing sunlight exposure between shaded and classic routing, with valuable conclusions on exposure versus path length. Our contribution takes such first evaluation efforts further and implements a whole mathematical framework for systematic investigation, but without an actual app being developed and deployed, to quantify a city’s potential for walking in shade. Being a city-focused approach, we assess the potential for shaded walking for each point in the city as an aggregate of potential walks from that point to all points in its local neighborhood, going beyond considering raw sunlight exposure on one particular path in one particular city26. For this task we develop a new metric, the CoolWalkability, with an adequate null model that accounts for best and worst shade coverage in the city, which we systematically evaluate in three different cities. As such, our contribution is more theoretical and methods-focused, coming from an Urban Data Science perspective, in contrast to applied transportation systems engineering approaches26,28.

Pedestrians are much more exposed to their surrounding environments than motorists29,30. Most routing for pedestrian mobility thus considers not just travel time or distance, but also, for example, traffic safety31, land use30, the attractiveness of the surroundings32, or avoiding smells, noises, or other unpleasant sensory experiences33,34. Previous works on routing have also covered a multitude of computational, environmental, or behavioral aspects of different traffic participants, including traffic assignment35, emissions36,37, real-time re-routing and recommendation assistants38,39. Like re-routing, considering shade for pedestrian routing is spatiotemporally more intricate than one-time shortest-path routing, since shade availability depends on the interplay between sidewalk network topology and the built environment, together with a dynamic dependence on the time of day.

Fig. 1
figure 1

Higher sun avoidance \(\alpha\) implies choice of routes that are not physically shortest but that minimize experienced length. (A) Example of three different links connecting two nodes in the street network, from shortest and least shaded (1, blue) to longest and most shaded (3, green). (B) The choice of which link to take depends on the pedestrian’s sun avoidance \(\alpha\). Increasing sun avoidance increases the experienced length because walking in the sun becomes less tolerable. At the threshold between different regimes, for example 1 (blue) to 2 (orange), the experienced length of the shaded link 2 becomes shorter than the experienced length of sunny link 1, implying a preference for link 2 despite longer physical length (dashed orange line). (C,D) Generalization from links to shortest paths with an example of five routes.

To contribute to the fields of active mobility and climate adaptation research, we introduce a route choice model for walking with a sun aversion parameter \(\alpha\) and a CoolWalkability metric that operationalizes the potential for shaded routing given an amount and spatial distribution of shade. By studying this metric we reveal the nontrivial impact of street networks and building height distributions on shade provision for active mobility. We measure CoolWalkability for cities with different urban forms and street networks, from grid-like to irregular: Manhattan, Barcelona, Valencia. We introduce diurnal (daily) CoolWalkability profiles and phase portraits to visualize the progression of CoolWalkability in cities over the day. These tools allow us to disentangle the effects of building heights and street geometry and to compare Manhattan’s empirical data to the analytical solution for a corresponding regular grid.

We find that the analytic grid solution is independent of an individual’s sun aversion \(\alpha\), meaning that individuals are not able to minimize time walking in the sun between an origin-destination pair on a perfect grid. However, the slight variations in Manhattan’s building heights and street geometry improve the CoolWalkability compared to the exact grid with constant building height, yielding potential benefits for shade-seeking individuals. Moreover, by comparing grid-like cities like Manhattan with more irregular street geometries from Barcelona and Valencia, we uncover different classes of diurnal CoolWalkability profiles that are spatially clustered, meaning that shade availability varies substantially between different parts of the cities. Finally, we discuss the effect of network geometry on the CoolWalkability and compare results between centerline and full pedestrian networks. Understanding how, where, and why the built environment contributes to shade availability are important first steps in adapting cities to a hotter climate and supporting active mobility throughout the year.

Model and metrics

In this section we first define our route choice model, then the corresponding CoolWalkability metric.

Route choice model with sun aversion \(\alpha\)

How a shade-seeking pedestrian selects their routes when traversing a city depends on the available shade along the streets. They might choose to walk farther than the shortest path, but with reduced sun exposure, trading a shorter total distance traveled for a longer distance traveled in the shade. We therefore express the problem of finding the best shaded route in terms of a shortest path problem on the street network \(G=(V,E)\) with edge lengths given by the experienced length

(1)

where and \(l^{{{\bullet }} }_{ij}\) are the physical lengths in the sun or shade on the street segment (ij) connecting intersections i and j, respectively. The parameter \(\alpha \in \left[ 1, \infty \right)\) captures the sun aversion of a pedestrian: A constant distance traveled in the sun is experienced as \(\alpha\) times as long as the same distance traveled in shade. An example of the effect of \(\alpha\) is shown in Fig. 1A,B, where the blue link is the shortest but most sun-exposed link preferred by individuals who are not sun-averse (low \(\alpha\)), while the other links are longer but less sun-exposed preferred by individuals with sun aversion (higher \(\alpha\)).

Generalizing the experienced length of a link, we define the experienced length of a path \(\Lambda ^{\alpha }_{i \rightarrow j}\) as

$$\begin{aligned} \Lambda ^{\alpha }_{i \rightarrow j}\left(\Pi _{i \rightarrow j}\right) = \sum _{ab \in \Pi _{i \rightarrow j}} \lambda _{ab} \end{aligned}$$
(2)

where \(\Pi _{i \rightarrow j}=\left(i \rightarrow k_1, k_1 \rightarrow k_2, ..., k_{N-1} \rightarrow j\right)\) is a path of length N between i and j.

For constant time of day and \(\alpha\), we assume that a pedestrian minimizes their experienced path length \(\Lambda ^{\alpha }_{i \rightarrow j}\) choosing the path

$$\begin{aligned} \Pi ^{*}_{i \rightarrow j} = \textrm{argmin}\left(\Lambda ^{\alpha }_{i \rightarrow j}(\Pi _{i \rightarrow j})\right) \end{aligned}$$
(3)

over all possible paths \(\left\{ \Pi _{i \rightarrow j}\right\}\) connecting node i to node j.

In this context, \(\alpha\) is an upper bound on the maximal increase of the physical length of the shortest path, compared to the physically shortest path at \(\alpha =1\). For example, an \(\alpha =1.5\) means that a pedestrian tolerates an increase in path length of up to 50%. This increase will however only be realized when the shortest path is fully exposed to the sun while the alternative path is fully covered by shade. Another way to think about the value of \(\alpha\) is to consider it as the trade-off between physical distance and distance in the sun every individual is willing to endure. Individuals will trade distance in the sun against at most \(\alpha\) times as much distance in the shade. If this trade is not realizable, the experienced shortest path will be the same as the physically shortest one. Figure 1C,D illustrates how different values of \(\alpha\) result in different selected paths through a city.

The exact values of \(\alpha\) are not easy to determine empirically, as they might depend on various individual preferences like heat resilience or time constraints, and on local or temporal factors like surface, the height of the sun, or wind conditions. Pedestrians are in general willing to endure detours for a variety of reasons31,40 compared to the physically shortest path. We therefore set the studied sun aversions to \(\alpha \in \left\{ 1.1, 1.25, 1.5, 2, 4, 10 \right\}\), capturing both realistic values (\(\alpha \le 1.5\)) and extreme values (\(\alpha \gg 1\)) for a comprehensive exploration of the parameter space.

For all shortest-path calculations, we consider fixed times during the 21st of July 2023, not including possible changes in shade during any trip. This simplification, together with the local weights of experienced edge lengths \(\lambda _{ij}\), enables us to efficiently calculate the shortest path for various scenarios using Dijkstra’s shortest path algorithm41.

Defining CoolWalkability

At each point in time t, the shadow fraction \(S_{ij}(t)\) of a street-segment (ij) is defined as

$$\begin{aligned} S_{ij}(t) = \frac{l^{{{\bullet }} }_{ij} (t)}{l_{ij} }, \end{aligned}$$
(4)

denoting the fraction of the segment covered in shade. Similarly, the global shadow fraction \(S (t)\) denotes the total shaded length available in the city at time t, normalized by the full length of all streets

$$\begin{aligned} S (t) = \frac{\sum \limits _{(i,j) \in E} l^{{{\bullet }} }_{ij} (t)}{\sum \limits _{(i,j) \in E} l_{ij} } \end{aligned}$$
(5)
Fig. 2
figure 2

Study area definition. We use a subgraph of the Manhattan street network centered around Times Square; similar subgraphs are extracted from the centers of Barcelona and Valencia. Each considered source node \(i \in V_{src}\) (orange) lies within 800m of the center and has a set of reachable nodes \(V_{dst}\)(i), here highlighted in blue for one example node i (red). We limit the number of reachable nodes to a maximum distance of 800m on the street network, to effectively capture the local structure of the city. To avoid edge effects caused by cutting the network from the full road network, we include all nodes within 1600m of the center. The nodes used in our analysis are therefore the source nodes together with all the nodes in the padding-area (grey).

This global shadow fraction is a baseline performance measure for a given city which consists of a street network and the associated buildings. We then define the global CoolWalkability \(C^\alpha\)(t) as

$$\begin{aligned} C^\alpha (t) = \frac{\sum \limits _{i \in V_{\textrm{src}}, j \in V_{\textrm{dst}}(i)} \left(\Lambda ^{\alpha ,*}_{i \rightarrow j}(0)-\Lambda ^{\alpha ,*}_{i \rightarrow j}\left(\left\{ S_{ab}(t)\right\} \right) \right) }{\sum \limits _{i \in V_{\textrm{src}}, j \in V_{\textrm{dst}}(i)}\left(\Lambda ^{\alpha ,*}_{i \rightarrow j}(0)-\Lambda ^{\alpha ,*}_{i \rightarrow j}(1)\right) } \end{aligned}$$
(6)

where \(\Lambda ^{\alpha ,*}_{i \rightarrow j}\) is the experienced length of the shortest experienced path between i and j, expressed as a function either of the shadow fraction \(\left\{ S_{ab}(t)\right\}\) at time t or at constant shadow fractions \(S_{ij}=0\) or \(S_{ij}=1\) for all edges \((i,j) \in E\), respectively, representing the worst and best case of shade coverage for the city. The CoolWalkability thus represents how much shorter all experienced trip-lengths are, compared to the experienced trip lengths in the worst-case scenario with no shade available at all. To make these results comparable between various cities, this value is normalized by the maximal difference in all experienced trip lengths. Small CoolWalkability values imply lower performance of the city at keeping pedestrians out of the sun, either due to a general lack of available shade or due to the available shade not being distributed in such a way that it can be effectively utilized to reroute pedestrians. Conversely, a CoolWalkability close to one signifies a high performance, due to a generally high availability of shade or a favorable distribution. CoolWalkability is inspired by a recent definition of bikeability7.

We consider destinations \(V_{\text {dst}}(i)=\left\{ j \in V \,\Big {|}\,\Lambda ^{1,*}_{i \rightarrow j} <{800}\text { m}\right\}\) to emulate a limited range of activity for each pedestrian. This restriction also makes the error negligible from assuming a constant sun position for the duration of a trip, and it is appropriate considering we are interested in the local structure of the city at each node and not in potentially long, user-centric trips. Figure 2 shows the different parts of the summation setup on the street graph of Manhattan. With an average speed of 5km/h, it would take a pedestrian around 10min to complete the longest allowed trip, an interval in which sun position and shade are assumed to not change noticeably. We also implemented a robustness check where we extend the range to 2400m, see Supplementary Note 3.

Fig. 3
figure 3

Comparing CoolWalkability of Manhattan with a synthetic grid shows similarities but also crucial differences. (A) We introduce the diurnal Coolwalkability profile (here shown for 2023-06-21, and \(\alpha =1.5\)). It shows two characteristic dips for Manhattan (green) due to the two Manhattanhenge events MH1 and MH2 at 11:05 and 13:25, respectively, where the sun is aligned with the grid. The dips are also present in the synthetic grid (grey), but less pointed. (B) We introduce the diurnal CoolWalkability phase portrait. It shows CoolWalkability versus shadow fraction, as functions of time, revealing larger differences. Manhattan’s portrait (green) is relatively smooth due to slight imperfections in its grid structure and heterogeneous building heights, while the grid’s portrait (grey) jumps discontinuously due to its perfect symmetries and constant building heights. The grid’s analytical solution of Manhattanhenges (black crosses) fits well with the numerical simulation. (C) Illustration of the two Manhattanhenge events MH1 and MH2 for Manhattan and the synthetic grid. Grey polygons denote building footprints, black polygons their shadows, orange arrows the direction of sun rays.

Data

In this section we outline the data of street networks and buildings to which we apply our routing model. We focus on subsections from Manhattan, Barcelona, and Valencia. The street networks are taken from OpenStreetMap (OSM)42, while the building data were provided by the New York City Office of Technology and Innovation43 for Manhattan and by the General Directorate for Cadastre of Spain44 for Barcelona and Valencia.

The sidewalk networks available via OSM can be highly detailed, often including sidewalks on both sides of a street as well as the multiple ways in which pedestrians can cross a street, for example around intersections45. We call these high resolution networks the “full” pedestrian networks. While these full networks are generally favorable for analyzing pedestrian mobility, OSM data availability depends on the activity of the local OSM communities46,47,48. Despite increasing crowd-sourced and remote sensing efforts to collect better data, accurate high-resolution sidewalk networks are currently not available in OSM for most cities around the world45. As a useful proxy for a centerline representation of sidewalk networks, where the sidewalks on the two sides of the street are collapsed into a single line in the center45, we therefore consider bicycle networks, which we define as all road infrastructure that can legally be used by cyclists. Following this definition, bicycle networks are well mapped in general49,50 because they consist to a large extent of mostly well mapped road networks51. Bicycle networks come with the additional benefit of small size compared to the full pedestrian networks, with comparable spatial coverage. Further, it is reasonable to assume that the vast majority of the bicycle network can also be reached by pedestrians – we support this assumption by comparing the bicycle and sidewalk networks for the three study areas, finding a length-overlap of 98% (Manhattan), 75% (Barcelona), and 80% (Valencia). Bicycle networks are thus a reasonable proxy for centerline pedestrian networks in areas that lack a detailed mapping of sidewalks. It also reduces computational complexity, as shown for the study areas in Table 1.

Our study follows a systematic bottom-up approach, where we start with the coarsest available data or model (centerline network), refining it subsequently with details to understand the impact of such details (building heights, full network geometry, parks, etc.), with the aim to inform future studies on the data or model refinement level necessary to come to reliable conclusions. We thus focus first on the centerline networks, as only they can reasonably be compared to synthetic grid networks and to analytical solutions. Later, in Section Network geometry matters, we compare the differences between centerline and full networks, to assess potential inaccuracies introduced by the centerline approximation. To not miss any such potential inaccuracies, we therefore report results for both centerline and full pedestrian networks for all our analyses whenever possible. As pedestrians do not need to adhere to one-way streets, we ignore edge directions by adding all non-existent reverse edges to the graphs of both network types.

Table 1 Datasets studied in this project. ctrl = centerline network, full = full network. Length in km.

Given the sparse availability of full 3D building data, and for computational simplicity, we handle building data following the 2.5D standard, i.e. consisting of a footprint-polygon and a singular height value which is simplified as constant across the whole building.

In addition to the empirical data, we consider two types of synthetic cities. On one extreme, we study cities based on an ideal, regular grid with cell edge lengths \(l_a\) and \(l_b\). On the other extreme, we construct cities from the Poisson-Voronoi tessellation52. In this model, seed-points are first distributed randomly, then Voronoi cells are created around them, and the cell edges represent the city’s streets. For each of these synthetic cities, we either assume a constant height across all buildings, or we sample the building heights from the empirical building height distributions. See Supplementary Note 2 for more details on data generation and processing.

Results

Before analyzing empirical data from real-world cities, we solve the case of the grid street network analytically, setting the theoretical expectation for CoolWalkability in grid-like cities. We then introduce the diurnal CoolWalkability profile and phase portrait, allowing us to compare deviations of this expectation with a synthetic grid and with the empirical results in Manhattan. This comparison untangles the different factors that cause these deviations: Grid deviations and non-uniform building height distribution. After the grid analysis, we incorporate Barcelona and Valencia, two cities with a more irregular street geometry. Lastly, after observing global differences in CoolWalkability, spatial cluster analysis also reveals local differences between grid-like and irregular network structures.

Fig. 4
figure 4

Disentangling the effects of building height distribution and street geometry on Coolwalkability. Multiple curves shown in diurnal profiles correspond to different sun avoidance values \(\alpha\) – the curves mostly overlap, showing independence of Coolwalkability from \(\alpha\), as proven analytically for the grid. All diurnal profiles shown for 2023-06-21. (A) Left: Zoom into Manhattan’s building footprints. Right: diurnal Coolwalkability profile. (B) Left: Zoom into Manhattan’s building footprints at constant height, set as the average 71m of empirical building heights. Right: The corresponding diurnal Coolwalkability profile. Due to loss of building height heterogeneity, the Manhattanhenge dips are slightly less pointy. (C) Right: Zoom into the grid with empirical building footprints taken from Manhattan. Left: the corresponding diurnal Coolwalkability profile. Keeping building height heterogeneity but changing from empirical street network to grid implies only slight differences in diurnal Coolwalkability. (D) Right: Zoom into the grid’s building footprints at constant height, set as the average 71m of empirical building heights. Left: the corresponding diurnal Coolwalkability profile. Due to loss of building height heterogeneity and the change to a grid, the Manhattanhenge dips are considerably broader and less pointy.

CoolWalkability on a grid is independent of sun avoidance \(\alpha\)

A theoretical approximation of a city with a grid-like street network like Manhattan is a regular grid consisting of rectangles with edge lengths \(l_a\) and \(l_b\), and buildings of a constant height which have their footprints reduced from the streets by a distance w. On this grid, we derive the CoolWalkability analytically (full derivation in Supplementary Note 1) as a function of the length of shade \(l^{{{\bullet }} }_{a}\) and \(l^{{{\bullet }} }_{b}\) on the edges:

$$\begin{aligned} C^\alpha \left(l^{{{\bullet }} }_{a}, l^{{{\bullet }} }_{b}\right) = \frac{l_b \cdot l^{{{\bullet }} }_{a}+l_a \cdot l^{{{\bullet }} }_{b}}{2l_a l_b} \end{aligned}$$
(7)

This expression is independent of \(\alpha\), showing that highly symmetric cities offer pedestrians no choice for more shaded routes, no matter how high their sun aversion. Conversely, the fraction of total street length in shade is given by

$$\begin{aligned} S\left(l^{{{\bullet }} }_{a}, l^{{{\bullet }} }_{b}\right) =\frac{l^{{{\bullet }} }_{a} + l^{{{\bullet }} }_{b}}{l_a+l_b} \end{aligned}$$
(8)

which, unlike Eq. 7, is symmetric in both its arguments, showing how the same total shadow fraction S may lead to different CoolWalkabilities, depending not only on the distribution of said shade but also on the underlying geometry. For example, if \(l^{{{\bullet }} }_{a}=x\) and \(l^{{{\bullet }} }_{b}\)=0, we get \(S\left(x,0\right) =S\left(0,x\right)\) but \(C^\alpha \left(x, 0\right) = \frac{l_b \cdot x}{2l_a l_b} \ne \frac{l_a \cdot x}{2l_a l_b} = C^\alpha \left(0, x\right)\) if \(l_a \ne l_b\).

Diurnal CoolWalkability profile and phase portrait reveal differences between Manhattan and grid

As a tool to visually study CoolWalkability over the course of a day, we introduce the diurnal CoolWalkability profile and phase portrait. Figure 3A and B show these visualization methods, respectively, comparing the results using empirical data from Manhattan with numerical results in a synthetic city. The synthetic city is based on a regular grid as introduced in the previous section, with parameters chosen to fit the underlying grid structure of Manhattan. Each grid cell has edge lengths of \(l_a={270}\textrm{m}\) and \(l_b={80}\textrm{m}\), and is rotated by \({61}^{\circ }\) counterclockwise to align with the Manhattan street grid. The buildings are inset by \(w={11.5}\textrm{m}\) and have a constant height of 71m, the area-weighted average of the building heights in the Manhattan dataset.

Comparing the diurnal CoolWalkability profiles, Fig. 3A, we find a generally similar shape, both showing similar dips around 11:05 and 13:25, caused by the characteristic “Manhattanhenge” events where the sun shines down the urban canyons either from the south-east (MH1) or south-west (MH2) direction (Fig. 3C). In both events, the CoolWalkability is roughly similar between the two dips, slightly higher at MH2. In the synthetic grid (grey), the CoolWalkability shows discontinuities, caused by the high symmetry of the gridded city, where all shadows sweep over the streets at the same time. These discontinuities disappear for the empirical data (green). We explore this smoothening in the next section.

When comparing the CoolWalkability against the shadow fraction in a diurnal phase portrait, Fig. 3B, we see more substantial differences, especially around the second Manhattanhenge event MH2. Here, the shadow fraction on the grid is considerably larger than the one in Manhattan, without showing a proportional increase in CoolWalkability. This observation is consistent with the theoretical predictions from Eqs. 7 and 8 because \(C^\alpha \left(l^{{{\bullet }} }_{a}, 0\right) \approx C^\alpha \left(l_{a}, 0\right) = C^\alpha \left(0, l_{b}\right) \approx C^\alpha \left(0, l^{{{\bullet }} }_{b}\right)\) for \(w \ll l_{a}\) and \(w \ll l_{b}\).

Around MH2, Manhattan has much less shade available compared to the grid but is still able to provide about as good a CoolWalkability as the grid. In general, the empirical curve (green) runs to the left or above the grid curve (grey) during corresponding times of the day, implying a better potential use of shade for walking than expected for a perfect grid with constant building heights. This situation is different for Barcelona and Valencia, which are less grid-like and have lower, more uniform building heights, therefore not featuring distinct “henge” events, see Supplementary Figures SI1 and SI2.

Empirical building heights smoothen diurnal profiles

To untangle the different effects leading to deviations between empirical and synthetic data, as just observed in Fig. 3B, we investigate the impact of a constant building height distribution, by running the same study on Manhattan but with constant building heights of 71m, and on the grid with building heights randomly drawn from the area-weighted distribution observed in Manhattan. The results of this experiment are shown in Fig. 4. Going from the fully empirical Manhattan (Fig. 4A) to the case of Manhattan with constant building heights (Fig. 4B), we find the dips around the two Manhattanhenges to widen and to increase their CoolWalkability values slightly. Also, the flanks dropping in to MH1 and leading out of MH2 steepen. Going from Manhattan with constant building heights (Fig. 4B) to the most synthetic case of a grid with constant building heights (Fig. 4D) iterates the same effect changes: The dips plateau and widen, discontinuities and slopes increase. The effect of going from the fully empirical Manhattan (Fig. 4A) to the grid with empirical heights (Fig. 4C) is mostly a slight increase in CoolWalkability values, but keeping a similar pointedness of Manhattanhenge dips. The largest effect is observed in the grid case, going from empirical to constant heights (Fig. 4C, D). The two dips go from sharp to two plateaus stretched over around 1.5 hours each.

To summarize, going from empirical to constant building heights has a stronger impact on diurnal CoolWalkability profiles than going from Manhattan to the perfect grid. Manhattan’s grid imperfections have a negligible influence on CoolWalkability. An implied consequence for future modeling efforts is to prefer approximating a grid-like network with a perfect grid than to neglect the heterogeneous distribution of building heights. For all these cases, we also observe little to no \(\alpha\)-dependence of the profiles (they mostly overlap), further showing how there are nearly no relevant choices to be made by pedestrians in such grid-like networks.

CoolWalkability clusters locally

Fig. 5
figure 5

Spatial clustering by CoolWalkability leads to areas with different profiles. From top to bottom, we study the cities Manhattan, Barcelona, Valencia, and the random null model (Poisson-Voronoi). Left column: Clustering local Coolwalkability of each node in the street network leads to spatial clusters of similar CoolWalk potential. Middle column: The diurnal profiles of these clusters display high variations within each city and between different cities. In particular, the more organic, least grid-like areas (red curves) display the highest potential. (K) The null model shows the baseline of small variation. Right column: the distributions of the time average of each diurnal profile within each cluster illustrate the large potential differences in empirical street networks. (L) These differences are negligible in the null model.

The global CoolWalkability is aggregated over the whole study area, neglecting spatial heterogeneities within cities that might affect CoolWalkability locally. To study the impact of the geometric variations in building and street geometry, we calculate the local CoolWalkability \(C^\alpha _i\)(t) for each vertex \(i \in V_{src}\) as

$$\begin{aligned} C^\alpha _i(t) = \frac{\sum \limits _{j \in V_{\textrm{dst}}(i)} \left(\Lambda ^{\alpha ,*}_{i \rightarrow j}(0)-\Lambda ^{\alpha ,*}_{i \rightarrow j}\left(\left\{ S_{ab}(t)\right\} \right) \right) }{\sum \limits _{j \in V_{\textrm{dst}}(i)}\left(\Lambda ^{\alpha ,*}_{i \rightarrow j}(0)-\Lambda ^{\alpha ,*}_{i \rightarrow j}(1)\right) } \end{aligned}$$
(9)

for multiple times across the whole day, constantly spaced 15min apart. Interpreting the resulting discrete series \(C^\alpha _i(t_j)\) as an element of a j-dimensional vector space, we map the problem of distinguishing qualitatively different temporal trajectories to a clustering problem, which we solve using a combination of DBSCAN and k-means: In the first step, we detect and eliminate outliers using DBSCAN and find clusters within the remaining intersections using k-means. The resulting clusters represent vertices in the street network that show similar diurnal CoolWalkability profiles.

Visualizing the spatial relationship between the vertices in real cities reveals spatially coherent structures (Fig. 5A,D,G). Cities have nontrivial spatial variations of their urban form which are picked up by our clustering approach. This variation is reflected in the noticeably different local CoolWalkabilities between the clusters (Fig. 5B,E,H).

For both Barcelona (Fig. 5D) and Valencia (Fig. 5G), the clusters are well explained by the geometric heterogeneity in the street layout. In Barcelona, the cluster with the lowest average local CoolWalkability (blue) captures the vicinity of the Avinguda Diagonal, Barcelona’s widest street. The remaining clusters align well with the three districts which make up the study area: Eixample (orange), Gracia Nova (green), and Gracia (red), in order of increasing average CoolWalkability. Interestingly, the profiles of the orange and green clusters do not exhibit the double-well structure we found earlier for the regular, grid-like network structure of Manhattan. In these two areas of the city, the low height of the buildings combined with the large width of the streets and the high angle of the sun causes the buildings to not cast any shade on the street network geometries which are generally located in the middle of the street. As such, the grid structure is not apparent during the day. Only in Gracia (red), where the streets are generally narrower, do we find a remnant of this effect.

We also find substantially different clusters in Manhattan (Fig. 5A–C) although Manhattan’s street network is highly symmetric and thus cannot be expected to explain the structure of the obtained clusters. However, the spatial distribution of building heights can. All clusters show the characteristic double well (Fig. 5B), albeit with different strengths, increasing from west to east. The building height in and around the blue cluster is lower than for the other clusters. The last, red cluster receives the most shade because it has the highest buildings. Of special note are the asymmetries between the decrease and increase of CoolWalkability in the blue and orange clusters. While the CoolWalkability of the green and red clusters decreases and recovers quickly in the two Manhattan-Henge events, the recovery is noticeably slower for the blue and orange clusters. In the morning these regions are shaded mostly by the higher buildings east of them, but are less shaded by the comparably lower buildings in the west. As the sun sets, the shorter shadows grow longer, causing the CoolWalkability to recover, but slower. Similar temporal asymmetries can thus be expected in any city where there is a non-zero gradient in the spatial building-height distribution.

For the synthetic city based on the Voronoi tessellation (Fig. 5J–L) we also observe patches, but spatially less coherent. The low but non-zero coherence is explained by the limited radius of movement imposed when calculating \(C^\alpha _i\)(t), as two physically close nodes i and j tend to be close in network distance as well. Therefore, the intersection of their respective reachable destinations \(V_{dst}(i) \cap V_{dst}(j)\) is large, and the sums in Eq. 9 will produce similar results. In other words, places close to one another have similar CoolWalkabilities by construction. This locality principle is the case for any network, but the question is how distinct the spatial clusters in empirical networks are from each other compared to clusters in the random Voronoi model. Indeed, the qualitative differences between the CoolWalkability profiles of different clusters in the Voronoi model (Fig. 5K,L) is much smaller than for the real cities, which is especially apparent in the CoolWalkability variation plot (Fig. 5L). This discrepancy provides evidence that irregular networks, narrower streets, and/or heterogeneous building height distributions of real cities have a non-trivial impact on local CoolWalkability. The same figure but for constant building heights shows similar behavior, and even smaller CoolWalkability variations for the clusters in the Voronoi model (Fig. SI3L).

Whether streets need to be narrower (or buildings higher) to provide better local CoolWalkability remains a question for future research13.

Fig. 6
figure 6

Network geometry can have an impact on CoolWalkability. Considering centerline versus the full pedestrian networks can lead to different results, as links in these networks are sometimes mapped differently in OpenStreetMap. Left map: A centerline-based mapping in Barcelona can inaccurately reflect the actual position of sidewalks. Right map: The full pedestrian links in the same area are mapped with more detailed geometries, some of them closer to buildings and therefore shaded, which comes with more flexibility for shaded routing when walking. Middle: Accordingly, the diurnal profiles in the centerline and full networks can differ substantially, especially for high sun avoidance \(\alpha\): Full networks generally display higher CoolWalkability and are more likely to have two dips.

Network geometry matters

By “network geometry” we understand the spatial geometry used to represent the physical position of elements in a transport network. To which extent this geometry is an accurate reflection of reality depends on many factors and choices, such as the data model, data resolution, or mapping practices, which all can depend on the use case (like routing) and on the transport mode45,46,50.

In our data source OpenStreetMap, and many other road network datasets, the mapped geometry that represents a street is the street’s centerline45. Although pedestrians usually do not get space allocated on the centerline, but on the side of the street, centerlines are generally considered sufficient for deriving meaningful quantities like the length of a street segment. This proxy is usually adequate enough to enable effective research and applications on street networks, including routing for cyclists or pedestrians7,45. However, in our specific use case, the centerline is not necessarily a reliable proxy, as the quantities of length in shade \(l^{{{\bullet }} }_{a}\) and length in the sun on all edges a can depend on the exact location of the geometry of each sidewalk in relation to the surrounding buildings. This dependence is especially relevant if the length of the shadows is in the order of the street width, like in Barcelona.

Solving this accuracy problem requires either to offset the location of the centerline geometries towards the sidewalks where pedestrians actually walk, or to acquire higher resolution networks which include the sidewalks as their own geometry. While the first approach would allow for more widespread application even for cities for which high-resolution sidewalk geometries are not available, this requires additional information on the width of each street, which is often not available. This lack of exact geometry and width information is a known data limitation in sidewalk networks45. Fortunately, the OSM dataset of Manhattan, Barcelona and Valencia also contains many sidewalks as separate geometries, enabling the comparison between the centerline-based proxy network and the full, high-resolution pedestrian network.

We therefore calculate the global CoolWalkability as a function of time for various values of the sun aversion \(\alpha\) in all three studied cities on both these networks – centerline and full. The resulting profiles can show substantial differences, depending on the observed cities, as shown in Fig. 6. Compared to the centerline networks, in full pedestrian networks the observed CoolWalkability increases for all cities, as the sidewalks are generally closer to the buildings, increasing the probability of one side being shaded. Thus, crossing the street often causes only a small detour while substantially increasing the distance traveled in shade, increasing the overall CoolWalkability even for small sun-aversions.

In addition to the overall increase in CoolWalkability, we observe an increased sensitivity with the sun-aversion \(\alpha\). Where pedestrians on Manhattan’s centerline network did not have many options of similar length from which to choose an optimal route given their individual preferences, the full sidewalk network provides a multitude of such options due to the denser network and slight variations in geometry placement of the footpaths. Here the temporal location of the minima does not change, as the sun still aligns with the urban canyons at the same time; the dips do, however, become narrower since the duration for which both sides of the street are exposed at the same time decreases. If only one side is exposed, a pedestrian can often get into the shade by crossing the road and thus increasing the CoolWalkability, especially around the henge events. For Barcelona, the effect of the full pedestrian network is especially obvious as the profiles of the global CoolWalkability change qualitatively to now exhibit a similar double-well structure as Manhattan.

Depending on the observed city, a switch from the centerline network to the full sidewalk network with more accurately mapped pedestrian infrastructure can have either a small impact, as seen for Valencia, a mostly quantitative effect as in Manhattan or even cause a qualitative change in the dynamics, as demonstrated for Barcelona. The same effects apply to the spatial clustering plot (Fig. 5 vs. Fig. SI4), but without changing the main result of CoolWalkability clustering.

Incorporating green spaces

Although buildings are the largest shade-providing objects in cities, urban greenery such as parks and trees should also be considered when studying urban shading, as it is a widely used and flexible approach for enhancing pedestrian comfort in cities. Due to availability and quality issues with open tree data53,54, here we use park data as a proxy as they are readily available on OSM (for the studied cities). We used this data to re-run our simulations, modeling each park in our study areas as a canopy of 8m height, assuming a park to be fully covered and shaded by trees and able to cast a shadow on surrounding streets. The results are reported in Figs. SI7-9. This addition increases the CoolWalkability slightly in the full networks, especially around noon. Buildings only cast shade on the streets next to them when the sun angle is sufficiently low, while trees are able to cast usable shade onto paths beneath them even when the sun is at its highest, causing them to have a stronger effect during noon. In centerline networks at same routing length, the effect is overall weaker.

While there is a measurable effect of parks on the CoolWalkability up to a difference of 0.1, this difference is relatively small and does not qualitatively change any of the CoolWalkability profiles. Thus, this additional analysis shows that there are some local CoolWalkability gains from incorporating parks, but also that an overall assessment of CoolWalkability is robust to neglecting parks, at least in the considered cities.

Realized routes and impacts

CoolWalkability gives a metric for the performance of a city to provide shaded routing but lacks practical information for individual pedestrians. The chosen \(\alpha\) stands for how much farther a pedestrian is willing to walk in shadow than in sun – but how much longer are such sun-avoiding walks when actually realized, and how does this translate into practical, human-readable benefits?

To answer these questions, we introduce two simple measures: First, the relative distance traveled in the sun when optimizing for shaded routes, compared to the distance traveled in the sun when using the physically shortest paths:

(10)

where is the total length traveled in the sun with a sun aversion of \(\alpha\). Second, the relative increase in physical trip-length when optimizing for shaded routes compared to the physical length of the physically shortest paths:

$$\frac{{L^{{\alpha ,*}} }}{{L^{{1,*}} }}$$
(11)

where \(L^{\alpha ,*}\) is the total length traveled in the sun with a sun aversion of \(\alpha\).

We discuss in detail the daily evolution of these two metrics in Supplementary Note 4, visualized in panels E-H and in panels I-L of Figs. SI10-12, respectively. In summary, the first main result is that the overall physical length of all paths increases only by up to 10% for \(\alpha \le 2\), and only up to 30% for \(\alpha =10\). These values are thus all considerably lower than the theoretically possible increase by the factor \(\alpha\), since in practice physically shortest paths are usually not fully covered in sun with experienced shortest paths being fully covered in shade. Second, the relative decrease of distance in the sun fluctuates mostly between 20% and 90%, strongly depending on the city, time of day, and sun aversion \(\alpha\). In general, we find that the daily curves of and \(\frac{L^{\alpha ,*}}{L^{1,*}}\) are non-trivial and hard to interpret, possibly due to their numerical sensitivity: For example, they are naturally sensitive at extreme values of shade availability, such as during full shade in the morning/evening and little shade at noon. This numerical sensitivity provides another good motivation for our CoolWalkability metric, as CoolWalkability does not suffer from such fluctuations and gives a clear picture of a city’s performance for providing shaded walks.

Despite the difficulty in finding general patterns for these metrics, for a user-centric “navigation app” scenario it would be useful for an individual pedestrian to be informed about their length decrease in the sun while choosing \(\alpha\), including for medical reasons, as it can be assumed to be proportional to the reduction of heat-stress or UV exposure. Similarly, it would be crucial to be informed about the actual total length increase \(\frac{L^{\alpha ,*}}{L^{1,*}}\). Both these values could also be expressed as absolute rather than relative length differences.

Finally, we assessed the number of intersections and left turns encountered as a function of total physical distance, for individual \(\alpha\) values, Figs. SI13-14, as these metrics can serve as a useful proxy for the “complexity”, effort, or cognitive load associated with navigating a route. We found that the number of intersections encountered tends to be roughly linear in the total physical distance (but we cannot exclude non-linear exceptions for individual \(\alpha\) values in cities where long paths could be routed through neighborhoods with distinctly higher intersection densities), and the fraction of left turns is always very close to \(\frac{1}{2}\). This result shows that shade-aware routing tends to not increase the complexity of the experienced shortest paths beyond the complexity added due to an increased length.

Discussion

This research represents a first exploration and method development towards the systematic study of shaded routing and the potential benefits that the built infrastructure can provide. We were able to analytically derive solutions for regular grids, to disentangle building height distribution from street network geometry, and we found a particular dependence of results on network geometry, showing higher potential CoolWalkabilities for walking than for cycling networks. Below, we discuss the implications of these results, limitations, and relevance for urban planning and future research.

Although the street layout and building heights of existing cities are mostly static and only change slowly over time, our results reveal several insights which might be of relevance for achieving optimal shading in future urban development projects. More pointwise shading is, of course, achieved by narrower streets, taller buildings, or by adding trees or other objects that can block direct sunlight. However, as our analysis considered full paths and not just pointwise shade, it also exposed the nontrivial dependence of CoolWalkability on building height distributions: Especially the diurnal CoolWalkability phase portrait (Fig. 3B) reveals that at a given shadow fraction, more CoolWalkability can be achieved than expected for a perfect grid with constant building heights. We furthermore showed that an irregular street network can provide a qualitatively different diurnal CoolWalkability profile locally (Fig. 5), for example by avoiding “henge” events and corresponding dips, with very low shade availability.

A large-scale, systematic study of geometric factors such as street bearing entropy55 in relation to CoolWalkability remains open, which could answer which network properties are most beneficial when seeking more shade for active travel. To better understand local contexts and the cause of temporal asymmetries, CoolWalkability could, for example, be investigated on rotated cities, for varying latitudes, or for larger study areas and a larger number of cities. Further, more realistic pedestrian routing scenarios could be considered beyond the sidewalk network perspective, such as traversing open areas56, and to account for the potentially considerable time or risk involved in crossing a heavily trafficked street. Such an approach is unfortunately limited by the spatial data structure, which in OSM is mostly one-dimensional and thus fundamentally not adaptable to 2D routing45. Further, OSM usually lacks information whether an edge represents a crossing within a street intersection or between two “regular” sidewalks across the two sides of a street, thus making it practically impossible to study street crossings.

Shade optimization is also not only a question of sun avoidance during hot seasons, because in other seasons too much shade can be undesirable – as demonstrated, for example, in a 10-year long study in Taiwan22. To identify the right annual balance between shade and sun provision depending on the local context, our model could easily be extended to also account for sun seeking. Further, the assumed form of experienced length \(\lambda _{ij}\) used in Eq. 1 is a choice that facilitates analytical convenience and reflects reality in a first approximation, but could be extended. Fundamentally, we do not know \(\alpha\) (or its distribution among people and contexts), which would need to be measured and calibrated, for example through field experiments. The dependence could also be non-linear, for example to preferentially avoid continuous gaps in the sun, or to account for vector or visibility based pedestrian navigation57.

In order to make the methods presented in this paper of further relevance to urban planning applications, researchers need access to data for pedestrian and cyclist routing of a much higher quality. The marginalization of active mobility like walking and cycling does not only happen on the policy level, but also on the level of data quality and completeness45,49,50,58. Specifically, the lack of detailed, topologically correct, and spatially accurate data both on sidewalk and bicycle networks means that results on whether a given edge will be in shade or sun often come with substantial uncertainties. Similarly, differing mapping practices around intersections, a lack of common mapping and quality standards for street network data from the perspective of active mobility, and uncertainties on how network simplification can influence results warrant further work on active mobility networks45,58,59,60. In addition to data quality issues for street network data, building height data is only available locally61 and often follow different standards62. However, new GeoAI and image recognition tools are showing promise towards creating global, high-resolution data sets63,64,65,66.

Our research on the status quo has just started to scratch the surface of a much-neglected topic in urban planning13. Besides describing the existing situation, future research should ask how to use the know-how on CoolWalkability to effectively design better cities. How to identify the most optimal improvements to CoolWalkability within a given budget? The non-trivial impact of buildings, which both radiate heat and provide shade18,20, highlights that our focus on buildings and street networks is limited and part of a broader interdisciplinary puzzle16,67, which should be extended with further work on potential urban interventions like tree planting or installation of (solar panel) canopies13. We considered as a first step buildings only and not trees, due to availability issues with tree data. Buildings are moreover the largest shade-providing objects in cities, but are often ignored in the shade provision literature compared to trees13. Shade should ideally become a fundamental part of infrastructure planning via “shade master plans” and other policy guidelines13,14, and these plans should be based on evidence that research like ours can provide.

Central for defining the “optimality” of improvements should be the notion of equity68. Previous research has shown that urban “shade deserts” – places lacking the shade needed to reduce heat burden and protect human health outdoors – are part of the lived experience for low-income communities, and exacerbate heat-related health disparities13. Such marginalized communities have less access to shade and to air conditioning, and it is thus crucial to consider how shade provision can target those most in need.

Although our paper focuses on the health aspects of shaded mobility, further practical considerations could include economic aspects such as changing foot traffic to businesses. For example, the prospect of more shaded routes at tall buildings could divert people away from open spaces. If there was a spatial correlation between such aspects of urban form with local businesses, such businesses could either be harmed unintentionally, or they could benefit. In the long term, following the increased impacts of climate change, businesses will aim to relocate to shaded areas, or they will have increased interest in more shade provision, which makes our study also relevant in this context. Future work should thus incorporate data of human mobility and local businesses69, and extend models of urban business location70 to account for shade provision and economic consequences.

Finally, despite the multidimensional benefits of better shade provision – including more vegetation or green canopies – on liveable cities, in the context of climate change, it must be stressed that these are primarily adaptation strategies and thus do not address the underlying core issue of human-caused increases in temperatures and extreme weather events12.