Giter VIP home page Giter VIP logo

ta4's Introduction

From an IOT system we have gathered a log of sensor observations as a JSONL text file with the following format:

{"date": "2019-01-01", "time": "14:09:13.010", "input": "sensor_17", "value": 56.65788628257326}
{"date": "2019-01-01", "time": "16:07:09.166", "input": "sensor_23", "value": -6.939272293750748}
{"date": "2019-01-01", "time": "12:18:39.988", "input": "sensor_103", "value": 14.45649620272106}

The dates in the input file are guaranteed to appear in order.

For reporting, we would like you to write a small tool to aggregate the data per day, and for each day to report the median value for each sensor.

It is imperative to write the program in such a way that it can scale as the data grows.

Also, the code must be covered with unit tests.

The output file should be in the following format:

{"date": "2019-01-01", "input": "sensor_134", "median_value": 19.09421548912573}
{"date": "2019-01-01", "input": "sensor_121", "median_value": 12.99225035624281}
{"date": "2019-01-01", "input": "sensor_33", "median_value": -30.332243582193147}

ta4's People

Contributors

goodwinvlad avatar walkish avatar

Watchers

 avatar

Forkers

goodwinvlad

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.