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

@varunaiot/varunalib

v1.0.8

Published

VarunaLib is the library of the [Digital Performance Twin API](https://github.com/decagonhq/varunax), a software that helps manage water stations, utility company's assets and help to deliver safe and quality water across the network, monitoring and predi

Downloads

11

Readme

Node.js CI

VarunaLib

VarunaLib is the library of the Digital Performance Twin API, a software that helps manage water stations, utility company's assets and help to deliver safe and quality water across the network, monitoring and predicting asset failures in real time

Getting Started

These instructions will get you a copy of the library up and running on your local machine for data crunching purposes.

Prerequisites

Here are list of things you need to get started

  • Globally install node
  • Globally install yarn

Installing

A step by step series of examples that tell you how to get a development env running

  • Run in your terminal within your projects directory

npm i @varunaiot/varunalib

How to use

The varunalib consist of 4 functions

  • GetAverageORP
  • GetAveragePH
  • PumpRuntime
  • Flowrate

GetAverageORP function

This function calculates the Average ORP of a given set of ORPs between two dates. To make use of this function do the following

import {GetAverageORP} from "@varunaiot/varunalib"

GetAverageORP(startTime: Date, endTime: Date, previousData: Array<Object>)

Parameters involved include

  • startTime (DateTime):- The start date for processing the ORP
  • endTime (DateTime):- This is the endDate for processing the ORP
  • previousData (Array):- this is the historical data that is to be processed to get out the ORP

Expected Result

  • return { orpAverage, orpData, orpInfo };

GetAveragePH function

This function calculates the Average PH of a given set of PHs between two dates. To make use of this function do the following

import {GetAveragePH} from "@varunaiot/varunalib"

GetAveragePH(startTime: Date, endTime: Date, previousData: Array<Object>)

Parameters involved include

  • startTime (DateTime):- The start date for processing the PH
  • endTime (DateTime):- This is the endDate for processing the PH
  • previousData (Array):- this is the historical data that is to be processed to get out the PH

Expected Result

  • return { phAverage, phData, phInfo };

PumpRuntime function

This function calculates the pump runtime of a given set of runtimes between two dates. To make use of this function do the following

import {PumpRuntime} from "@varunaiot/varunalib"

PumpRuntime(startTime: Date, endTime: Date, previousData: Array<Object>, pumpId: String)

Parameters involved include

  • startTime (DateTime):- The start date for processing the PH
  • endTime (DateTime):- This is the endDate for processing the PH
  • previousData (Array):- this is the historical data that is to be processed to get out the PH
  • pumpId (String):- The symbol of the pump whose runtime is needed

Expected Result

  • return runtime;

Flowrates function

This function calculates the pump runtime of a given set of runtimes between two dates. To make use of this function do the following

import {Flowrates} from "@varunaiot/varunalib"

Flowrates(startTime: Date,
  endTime: Date,
  assets: Array<Object>,
  pumpData: Array<Object>,
  pumpType: String)

Parameters involved include

  • startTime (DateTime):- The start date for processing the PH
  • endTime (DateTime):- This is the endDate for processing the PH
  • pumpData (Array):- This is the historical data that is to be processed to get out the PH
  • assets: (Array):- This is an array of all assets in the database ,
  • pumpType (String):- The type of the pump whose Flowrate is needed

Expected Result

  • return flows;

And coding style

  • Our coding style can be found here

Deployment

Add additional notes about how to deploy this on a live system

Built With

  • TypeScript

Authors

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc