node-spc-storm-reports v1.0.3
node-spc-storm-reports
This is a library that parses and returns NWS Storm Prediction Center storm reports.
Install
$ npm install node-spc-storm-reportsUsage
var nodeStormReports = require('node-spc-storm-reports');
// Only request tornado reports
nodeStormReports('2016-01-01', { hail: false, windDamage: false }).then(function spcResponse(data) {
console.log(data);
}).catch(function errorHandler(err) {
console.log(err);
});API
nodeStormReports(date, options)
date
Type:
stringString in date format
YYYY-MM-DD, e.g. 2016-01-30
options (optional)
Type:
objectDefines which weather products should be returned. NOTE: If no data is available for a given product, the returned value will be an empty array.
Properties: -
tornadoType:booleanDefault:trueDefines whether tornado reports should be returned -hailType:booleanDefault:trueDefines whether hail reports should be returned -windDamageType:booleanDefault:trueDefines whether wind damage reports should be returned -gustType:booleanDefault:falseDefines whether wind gust reports should be returned -blizzardType:booleanDefault:falseDefines whether blizzard reports should be returned -freezingRainType:booleanDefault:falseDefines whether freezing rain reports should be returned -heavySnowType:booleanDefault:falseDefines whether heavy snow reports should be returned -iceStormType:booleanDefault:falseDefines whether ice storm reports should be returned -sleetType:booleanDefault:falseDefines whether sleet reports should be returned -snowType:booleanDefault:falseDefines whether snow reports should be returned -wildfireType:booleanDefault:false* Defines whether wildfire reports should be returned
##Returned Data Structure Sample
{
tornado: [
{
id: 1,
time: '18:30',
type: 'T',
distance: 3,
direction: 'NW',
city: 'REPUBLIC',
county: 'MARQUETTE',
source: 'NWS STORM SURVEY',
remark: 'PRELIMINARY NWS STORM SURVEY CONFIRMS TREE DAMAGE ASSOCIATED WITH A TORNADO ALONG RIVER ROAD NORTHWEST OF REPUBLIC...INCLUDING SNAPPED WHITE PINES LARGER THAN 12 INCHES IN DIAMETER. TIME ESTIMATED FROM RADAR.',
office: 'MQT',
issuance: 1464132240,
fatalities: 0,
injuries: 0,
magnitudeDesignator: null,
magnitude: null,
state: 'MI',
latitude: 46.43,
longitude: -88.03
}
],
hail: [
{
id: 33,
time: '19:54',
type: 'A',
distance: 3,
direction: 'W',
city: 'ARVADA',
county: 'JEFFERSON',
source: 'TRAINED SPOTTER',
remark: null,
office: 'BOU',
issuance: 1464139140,
fatalities: 0,
injuries: 0,
magnitudeDesignator: 'M',
magnitude: 100,
state: 'CO',
latitude: 39.82,
longitude: -105.16
}
],
windDamage: [
{
id: 104,
time: '19:00',
type: 'W',
distance: 3,
direction: 'WNW',
city: 'PEEL',
county: 'MARION',
source: 'EMERGENCY MNGR',
remark: 'TREES AND POWERLINES DOWN IN THE AREA.',
office: 'LZK',
issuance: 1464118500,
fatalities: 0,
injuries: 0,
magnitudeDesignator: null,
magnitude: null,
state: 'AR',
latitude: 36.45,
longitude: -92.82
}
]
}License
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago