Git Product home page Git Product logo

melange's People

Contributors

ckarthik1994 avatar thunder1989 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

melange's Issues

Data interface issues

@ckarthik1994 @Thunder1989

The current format seems not generalizable as a module in this project. You should make it more generalizable. Think that anybody who does not know your data format should be able to use it.

1

def insert_points_data(filename):

In general, this function is not generalizable. It can only digest the file format you have. You should design a function generic enough for every users to use. What you may do are

  1. Design a data model for the timesereis data.
  2. How to change the end user's data format into the target data model (that you designed) should be the end user's responsibility.
    1. The data model I used in the code I shared before was
    [ (uuid1, timestamp1, value1),
      (uuid2, timestamp2, value2),
    ]
    
    1. If you'd like not to include uuids in this data model, you can just remove that part and assuming the uuid is given as a parameter, but it'd be painful in bulk upload.
  3. Then, in your function, you can transform the functions into the MongoDB model that you are using.
  4. Change "filename" to srcid, which is the identifier of a sensor.

2


What is "s"?

3

def get_points_data(self,filename):

Again, change the parameter to srcid

4

from mongodb_interface import mongodb_interface

Where is this module?

5

def insert_timeseries_data(self,filePath):

Use consistent naming conventions. file_path. I think it could be filename as you did in the other codes. But anyway, filename should be agnostic to your implementation, so I'd say if there is any code needeing filename, it'd be wrong. Such implementation should be added outside the package (like helper code.)

6

Document your data model in the code.

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.