Git Product home page Git Product logo

maritime_flow's Introduction

Maritime flow

data-generator.py

Generate randomly 100 boat signal and send them in the boat_stream of the RabbitMQ server

ex:

{
    "boat_destination": "PALERMO",
    "boat_id": 1,
    "boat_speed": 3
},

dispatcher.py

Analyse the boat signal received in the boat_stream

if the boat_speed > 4, this signal is sent to the at_sea_stream else it is sent at_port_stream

avg_speed_estimator.py

Store any boat signal received in the at_sea_stream, into at_sea_boat.json. It adds a new data to the boat dictionary boat_list_speed, which contains all the speed registered for this sailing_boat. And it modify the boat_speed to match the average speed of this previous list.

ex:

[
    {
        "boat_destination": "BREST",
        "boat_id": 86,
        "boat_list_speed": [
            18,
            10,
            8
        ],
        "boat_speed": 12.0
    }
]

classifier.py

Store the boat signal received in the at_port_stream into the at_port_boat.json. It updates/append the data in this json, and keep track of how much boats are in each port in port_classifier.json

ex of port_classifier.json:

[
    {
        "boat_count": 4,
        "port_name": "BREST"
    },
    {
        "boat_count": 1,
        "port_name": "VALENCIA"
    },
    {
        "boat_count": 5,
        "port_name": "PALERMO"
    },
    {
        "boat_count": 2,
        "port_name": "BRIGHTON"
    },
    {
        "boat_count": 7,
        "port_name": "AMSTERDAM"
    }
]

Future Features

comming soon: || never ||

  • Trackingthe average speed of boats for each destination
  • When a boat previously stored in the at_port_boat.json file sends a signal, which indicates that this boat is now sailing: Update the database
  • Keep track of the number of boats leaving each port and the number of boats heading for each port.

maritime_flow's People

Contributors

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