weathers

0.0.3 • Public • Published

weathers

every other weather npm was tragic so I rolled my own [its so simple]

  
    npm install weathers

    --

    var weathers = require('weathers');

    weather.getWeather(lat, lng, function(err, data){
     ~~ do awesome stuff! ~~
    });
  
Sample Response
{ operationalMode: '',
  srsName: 'WGS 1984',
  creationDate: '2013-10-01T06:51:22-04:00',
  creationDateLocal: '1 Oct 09:55 am EDT',
  productionCenter: 'Taunton, MA',
  credit: 'http://www.erh.noaa.gov/box/',
  moreInformation: 'http://weather.gov',
  location:
   { latitude: '41.83',
     longitude: '-71.41',
     elevation: '98',
     wfo: 'BOX',
     timezone: 'E|Y|5',
     areaDescription: 'Providence RI',
     radar: 'kbox',
     zone: 'RIZ002',
     county: 'RIC007',
     firezone: 'RIZ002',
     metar: 'KSFZ' },
  time:
   { layoutKey: 'k-p12h-n13-1',
     startPeriodName:
      [ 'Today',
        'Tonight',
        'Wednesday',
        'Wednesday Night',
        'Thursday',
        'Thursday Night',
        'Friday',
        'Friday Night',
        'Saturday',
        'Saturday Night',
        'Sunday',
        'Sunday Night',
        'Monday' ],
     startValidTime:
      [ '2013-10-01T06:00:00-04:00',
        '2013-10-01T18:00:00-04:00',
        '2013-10-02T06:00:00-04:00',
        '2013-10-02T18:00:00-04:00',
        '2013-10-03T06:00:00-04:00',
        '2013-10-03T18:00:00-04:00',
        '2013-10-04T06:00:00-04:00',
        '2013-10-04T18:00:00-04:00',
        '2013-10-05T06:00:00-04:00',
        '2013-10-05T18:00:00-04:00',
        '2013-10-06T06:00:00-04:00',
        '2013-10-06T18:00:00-04:00',
        '2013-10-07T06:00:00-04:00' ],
     tempLabel:
      [ 'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High' ] },
  data:
   { temperature:
      [ '76',
        '55',
        '83',
        '55',
        '76',
        '54',
        '75',
        '57',
        '74',
        '55',
        '74',
        '57',
        '72' ],
     pop:
      [ null,
        null,
        null,
        null,
        null,
        null,
        '30',
        '30',
        null,
        null,
        null,
        '40',
        '40' ],
     weather:
      [ 'Sunny',
        'Mostly Clear',
        'Sunny',
        'Clear',
        'Sunny',
        'Partly Cloudy',
        'Chance Showers',
        'Chance Showers',
        'Partly Sunny',
        'Mostly Cloudy',
        'Partly Sunny',
        'Chance Showers',
        'Chance Showers' ],
     iconLink:
      [ 'http://forecast.weather.gov/images/wtf/medium/few.png',
        'http://forecast.weather.gov/images/wtf/medium/nfew.png',
        'http://forecast.weather.gov/images/wtf/medium/few.png',
        'http://forecast.weather.gov/images/wtf/medium/nskc.png',
        'http://forecast.weather.gov/images/wtf/medium/few.png',
        'http://forecast.weather.gov/images/wtf/medium/nsct.png',
        'http://forecast.weather.gov/images/wtf/medium/shra30.png',
        'http://forecast.weather.gov/images/wtf/medium/nshra30.png',
        'http://forecast.weather.gov/images/wtf/medium/bkn.png',
        'http://forecast.weather.gov/images/wtf/medium/nbkn.png',
        'http://forecast.weather.gov/images/wtf/medium/bkn.png',
        'http://forecast.weather.gov/images/wtf/medium/nshra40.png',
        'http://forecast.weather.gov/images/wtf/medium/shra40.png' ],
     hazard: [],
     hazardUrl: [],
     text:
      [ 'Sunny, with a high near 76. North wind 5 to 7 mph. ',
        'Mostly clear, with a low around 55. Light and variable wind. ',
        'Sunny, with a high near 83. West wind 5 to 13 mph. ',
        'Clear, with a low around 55. Northwest wind 6 to 8 mph. ',
        'Sunny, with a high near 76. Northwest wind around 7 mph becoming southwest in the afternoon. ',
        'Partly cloudy, with a low around 54.',
        'A chance of showers after 11am.  Partly sunny, with a high near 75. Chance of precipitation is 30%.',
        'A chance of showers.  Mostly cloudy, with a low around 57. Chance of precipitation is 30%.',
        'Partly sunny, with a high near 74.',
        'Mostly cloudy, with a low around 55.',
        'Partly sunny, with a high near 74.',
        'A chance of showers.  Mostly cloudy, with a low around 57. Chance of precipitation is 40%.',
        'A chance of showers.  Mostly cloudy, with a high near 72. Chance of precipitation is 40%.' ] },
  currentobservation:
   { id: 'KSFZ',
     name: 'Smithfield',
     elev: '440',
     latitude: '41.91',
     longitude: '-71.4',
     Date: '1 Oct 09:55 am EDT',
     Temp: '64',
     Dewp: '50',
     Relh: '60',
     Winds: '9',
     Windd: '330',
     Gust: '0',
     Weather: 'Fair',
     Weatherimage: 'sct.png',
     Visibility: '10.00',
     Altimeter: 'NA',
     SLP: '29.98',
     timezone: 'EDT',
     state: 'RI',
     WindChill: '64' } 
 }

Readme

Keywords

none

Package Sidebar

Install

npm i weathers

Weekly Downloads

0

Version

0.0.3

License

BSD

Last publish

Collaborators

  • samccone