Skip to main content

Access and analyze historical weather and climate data with Python.

Project description

Meteostat Python Package

The Meteostat Python library provides a simple API for accessing open weather and climate data. The historical observations and statistics are collected by Meteostat from different public interfaces, most of which are governmental.

Among the data sources are national weather services like the National Oceanic and Atmospheric Administration (NOAA) and Germany's national meteorological service (DWD).

Are you looking for a hosted solution? Try our JSON API.

Installation

The Meteostat Python package is available through PyPI:

pip install meteostat

Meteostat requires Python 3.5 or higher. If you want to visualize data, please install Matplotlib, too.

Documentation

The Meteostat Python library is divided into multiple classes which provide access to the actual data. The documentation covers all aspects of the library:

Example

Let's plot 2018 temperature data for Vancouver, BC:

# Import Meteostat library and dependencies
from datetime import datetime
import matplotlib.pyplot as plt
from meteostat import Point, Daily

# Set time period
start = datetime(2018, 1, 1)
end = datetime(2018, 12, 31)

# Create Point for Vancouver, BC
location = Point(49.2497, -123.1193, 70)

# Get daily data for 2018
data = Daily(location, start, end)
data = data.fetch()

# Plot line chart including average, minimum and maximum temperature
data.plot(y=['tavg', 'tmin', 'tmax'])
plt.show()

Take a look at the expected output:

2018 temperature data for Vancouver, BC

Contributing

Instructions on building and testing the Meteostat Python package can be found in the documentation. More information about the Meteostat bulk data interface is available here.

Donating

If you want to support the project financially, you can make a donation using one of the following services:

Data License

Meteorological data is provided under the terms of the Creative Commons Attribution-NonCommercial 4.0 International Public License (CC BY-NC 4.0). You may build upon the material for any purpose, even commercially. However, you are not allowed to redistribute Meteostat data "as-is" for commercial purposes.

By using the Meteostat Python library you agree to our terms of service. All meteorological data sources used by the Meteostat project are listed here.

Code License

The code of this library is available under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meteostat-1.5.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meteostat-1.5.3-py2-none-any.whl (29.7 kB view details)

Uploaded Python 2

File details

Details for the file meteostat-1.5.3.tar.gz.

File metadata

  • Download URL: meteostat-1.5.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

File hashes

Hashes for meteostat-1.5.3.tar.gz
Algorithm Hash digest
SHA256 3ef8697ef0b58de2623d06ea8a32e79f87afa53c6e180ee94f4e2620bc1c200a
MD5 96e6bfb00f9bde3ad35466def69154a3
BLAKE2b-256 4ebb0c0fea8956ed0a5ae1ebd513e543253a1c7151c5a4abb93c9eb38ddb0288

See more details on using hashes here.

File details

Details for the file meteostat-1.5.3-py2-none-any.whl.

File metadata

  • Download URL: meteostat-1.5.3-py2-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

File hashes

Hashes for meteostat-1.5.3-py2-none-any.whl
Algorithm Hash digest
SHA256 67eb32e9d06ecfeb3e3ecca4096766ac957b7bbd3e77171f819639025b37ef46
MD5 1e1b477952674c64b176fc86b4805c58
BLAKE2b-256 a8534728c708d6e07c81a31b667a511c224626549e120e15a50215ac24ddb459

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page