aixweather.imports package
AixWeather Imports Package
The ‘imports’ package within AixWeather contains modules for importing raw weather data from various sources, including pulling data from DWD (Deutscher Wetterdienst) or reading files from local drives. Each module is designed to handle data from a specific source or format.
The output is as raw as possible.
Submodules
aixweather.imports.DWD module
imports weather data from the DWD
- aixweather.imports.DWD.import_DWD_forecast(station: str) DataFrame [source]
Import weather forecast data from the DWD (German Weather Service) for a specified station.
- Args:
- station (str): Station ID of the DWD for which forecast data is to be imported.
For debugging purposes: station 01028.
- Returns:
pd.DataFrame: DataFrame containing weather forecast data from the DWD.
- aixweather.imports.DWD.import_DWD_historical(start: datetime, station: str) DataFrame [source]
Pull historical data from DWD: (https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/) and format them into a dataframe.
- Args:
start: defines how much data must be pulled station: station id of the DWD
- Returns:
Dataframe weather data from DWD that is as raw as possible.
- aixweather.imports.DWD.import_meta_DWD_forecast(station: str) MetaData [source]
Downloads and extracts metadata related to the specified station from the DWD (Deutscher Wetterdienst) Open Data Interface.
- Parameters:
station: Station ID for which metadata is to be retrieved.
- Returns:
meta (meta_data object): An object of the meta_data class with populated attributes related to the station.
- aixweather.imports.DWD.import_meta_DWD_historical(station: str) MetaData [source]
Downloads and extracts metadata related to the specified station from the DWD (Deutscher Wetterdienst) Open Data Interface.
- Parameters:
station: Station ID for which metadata is to be retrieved.
- Returns:
meta (meta_data object): An object of the meta_data class with populated attributes related to the station.
aixweather.imports.EPW module
import epw files
aixweather.imports.ERC module
contains functions to handle data within ERC
- aixweather.imports.ERC.import_ERC(start: datetime, stop: datetime, cred: tuple) DataFrame [source]
Import weather data from aedifion ERC weather station (credentials required).
- Args:
start (datetime): Datetime object representing the data start. stop (datetime): Datetime object representing the data stop. cred (tuple): Aedifion credentials.
- Returns:
pd.DataFrame: DataFrame containing as raw as possible weather data from aedifion ERC.
aixweather.imports.TRY module
import DWD TRY data
aixweather.imports.custom_file module
change this file to your custom requirements (only import and perform as little preprocessing as possible)
aixweather.imports.utils_import module
includes a class that reads metadata from weather station
- class aixweather.imports.utils_import.MetaData(**kwargs: str)[source]
Bases:
object
A class for storing metadata information about a weather station.
- Attributes:
station_name (str): The name of the weather station. station_id (str): The ID (DWD or DWD MOSMIX ID) of the weather station. altitude (float): The altitude of the weather station in meters. latitude (float): The latitude of the weather station in degree. longitude (float): The longitude of the weather station in degree. input_source (str): The source of input data for the station.
- property station_name