T-reX.MakeCustomDatabase
This module contains functions for creating an xlsx representation of a Brightway2 database and importing it into Brightway2.
Main functions: - dbWriteExcel: Creates an xlsx file representing a custom Brightway2 database. - dbExcel2BW: Imports the custom database (created by dbWriteExcel) into Brightway2.
Functions
|
Collects filenames from the SearchMaterial and SearchWasteResults directories. |
Create an xlsx file representing a custom Brightway2 database. |
|
|
Determine the unit based on the name. |
Import the custom database (created by dbWriteExcel) into Brightway2. |
Module Contents
- T-reX.MakeCustomDatabase.get_files_from_tree(dir_searchmaterial_results, dir_searchwaste_results)[source]
Collects filenames from the SearchMaterial and SearchWasteResults directories.
- Parameters:
dir_searchmaterial_results – Directory path for SearchMaterial results.
dir_searchwaste_results – Directory path for SearchWasteResults.
- Returns:
Sorted list of filenames.
- T-reX.MakeCustomDatabase.dbWriteExcel()[source]
Create an xlsx file representing a custom Brightway2 database.
This function generates an Excel file which represents a custom database for Brightway2, using predefined directory and database settings.
- Returns:
Path to the generated xlsx file.