meteostat
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Meteostat

npm npm bundle size NPM semantic-release

Meteostat is an open platform which provides free access to weather and climate data.

Documentation

Meteostat provides a convenient JavaScript wrapper for its JSON API.

See the JSON API docs for more information about the API.

Installation

To install the package, run:

npm install meteostat

or

yarn add meteostat

Usage

All you need to get started is an API key, which can be generated here. Once you have your API key, you can create a client:

import { Meteostat } from 'meteostat'

const meteostat = new Meteostat('YOUR_API_KEY_HERE')

;(async () => {
  try {
    const { data } = await meteostat.stations.nearby({ lat: '51.5085', lon: '-0.1257' })
    console.log(data)
  } catch (error) {
    console.log(error)
  }
})()

Reference

Data License

Meteorological data is provided under the terms of the Creative Commons Attribution-NonCommercial 4.0 International Public License. Please be aware that Meteostat uses data which is shared under WMO resolution 40.

All meteorological data sources used by the Meteostat project are listed here.

Contributing

Issues and pull requests are welcome.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i meteostat

Weekly Downloads

120

Version

2.0.0

License

MIT

Unpacked Size

73.8 kB

Total Files

20

Last publish

Collaborators

  • rfoel