Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meteorologist

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meteorologist

Get some weather for your zip codes.

  • 1.1.1-1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Meteorologist

Meteorologist is a wrapper around NOAA's weather forecasts. Since NOAA response is crappy XML, this library wrapper gives you nice pretty JSON on the weather forecasts that NOAA provides. And because it's really slow, it introduces a way to cache forecasts so the response is snappy.

Usage

Webservice

You should clone this repository and run the following.

npm install
node server.js

You can then request on http://localhost:4000 with the following endpoints.

Daily Forecasts

The following endpoints return daily forecats given on the location.

  • /forecast/gps/:lat/:lng
  • /forecast/zip/:zipcode
Hourly Predictions

These endpoints return you hour to hour predictions throughout the days.

  • /predictions/gps/:lat/:lng
  • /predictions/zip/:zipcode

Module

You can also use this as a module, note that it is built asynchronously, you'll need to npm install meteorologist.

var meteorologist = require('meteorologist');
Daily Forecasts
meteorologist.forecast(:zipcode, function(res) // any 5 digit US zipcode
{
    console.log(res);
});
Hourly Predictions
meteorologist.predictions(:zipcode, function(res)
{
  console.log(res);
});

Samples

  • Daily Forecast
  • Hourly Predictions

Notes

Some important things to note is that the functionality will stay true to the requested location's timezone. Though the timezone is not listed, it will always be in that locale.

It is also important to note that the NOAA service is horrible and sometimes doesn't respond. It is important to check for .error in any of the responses just in case we encounter bad data.

License

MIT.

FAQs

Package last updated on 09 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc