# Hourly Data

If you want to investigate the weather on a particular day or a short period of time, the Hourly class is a perfect match. It may include model data to fill gaps in the observations.

# Example

You can use the Hourly class to retrieve historical data and prepare the records for further processing. For more complex analysis and visulization tasks you can utilize Pandas.

# Import Meteostat library and dependencies
from datetime import datetime
from meteostat import Hourly

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

# Get hourly data
data = Hourly('72219', start, end)
data = data.fetch()

# Print DataFrame
print(data)

# API

Parent Class: meteostat.TimeSeries

# Data Structure

Each hour is represented by a Pandas DataFrame row which provides the weather data recorded at that time. These are the different columns:

Column Description Type
station The Meteostat ID of the weather station (only if query refers to multiple stations) String
time The datetime of the observation Datetime64
temp The air temperature in °C Float64
dwpt The dew point in °C Float64
rhum The relative humidity in percent (%) Float64
prcp The one hour precipitation total in mm Float64
snow The snow depth in mm Float64
wdir The average wind direction in degrees (°) Float64
wspd The average wind speed in km/h Float64
wpgt The peak wind gust in km/h Float64
pres The average sea-level air pressure in hPa Float64
tsun The one hour sunshine total in minutes (m) Float64
coco The weather condition code Float64
Last Updated: 2/18/2022, 12:29:58 PM