Weather Stations
Weather stations are the primary source of meteorological data for Meteostat. The Meteostat Python library provides access to a comprehensive database of weather stations worldwide, allowing users to retrieve station metadata and search for stations based on various criteria.
All meteostat.stations.* methods are using the Meteostat weather stations SQLite database. While this database can be loaded into memory, it is recommended to use the default on-disk database for most applications to conserve system memory.
🚀 Example
- Meta Data
- Nearby Stations
- Inventory Data
You can easily retrieve metadata for a specific weather station using its unique identifier:
import meteostat as ms
station = ms.stations.meta('72503') # LaGuardia Airport
print(station)
Learn more about station metadata in the Meta Data chapter.
To find weather stations near a specific geographical point, you can use the nearby method:
import meteostat as ms
POINT = ms.Point(50.1155, 8.6842, 113) # Try with your location
# Get nearby weather stations
stations = ms.stations.nearby(POINT, limit=4)
print(stations)
Learn more about finding nearby stations in the Nearby Stations chapter.
You can check the data availability for a specific weather station using the inventory method:
import meteostat as ms
STATION = '71624' # Toronto Pearson International Airport
# Get station inventory
inventory = ms.stations.inventory(STATION)
print(f"Data available from {inventory.start} to {inventory.end}.")
Learn more about station inventory in the Inventory chapter.
👀 Learn More
📄️ Meta Data
Meteostat provides detailed metadata for each weather station in its database. This metadata includes information such as the station's name, location (latitude, longitude, elevation), country, and provider-specific identifiers. Metadata for individual stations can be accessed using the meta method. This method retrieves a Station object containing all relevant metadata for the specified station.
📄️ Nearby Stations
To find weather stations near a specific geographical point, you can use the nearby method. This method allows you to specify a location using latitude & longitude, and it returns a list of nearby weather stations sorted by distance.
📄️ Inventory
You can check the data availability for a specific weather station using the inventory method. This method retrieves information about the time range for which data is available at the specified station. Inventory data is both provider and parameter specific, allowing you to see exactly what data can be accessed.