Urban planners and public health officials are increasingly investing in cycling infrastructure to promote sustainable transportation and improve population health. However, the uneven distribution of biking amenities - such as varying quality bike lanes, shared-use paths, and bike-share stations - is problematic as it may exacerbate existing health disparities. This project examines the local relationship between cycling infrastructure and usage and their impact on health outcomes, aiming to understand how access to cycling resources influences community well-being.
Viewable at: https://pooley3100.github.io/cycling-medsat/
To test the software without having to run QGIS, the files for Sheffield are provided
- Ensure working directory set to within cycling-medsat-main
- Run run.py and can delete Score Scripts/SheffieldDatasets/Sheffield_msoa_scores.csv to see score re-creation, will need ODWP01EW_MSOA (see point 3 To Run) downloaded however for commute path score.
To use run.py, this should run the user through the steps required to creat a cycling & health map for the region
- QGIS: https://qgis.org/
- MedSat point_data folder: https://dataserv.ub.tum.de/index.php/s/m1714817.rep and replace in MedSat/point-data folder
- Origin Destination Census Data: https://www.nomisweb.co.uk/sources/census_2021_od, file OODWP01EW, unzip then place ODWP01EW_MSOA.csv in the folder Score Scripts/Commute Route/
- Venv with requirements.txt
- Running Overpass turbo [https://overpass-turbo.eu/] on desired region (creating a BBOX boundary), potentially in sub boxes if big (i.e London) and adding the Region name to config.py with the path name to the folder with overpass geojson boxe(s) result in within the Datasets folder. Example can be seen Score Scripts/QueryManchesterOSM.txt for Overpass Script.
- Run.py <--- CORE
- Requires manually running OSM-Cycling-Quality-Index [https://www.osm-verkehrswende.org/cqi/] (UK edited script)(REMOVE MPH MANUALLY) in QGIS, read README within file if needed from OSM-verkehrswende, script modified for UK but ALL Accreditation goes to osm-verkehrswende. Essentially download [https://qgis.org/], load OSM-Cycling-Quality-Index folder, then load cycling_quality_index.py into the QGIS python scripts editor, make sure way_import.geojson, with mph REMOVE with Ctrl+F, is in data folder of OSM-Cycling-Quality-Index, created by run.py is placed in data sub directory (create folder OSM-Cycling-Quality-Index/data if not present), then run the python file cycling_quality_index.py in QGIS. The result cycling_quality_index.geojson file now needs to be placed in {Region}Datasets/ folder.
- Creating {Region}MSOA.csv region file for desired region, this file is created but needs to be filled in by the user so the program knows which MSOA boundaries to include, look at other Dataset files for an idea. (i.e. LondonMSOA.csv)
- Scores should be created now and DONE, to visualise edit top of index.js to include new location front-end.
Results = msoa_scores csv file, medsat_msoa_scores.csv file. AND boundary output_jsons_msoa file with msoa broken down into way scores.
All scores are stored in msoa_scores.csv and then Z-based normalized are stored in msoa_scores_zscaled.csv for each dataset:
- Overall Cycle Score (OverallCycleScore) <-- Created in Score Scripts/OverallCycleScore.py
- Commuter Rate % <-- Created in Score Scripts/CommuteRate/CalculateCommuteMSOA.py
- Crash Rate <-- Created in Score Scripts/CrashRate/CalculateCrashMSOA.py
- CQI Threshold - % over 55 score (ScoreCQI) <-- Created in Score Scripts/CQI/AddMSOAtoCQI.py and added in Score Scripts/CQI/AddThresholdScores.py
- CQI Mean Score (ScoreCQIMean) <-- Created in Score Scripts/CQI/MSOAAverageCQIScore.py
- CQI Mean and weighted by road length (index_length) <-- Created in Score Scripts/SpaceSyntax and Length/spacesyntax.py and added in Score Scripts/SpaceSyntax and Length/updateMSOA.py
- CQI Mean weighted by space syntax (index_space_syntax) <-- Created in Score Scripts/SpaceSyntax and Length/spacesyntax.py and added in Score Scripts/SpaceSyntax and Length/updateMSOA.p
- CQI Mean weighted by space syntax and road length (CQI Space Syntax)(index_space_syntax_length) <-- Created in Score Scripts/SpaceSyntax and Length/spacesyntax.py and added in Score Scripts/SpaceSyntax and Length/updateMSOA.p
- Commute Path (commute_path)- Average CQI Space Syntax, Commute Rate, Crash Rate along most popular commute route <-- Created in Score Scripts/Commute Route/path.py
OME,anxiety,asthma,depression,diabetes,hypertension,opioids,total
London, Birmingham, Leeds, Liverpool, Sheffield, Manchester, Bristol
Where Region = i.e. London
- All cycling metrics are stored in Score Scripts/{Region}Datasets
- All Healh scores are stored in MedSat/{Region}
- All MSOA Street Level Scores are stored in Datasets/{Region}_cqi_jsons_msoa_REDUCED
- DescComp = more City wide average statistics
- CorrAnalysis = Pearson Correlations by City and All cities, plus predictor vs predictor analysis
- Regression = regressionSingle + regressionMultiple + plotCoef creates coefficient plot as seen in the paper figure 13
- Confound = correlations when median income of MSOA included.
