Code Monkey home page Code Monkey logo

ratp's Introduction

RATP General project methodology

Guidelines: To simplify running of code, download the entire file (containing ‘base_trajet_total.csv’ and ‘temps_trajet.csv’) to avoid having to merge all the databases from scratch

Keywords : Djisktra, metro, Shiny

I/ Aim of project

The aim of the project was to find the optimal mid-way for two users in a city to meet using Djikstra algorithm. A visualisation tool depicting the mi-way and meeting point suggestions (café, bar, restaurant) was integrated into a Shiny App. This optimal mid-way was computed based on data taken from the public Paris metro station dataset (‘Open RATP’ website). The scope of the dataset was limited to metro and suburban train (RER), excluding buses.

For example, if a person is at ‘Bastille’ tube stop and the other at ‘Champs Elysées Clémenceau’, the app would find the optimal tube mid-way and geographical coordinates. the Shiny App displays café, bar and restaurant recommendations at this mid-way.

II/ Methodology

Datasets were taken from the following website: https://data.ratp.fr/explore/dataset/offre-transport-de-la-ratp-format-gtfs/ Folder “RATP_GTFS_FULL”

This folder included separate databases for metro stop, trips, routes and stop_times which we merged.

After merging of different datasets, the global dataset was sorted by:

  1. Direction of line (to or fro)
  2. branches (several branches per line)
  3. stop sequence (order of stations per line)

Some of the challenges encountered were loops for some lines and irregular stop sequences, which we corrected for to enable visualisation and computation of Djikstra algorithm. Visualisations were produced using ggplot and leaflet packages, with attribution of colours per line.

To prepare for the Djikstra algorithm, timings between stops were calculated using stop inputs and stop outputs. Commute travel time between stops (walking) were integrated to adjust for the timing computations. The database was simplified to a 3-column dataframe containing stop input, stop output and time difference between input and output (‘weight’).

For example, the line RER B had 10 different branches, these were reduced to just 2 (KOCQ and SOIR) due to irregular stop sequences on the other branches (duplicate stop sequence for one stop, stops being skipped on the line) Metro Line 7 had loops, which were separated as separate journeys.

The cafés, restaurants and bar recommendations were taken from Google API website (https://developers.google.com/places/web-service/) and integrated to midway calculations through geographical coordinates.

The project was enriching from several angles :

  1. Narrowing of the scoping of project (metro and RER, excluding for buses)
  2. Arranging of database based on direction, branches, stop sequences
  3. Exclusion of outliers (loops, stop sequences and variables (sorting the databases by key variables
  4. Visualisation using leaflet packages
  5. Shiny App integration using user interface and server

ratp's People

Contributors

ameliemeurer avatar mathildelavacquery avatar margauxwehr avatar vincentguyader avatar

Watchers

James Cloos avatar  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.