REGISTER NOW: Brightway Spring School! 🇨🇦 Québec City (Canada) 🗓️ 20.-24. May 2024

bw2data.backends.wurst_extraction#

Module Contents#

Functions#

_list_or_dict(obj)

add_exchanges_to_consumers(activities, exchange_qs[, ...])

Retrieve exchanges from database, and add to activities.

add_input_info_for_external_exchanges(activities, names)

Add details on exchange inputs from other databases

add_input_info_for_indigenous_exchanges(activities, names)

Add details on exchange inputs if these activities are already available

extract_activity(proxy[, add_identifiers])

Get data in Wurst internal format for an ActivityDataset

extract_brightway_databases(database_names[, ...])

Extract a Brightway2 SQLiteBackend database to the Wurst internal format.

extract_exchange(proxy[, add_properties])

Get data in Wurst internal format for an ExchangeDataset

bw2data.backends.wurst_extraction._list_or_dict(obj)[source]#
bw2data.backends.wurst_extraction.add_exchanges_to_consumers(activities, exchange_qs, add_properties=False, add_identifiers=False)[source]#

Retrieve exchanges from database, and add to activities.

Assumes that activities are single output, and that the exchange code is the same as the activity code. This assumption is valid for ecoinvent 3.3 cutoff imported into Brightway2.

bw2data.backends.wurst_extraction.add_input_info_for_external_exchanges(activities, names, add_identifiers=False)[source]#

Add details on exchange inputs from other databases

bw2data.backends.wurst_extraction.add_input_info_for_indigenous_exchanges(activities, names, add_identifiers=False)[source]#

Add details on exchange inputs if these activities are already available

bw2data.backends.wurst_extraction.extract_activity(proxy, add_identifiers=False)[source]#

Get data in Wurst internal format for an ActivityDataset

bw2data.backends.wurst_extraction.extract_brightway_databases(database_names, add_properties=False, add_identifiers=False)[source]#

Extract a Brightway2 SQLiteBackend database to the Wurst internal format.

database_names is a list of database names. You should already be in the correct project.

Returns a list of dataset documents.

bw2data.backends.wurst_extraction.extract_exchange(proxy, add_properties=False)[source]#

Get data in Wurst internal format for an ExchangeDataset