Socket
Book a DemoInstallSign in
Socket

weather-gov-graph-parse

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weather-gov-graph-parse

Parse weather graph data from weather.gov

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

weather.gov graph parser

Parse data from weather.gov's weather graph.

Build Status

NPM

Installation

npm install weather-gov-graph-parse

Usage

Require the module.

var gp = require('weather-gov-graph-parse');

Fetch and parse the weather graph.

gp(pos.latitude, pos.longitude, function(err, data) {
	// data is an array of data points
});

Or fetch and parse the weather graph, promises style.

gp(pos.latitude, pos.longitude).then(function(data) {
	// data is an array of data points
});

Data

The data variable that is returned is an array of data points. Each data point has the following structure. All fields are always present unless otherwise noted.

{
	// The date of the prediction data point.
	date: [date]

	// The predicted temperature.
	temperature: number

	// The predicted dew point.
	dewPoint: number

	// The predicted heat index, if available. This may be 'null' if no heat
	// index is available. The weather.gov weather graph assumes that if no
	// heat index is available, it is the same as the temperature.
	heatIndex: number

	// The predicted wind speed.
	windSpeed: number

	// The predicted wind direction. This will be either 'N', 'NNE', 'NE',
	// 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW',
	// 'NW', or 'NNW'
	windDirection: string

	// The maximum predicted wind gusts, if available. This may be 'null' if
	// no gusts are predicted.
	gust: number

	// The predicted sky cover, in percent. This will be between 0 and 100.
	skyCover: number

	// The predicted precipitation potential. This will be between 0 and 100.
	precipitation: number

	// The predicted relative humidity. This will be between 0 and 100.
	relativeHumidity: number
}

FAQs

Package last updated on 10 Jun 2016

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