Brightway
src.brightwebapp.brightway
¶
brightway_wasm_database_storage_workaround()
¶
Sets the Brightway project directory to `/tmp/.
The JupyterLite file system currently does not support storage of SQL database files
in directories other than /tmp/. This function sets the Brightway environment variable
BRIGHTWAY_DIR to /tmp/ to work around this limitation.
Source code in src/brightwebapp/brightway.py
load_and_set_ecoinvent_project(username=None, password=None, overwrite_existing=False)
¶
Checks if the ecoinvent 3.10 Brightway project is installed. If not, loads it from Ecoinvent servers and installs it.
Notes
username and password are required to access the Ecoinvent database.
See Also
Source code in src/brightwebapp/brightway.py
load_and_set_useeio_project()
¶
Checks if the USEEIO-1.1 Brightway project is installed. If not, loads it from Brightway servers and installs it.
See Also
Notes
The USEEIO-1.1 project is also available from the Brightway data repository at:
However, this function loads it from a GitHub repository, which is more reliable and has guaranteed uptime:
Warnings
The Zenodo URL where this file is archived
cannot be used directly due to browser CORS (Cross-Origin Resource Sharing) security policies. The Zenodo link redirects to a file server that lacks the required CORS headers, causing the browser to block the download. This function therefore uses a copy hosted on raw.githubusercontent.com, which is correctly configured for cross-origin access.