Coder Social home page Coder Social logo

i24-transform-module's Introduction

i24-transform-module

I24's Transform module for downstream traffic visualization and analysis (post-post processing).

The module is collection-agnostic, meaning it can transform both RAW and RECONCILED collections without explicit configuration.

transform_raw transform_reconciled

High level overview

The Transform module:

  1. Subscribes to a post-processed collection via mongoDB's change stream (change_stream_reader.py)
  2. Transforms trajectories into a timestamp-based document (transformation.py)
  3. Writes and updates the documents into a transformed mongoDB collection (batch_update.py)
  4. Parallelizes step 1-3 with multiprocessing (main.py)

Initialize config

  1. Clone the repository

  2. Create a config.json file using config.template.json.

  3. Enter the credentials for connecting to MongoDB and the collection info

    read_database_name & read_collection_name: The name of the collection and its database to transform (must already exist in db)

    write_database_name & write_collection_name: The name of the transformed collection and its database (to be generated by main.py)

    {
    	"host": "x.x.x.x",
    	"port": 27017,
    	"username": "username",
    	"password": "password",
    	"read_database_name": "db_name",
    	"read_collection_name": "collection_name"
    	"write_database_name": "database_name"
    	"write_collection_name": "collection_name"
    }
    

How to transform an existing (static) collection using static_collection_transformer.py

  1. Initialize config
  2. Run run_static_transformer.py

How to transform a dynamic collection using run_dynamic_transformer.py

  1. Initialize config
  2. Run run_dynamic_transformer.py

i24-transform-module's People

Contributors

zineanteoh avatar lisaliuu 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.