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

barometer-trend

v2.2.6

Published

Calculate the tendency, trend and weather predictions of barometric pressure

Downloads

66

Readme

Node.js CI

barometer-trend

Calculate the tendency and trend of a barometer for a one to three hour period including barometric weather predictions.

Features

  • Tendency and trend of the barometer for the last hour or three hours (FALLING|SLOWLY)
  • Prediction of weather and systems:
    • By pressure trend only (Expect gale force weather')
    • By pressure trend, thresholds and wind direction (Increasing rain, clearing within 12 hours.)
    • By seasonal pressure thresholds for winter and summer (Cloudy and humid, thunderstorms)
    • Front system tendency for the last three hours (Falling before a lesser rise | Cold front passage | Strong and gusty, then veers)
    • Force wind expectation in Beaufort scale based on the pressure tendency (F8-9)
  • Detects current pressure system Low, Normal, High

Note

  • Picks the period with the highest severity (one hour or three hours)
  • All calculations corrected (internally) to sea level pressure by optional altitude and temperature
  • Up to 48 hour history

Install & Use

npm i barometer-trend
const barometer = require('barometer-trend');

barometer.addPressure(datetime1, 101500);
barometer.addPressure(datetime2, 101505);
barometer.addPressure(datetime3, 101512, 100, 20, 225); //100 = altitude, 20 = C degrees, 225 = wind direction 

//barometer.addPressure(...) is more precise when pressure is corrected by altitude and temperature.

let forecast = barometer.getPredictions(); //returns JSON

Note

  • Pressure must be input in Pascals, 1015 mBar/hPa = 101500 Pascal.
  • getPredictions() investigate the trend for the latest one hour and three hours
  • If run less than one hour or three hours, the latest timing up until now is picked.
  • The most recent trend with the highest severity is chosen (One hour or Three hour reading)

Contribute

Feel free to contribute; create an Issue, and Pull Request including test code.

Disclaimer

  • All calculations is done by online research; the author of this library does not have a background in metereology. All sources listed below.
  • A barometer is only one source of weather information and may give a general trend and indication, but not "see" the overall picture. (There's a reason satelittes exists and being a metereologist is a paid job.)
  • All calculations presumes being located at sea with no disturbances.
  • Near land, winds may be one-two Beaufort scale numbers lower and the wind might be coming from "the wrong direction".
  • In subtropic and tropical regions some of the calculations may not be valid at all; i.e. the trade winds (easterlies) is different from northern hemishpere west->east (westerlies) low pressure systems.
  • In trade wind zones observe the daily variations; any change to this pattern could possibly indicate gale weather.

Sources / References