Meteostat Python
On this page
The Meteostat Python library offers an easy and efficient way to access open weather and climate data through Pandas. It retrieves historical observations and statistics from Meteostat Datasets, which aggregates information from various public sources — primarily governmental agencies. Among Meteostat’s data providers are national weather services such as the National Oceanic and Atmospheric Administration (NOAA) and Germany’s Meteorological Service (DWD).
📚 Installation#
The Meteostat Python package is available through PyPI:
Shell
pip install meteostat🚀 Usage#
Let's plot 2018 temperature data for Frankfurt, Germany:
Python
from datetime import date
import matplotlib.pyplot as plt
import meteostat as ms
# Specify location and time range
POINT = ms.Point(50.1155, 8.6842, 113) # Try with your location
START = date(2018, 1, 1)
END = date(2018, 12, 31)
# Get nearby weather stations
stations = ms.stations.nearby(POINT, limit=4)
# Get daily data & perform interpolation
ts = ms.daily(stations, START, END)
df = ms.interpolate(ts, POINT).fetch()
# Plot line chart including average, minimum and maximum temperature
df.plot(y=[ms.Parameter.TEMP, ms.Parameter.TMIN, ms.Parameter.TMAX])
plt.show()This is how the resulting chart looks:

👀 Learn More#
Time Series3 pagesClimate NormalsClimate normals represent the average meteorological conditions, typically over a 30-year period. They are commonly used as a reference to compare current weather conditions…Weather Stations3 pagesGeographical PointsMeteostat allows you to define geographical points using latitude, longitude, and optional elevation. These points can be used to retrieve weather data for specific locations that…Data ProvidersMeteostat integrates data from various weather data providers to offer comprehensive meteorological information. Each provider has its own set of meteorological parameters, data…InterpolationMeteostat provides interpolation methods to estimate weather data at specific geographical points based on nearby weather stations. This is particularly useful for locations that…Lapse RateMeteostat provides a function to calculate the lapse rate for temperature parameters based on weather data from multiple stations. The lapse rate is defined as the rate of…ConfigurationThe Meteostat Python library allows you to customize its behavior through a configuration system. You can set various options that affect how data is retrieved, cached, and…Contributing2 pagesAPI Reference27 pages