Demand-driven design of bicycle infrastructure networks for improved urban bikeability

Cycling is crucial for sustainable urban transportation. Promoting cycling critically relies on sufficiently developed infrastructure; however, designing efficient bike path networks constitutes a complex problem that requires balancing multiple constraints. Here we propose a framework for generating efficient bike path networks, explicitly taking into account cyclists’ demand distribution and route choices based on safety preferences. By reversing the network formation, we iteratively remove bike paths from an initially complete bike path network and continually update cyclists’ route choices to create a sequence of networks adapted to the cycling demand. We illustrate the applicability of this demand-driven approach for two cities. A comparison of the resulting bike path networks with those created for homogenized demand enables us to quantify the importance of the demand distribution for network planning. The proposed framework may thus enable quantitative evaluation of the structure of current and planned cycling networks, and support the demand-driven design of efficient infrastructures. Designing efficient bike path networks requires balancing multiple constraints. In this study, a demand-driven inverse percolation approach is proposed to generate families of efficient bike path networks taking into account cyclist demand and safety preferences.

Cycling is a crucial part of sustainable urban transportation.Promoting cycling critically relies on a sufficiently developed bicycle infrastructure.However, designing efficient bike path networks constitutes a complex problem that requires balancing multiple constraints while still supporting all cycling demand.Here, we propose a framework to create families of efficient bike path networks by explicitly taking into account the demand distribution and cyclists' route choices based on safety preferences.By reversing the network formation process and iteratively removing bike paths from an initially complete bike path network and continually updating cyclists' route choices, we create a sequence of networks that is always adapted to the current cycling demand.We illustrate the applicability of this demand-driven planning scheme for two cities.A comparison of the resulting bike path networks with those created for homogenized demand enables us to quantify the importance of the demand distribution for network planning.The proposed framework may thus enable quantitative evaluation of the structure of current and planned bike path networks and support the demand-driven design of efficient infrastructures.
Human mobility critically depends on the existing infrastructure underlying it [1][2][3].The transition to more sustainable mobility in particular requires a sufficiently developed infrastructure to promote, for example, cycling over motorized mobility for short and medium-distance intra-urban trips [4][5][6][7].During the COVID-19 pandemic, a number of cities such as Paris, New York and Bogotá pushed to open more street space to cyclists, expanded the size of side-walks, or blocked car traffic in order to enable social distancing [8].Similarly, many cities have vouched to invest into cycling infrastructure [9][10][11][12] and are gaining increasing support among the population for these investments [13].
In general, designing suitable and efficient infrastructure networks constitutes an intricate problem as the networks are subject to multiple, often opposing technical, economic and social constraints [14][15][16][17].Examples for efficient network structures can be found in various biological [18][19][20][21] and social networks [22][23][24], balancing resource and energy costs with efficient physical or information transport and robustness to failures.For mobility and infrastructure networks, examples of efficient topologies include the core-periphery structure of air travel networks, balancing the cost of direct flights with the inconvenience of transfers [18,[25][26][27][28], and the emergent backbone structure in street networks of cities [29][30][31][32].
For the design of bike path networks, three major constraints include: (i) Budget constraints limit the total length of bike paths, as for most physical networks, e.g.due to construction or maintenance cost [25,33].(ii) Bike path networks have to support the mobility demand, enabling fast travel between frequented locations without large detours [25,27,29,34].(iii) In addition to fast travel, bike path networks should enable safe travel of cyclists along highly frequented routes [35].Different implementations of bike path infrastructure weigh these constraints differently.For example colored bike lanes on the street do not cost much but add only little safety of cyclists whereas physically separated bike lanes greatly improve cyclists' safety but require more space and investment [36,37].
From a network structure perspective, each of these aspects is simple to understand individually.For example, a connected bike path network in a city that minimizes the required budget is simply given by the minimum spanning tree of the underlying street network [26,30,38].More sophisticated approaches for finding connected network structures have recently been proposed based on percolation processes [39][40][41] to optimize the connectivity of the bike path network.However, connectivity alone is not sufficient to support the demand since routes along streets equipped with bike paths would likely be indirect and require large detours.Shortest path trees would optimally support the demand only from and to a single location.In contrast, direct routes between other locations would require cycling along streets without a dedicated bike infrastructure and would not be as safe [42,43].Finally, the safest and most convenient network for cyclists, where a bike path exists along every street, would naturally exceed any reasonable budget constraints [33,44].However, efficient bike path networks have to simultaneously adhere to all three constraints to enable both convenient and safe travel with feasible investment [45][46][47].
In this article, we propose a framework for constructing a family of efficient bike path networks, all adapted to the given street network and demand distribution.The algorithm realizes inverted network growth: Based on a simplified cyclist routing model and starting from a network fully equipped with bike paths, the algorithm generates a sequence of bike path networks by successively removing bike paths from the street segments with the least impact given the usage patterns in the current network.We observe that both convenience and safety of cycling in the network remain high, even if only a small part of the street network remains equipped with bike paths.Application of the algorithm to synthetic, homogeneous demand conditions enables us to quantify the importance of the cycling demand for the structure of the resulting bike path networks.The proposed framework is extendable to include different routing models and its applicability to different street networks and demand distributions may support planning of bike path networks that promote a desired cycling demand.

Cyclist route choice model
Route choice and traffic assignment constitute complex problems in modeling the dynamics of human mobility, not least due to congestion and other collective phenomena induced by interactions among individuals.For car traffic, one prominent example of complex collective dynamics is Braess' paradox [48,49] emerging from the selfish routing decision of drivers.For cyclists, Braess paradox and congestion is less relevant due to the smaller spatial footprint compared to cars [50].However, cyclists often share infrastructure with cars and their route choice is not only based on the fastest route as often assumed in general transportation or information routing networks [48,51] but also on safety along potential routes.Studies comparing the routes taken by cyclists with potential alternative options consistently find a strong tendency to avoid dangerous traffic situations or inconvenient routes [42,43].As cyclists are highly sensitive to traffic volume on streets without separate bike infrastructure, these studies predict that cyclists may prefer significant detours to avoid cycling on busy streets.Other factors that deter cyclists from using a specific route are steep inclines and unsignaled turns, in particular left turns where cyclists may have to wait in the middle of the street [42,43].In general, the preference for convenient and safe travel is higher for leisure trips than for commuting cyclists, except for the avoidance of high traffic (possibly due to commuting trips typically taking place under generally busier traffic conditions).Safety thus constitutes a substantial factor in designing bike path networks to promote cycling [39,40,52,53].
We map these route choice preferences to a shortest path problem on a cyclist preference graph G = (V, E) with N = |V | nodes (intersections) and M = |E| edges (street segments).We derive the preference graph G from the physical street network G street .Both graphs share the same set of nodes V .Each edge e ij ∈ E in the cyclist preference graph represents a street segment that connects intersections i, j ∈ V and is assigned a perceived distance Here, l street ij denotes the physical length of the corresponding street segment e street ij in the street network and p ij ∈ {p B ij , p 0 ij } is the penalty factor summarizing cyclists preferences against riding along a street segment e ij .The set of street segments equipped with bike paths, E B ⊆ E, contains street segments e ij ∈ E B without distance penalty, p B ij = 1.Street segments not in this set, e ij / ∈ E B , have penalty factors p 0 ij > 1.The value of these penalty factors p 0 ij may depend on different characteristics of the individiual street segments, representing the perceived safety or convenience.
Adopting this perspective of a cyclist preference graph, we take cyclists to choose their route based on the shortest path Π * i→j = argmin [L i→j (Π i→j )] between their origin and destination, minimizing the perceived trip distance over their potential paths Π i→j .Effectively, cyclists choose the most direct path to keep the physical distance of their trip as small as possible but accept detours to avoid busy streets and use bike paths or low-traffic residential streets as alternative routes (Fig. 1).This simplified route choice model enables efficient calculation of route choice decisions, in particular compared to more complex stochastic models [51,54,55].To illustrate the concept, we focus here on the effect of street type and take the penalties p 0 ij of a street segment to depend on the volume of car traffic on the respective segment, with penalties being higher the larger the car traffic volume (i.e. the lower the perceived safety or convenience), see Methods for details.In principle, the approach can be extended to include additional factors such as (left) turns and crossings by appropriately modifying the cyclist preference graph (e.g.adding additional edges with a penalty for left turns) or even more complex route choice models or heterogeneous preferences among cyclists [43].
FIG. 1. Cyclists' route choices trade speed for safety.Cyclists choose their routes to achieve a short distance and a high safety, potentially avoiding busy streets without a bike path in favor of a longer route with dedicated cycling infrastructure.We model cyclists' route choices as a shortest path problem in a cyclist preference graph [Eq.( 2)]: Street segments eij are assigned an effective distance lij = l street i,j pij combining their physical length l street ij and a penalty factor pij ≥ 1 summarizing their perceived safety.(a) If all major streets (thick edges) are outfitted with dedicated bike paths (blue), cyclists choose the most direct route (1, solid black arrow) from their origin (pin) to a destination (flag).(b) If only some major streets are equipped with a bike path, cyclists avoid busy roads without a bike path (thick gray) and may prefer a short detour (2).(c) If none of the streets have dedicated bike infrastructure, cyclists balance the distance and safety of their route choices and may prefer long detours via low-traffic residential streets (thin gray, 3) compared to more direct routes with high car traffic (dashed black).

Network generation
We describe the bike path network of a city as a subgraph G B = (V, E B ) ⊆ G of the city's street network where each street segment e ij ∈ E may either be equipped with a bike path, e ij ∈ E B , or not, e ij / ∈ E B .Even in this simple binary model, the number of possible bike path networks G B scales exponentially with the number M of edges in the street network since each street segment may be equipped with a bike path or not (thus there are 2 M possible subgraphs).Testing all of these networks is impossible for real-world cities in reasonable time.Recent approaches utilize forward network percolation models to construct bike path networks [39,41] or apply percolation models to a fixed cyclist flow [40] to find efficient bike path networks.
Here, we employ a complementary approach, following the idea or pruning links from a network, previously employed in network community detection algorithms [56] and for studying the structure of aviation networks [27].Specifically, we create a sequence {G B (M )} M of bike path networks where M ∈ {0, 1, . . ., M } street segments are outfitted with a bike path (see Fig. 2): We start from an optimal bike path network G B (M ) = G where every street segment is equipped with a bike path, E B (M ) = E, such that there is no penalty for any street segment, p ij = p B ij = 1 for all edges.We then compute the route choice decisions of the cyclists in their preference graph G as described above based on their demand distribution n i→j .Here, n i→j denotes the number of cyclists traveling from node i to j.To construct the family of bike path networks, we one by one remove the least important bike path e * ij (M ) from the network, We quantify the importance of a bike path e ij ∈ E B (M ) in the current state of the bike path network (with M remaining bike paths) as the product p 0 ij n ij (M ) of penalty p 0 ij if the street had no bike path and the number of current users of that street segment n ij (M ).The product represents the graph-theoretical weighted betweenness centrality of the edge in the cyclist preference graph.This approach minimizes the negative impact of each removed bike path on the perceived distance of the cyclists in the current bike path network.After each change of the cyclist preference graph G, we update the route choice decisions of the cyclists, ensuring that the algorithm continually adapts to the cycling demand given the currently available set of bike paths E B (M ).For example, it keeps bike paths that may not be important in the perfect network if cyclists start to use them more heavily as other bike paths are removed.The process terminates with an empty bike path network G B (0) = (V, ∅) once all bike paths have been removed.
In contrast to iteratively adding bike paths to an initially empty graph and building on the suboptimal cycling routes in networks with few bike paths, this procedure creates bike path networks adjusted to the ideal cycling conditions.
For example, instead of constructing bike paths in residential areas with a high number of cyclists because large streets are not yet outfitted with bike paths, it keeps large streets equipped with bike paths in the first place and would only remove bike paths from segments of large streets if they are not important for a direct trip for many cyclists.
Inputs to our algorithm are (i) the street network G street , (ii) the penalty factors p 0 ij for each street segment not equipped with a bike path, (iii) the demand distribution n i→j , and (iv) the cyclists' route choice model.These parameters may either be as-is empirical values or planned or desired ideal values (e.g.describing the desired or predicted demand of cycling usage in a city).The latter application might be particularly relevant for planning bike path network extensions if urban quarters develop or are repurposed.
For the computational runtime of the network generation, see Appendix.We first remove all unused bike paths that do not affect the cyclists, p 0 ij nij = 0, leaving us with the smallest subgraph GB(M0) that still optimally serves the given demand.(iii, iv) We then one by one remove the least important edges, defined by the smallest product p 0 ij nij of penalty factor and number of cyclists using the bike path, recording one network GB(M ) for each number M of bike paths.(v) The algorithm terminates with an empty bike path network GB(0) once all bike paths have been removed.Upon removal of a bike path from a street segment, we update the routes of all cyclists who used the removed bike path and update the importance rating pij nij such that we always compute the importance of a bike path with respect to the cycling usage in the current bike path network.

Application
We test the proposed algorithm with data from two German cities, Dresden and Hamburg (see Fig. 3).As input data we take the street network of both cities from OpenStreetMap (OSM) [57], including the classification of the streets as a proxy for their expected traffic load, and data from local bike sharing services to model the cycling demand.We fix the penalty factors compared to physically protected bike path infrastructure based on the street type classification decoded in OSM, assuming street types to be a proxy for the traffic load on a street.See Methods for a detailed description of the data.
The two cities are representatives of two archetypes of local demand constellations: spatially homogeneous all-to-all and confined few-to-few demand.Bike sharing usage patterns in Hamburg indicate a local demand structure referring to the first archetype (see Fig. 3c,d).Corresponding data for Dresden hint at the latter archetype, reflected by strong dominance of trips between university and main train station (see Fig. 3a,b).

Algorithmic generation of bike path networks
We generate families of bike path networks {G B (M )} M for both cities.As a comparison we chose a network where all primary and secondary (P+S) street segments (as per their classification in OSM) are equipped with bike paths.We compare this network to our generated network with the same total length Λ(M ) = e∈E B (M ) l street e of bike paths such that Λ(M ) = Λ P+S .Taking the cost for installation and maintenance of the bike path network proportional to its length, we thus compare networks for the same budget.Due to some antiparallel one-way streets, our algorithm may place slightly more bike paths than effectively exist in the primary and secondary network.Since we assume bidirectional paths, our algorithm may equip only one of the antiparallel streets with a bike path instead of both as in the P+S network.
Figure 4 illustrates both types of networks for Dresden and Hamburg.The network generated by our algorithm largely coincides with the primary and secondary roads due to the high penalty if bike paths were removed.However, we observe strong differences in the density of the bike path coverage.Especially in Dresden, the resulting bike path network is much denser along the central north-south axis of high station density and bike-sharing usage, indicating that our algorithm correctly adapts the network to the input demand conditions (compare Fig. 4c).The differences for Hamburg are smaller due to the comparatively homogeneous demand across the city, though our algorithm introduces bike path shortcuts through residential areas in cases of high demand or to connect stations to the bike path network.The network generated by the proposed algorithm largely coincides with the primarysecondary-network (orange edges in panel c, f).However, it more accurately reflects the input demand structure, keeping also highly used tertiary or residential streets equipped with bike paths and exhibiting a higher density of bike paths in high-demand areas.This is particularly visible by the concentration of bike paths along the central areas with high station density in Dresden.The differences are smaller in Hamburg due to the more homogeneous demand structure.
To quantitatively compare the bike path families for both cities, we normalize the length of bike paths λ = Λ(M )/Λ(M 0 ) with respect to the length Λ(M 0 ) after removing all unused bike paths (compare Fig. 2b).We define the total perceived distance of all trips in the cyclist preference graph as with L i→j (Π, λ) = e∈Π l e (λ) [compare Eq. ( 2)].Here l e (λ) denotes the effective length of the street segment e in the cyclist preference graph G given a set of bike paths E B (M ) with normalized length λ, i.e. including penalties only for those streets where we have removed the bike path.Π * i→j (λ) denotes the shortest path in this cyclist preference graph and thus the route chosen by cyclists going from i to j.To compare the total perceived distance across both cities, we measure the overall performance b(λ) of the resulting network as the bikeability where we again normalize the absolute values to the best case (λ = 1) and worst case (λ = 0) scenarios.b(0) = 0 describes the network with no bike paths and b(1) = 1 is the optimal network with bike paths along all shortest paths.We remark that our definition of bikeability differs from previous measures of bikeability [60] in that it quantifies the efficiency of the bike path network with respect to a specific demand distribution.The total difference between the physical trip length of cyclists and the direct shortest paths is only of the order of 10%, consistent with the empirical observations of cyclists' route choice behavior [42,43].Fig. 5 illustrates the bikeability across the generated sequence of bike path networks.Interestingly, already a small fraction of bike paths with a small relative length λ > 0.1 is sufficient to achieve more than 50% of the maximal bikeability in both cities.The larger area under the bikeability curve for Dresden compared to Hamburg is consistent with the differences in the demand structure between the two cities: we achieve a faster improvement in Dresden due to the more concentrated demand distribution whereas we have to cover most of the city in Hamburg due to the more homogeneous demand.For a brief overview of the bikeability for 12 additional cities, see Fig. A1.
A comparison with the bikeability of the primary-secondary bike path network with the same relative length λ P+S of bike paths highlights the better adaptation to the demand structure in our algorithm.The bikeability is already high when all large roads are equipped with bike paths, about 0.87 for Dresden and 0.82 for Hamburg.Yet, our algorithm manages to further increase this value to about 0.97 for Dresden and 0.95 for Hamburg (capturing more than 70% of the remaining potential of an optimal network b(1) = 1).Moreover, by adjusting the network to the route choice behavior, cyclists keep to streets equipped with bike paths for more than 89% of their total trip distance, compared to only about 60% in the primary-secondary network (see Fig. 5b and d).A negligable but non-zero fraction of the distance is cycled on tertiary and secondary streets without a bike path.For a comparison to static percolation approaches, see Appendix.

Impact of demand structure
We attribute the difference between the two cities in the above analysis to the structure of the bike-sharing demand distributions.To quantify the impact of the demand structure on our bike path network families and their bikeability curves, we compare the previous results to synthetic bike path networks for homogenized demand.We create these homogeneous demand settings by first distributing demand equally between all stations and then distributing the stations as equidistantly as possible in the street network (see Fig. 6a and Methods).
Comparing the bikeability curves b(λ) and b hom (λ) in the empirical and the homogeneous demand settings, respectively, we find a comparatively large difference for Dresden and a much smaller difference for Hamburg (Fig. 6b,c).We quantify these differences by the area between the two bikeability curves, describing the impact of the patterns and the structure in the station and demand distribution on the bikeability (β hom ≈ 0.015 for Dresden, β hom ≈ 0.007 for Hamburg, compare Fig. 6).This confirms our above analysis that the heterogeneous, centralized demand and station distribution in Dresden enhances the bikeability as fewer streets have to be equipped with bike paths to cover a large fraction of the total demand,  4)], increases quickly as the length of bike paths in the network grows.In contrast, the relative cost of the network, taken to be proportional to the total length of bike paths, increases linearly.Even a low density of bike paths λ > 0.10 increases the bikeability to b(λ) > 0.50, with a larger effect of a small fraction of bike paths in Dresden.Equipping only the largest streets (primary and secondary, blue circle in panels a and c, bP+S = 0.87 for Dresden and bP+S = 0.82 for Hamburg) already achieves a substantial bikeability due to avoiding high penalties of these streets.Our demand-efficient bike path networks close more than 70% of the remaining gap to the best possible bikeability (if all streets are equipped by bike paths) at the same cost by adapting the bike path network to the input demand, achieving b(λP+S) = 0.97 for Dresden and b(λP+S) = 0.95 for Hamburg.(b, d) Fraction of total distance traveled on streets with and without bike path in networks with bike paths with a relative length λP+S and the primary-secondary (P+S) comparison network.Adapting the network to the demand structure achieves over 89% of the distance traveled on bike paths due to equipping also smaller streets used by many cyclists with dedicated bike infrastructure (compare Fig. 4).For our algorithm, a negligible fraction of the total distance is cycled on tertiary and secondary roads without a bike path (not visible in the bar chart).
while there is a significantly smaller effect in Hamburg.A similar approach may be used to quantitatively compare the impact different street networks, different types of cycling demand, or different desired demand distributions may have on the resulting bike path networks.

DISCUSSION
Promoting cycling as a way to improve the sustainability of urban mobility is a complex problem.The attractiveness of cycling depends on the available infrastructure and safety of the trips, alternative mobility options, other mode choice decisions influencing the amount of car traffic, as well as aspects like topography and weather [35,61,62].
Existing approaches to study bike path networks focus on different properties and rely on various types of input data.Using only existing bike paths as input, [39] focuses on the structural connectivity of these networks by linking the fragmented components without accounting for demand.Taking as input a qualitative demand distribution in the form of (artificial) points of interest, [41] considers network connectivity and physical shortest path routing to grow bike path networks without accounting for different types of streets or the route choices of cyclists.Building on empirical demand data and a detailed but static route choice model in an existing network, [40] considers only the number of cyclists on each street segment (compare Fig. A2), without accounting for route choice changes as the network grows or for different penalty weighting across different street types.
We have introduced an adaptive percolation framework to generate families of bike path networks that includes cycling demand as well as adaptive route choices of cyclists as the network changes by using a simplified, penalty based route choice model [42,43].Compared to more abstract percolation models, our approach trades computational speed for the explicit inclusion of cyclist demand.Compared to more detailed models, we trade accuracy of the route choice model for the ability to adaptively adjust route choices as the network evolves.The resulting bike path networks highlight that most of the potential effect of bike paths on cycling quality may be achieved already with a small investment in cycling infrastructure.Moreover, the framework enables us to quantify the impact of the network topology and demand distribution by providing a direct way to compare the resulting networks in different settings [35,63].

FIG. 6.
Bikeability differences quantify the importance of demand structures.(a) Illustration of the demand homogenization for Hamburg.Starting from the empirical demand (i), we create uniform demand between all stations (ii) and then distribute the stations approximately equidistantly across the city (iii).(b, c) Comparison of the bikeability from the empirical and the homogeneous demand data for Dresden and Hamburg, respectively.The comparatively large area between the bikeability curves of empirical and homogeneous demand in Dresden [β hom ≈ 0.015, compare Eq. ( 5)] suggests a large effect of the more localized demand distribution, making it easier to create an efficient bike path network (compare Fig. 4).For Hamburg, we find a two times smaller change (β hom ≈ 0.007) confirming our earlier observations that the empirical demand distribution is already largely homogeneous across the city.
Similar network pruning or inverse percolation techniques, as for cascading failure models [64,65], have previously been applied to understand the structure of transportation networks and their robustness [27,29].The approach may thus find applications in designing and analyzing infrastructure and transportation networks also beyond cycling.Combining the suggested approach with additional optimization steps, for example using successive addition and removal of individual bike paths or simulated annealing techniques [25,66,67] to explore the vicinity of networks constructed by our greedy approach, may further improve the quality of the resulting networks.
The proposed framework relies on several types of input, all with potential limitations in terms of data quality, modelling accuracy, and interpretability of the results.However, the framework is highly adaptive and can easily be extended to overcome these challenges provided more detailed input data is available.
Firstly, the quality and type of input data is critical for the resulting networks and their interpretation.Available street network data is mostly of high quality (see Methods) and even existing bicycle infrastructure may be included in the framework by preventing the removal of bike paths from specific street segments in the network.However, the resulting bike path networks have to be interpreted in the context of the demand input (compare our results for Dresden).For example, the empirical bike sharing demand used to illustrate the framework may be strongly influenced by the currently (non-)existing infrastructure and the type of users of the service, thus skewing the generated networks to further improve already efficient parts of the network.At the same time, the framework is not limited to empirical demand data.Constructing efficient networks for desired and predicted demand may help guide extensions of bicycle infrastructure networks by suggesting efficient network structures [4,40].Combining full mobility demand with a suitable mode choice model may even enable us to capture effects of induced additional demand when sufficient infrastructure is provided [55,68].
Secondly, the framework relies on a simplified route choice model to enable fast computation by mapping the route choice of cyclists to an effective shortest path problem.We illustrated the framework with an effective network capturing only the effect of car traffic volume on cyclists route choice.A more detailed definition of the penalties, including additional deterrents such as slopes and (left) turns, may improve the accuracy of the route choice model.Additionally, explicit safety considerations such as accident risk may be included in the penalties as proposed in [69], enabling more accurate quantification of the actual safety in addition to the perceived safety.A more accurate representation of cyclist route choice behavior and heterogeneous preferences among cyclists, as assumed in common probabilistic route choice models, may be indirectly possible by considering multiple types of cyclists and creating a cyclist preference graph with appropriate penalties for each user type.
All of these potential extensions naturally require more details in the input data, such as information on traffic signals, street quality, or expected driving behavior for car traffic across the street network.Recent contributions to the data-driven analysis and planning of cycling infrastructure and route choice as well as data collection methods are essential to establish a foundation of input data and ensure reliable results and predictions [39][40][41].While eventually first-hand on-site experience and detailed case-by-case modelling must determine the sensibility and feasibility of the suggested networks, with sufficiently accurate input data our framework may provide scenarios for efficient bicycle infrastructure networks, helping to guide planned extensions of existing infrastructure networks [4,40].Our framework may thus complement current urban planning approaches [36] by (i) helping to develop a more detailed understanding of the theoretical properties of efficient bike network structures across cities and (ii) offering a baseline of an efficient network to develop a more detailed long-term strategy to expand bicycle infrastructure.
Overall, the framework presented in this article may enable quantitative analysis of bike path networks with a large range of tools from network science by providing a way to quickly generate and compare families of efficient bike path networks in different settings and under different conditions.

Street networks
We download physical street networks for Hamburg and Dresden from OpenStreetMap [57,70].Although OSM data is crowdsourced, it is of high quality in developed countries, especially in Western Europe [71].For other regions of the world, OSM is sometimes the only feasible source of data [72].
For both cities, we restrict ourselves to the area covered by the local bike-sharing schemes.We exclude city peripheries that are either sparsely populated with low density of bike sharing stations or a long distance from the city center.This results in a reasonably bikeable area of approximately 65 km 2 (Dresden) and 49 km 2 for Hamburg (Fig. 3).
We simplify this raw street networks by merging nodes within a radius of less than 35 m (e.g.simplifying the detailed structure of intersections), and placing the resulting aggregated node at the centroid of their former position [70].Finally, we discard bike inaccessible roads based on the OSM street classification hierarchy [73], in particular edges labeled as 'motorway', 'motorway_link', 'trunk', 'trunk_link', describing highways or high-speed motorways where cycling is not possible.
Based on the remaining nodes and edges (see Fig. 3) we create the physical street network G street by assigning each street segment a length l street ij corresponding to its physical length in the OSM data.

Street size classification
To fix the penalty factors in these networks without detailed information on traffic volume, we rely on the street type classification decoded in OSM as a proxy for the traffic load.Within the OSM-category of car-accessible streets, we use OSM's classification hierarchy into 'primary', 'secondary', 'tertiary', or 'residential' streets, replacing link street types with their corresponding normal street types, e.g.'primary_link' with 'primary.Street segments not labeled with one of the four aforementioned classifications, will be assigned the 'residential' status, as most other OSM classifications are reserved for small streets, e.g.'living_street'.In case of ambiguity about the street segment length or street type, we always choose the first value in the list of the OSM data.
We assume that the expected traffic load and thus the corresponding penalty factor p 0 ij monotonically increases from residential to primary roads (Tab.I).Based on this input, we construct the cyclist preference graph G with the perceived edge lengths l ij = p ij l street ij [Eq.( 1)].The penalty factors p 0 ij quantify the trade-off between the distance a cyclist is willing to ride along a street with a bike path in order to avoid a specific street segment without bike path.To illustrate our framework, we take penalty values representing the perceived distance compared to physically protected bike paths as they are the safest option for cyclists.However, the penalties can be adapted to represent other types of bike path implementations.We employ penalty factors as estimated in Ref. [43]; the authors associated different penalties with different properties of the route and street segment by contrasting actually chosen bike routes with possible alternatives in a logit route choice model.We take the penalty factors representing accepted detours for streets with more than 30k vehicles per day, 20k to 30k vehicles per day and 10k to 20k vehicles per day, respectively.Due to lack of detailed information on traffic volume, we directly match these penalties to the OSM street types (see results in Tab.I).For 'residential' street segments, we add a smaller penalty factor based on the other three values.These values serve as illustrative examples of the influence of car traffic and may vary depending on the location, trip purpose, bicycle infrastructure, or for individual cyclists.I. High traffic volume streets are perceived longer by cyclists.Depending on the OSM street type classification hierarchy for street size, we determine cyclists' perceived street segment length loosely based on empirical length penalty factors [43].

Bike sharing demand data
We take demand data from local bike sharing services in Dresden and Hamburg as demand input for the algorithm (Fig. 3).For both cities, we map the bike sharing stations to their respective nearest node in the street network and obtain the origin-destination resolved demand statistics by counting the overall number of trips n i→j made throughout the entire observation period per pair (i, j) of stations.To quantify the total usage of each station, we compute the sum of bike rentals and returns at the station (compare Fig. 3b,d).The two datasets represent two archetypes of local demand constellations: confined few-to-few demand in Dresden (Fig. 3a,b) and spatially homogeneous all-to-all demand in Hamburg (Fig. 3c,d).

Dresden
Dresden's local bike-sharing scheme operated on a combined station-based and free-floating mode during the observation period.While bikes could be rented or returned on an as-needed basis within a pre-defined area in the inner city center, they needed to be rented from and returned to one of 159 stations outside the free-floating zone [58].
To estimate the local bike demand we use a proprietary dataset of approximately 440,000 bike-sharing trip records conducted by students of the local universities between November 2017 and March 2020, except February and September 2018, accounting for about 80% of all trips of the service [58].The dataset contains, among others, information on trip origin and destination if the trip started or ended at a station as well as pickup and drop-off timestamps.The dataset does not contain positional information on trips conducted in free-floating mode.
To be able to fix the demand distribution to nodes in the street network, we exclude trips for which no origin or destination information is available (for example trips starting or ending in the free-floating zones).Furthermore, we exclude 9 stations distant from the city center and thus not included in the core polygon illustrated in Fig. 3a, leaving approximately 163,000 trip records for the demand analysis.The remaining 150 stations are mapped to 142 nodes of the street network G (8 stations are mapped to the same node as another station, e.g. two stations on two sides of a large street crossing).

Hamburg
In 2017, Hamburg's station-based bike-sharing scheme operated 206 stations of which 129 were distributed in the core city (see Fig. 3b).Between January 2014 and May 2017 the service facilitated approximately 8.6 million rides for which detailed trip information is publicly available [59].The data contains, among others, information on trip origin and destination station, pickup and drop-off timestamps, as well as user or bike-related information.
We again exclude trips where no origin or destination information is available as well as trips which start and end at the same station, leaving about 6.4 million trips in our region of interest (approximately 74% of all trips).After mapping the 129 stations to the street network G, we keep 127 unique locations (2 stations are mapped to the same node as another station).

Homogenized Demand
To quantify the impact of the demand distribution on the bikeability, we compare our results for the empirical demand distribution with results for homogenized demand distributions.We generate these randomized comparisons in three steps: (i) create approximately homogeneous demand and station distribution, (ii) generate bike path ensembles for ten realizations of the demand and station distribution, (iii) average the bikeability results from the different realizations.
We create these homogeneous demand settings by first distributing demand equally between all stations, setting n (hom) i→j = 1 for all bike sharing station pairs i, j with i = j.Second, we distribute the stations as equidistantly as possible in the street network.To achieve this station distribution, we create a triangular lattice in the polygon of the physical street network with a slightly higher total number of lattice points.We then map each lattice point to the closest node in the underlying street network G and delete excess points starting with those lattice points whose position in the triangular lattice is furthest from its corresponding node in G until we are left with the same number of nodes as station in our original data (Fig. 6a).
We create bike path networks as described above, compute the resulting bikeability and other measures, and average them over ten realizations of random homogeneous station distributions.

APPENDIX Demonstration for additional cities
Applying our algorithm to 12 additional cities (see [59,[75][76][77][78][79][80][81][82][83] for the underlying data), we find qualitatively the same results for all cities.Bikeability quickly increases with a small fraction of bike paths for all cities (see Fig. A1).Differences between the bikeability curves of the cities stem from the different demand distributions and number of stations in the available bike-sharing data used as demand input for the network generation.Additionally, the size of the network and potentially inconsistent classification of the streets in Open Street Map across different cities may also affect the algorithm.A more detailed analysis of all these factors would be required to accurately contextualize the results for each city.
We especially note that directly comparing the bikeability of different cities is not straightforward.Since the bikeability measures the normalized improvement from the worst network state (without any bike paths) to the optimal network state, high bikeability may mean different things.Bikeability may be high, because the network is very bikeable, e.g.due to very concentrated demand requiring few bike paths, such as along the North-South axis of Manhattan.However, it may also mean a very non-bikeable network in the absence of a bike path network and thus a proportionally higher increase as bike paths are added (e.g.Chicago).An accurate interpretation of the bikeability measure thus requires the context of the street network and the demand.

FIG. A1.
Fast improvements of bikeability across cities.The bikeability b(λ) shows a qualitatively similar behavior across 14 different cities.In all cities, the dynamic percolation framework creates large improvements in bikeability with relatively few bike paths (compare Fig. 5 in the main manuscript).The differences in bikeability of the cities likely result from a variety of factors, including the demand distribution or size and topology of the network, required to accurately contextualize the results for each city (compare the detailed discussion for Hamburg and Dresden in the main manuscript).

Runtime
The runtime of the algorithm critically depends on the demand distribution and size of the street network covered by the demand.The more unique trips are driven, the slower the computation since more different shortest path have to be recomputed in each step.Note, however, that we only recompute shortest paths of cyclists travelling along a bike path that was removed in the current step.Similarly, the size of the covered network in terms of the number of edges directly affects the complexity of the shortest path computation and the number of bike paths that have to be removed in total.Consequently, the larger the covered network, the longer the computational time.
Hamburg A full run for Hamburg takes approximately 14 minutes with the empirical data (15911 unique trips) and the network as shown in the main manuscript.For the homogeneous demand, the full simulation is slightly slower and takes approximately 15 minutes due to 16002 unique trips of the all-to-all demand with the same network.The difference is small since the empirical demand for Hamburg is already close to all-to-all demand.
Dresden A full run for Dresden takes approximately 14 minutes with the empirical data (13254 unique trips) and the network as shown in the main manuscript.For the homogeneous demand, the full simulation is significantly slower and takes approximately 29 minutes for the same network.Here, the number of unique trips strongly increases with all-to-all demand to 20022 unique trips.
Hardware The specified runtimes were achieved on a consumer laptop with an Intel ® Core™ i5-10210U.

Comparison to static percolation approaches
Existing static percolation approaches remove bike paths based on a fixed ordering from a snapshot of the street segment importance for the initial, complete bike path network G B (M ), starting with the least to most important bike path in the initial setting.Here we chose two different importance measurements: (i) the same importance measurement as explained in the manuscript given by the product p 0 ij n ij (M ) of penalty p 0 ij if the street had no bike path and the number of users of that street segment n ij (M ), and (ii) solely the number of users of that street segment n ij (M ).
For the analysis of the static percolation approach we use the same concept as for our dynamic approach to enable a direct comparison.For each bike path network G static B (M ) we calculate the chosen routes based on our cyclists route choice model and calculate the resulting observables such as the bikeability b(λ) and the fraction cycled on a street without a bike path.
The dynamic network generation framework introduced in the manuscript generates only slightly more bikeable networks compared to penalty-weighted static percolation (see Fig. A2).Differences between both approaches would likely increase for more diverse demand distributions with more origin and destination locations and more complex route choice models including additional aspects such as left turns.Beyond this small increase in network efficiency, and more importantly, our framework opens up a new perspective on bike path network generation by including a flexible model of cyclist route choice behavior.It thus enables fast generation and testing of bike path network structures bridging the gap between static percolation approaches and complex real-world bike path network planning.
FIG. A2.Dynamic network generation framework creates highly bikeable networks.Comparison between the dynamic framework introduced in the main manuscript (blue) and static approaches based on the same importance measurement (orange) or pure user numbers (green) for the empirical bike-sharing demand in Hamburg (compare Fig. 5 in the main manuscript).The pure user number based measurement is comparable to the approach in [40].(a) The dynamic approach generates network with slightly better bikeability b(λ) compared to (penalty-weighted) static percolation.These improvements are better visible in terms of the relative bikeability b dynamic (λ)/bstatic(λ) (inset).(b) As for the bikeability, penalty-weighted approaches yield better networks that reduce the perceived distance for cyclists.The inset shows the relative perceived distance L dynamic (λ)/Lstatic(λ).(c) All approaches significantly reduce the fraction cycled on streets already with few bike paths.The static approach considering only the number of cyclists using each street segment performs slightly better than the other two, however, no distinction is made between the traffic load of the streets cyclists have to travel on.

FIG. 2 .
FIG. 2. Constructing a sequence of efficient bike path networks.(a) Block diagram of the algorithm.(b) Illustration of different bike path networks GB(M ).(i) We start from a full bike path network GB(M ) = G, where every street segment of the network G is equipped with a bike path (M = M , blue).(ii)We first remove all unused bike paths that do not affect the cyclists, p 0 ij nij = 0, leaving us with the smallest subgraph GB(M0) that still optimally serves the given demand.(iii, iv) We then one by one remove the least important edges, defined by the smallest product p 0 ij nij of penalty factor and number of cyclists using the bike path, recording one network GB(M ) for each number M of bike paths.(v) The algorithm terminates with an empty bike path network GB(0) once all bike paths have been removed.Upon removal of a bike path from a street segment, we update the routes of all cyclists who used the removed bike path and update the importance rating pij nij such that we always compute the importance of a bike path with respect to the cycling usage in the current bike path network.

FIG. 3 .
FIG. 3. Street networks and bike sharing demand in Dresden and Hamburg.(a) Street network (gray lines), bike sharing station locations, and station activity (circles) in Dresden between November 2017 to March 2020 [58].(b) Distribution of station usage, measuring the combined number of in-and out-going trips per station, in Dresden.Bike sharing usage is strongly heterogeneous, dominated by two heavily used stations (pink) along the north-south axis between the central train station (center) and the university campus (south).Station density reflects this usage pattern and is highest in the central city (north/center) and near the university campus (south).(c) Street network (gray lines), bike sharing station locations, and station activity (circles) in Hamburg between January 2014 to May 2017 [59].(d) In Hamburg, the station activity distribution is homogeneous across a broad spectrum of total number of trips.This homogeneous usage is also reflected in a more homogeneous distribution of bike sharing stations, which is slightly denser only in the inner city (south).

FIG. 4 .
FIG. 4.Demand-efficient bike path networks.(a-c) Dresden, (d-f) Hamburg.Panels a and d show the networks generated by the algorithm with a total length Λ(M ) = ΛP+S.Panels b and e show networks with the same total length if only the primary and secondary streets (as per their OSM classification) are equipped with bike paths.Panels c and f show a comparison between both networks.The network generated by the proposed algorithm largely coincides with the primarysecondary-network (orange edges in panel c, f).However, it more accurately reflects the input demand structure, keeping also highly used tertiary or residential streets equipped with bike paths and exhibiting a higher density of bike paths in high-demand areas.This is particularly visible by the concentration of bike paths along the central areas with high station density in Dresden.The differences are smaller in Hamburg due to the more homogeneous demand structure.

FIG. 5 .
FIG. 5. Demand-driven design of bike path networks improves bikeability.Resulting bikeability for (a, b) Dresden and (c, d) Hamburg as a function of the fraction of street segments equipped with bike paths.In both Dresden (a) and Hamburg (c), the bikeability b(λ), quantified via the normalized effective distance of routes in the cyclist preference graph [Eq.(4)], increases quickly as the length of bike paths in the network grows.In contrast, the relative cost of the network, taken to be proportional to the total length of bike paths, increases linearly.Even a low density of bike paths λ > 0.10 increases the bikeability to b(λ) > 0.50, with a larger effect of a small fraction of bike paths in Dresden.Equipping only the largest streets (primary and secondary, blue circle in panels a and c, bP+S = 0.87 for Dresden and bP+S = 0.82 for Hamburg) already achieves a substantial bikeability due to avoiding high penalties of these streets.Our demand-efficient bike path networks close more than 70% of the remaining gap to the best possible bikeability (if all streets are equipped by bike paths) at the same cost by adapting the bike path network to the input demand, achieving b(λP+S) = 0.97 for Dresden and b(λP+S) = 0.95 for Hamburg.(b, d) Fraction of total distance traveled on streets with and without bike path in networks with bike paths with a relative length λP+S and the primary-secondary (P+S) comparison network.Adapting the network to the demand structure achieves over 89% of the distance traveled on bike paths due to equipping also smaller streets used by many cyclists with dedicated bike infrastructure (compare Fig.4).For our algorithm, a negligible fraction of the total distance is cycled on tertiary and secondary roads without a bike path (not visible in the bar chart).