From e6a60c68b2dbd254b525400fe49dbfca5d5607d8 Mon Sep 17 00:00:00 2001 From: Chris Mutel Date: Thu, 8 Sep 2016 20:45:46 +0200 Subject: [PATCH] Correct fields for Brightway2 activity export --- ocelot/io/brightway2.py | 3 ++- ocelot/transformations/cutoff/wastes.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ocelot/io/brightway2.py b/ocelot/io/brightway2.py index f821ae2..9b26e55 100644 --- a/ocelot/io/brightway2.py +++ b/ocelot/io/brightway2.py @@ -73,6 +73,7 @@ class Brightway2Converter: Finally, we only include some elements of the activity datasets themselves. The following keys from activity datasets are included: * name + * code * location * economic scenario * start date @@ -101,7 +102,7 @@ def translate_activity(ds, database_name): 'to environment': Brightway2Converter.translate_biosphere_exchange } FIELDS = ("code", "economic scenario", "end date", "filepath", - "location", "name", "start date", "technology level", + "location", "name", "start date", "technology level", 'dataset author', 'data entry') data = {field: ds[field] for field in FIELDS} data['database'] = database_name diff --git a/ocelot/transformations/cutoff/wastes.py b/ocelot/transformations/cutoff/wastes.py index 0b4c91a..8f40d10 100644 --- a/ocelot/transformations/cutoff/wastes.py +++ b/ocelot/transformations/cutoff/wastes.py @@ -81,7 +81,8 @@ def rename_recyclable_content_exchanges(data): def create_new_recycled_content_dataset(ds, exc): """Create a new dataset that consume recycled content production.""" common = ('access restricted', 'economic scenario', 'end date', - 'filepath', 'id', 'start date', 'technology level') + 'filepath', 'id', 'start date', 'technology level', + 'dataset author', 'data entry') obj = { "exchanges": [{ 'amount': 1,