Giter Site home page Giter Site logo

scm's Introduction

Sustainable City Management

Table of contents

Description

This project implements a software system to monitor the means of public transport in Dublin and provide recommendations for their sustainable and efficient management. The supported types of public transport include buses, bikes, trams and pedestian ways.

The real-time monitoring part of the system collects data from publicly available APIs. It visualises information about most delayed bus routes, current availability of shared bikes per station, position of trams and pedestian footfall density. It also includes forecasts about bike availability in the next hours through a custom Prophet model.

Moreover, the system provides two different types of recommendations. First, a greedy algorithm proposes dynamic bike reallocation between neighbouring stations, to prevent stations from running out of bikes. Second, a genetic algorithm is used to optimise bus and tram timetables. The algorithm takes as input the target number of daily routes, and the time of the first and the last routes. The optimisation objectives are the minimisation of the passenger waiting time and the approximation of the target number of routes.

Architecture

The software system consists of 4 distinct components:

  1. A Postgres database.
  2. An ETL pipeline implemented with pySpark that ingest data from the publicly available transport APIs and stores it in the database.
  3. An MVC web application implemented with Django that covers backend functionalities.
  4. A Streamlit frontend application.

Deployment instructions

  1. Create virtual environments and install requirements:

    cd backend
    python -m venv venv
    source venv/bin/activate
    pip install -r requirements
    
    cd frontend
    python -m venv venv
    source venv/bin/activate
    pip install -r requirements
    
    cd etl
    python -m venv venv
    source venv/bin/actinvate
    pip install -r requirements
    
  2. Run migrations

    cd backend
    python manage.py makemigrations
    python manage.py migrate
    
  3. Run ETL pre-deployment scripts

    cd etl
    python scripts.py
    
  4. Run the ETL pipeline
    spark-submit --master local[*] --jars ./Driver/postgresql-42.7.1.jar ./ingest.py

  5. Start the Django application
    python manage.py runserver

  6. Start the streamlit application
    streamlit run streamlit-app.py

Demonstration and presentation videos

You can watch a demonstration here and a high-level presentation of the project here

scm's People

Contributors

gkanel97 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.