optigob.resource_manager.database_manager
This module provides the DatabaseManager class, which is responsible for managing the connection to an SQLite database and retrieving various scaler tables as pandas DataFrames.
- Classes:
DatabaseManager: Manages database connections and retrieves scaler tables.
- optigob.resource_manager.database_manager.create_engine()
Creates a SQLAlchemy engine connected to the SQLite database.
- optigob.resource_manager.database_manager.get_ad_area_scaler_table()
Retrieves the ‘ad_area_scalers’ table.
- optigob.resource_manager.database_manager.get_ad_emission_scaler_table()
Retrieves the ‘ad_emission_scalers’ table.
- optigob.resource_manager.database_manager.get_crop_protein_scaler_table()
Retrieves the ‘protein_crop_scalers’ table.
- optigob.resource_manager.database_manager.get_crop_scaler_table()
Retrieves the ‘crop_scalers’ table.
- optigob.resource_manager.database_manager.get_forest_scaler_table()
Retrieves the ‘forest_scalers’ table.
- optigob.resource_manager.database_manager.get_forest_scaler_wood_output_table()
Retrieves the ‘forest_scaler_wood_output’ table.
- optigob.resource_manager.database_manager.get_hwp_scaler_table()
Retrieves the ‘hwp_scalers’ table.
- optigob.resource_manager.database_manager.get_livestock_area_scaler_table()
Retrieves the ‘animal_area_scalers’ table.
- optigob.resource_manager.database_manager.get_livestock_emission_scaler_table()
Retrieves the ‘animal_emission_scalers’ table.
- optigob.resource_manager.database_manager.get_livestock_protein_scaler_table()
Retrieves the ‘animal_protein_scalers’ table.
- optigob.resource_manager.database_manager.get_organic_soil_area_scaler_table()
Retrieves the ‘organic_soils_area_scalers’ table.
- optigob.resource_manager.database_manager.get_organic_soil_emission_scaler_table()
Retrieves the ‘organic_soils_emission_scalers’ table.
- optigob.resource_manager.database_manager.get_protein_crop_emission_scaler_table()
Retrieves the ‘protein_crop_emission_scalers’ table.
- optigob.resource_manager.database_manager.get_protein_crop_protein_scaler_table()
Retrieves the ‘protein_crop_protein_scalers’ table.
- optigob.resource_manager.database_manager.get_static_forest_scaler_table()
Retrieves the ‘static_forest_scalers’ table.
- optigob.resource_manager.database_manager.get_static_livestock_area_scaler_table()
Retrieves the ‘static_animal_area_scalers’ table.
- optigob.resource_manager.database_manager.get_static_livestock_emission_scaler_table()
Retrieves the ‘static_animal_emission_scalers’ table.
- optigob.resource_manager.database_manager.get_static_livestock_protein_scaler_table()
Retrieves the ‘static_animal_protein_scalers’ table.
- optigob.resource_manager.database_manager.get_substitution_scaler_table()
Retrieves the ‘substitution_scalers’ table.
- optigob.resource_manager.database_manager.get_willow_bioengery_scaler_table()
Retrieves the ‘willow_bioenergy_scalers’ table.
- optigob.resource_manager.database_manager.get_wood_ccs_scaler_table()
Retrieves the ‘wood_ccs_scalers’ table.
Classes
Module Contents
- class optigob.resource_manager.database_manager.DatabaseManager(database_path=None)
- engine = None
- create_engine()
Creates a SQLAlchemy engine connected to the SQLite database specified by self.database_path.
- Returns:
A SQLAlchemy engine instance connected to the specified SQLite database.
- Return type:
sqlalchemy.engine.Engine
- get_ad_area_scaler_table()
Retrieves the ‘ad_area_scalers’ table from the database.
- Returns:
DataFrame containing the ‘ad_area_scalers’ table data.
- Return type:
pandas.DataFrame
- get_ad_emission_scaler_table()
Retrieves the ‘ad_emission_scalers’ table from the database.
- Returns:
DataFrame containing the ‘ad_emission_scalers’ table data.
- Return type:
pandas.DataFrame
- get_crop_protein_scaler_table()
Retrieves the ‘protein_crop_scalers’ table from the database.
- Returns:
DataFrame containing the ‘protein_crop_scalers’ table data.
- Return type:
pandas.DataFrame
- get_crop_scaler_table()
Retrieves the ‘crop_scalers’ table from the database.
- Returns:
DataFrame containing the ‘crop_scalers’ table data.
- Return type:
pandas.DataFrame
- get_forest_scaler_table()
Retrieves the ‘forest_scalers’ table from the database.
- Returns:
DataFrame containing the ‘forest_scalers’ table data.
- Return type:
pandas.DataFrame
- get_forest_scaler_wood_output_table()
Retrieves the ‘forest_scaler_wood_output’ table from the database.
- Returns:
DataFrame containing the ‘forest_scaler_wood_output’ table data.
- Return type:
pandas.DataFrame
- get_hwp_scaler_table()
Retrieves the ‘hwp_scalers’ table from the database.
- Returns:
DataFrame containing the ‘hwp_scalers’ table data.
- Return type:
pandas.DataFrame
- get_livestock_area_scaler_table()
Retrieves the ‘animal_area_scalers’ table from the database.
- Returns:
DataFrame containing the ‘animal_area_scalers’ table data.
- Return type:
pandas.DataFrame
- get_livestock_emission_scaler_table()
Retrieves the ‘animal_emission_scalers’ table from the database.
- Returns:
DataFrame containing the ‘animal_emission_scalers’ table data.
- Return type:
pandas.DataFrame
- get_livestock_protein_scaler_table()
Retrieves the ‘animal_protein_scalers’ table from the database.
- Returns:
DataFrame containing the ‘animal_protein_scalers’ table data.
- Return type:
pandas.DataFrame
- get_organic_soil_area_scaler_table()
Retrieves the ‘organic_soils_area_scalers’ table from the database.
- Returns:
DataFrame containing the ‘organic_soils_area_scalers’ table data.
- Return type:
pandas.DataFrame
- get_organic_soil_emission_scaler_table()
Retrieves the ‘organic_soils_emission_scalers’ table from the database.
- Returns:
DataFrame containing the ‘organic_soils_emission_scalers’ table data.
- Return type:
pandas.DataFrame
- get_protein_crop_emission_scaler_table()
Retrieves the ‘protein_crop_emission_scalers’ table from the database.
- Returns:
DataFrame containing the ‘protein_crop_emission_scalers’ table data.
- Return type:
pandas.DataFrame
- get_protein_crop_protein_scaler_table()
Retrieves the ‘protein_crop_protein_scalers’ table from the database.
- Returns:
DataFrame containing the ‘protein_crop_protein_scalers’ table data.
- Return type:
pandas.DataFrame
- get_static_forest_scaler_table()
Retrieves the ‘static_forest_scalers’ table from the database.
- Returns:
DataFrame containing the ‘static_forest_scalers’ table data.
- Return type:
pandas.DataFrame
- get_static_livestock_area_scaler_table()
Retrieves the ‘static_animal_area_scalers’ table from the database.
- Returns:
DataFrame containing the ‘static_animal_area_scalers’ table data.
- Return type:
pandas.DataFrame
- get_static_livestock_emission_scaler_table()
Retrieves the ‘static_animal_emission_scalers’ table from the database.
- Returns:
DataFrame containing the ‘static_animal_emission_scalers’ table data.
- Return type:
pandas.DataFrame
- get_static_livestock_protein_scaler_table()
Retrieves the ‘static_animal_protein_scalers’ table from the database.
- Returns:
DataFrame containing the ‘static_animal_protein_scalers’ table data.
- Return type:
pandas.DataFrame
- get_substitution_scaler_table()
Retrieves the ‘substitution_scalers’ table from the database.
- Returns:
DataFrame containing the ‘substitution_scalers’ table data.
- Return type:
pandas.DataFrame
- get_willow_bioengery_scaler_table()
Retrieves the ‘willow_bioenergy_scalers’ table from the database.
- Returns:
DataFrame containing the ‘willow_bioenergy_scalers’ table data.
- Return type:
pandas.DataFrame
- get_wood_ccs_scaler_table()
Retrieves the ‘wood_ccs_scalers’ table from the database.
- Returns:
DataFrame containing the ‘wood_ccs_scalers’ table data.
- Return type:
pandas.DataFrame
- get_protein_content_scaler_table()
Retrieves the ‘protein_content’ table from the database.
- Returns:
DataFrame containing the ‘protein_content’ table data.
- Return type:
pandas.DataFrame