npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@binsoul/node-red-contrib-statistics

v0.4.1

Published

Perform statistical operations on a configurable duration of incoming events.

Downloads

42

Readme

node-red-contrib-statistics

Software License

This node performs statistical operations on a configurable duration of incoming events.

Configuration

Output method

This algorithm is used to calculate the output value.

Slot resolution

Time is divided into slots with a fixed duration. Incoming events are assigned to the slot which corresponds to their timestamp rounded down to slot boundaries.

Number of slots

This number of slots are available. Together with the slot resolution it determines the total duration of the floating window.

Slot method

If more than one event is received for the same slot this method is used to calculate the value of the slot.

Interpolation

If there are slots without events this algorithm is used to fill them.

  • No interpolation

    Only the values of received events are used.

  • Step before

    The value of the next event is repeated from the next slot of the previous event.

  • Step middle

    The value of every event is repeated until the middle between this event and the next event .

  • Step after

    The value of previous event is repeated until the previous slot of the next event.

  • Linear

    Linear interpolation between event values.

  • Cosine

    Cosine interpolation between event values.

  • Cubic

    Cubic interpolation between event values.

  • Catmull-Rom

    Catmull-Rom interpolation between event values.

  • Hermite (low tension)

    Hermite interpolation between event values with a tension of -1.

  • Hermite (normal tension)

    Hermite interpolation between event values with a tension of 0.

  • Hermite (high tension)

    Hermite interpolation between event values with a tension of 1.

Fraction digits

The output value is either rounded to this number of fraction digits or output without rounding.

Update automatically

If no events are received in a certain time span updates can be triggered automatically.

  • Never

    Automatic updates are disabled.

  • If no events are received

    An update is triggered repeatedly until the timestamp of the last received event is older than the last slot.

Number of empty slots before update

Sets the number of slots without events before an automatic update is triggered.

Input value source

The value of an event is read from this variable.

Input timestamp source

The timestamp of an event is read from this variable.

Number output frequency

Sets how often a message is sent for the number output.

  • Always

    A message is sent for every event received.

  • If value has changed

    A message is only sent if the calculated output value differs from the previous one.

Number output target

The number output is written to this variable.

Object output frequency

Sets how often a message is sent for the object output.

  • Always

    A message is sent for every event received.

  • If value has changed

    A message is only sent if the calculated output value differs from the previous one.

  • Never

    The output is disabled.

Object output target

The object output is written to this variable.

Dependencies

The node is tested with Node.js v18 and Node-RED v3. Simple Statistics is used to calculate output values.

License

The MIT License (MIT). Please see License File for more information.