Exporting#
Exporting to ecospold
1#
Brightway can export inventory datasets conforming to the latest version of the ecospold version 1 schema documentation. which follow the Brightway data schema.
ecospold
1 documents describe processes who produce and consume products. The bw2io.export.ecospold1.Ecospold1Exporter
operates on individual nodes, and it is up to you to pass nodes of the correct type to the exporter.
The ecospold
1 format uses a lot of fields which practitioners donât normally populate. When importing ecospold
1, we store most of this information as âtagsâ. The main exception are comment fields; the Ecospold1Exporter
requires that the comments
field be a dictionary, not a string. This is because we need to break comments up into several fields in the XML export. No keys in this dictionary are required, and the fields used are listed below.
Nodes#
The following node attributes are required for a valid ecospold
1 export:
Brightway node attribute |
|
---|---|
name |
ecoSpold/dataset/metaInformation/processInformation/referenceFunction/@name |
unit |
ecoSpold/dataset/metaInformation/processInformation/referenceFunction/@unit |
The following optional attributes can be included, and are considered useful by most ecospold
importers.
In ecoSpold/dataset/metaInformation/processInformation/referenceFunction
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âincludedProcessesâ] |
empty string |
@includedProcesses |
tags[âecoSpold01categoryâ] |
empty string |
@category |
tags[âecoSpold01datasetRelatesToProductâ] |
|
@datasetRelatesToProduct |
tags[âecoSpold01infrastructureIncludedâ] |
|
@infrastructureIncluded |
tags[âecoSpold01infrastructureProcessâ] |
|
@infrastructureProcess |
tags[âecoSpold01localCategoryâ] |
tags[âecoSpold01categoryâ] |
@localCategory |
tags[âecoSpold01localNameâ] |
name |
@localName |
tags[âecoSpold01localSubCategoryâ] |
tags[âecoSpold01subCategoryâ] |
@localSubCategory |
tags[âecoSpold01subCategoryâ] |
empty string |
@subCategory |
In ecoSpold/dataset/metaInformation/processInformation/geography
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âlocationâ] |
empty string |
@text |
location |
âGLOâ |
@location |
In ecoSpold/dataset/metaInformation/processInformation/technology
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âtechnologyâ] |
empty string |
@text |
In ecoSpold/dataset/metaInformation/processInformation/timePeriod
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âtimePeriodâ] |
empty string |
@text |
tags[âdataValidForEntirePeriodâ] |
|
@dataValidForEntirePeriod |
tags[âecoSpold01endDateâ] |
â1970-01-01â |
endData/text() |
tags[âecoSpold01startDateâ] |
â1970-01-01â |
startData/text() |
In ecoSpold/dataset/metaInformation/processInformation/timePeriod
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âtimePeriodâ] |
empty string |
@text |
tags[âdataValidForEntirePeriodâ] |
|
@dataValidForEntirePeriod |
tags[âecoSpold01endDateâ] |
â1970-01-01â |
endData/text() |
tags[âecoSpold01startDateâ] |
â1970-01-01â |
startData/text() |
In ecoSpold/dataset/metaInformation/processInformation/dataSetInformation
:
Brightway data schema |
Default value |
|
---|---|---|
tags[âecoSpold01impactAssessmentResultâ] |
|
@impactAssessmentResult |
tags[âecoSpold01internalVersionâ] |
â0.0â |
@internalVersion |
tags[âecoSpold01languageCodeâ] |
âenâ |
@languageCode |
tags[âecoSpold01localLanguageCodeâ] |
âdeâ |
@localLanguageCode |
tags[âecoSpold01timestampâ] |
datetime.now().isoformat() |
@timestamp |
tags[âecoSpold01typeâ] |
â1â |
@type |
tags[âecoSpold01versionâ] |
â0.0â |
@version |
In ecoSpold/dataset/metaInformation/modellingAndValidation/representativeness
:
Brightway data schema |
Default value |
|
---|---|---|
comments[âextrapolationsâ] |
âunknownâ |
@extrapolations |
comments[âproductionVolumeâ] |
âunknownâ |
@productionVolume |
comments[âsamplingâ] |
âunknownâ |
@samplingProcedure |
comments[âuncertaintyAdjustmentsâ] |
âunknownâ |
@uncertaintyAdjustments |
References#
If provided, node["references"]
should be a list attached to nodes. Each element in the list is a dictionary. This dictionary does not have any required attributes, but the following can be provided in each âreferenceâ dictionary:
In ecoSpold/dataset/metaInformation/modellingAndValidation/source
:
Brightway data schema |
Default value |
|
---|---|---|
anthology |
skipped if missing |
@titleOfAnthology |
authors[0] |
empty string |
@firstAuthor |
authors[1:] |
empty string |
@additionalAuthors |
editors |
skipped if missing |
@nameOfEditors |
identifier |
node numerical index |
@number |
issue |
skipped if missing |
@issueNo |
journal |
skipped if missing |
@journal |
pages |
skipped if missing |
@pageNumbers |
place_of_publication |
skipped if missing |
@placeOfPublications |
publisher |
skipped if missing |
@publisher |
text |
skipped if missing |
@text |
title |
skipped if missing |
@title |
type |
âUndefined (default)â |
@sourceType |
volume |
skipped if missing |
@volumeNo |
year |
skipped if missing |
@year |
The reference_element["authors"]
field, if given, should be a list of strings.
The reference_element["type"]
field, if given, should be one of:
âUndefined (default)â
âArticleâ
âChapters in anthologyâ
âSeperate publicationâ
âMeasurement on siteâ
âOral communicationâ
âPersonal written communicationâ
âQuestionnariesâ
Edges#
The following edge attributes are required for each exchange
element in ecoSpold/dataset/flowData
for a valid ecospold
1 export:
Brightway edge attribute |
|
---|---|
unit |
ecoSpold/dataset/flowData/exchange/@unit |
name |
ecoSpold/dataset/flowData/exchange/@name |
amount |
ecoSpold/dataset/flowData/exchange/@meanValue |
The edge âtypeâ will set the ecospold
1 inputGroup
or outputGroup
value using the following mapping:
Brightway edge type |
|
|
---|---|---|
technosphere |
â5â |
|
production |
â0â |
|
substitution |
â1â |
|
biosphere[1] |
â5â |
â4â |
If uncertainty information is given, this uncertainty information should follow the stats_arrays
data schema. All uncertainty fields will be translated to ecospold
1 equivalents.
The following optional attributes can be included, and are considered useful by most ecospold
importers.
Brightway data schema |
Default value |
|
---|---|---|
caetgories[0] |
empty string |
@category |
caetgories[1] |
empty string |
@subCategory |
CAS number |
skipped if empty |
@CASNumber |
chemical formula |
skipped if empty |
@formula |
comment |
skipped if empty |
@generalComment |
infrastructureProcess |
|
@infrastructureProcess |
location |
skipped if empty |
@location |
pages |
skipped if empty |
@pageNumbers |
source_reference |
skipped if empty |
@referenceToSource |
uncertainty type |
skipped if empty[2] |
@uncertaintyType |