Giter Club home page Giter Club logo

quant_cycle_walk's Introduction

Repository description

Ivann Schlosser

Folder structure

The folder scripts contains all the main set of scripts to reproduce the results of the work on cycling networks for London. Some additional script used for analysis and post-processing are within the other folders dedicated to the analysis. The folder reproducibility contains a set of functions that run the scripts in the right order to reproduce the results. The are in a way ‘meta-scripts’ that call the scripts that actually contain the data engineering and analysis in the right order.

Reproducibility

Aiming to have a reproducible workflow, we provide the necessary to be able to reproduce as much as possible, given potential constraints related to data sharing and other computational limitations. After revisions, most of this work can be reproduced on an average power personal laptop.

Prerequisites

You will need recent versions of R (> 4.0.0) and python (> 3.8) for better results.

In order to set up and run this code, you need to first download the github repository. To do so, either manually, or open a terminal and run the following command:

git clone https://github.com/ischlo/quant_cycle_walk.git

Data

Due to it’s size, the data is stored separately and needs to be downloaded and added to the repository. The data can be downloaded from this dropbox. It contains copies of openly available data sets that were downloaded at the time of the work. The description in the data/ folder shows the original links from which the data can be downloaded if it is not generated by a script.

Network setup

The workflow is divided into 3 main parts, first the network set up, it uses data downloaded from OSM with the OSMNx package in python to get the network data. It will download 3 networks for the different profiles considered in this work: cycling, walking and all.

Run the following command in terminal to launch the network download process.

python3 /scripts/network/data_import.py

Or, using the provided data sets (pre downloaded, but in raw format.) run the network_setup.R from the reproducibility folder. It will set up already routable networks for all the profiles considered in the work.

Routing setup

The routing setup requires pre processing of the London MSOA data, we need to find the different centroids. Run area_setup.R from the reproducibility folder to do that. The routing process will take the previously produced networks, do some preprocessing on them, find the nodes from which the routing will be done, and generate distance matrices. It will also produce summary statistics of the networks.

Modelling setup

The spatial interaction model part of the work originally relied on a set of R functions to be run, but since then, a package was made that has an increased performance and allows to run these models on smaller machines quickly. The model outputs with both methods are the same. These changes have been incorporated since to allow for easier reproducibility. Run test_env.R to do the gravity models and analysis of this section. This will populate the directory with the outputs and results that are shown in the paper.

For any questions, bugs, additional info, do not hesitate to contact me directly.

Session info

Here is the basic information about the R it was last run on.

R.version
##                _                           
## platform       aarch64-apple-darwin20      
## arch           aarch64                     
## os             darwin20                    
## system         aarch64, darwin20           
## status                                     
## major          4                           
## minor          3.0                         
## year           2023                        
## month          04                          
## day            21                          
## svn rev        84292                       
## language       R                           
## version.string R version 4.3.0 (2023-04-21)
## nickname       Already Tomorrow

Additionally, the user can set up the environment with the package versions used with the renv::restore() command, assuming renv is installed.

Images

The images illustrate the number of users by transport mode at MSOA level. This work will focus on pedestrians and cyclists.

Transport usage distribution

Transport usage distribution

Example of paths from one point.

Example of paths from one point.

quant_cycle_walk's People

Contributors

ischlo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.