-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b37063
commit d430ab6
Showing
42 changed files
with
140,070 additions
and
1,788 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Oct 6 19:53:03 2020 | ||
@author: msmsa | ||
""" | ||
|
||
import pandas as pd | ||
from ast import literal_eval | ||
from brightway2 import * | ||
|
||
def import_aibiotic_depletion(): | ||
|
||
Data = pd.read_excel('AbioticDepletion.xlsx') | ||
|
||
project = "Compost_use" | ||
projects.set_current(project) | ||
db = Database("biosphere3") | ||
|
||
Data['N'] = 0 | ||
Data['key'] = None | ||
|
||
for i in Data.index: | ||
subset=db.search(Data['Flow2'][i]) | ||
for act in subset: | ||
if act.as_dict()['categories'][0] == 'natural resource' and act.as_dict()['name'] == Data['Flow2'][i]: | ||
Data.loc[i,'N'] +=1 | ||
Data.loc[i,'key'] = str(act.key) | ||
|
||
CF = [] | ||
for i in Data.index: | ||
CF.append((literal_eval(Data['key'][i]), Data['Factor2'][i])) | ||
|
||
Method(('CML (v4.4, 2015)', 'resources', 'depletion of abiotic resources - elements, ultimate reserves')).register() | ||
Method(('CML (v4.4, 2015)', 'resources', 'depletion of abiotic resources - elements, ultimate reserves')).write(CF) |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.