Socket
Socket
Sign inDemoInstall

infoclimat

Package Overview
Dependencies
9
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    infoclimat

Query infoclimat.fr API


Version published
Weekly downloads
1
Maintainers
1
Install size
1.56 MB
Created
Weekly downloads
 

Readme

Source

infoclimat.fr API NPM version

Get weather data from infoclimat.fr API using NodeJS or your browser.

In-browser example : https://www.webpackbin.com/bins/-KflnHus6k5S01VMYcmO

Installation

npm i -S infoclimat

Usage

var infoclimat = require('infoclimat')

infoclimat.getNextWeatherInFrench("48.856578,2.351828").then(data => {
  // Aujourd'hui à Paris, la température sera de 8 degrés environ. Ca va pluvioter un peu. Vous ne verrez pas le ciel de la journée.
})
getWeather(location)

Return raw API data

infoclimat.getWeather("48.856578,2.351828").then(data => {
  console.log(data);
})

result :

{
  request_state: 200,
  request_key: 'fd543c77e33d6c8a5e218e948a19e487',
  message: 'OK',
  model_run: '07',
  source: 'internal:GFS:1',
  '2017-03-21 10:00:00':
    {
      temperature: { '2m': 281.9, sol: 281.4, '500hPa': -0.1, '850hPa': -0.1 },
      pression: { niveau_de_la_mer: 101240 },
      pluie: 0.1,
      pluie_convective: 0,
      humidite: { '2m': 80.5 },
      vent_moyen: { '10m': 18.8 },
      vent_rafales: { '10m': 26.6 },
      vent_direction: { '10m': 292 },
      iso_zero: 1128,
      risque_neige: 'non',
      cape: 0,
      nebulosite: { haute: 94, moyenne: 98, basse: 4, totale: 100 }
    },
}

see explanations for this values on infoclimat.fr API

getNextWeather(location)

Compute average values for today values

infoclimat.getNextWeather("48.856578,2.351828").then(data => {
  console.log(data);
})

result

{
  temperature: 8.1,
  pluie: 0.1,
  nuages: 93.75,
  vent: 14.075
}
getNextWeatherInFrench(location)

Create readable French 🇫🇷 text descripting today weather

infoclimat.getNextWeatherInFrench("48.856578,2.351828").then(data => {
  console.log(data);
})

result

Aujourd'hui à Paris, la température sera de 8 degrés environ. Ca va pluvioter un peu. Vous ne verrez pas le ciel de la journée.

License

MIT

Keywords

FAQs

Last updated on 02 Apr 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc