BikewaySim is a collection of open-source scripts and notebooks for helping cities, DOTs, MPOs, and/or advocacy groups assess the connectivity/bikeability impacts of new cycling facilities (bike lanes and cycletracks) through change in cycling impedance.
Cycling impedance measures the relative difficulty of cycling from point A to point B considering travel time, elevation/hills, exposure to automobile traffic, the presence of bicycle facilities, and other preferences that cyclists have for road attributes.
BikewaySim's cycling impedance model is trained on recorded cycling trips. The cycling impedance model can then be used to find the least cycling impedance route (Figure 1) between any two places (home to grocery, school to park, etc.). On its own, this model can be used by cities to help citizens find better cycling routes and encourage cycling.
Figure 1: Example of BikewaySim impedance routing (purple) and travel time only routing (black)When paired with BikewaySim's bicycle facility assessment framework (Figure 2), the cycling impedance model can be used to evaluate proposed cycling facilities using five metrics/visuals using the change in simulated impedance from the bicycle facilities. Cities, DOTs, MPOs, and/or advocacy groups can use the outputs of the framework to prioritize new cycling facilities accordingly.
Figure 2: BikewaySim bicycle facility assessment framework- Downloading and processing OpenStreetMap network data for bicycle routing using Geofabrik and OSMnx
- Conflating and reconciling attributes from other network sources to OSM
- Map matching cycling GPS traces to OSM using Leuven Map Matching
- Calibrating link and turn impedance functions for cycling using bicycling GPS traces or count data using stochopy
- Finding the least impedance route for selected or all-to-all O-D pairs given calibrated or custom link and turn impedance functions using NetworkX and rustworkx
- Using least impedance routes to generate five metrics for assessing the impacts of planned cycling facilities
BikewaySim is intended to work in the United States with minimal data as it pulls network data from OpenStreetMap and elevation data from USGS. However, it is highly recommended that you provide more detailed network attribute data and cycling GPS traces so that cycling impedances can be calibrated for your study area (as the default ones may not be applicable to your study area since they were calibrated for Atlanta, GA).
Required:
- A study area in shapefile, geojson, geodatabase, or geopackage format (bounding boxes also work)
- Cycling infrastructure improvements in shapefile, geojson, geodatabase, or geopackage format
Optional:
- Supplemental network attribute data from government, public, or private sources to be conflated to OpenStreetMap data (see Data Used for examples)
- Cycling GPS traces for calibrating cycling impedances
- Assuming that you have conda and git installed for your machine already
- Clone the repository into your desired directory
- Create a new conda environment named
bikewaysimusing theenvironment.ymlfile (make sure that you're in the directory with the .yml file)
conda env create -f environment.yml
- Activate the 'bikewaysim' environment
conda activate bikewaysim
- Change into the
BikewaySim/srcfolder on command line and install the development packagebikewaysim
pip install -e .
- Great! The main things should be installed! If you're having troubles with creating the environment, open the
environment.ymland try installing the packages one at a time in a new environment instead. - Most of the code is executed through Jupyter Notebooks which can be opened/run/edited through VS Code or Jupyter Notebook, just make sure the
bikewaysimenvironment is activated.
- Create a config.json file to define the project directory and various settings (e.g., desired projected coordinate system, supplemental data, etc.). See
example_config.jsonfor a template. - Create a new study area using GIS or bounding box or provide an existing one. Must be in
.geojson,.gpkg, or.shpformat. Place it in the root of the project directory.
- Download OpenStreetMap network data using step_0_download_process_osm.ipynb
- Continue running through each
.ipynbfile in thenetworkmodule in order until step_8_export_network.ipynb
- Run the notebooks
- Use the bicycle facilities module to add in bicycle facilities from other data sources and OpenStreetMap
- Run the notebooks in the bikewaysim_framework module to route cycling trips using default or custom impedance factors
- Clone the transit-routing submodule
- Open Simulating Bike-Transit Trips.ipynb and walk through the steps until a study area is generated
- Open Downloading_OSM.ipynb and use the generated study area to download OpenStreetMap network data
- Continue with Simulating Bike-Transit Trips.ipynb
- Open and follow the instructions to download OpenStreetMap network data
- Open Step_1 Network_Filtering_and_Processing.ipynb to process OSM into network graph format and identify link types
- Open Step_2_Network_Reconciliation.ipynb to finalize the network for routing
- Open Run_BikewaySim.ipynb to perform aggregated shortest path routing and output Geopackage files to visualize in GIS software
| Module | Description | Status |
|---|---|---|
| bicycle_facilities | Add supplemental bicycle facility data | working |
| bike-transit | Run aggregated bike-transit shortest path calculations | working |
| bikewaysim_framework | Run aggregated cycling shortest path calculations and create | working |
| map_matching | Map-match GPS trace data | working |
| impedance_calibration | Use map-matched GPS traces to calibrate link impedance functions | in development |
| network | Download OSM data and process for shortest path routing | working |
- Passmore, R., K., Watkins, and R. Guensler (2024). Using Shortest Path Routing to Assess Cycling Networks. Journal of Transportation Geography. DOI: 10.1016/j.jtrangeo.2024.103864
- Passmore, R., K. Watkins, and R. Guensler (2024). Assessing Bike-Transit Accessibility. Transportation Research Record. DOI: 10.1177/03611981241234902
- Passmore, R., K. Watkins, and R. Guensler (2024). Siumulating Bike-Transit Trips Through BikewaySim and TransitSim. National Center for Sustainable Transportation. DOI: 10.7922/G22R3Q0B
- Passmore, R., K. Watkins, and R. Guensler (2021). BikewaySim Technology Transfer: City of Atlanta Georgia. National Center for Sustainable Transportation. DOI: 10.7922/G2CF9NDV
BikewaySim was developed as part of Reid Passmore's Ph.D. dissertation. BikewaySim was developed with funding from the National Center for Sustainable Transportation and the Georgia Department of Transportation.
Reid Passmore, Ph.D. Candidate1
Fizzy Fan, Ph.D. Candidate1
Dr. Ziyi Dai,
Dr. Randall Guensler, Professor1
Dr. Kari Watkins, Associate Professor2
1School of Civil and Environmental Engineering, Georgia Institute of Technology
2School of Civil and Environmental Engineering, University of California, Davis

