Skip to main content

Time Series

Meteostat provides access to time series data for thousands of weather stations worldwide. These time series are provided in different granularities and can be consumed through a single interface.

🚀 Example

Let's fetch some hourly data for Atlanta, USA from January 1 to December 31, 2018:

# Import Meteostat library and dependencies
from datetime import datetime
import meteostat as ms

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

# Get hourly data
ts = ms.hourly(ms.Station(id='72219'), start, end)
df = ts.fetch()

# Print DataFrame
print(df)

🎯 Location Input

Please refer to the Location Input recipe for details on how to specify a location for fetching time series data.

🔀 Merging Time Series

Please refer to the Merging Time Series recipe for details on how to merge multiple time series objects into a single one.

👀 Learn More

🔍 API

meteostat.TimeSeries