aixweather package
AixWeather-Module. See readme or documentation for more information.
Subpackages
- aixweather.core_data_format_2_output_file package
- aixweather.imports package
- aixweather.transformation_functions package
- Submodules
- aixweather.transformation_functions.auxiliary module
- aixweather.transformation_functions.pass_through_handling module
- aixweather.transformation_functions.time_observation_transformations module
- aixweather.transformation_functions.unit_conversions module
- aixweather.transformation_functions.variable_transformations module
- aixweather.transformation_to_core_data package
Submodules
aixweather.data_quality_checks module
This module includes functions for analyzing and visualizing missing values.
aixweather.definitions module
This module includes variables or functions which define central variables for the whole project.
- class aixweather.definitions.CoreDataFormat[source]
Bases:
objectInformation on core data: Time of measurement is always at the indicated time. Units as in TMY3 https://www.nrel.gov/docs/fy08osti/43156.pdf Only exception to TMY3 format is pressure, as all TMY3 data file actually use “Pa” instead of mbar
- format: dict = {'Aerosol': {'unit': '1thousandth'}, 'AtmPressure': {'unit': 'Pa'}, 'CeilingH': {'unit': 'm'}, 'DewPointTemp': {'unit': 'degC'}, 'DiffHorRad': {'unit': 'Wh/m2'}, 'DiffuseHorIll': {'unit': 'lux'}, 'DirHorRad': {'unit': 'Wh/m2'}, 'DirNormRad': {'unit': 'Wh/m2'}, 'DirecNormIll': {'unit': 'lux'}, 'DryBulbTemp': {'unit': 'degC'}, 'ExtDirNormRad': {'unit': 'Wh/m2'}, 'ExtHorRad': {'unit': 'Wh/m2'}, 'GlobHorIll': {'unit': 'lux'}, 'GlobHorRad': {'unit': 'Wh/m2'}, 'HorInfra': {'unit': 'Wh/m2'}, 'LiquidPrecD': {'unit': 'mm/h'}, 'OpaqueSkyCover': {'unit': '1tenth'}, 'PrecWater': {'unit': 'mm'}, 'RelHum': {'unit': 'percent'}, 'Soil_Temperature_10cm': {'unit': 'degC'}, 'Soil_Temperature_1m': {'unit': 'degC'}, 'Soil_Temperature_20cm': {'unit': 'degC'}, 'Soil_Temperature_50cm': {'unit': 'degC'}, 'Soil_Temperature_5cm': {'unit': 'degC'}, 'TotalSkyCover': {'unit': '1tenth'}, 'Visibility': {'unit': 'km'}, 'WindDir': {'unit': 'deg'}, 'WindSpeed': {'unit': 'm/s'}, 'ZenithLum': {'unit': 'Cd/m2'}}
aixweather.project_class module
This module contains the central project classes which are used by the user.
- class aixweather.project_class.ProjectClassCustom(path, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing custom weather data. Modify this class and its functions to create your own weather data pipeline and consider to create a pull request to add the pipeline to the repository.
For common attributes, properties, and methods, refer to the base class.
- Attributes:
path (str): The file path to the custom weather data.
- class aixweather.project_class.ProjectClassDWDForecast(station: str, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing weather forecast data from DWD (Deutscher Wetterdienst).
For common attributes, properties, and methods, refer to the base class.
- Attributes:
station (str): The identifier of the KML grid associated with the forecast data.
- class aixweather.project_class.ProjectClassDWDHistorical(start: datetime, end: datetime, station: str, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing historical weather data from DWD (Deutscher Wetterdienst).
For common attributes, properties, and methods, refer to the base class.
- Attributes:
station (str): The identifier of the DWD weather station associated with the data.
- class aixweather.project_class.ProjectClassEPW(path, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing weather data from EPW (EnergyPlus Weather) format.
For common attributes, properties, and methods, refer to the base class.
- Attributes:
path (str): The absolute file path to the EPW weather data.
- class aixweather.project_class.ProjectClassERC(start: datetime, end: datetime, cred: tuple = None, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing weather data from the ERC (Energy Research Center).
For common attributes, properties, and methods, refer to the base class.
- Attributes:
cred (tuple): A tuple containing credentials or authentication information for accessing the data source.
- class aixweather.project_class.ProjectClassGeneral(**kwargs)[source]
Bases:
ABCAn abstract base class representing a general project.
For each source of weather data, a project class should inherit from this class and implement specific methods for data import and transformation.
- Attributes:
- fillna (bool): A flag indicating whether NaN values should be filled
in the output formats.
- abs_result_folder_path (str): Optionally define the absolute path to
the desired export location.
- start (pd.Timestamp or None): The start date of the project data in UTC
(sometimes inferred by the inheriting class).
end (pd.Timestamp or None): The end date of the project data in UTC.
- Properties:
imported_data (pd.DataFrame): The imported weather data. core_data (pd.DataFrame): The weather data in a standardized core
format.
- output_df_<outputformat> (pd.DataFrame): The output data frame
(name depends on output format).
meta_data: Metadata associated with weather data origin.
- Methods:
- import_data(): An abstract method to import data from the specific
source.
- data_2_core_data(): An abstract method to transform imported data into
core data format.
core_2_mos(): Convert core data to MOS format. core_2_epw(): Convert core data to EPW format. core_2_csv(): Convert core data to CSV format. core_2_json(): Convert core data to JSON format. core_2_pickle(): Convert core data to Pickle format.
- core_2_csv(filename: str = None) str[source]
Convert core data to .csv file
- filename (str): Name of the file to be saved. The default is constructed
based on the station name.
- Returns:
str: Path to the exported file.
- core_2_epw(filename: str = None, export_in_utc: bool = False) str[source]
Convert core data to .epw file
- filename (str): Name of the file to be saved. The default is constructed
based on the meta-data as well as start and stop time
- export_in_utc (bool): Timezone to be used for the export.
True (default) to use the core_df timezone, UTC+0, False (default) to use timezone from metadata
- Returns:
str: Path to the exported file.
- core_2_json(filename: str = None) str[source]
Convert core data to .json file
- filename (str): Name of the file to be saved. The default is constructed
based on the station name.
- Returns:
str: Path to the exported file.
- core_2_mos(filename: str = None, export_in_utc: bool = False) str[source]
Convert core data to .mos file
- filename (str): Name of the file to be saved. The default is constructed
based on the meta-data as well as start and stop time
- export_in_utc (bool): Timezone to be used for the export.
True (default) to use the core_df timezone, UTC+0, False (default) to use timezone from metadata
- Returns:
str: Path to the exported file.
- core_2_pickle(filename: str = None) str[source]
Convert core data pickle file
- filename (str): Name of the file to be saved. The default is constructed
based on the station name.
- Returns:
str: Path to the exported file.
- property core_data
Get core data
- property imported_data
Get imported data
- class aixweather.project_class.ProjectClassTRY(path, **kwargs)[source]
Bases:
ProjectClassGeneralA class representing a project for importing and processing weather data from TRY (Test Reference Year) format.
For common attributes, properties, and methods, refer to the base class.
- Attributes:
path (str): The absolute file path to the TRY weather data.