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

nwws-oi

v2.0.1

Published

Allows for realtime parsing of warnings, watches etc.

Downloads

6

Readme

National Weather Service Open-Interface Realtime Parser

long name

Important Information

I am no longer maintaing this parser, as I am now maintaing another closed source module, which is much more efficent than this one. This one is not that bad, however, I do reccomend making some changes to this parser, as it occasionly parses messages incorrectly.

THIS WAS RECENTLY ENTIERLY REWROTE TO BE CLEANER, PLEASE MAKE SURE YOU UPDATE YOUR CODE TO MATCH THE BREAKING, AND MAJOR CHANGES! [THIS IS NOT FINISHED, I AM STILL REWRITING]

This package is used to pull real-time information from NWWS-OI, using Node.JS. This package also handles parsing.

Prequiries

You're going to have to have an NWWS-OI account, but don't worry: it's pretty easy to get, the worst part is waiting. To get started on creating an account you need to go to here, fill out the form and wait.

This is the only method I really know to get realtime information, but I am also working on another addon to this project to get radar data, and mapping information. Thus giving more data, in less time.

Installation

npm install nwws-oi

Usage

const config = {
    username: "username here",//Enter your username for NWWS-OI, sent to you by email
    password: "password here",//Enter your password for NWWS-OI, sent to you by email
    service_name: "some name",//Please enter a identifier for your client, if you don't do this, you're not getting in :(
    testing: true//only use if you are giving false products to the system. if you are add your awips data to line: 28. THIS WILL DISABLE ALL CONNECTION TO THE XMPP SERVER!
};

const NWSModule = require("./nwws-oi-rewrite/index.js");
const nwws = new NWSModule(config)

const eventListener = nwws.returnListener();


eventListener.on("unparsed_message_event", function (data) {
    //console.log("receive", data)
})

eventListener.on("event", function (data) {
    //console.log("event", data)

    require("fs").writeFileSync("./warning.json", JSON.stringify(data.returnInfo()))
})

if (config.testing) {
    nwws.sendTestMessage({
        "xmlns": "nwws-oi",
        "cccc": "KBMX",
        "ttaaii": "WFUS54",
        "issue": "2019-10-26T14:38:00Z",
        "awipsid": "SVRBMX",
        "id": "13743.3632"
    }, require("fs").readFileSync("./warningdata.txt"))
}

I would highly recommend checking out my code on our GitHub location here, and helping make it better! If you have an issue, feel free to open an issue there.

Most Recent Update Info: VERSION: 2.0.0

Added new information in returned events

{
    "header": {
        "class": "Operational product",
        "action": "New event",
        "office": "KBMX",
        "phenomena": "Tornado",
        "significance": "Warning",
        "event_tracking_number": "0003",
        "start": "2019-01-19T21:43:00.000Z",
        "end": "2019-01-19T22:30:00.000Z",
        "raw_data": {
            "class": "O",
            "action": "NEW",
            "office": "KBMX",
            "phenomena": "TO",
            "significance": "W",
            "event_tracking_number": "0003",
            "phenomstartena": "190119T1543Z",
            "end": "190119T1630Z"
        }
    },
    "extra_info": {
        "Hazard": "Tornado. ",
        "Source": "Radar indicated rotation. ",
        "Impact": "Flying debris will be dangerous to those caught withoutshelter. Mobile homes will be damaged or destroyed.Damage to roofs, windows, and vehicles will occur.Treedamage is likely",
        "LocationsInclude": " Eutaw, Boligee, Union, Gainesville, Knoxville, Allison, Snoddy, New Mount Hebron, I 20 Rest Area Near Eutaw and Clinton.",
        "Actions": "TAKE COVER NOW! Move to a basement or an interior room on the lowest floor of a sturdy building. Avoid windows. If you are outdoors, in a mobile home, or in a vehicle, move to the closest substantial shelter and protect yourself from flying debr",
        "Hail": "<.75MPH",
        "Tornado": "RADAR INDICATED"
    },
    "polygon": [
        {
            "lat": "32.80",
            "long": "88.25"
        },
        {
            "lat": "33.08",
            "long": "87.83"
        },
        {
            "lat": "33.02",
            "long": "87.83"
        },
        {
            "lat": "33.02",
            "long": "87.71"
        },
        {
            "lat": "32.99",
            "long": "87.71"
        },
        {
            "lat": "32.98",
            "long": "87.75"
        },
        {
            "lat": "32.96",
            "long": "87.74"
        },
        {
            "lat": "32.95",
            "long": "87.75"
        },
        {
            "lat": "32.95",
            "long": "87.73"
        },
        {
            "lat": "32.93",
            "long": "87.77"
        },
        {
            "lat": "32.91",
            "long": "87.76"
        },
        {
            "lat": "32.90",
            "long": "87.77"
        },
        {
            "lat": "32.90",
            "long": "87.81"
        },
        {
            "lat": "32.88",
            "long": "87.81"
        },
        {
            "lat": "32.86",
            "long": "87.83"
        },
        {
            "lat": "32.85",
            "long": "87.83"
        },
        {
            "lat": "32.71",
            "long": "88.11"
        }
    ]
}

Added extra_info types and totaly rewrote most of the parser to make it more efficent/readable. Fixed some parsing issues too. Testing using https://mesonet.agron.iastate.edu/vtec/#2019-O-NEW-KBMX-SV-W-0001/USCOMP-N0Q-201901192235

Layed infunstrucutre to split parsing into seperate files. as much as i'd love to have a 20k line file

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. To collaborate go to our GitHub location here

License

Honestly, I don't care what you do with it, just please: be a good person. Give credit where credit is due, and don't say you wrote this code unless you have collaborated. :-)