Skip to content

CityChrone/public-transport-analysis

Repository files navigation

DOI

Public Transport Analysis

Urban Public Transport Analysis.

This repository hosts a Jupyter notebook along with all requisite libraries to conduct analyses similar to those showcased on the CityChrone platform. It also includes resources necessary to integrate new cities into the CityChrone platform.

Explore the demo notebook featuring an analysis for the city of Turin.

Image of Budapest

Prerequisites

To utilize this repository, ensure you have the following installed:

  1. Python 3.x
  2. Jupyter
  3. MongoDB with privileges to create and modify databases.
  4. All Python libraries listed in requirements.txt.

Optional

For calculating the "Sociality Score", you'll need the city's population distribution. This data can be sourced from SEDAC or for Europe, from EUROSTAT. Our notebook automatically projects the population onto a specified tessellation, summing populations of overlapping sections proportionally to their overlapping areas. The population data must be stored in a MongoDB collection with each element being a Feature of geojson, containing a Polygon geometry in the "geometry" field, and the population value in a sub-field of the "properties" field.

Computing Travel Time Distances and Accessibility Metrics

  1. Launch the notebook with jupyter-notebook and open the public-transport-analysis notebook.
  2. Set the variables listed at the start of the notebook:
    1. city = 'Turin' # name of the city
    2. urlMongoDb = "mongodb://localhost:27017/"; # URL of the MongoDB database
    3. directoryGTFS = './gtfs/'+ city+ '/' # directory of the GTFS files
    4. day = "20170607" # YYYYMMDD format [date validity of GTFS files]
    5. dayName = "wednesday" # name of the corresponding day
    6. Execute the cells within the notebook.

Citation

If you utilize this repository for your research, please cite the following paper:

Biazzo Indaco, Monechi Bernardo, and Loreto Vittorio. "General scores for accessibility and inequality measures in urban areas." R. Soc. open sci.6 (2019): 190979. DOI: 10.1098/rsos.190979.