weather-alerts-parser

0.1.6 • Public • Published

Weather Alerts Parser

A streaming parser for National Weather Service alerts.

Usage

Pipe a stream of the NWS atom feed to .stream() to convert it into alert objects.

For example, this will print alert objects to stdout:

var es = require('event-stream');
var fs = require('fs');
var parser = require('weather-alerts-parser');
var request = require('request');
 
request.get('http://alerts.weather.gov/cap/us.php?x=1')
  .pipe(parser.stream())
  .pipe(es.stringify())
  .pipe(process.stdout);

You can also stream them into other things, like files. See weather-alerts-geojson if you want to convert these bad boys to geojson.

Attributes

Most of the attributes are self-explanatory, but you may want to review the official information on how to interpret alert attributes, from the CAP v1.1 specification.

/weather-alerts-parser/

    Package Sidebar

    Install

    npm i weather-alerts-parser

    Weekly Downloads

    1

    Version

    0.1.6

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • adambreznicky
    • davidhickman
    • jasonkleinert
    • tnris
    • wilsaj