-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#NUM!
values in amount
and loc
columns in XLSX are imported as the number 36 by the Activity Browser.
#514
Comments
This... is pretty bizarre. Can you forward the information about how distributions make up for missing data? So this #NUM! field is always translated to 36 during the import? That shouldn't be normal behaviour. |
Hi @dgdekoning, I edited my original reply since I looked further into it and found more information. Static vs stochastic LCA
It makes sense since the default calculation is static. Indeed, the brightway documentation on the stochastic LCA mentions that the random numbers created according to the uncertainty fields overwrite the Sub-issue 1: The bw/AB importer interprets XL error codes as numbers
Yes. In fact, every error value in an XLS/XLSX file translates to a specific number. It is irrelevant if the error value is under When the uncertainty fields are used, the bw/AB exporter may fill some fields with This is how it looks like at the import xlrd
book = xlrd.open_workbook(myfile.xlsx)
sh = book.sheet_by_index(0)
for rx in range(sh.nrows):
print(sh.row(rx))
Sub-issue 2: Outdated documentation of bw's
|
Hi Mixib, so I've been going through this and am finding that brightway (version 2) is dealing with these errors slightly differently now. When I've introduced them what occurs is that brightway excludes the 'amount' field, which is personally not an ideal situation, however it is safe and does allow us to throw some warnings/errors. What I would propose to do myself is to introduce an error message that points to the activity in the database with an exchange that is absent (so should probably contain an error) |
Closing as resolved in #921 |
Consider an XLSX file in the brightway import format, with the value
#NUM!
for some of the exchangesamount
andloc
columns.Following the way in which amounts are calculated based on formulas containing parameters on import, I expected that the
amount
would be calculated as a mean value based on the uncertainty data. Instead it shows as the number 36 on the Activity Browser. Only when modifying the uncertainty fields exchange by exchange there is a prompt to update theamount
to match with the mean.According to brightway's documentation, the
uncertainty type
fields are defined in the packagestats_arrays
. When using a triangular distribution (ID-5), it is expected that when the mode is not provided, theloc
value becomes the average between theminimum
and themaximum
values. Then, I expected#NUM!
in theloc
field to be replaced by the calculatedloc
. Instead it shows as the number 36 on the Activity Browser.Is this normal behaviour? If so, is it documented that the
LCA results
tab reports on calculations based on theamount
and not on the uncertainty fields?The text was updated successfully, but these errors were encountered: