Giter Club home page Giter Club logo

Comments (2)

romainsacchi avatar romainsacchi commented on July 30, 2024

Hi @djuch ,
sorry for the late answer. Yes, Activity Browser in my experience, is not very good at importing stuff.
I suggest to do it directly in Python, like so (also illustrated in the carculator examples notebook):

import brightway2 as bw
import bw2io
bw.projects.set_current("your_bw_project")

fp = r"/Users/romain/Downloads/carculator_inventory_2022-04-13_for_ei_3.8_brightway2.xlsx"
i = bw2io.ExcelImporter(fp)
i.apply_strategies()

i.match_database(fields=('name', 'unit', 'categories', 'location'))
i.match_database('ecoinvent 3.8 cutoff', fields=('name', 'unit', 'location', 'reference product'))
i.match_database("biosphere3", fields=('name', 'unit', 'categories'))
i.statistics()

There, you will see that you still have some unmatched biosphere flows: those flows are not natively in the biosphere3 database (noise flows, mostly). If you want them, you can incorporate them either by creating an additional biosphere database that you then link to like the above procedure (doing first i.create_new_biosphere(name="additional biosphere")), or by integrating them into your biosphere3 database, doing i.add_unlinked_flows_to_biosphere_database() (preferred option I'd say).
Otherwise, if you do not need them, you can drop them:

i.drop_unlinked(i_am_reckless=True)
i.statistics()

241 datasets
2559 exchanges
0 unlinked exchanges

and then write the database:

i.write_database()

Writing activities to SQLite3 database:
0% [##############################] 100% | ETA: 00:00:00
Total time elapsed: 00:00:00
Title: Writing activities to SQLite3 database:
  Started: 04/23/2022 11:12:37
  Finished: 04/23/2022 11:12:38
  Total time elapsed: 00:00:00
  CPU %: 52.50
  Memory %: 3.88
Created database: carculator export

and there, you'll be able to do our LCAs :-)

Screenshot 2022-04-23 at 11 19 51

from carculator.

marc-vdm avatar marc-vdm commented on July 30, 2024

Thanks for pointing this out, I've made it an issue on AB.

from carculator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.