Giter VIP home page Giter VIP logo

Comments (3)

pedrosimao avatar pedrosimao commented on August 29, 2024

The idea would be to make the buffer slice according to a period in time (1 hour, 30m or 1 day), instead of a predefined period number. Then average the buffer length instead of the buffer period. I am just not sure how to make this slice.

from timeseries-analysis.

pedrosimao avatar pedrosimao commented on August 29, 2024

Ok. I think I did something acceptable. I just needed to use an external library (moment.js)

// Mean by timeframe (timeframe: "hour", "day", "isoWeek", "quarter", "month")
timeseries.prototype.meanBy = function(timeframe) {
    const momentData = _.map(this.data, item => {
        return {
            date: moment(item[0])
                .startOf(timeframe)
                .format(),
            values: parseInt(item[1])
        }
    });
    const groupedData = _.groupBy(momentData, "date")
    return _.mapValues(groupedData, item => {
        return _.meanBy(item, 'values')
    })
};

from timeseries-analysis.

26medias avatar 26medias commented on August 29, 2024

Hi,

I'm not updating this package anymore, but feel free to submit a pull request if you build it.

I have been working on a visual replacement for this package, a way to process, transform & analyze data series in a visual way with an export of the JS algorithm generated on the other end so you can use it anywhere you need it (or trigger alerts, send to ML, export to other site, ...)

I posted a preview a couple days ago, I'm opening the first private beta in about a month.
https://www.facebook.com/640905346018076/videos/233273264019370/

Developers can build/fork their own logic blocks, datasources, visualization, all in Javascript, right in the browser. I got tired of Python everywhere and the iPython/Jupyter standard.

from timeseries-analysis.

Related Issues (16)

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.