.. _bw2-notebooks:

Brightway2 notebooks
********************

.. note:: To download backup ``html`` and ``ipynb`` files, right-click and choose "Save file as".

Introduction
============

`Getting Started with Brightway2 <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Getting%20Started%20with%20Brightway2.ipynb>`_ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Getting%20Started%20with%20Brightway2.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Getting%20Started%20with%20Brightway2.ipynb>`__).

This notebook provides a basic introduction to Brightway2 functionality, including importing and using the FORWAST database. After you go through the introduction notebook, you are ready to start exploring, and the manual will try to help you when you get lost.

Brightway2 seminar
==================

A Brightway2 seminar was held in Zürich in 2017, and the `teaching material is available <https://github.com/PoutineAndRosti/Brightway-Seminar-2017>`__.

.. _example-notebooks:

Example notebooks
=================

In general, this manual tells you *what* to do; the notebooks tell you *how* to do it. Here are some example notebooks showing various themes:

* `Activities and Exchanges <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Activities%20and%20exchanges.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Activities%20and%20exchanges.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Activities%20and%20exchanges.ipynb>`__)
* `Projects <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Projects.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Projects.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Projects.ipynb>`__)
* `Databases <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Databases.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Databases.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Databases.ipynb>`__)
* `Using calculation setups <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Using%20calculation%20setups.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Using%20calculation%20setups.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Using%20calculation%20setups.ipynb>`__)
* `Meta-analysis of LCIA methods <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Meta-analysis%20of%20LCIA%20methods.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Meta-analysis%20of%20LCIA%20methods.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Meta-analysis%20of%20LCIA%20methods.ipynb>`__)
* `Defining a new matrix - example of Weighting and Normalization matrices <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Defining%20a%20new%20Matrix%20-%20example%20of%20Weighting%20and%20Normalization.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Defining%20a%20new%20Matrix%20-%20example%20of%20Weighting%20and%20Normalization.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/Defining%20a%20new%20Matrix%20-%20example%20of%20Weighting%20and%20Normalization.ipynb>`__).
* `Negative Biosphere flows and CFs <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Negative%20Biosphere%20flows%20and%20CFs.ipynb>`__

.. * `Defining a LCA calculation - example of power series expansion <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Power%20Series%20LCA.ipynb>`_

.. _parameterized-notebooks:

Parameterized inventories
-------------------------

* `Parameterized inventories from Excel import <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Parameters%20-%20Excel%20import.ipynb>`__
* `Parameterized inventories defined manually <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/Parameters%20-%20manual%20creation.ipynb>`__

.. _example-io-notebooks:

Importing data: example notebooks
---------------------------------

Importing data can be difficult, due to data incompatibilities between different software implementations. Here are some notebooks that show the steps needed to import various databases.

* `Importing Ecoinvent <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20Ecoinvent.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20Ecoinvent.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20Ecoinvent.ipynb>`__)
* `Importing data from an Excel file <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20an%20Excel%20file.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20an%20Excel%20file.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20an%20Excel%20file.ipynb>`__)
* `Importing the US LCI database (note: work in progress) <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20the%20US%20LCI%20database.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20the%20US%20LCI%20database.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20the%20US%20LCI%20database.ipynb>`__)
* `Importing a student project from SimaPro <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20student%20project%20SimaPro%20export.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20student%20project%20SimaPro%20export.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20student%20project%20SimaPro%20export.ipynb>`__)
* `Importing Agribalyse 1.2 <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20Agribalyse%20with%20Ecoinvent%202.2.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20Agribalyse%20with%20Ecoinvent%202.2.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20Agribalyse%20with%20Ecoinvent%202.2.ipynb>`__)
* `Importing Agribalyse 1.3 <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20Importing%20Agribalyse%201.3%20with%20Ecoinvent%203.2%20cutoff.ipynb>`__
* `Importing a SimaPro export with ecoinvent included <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20SimaPro%20export%20with%20ecoinvent.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20SimaPro%20export%20with%20ecoinvent.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20SimaPro%20export%20with%20ecoinvent.ipynb>`__)
* `Importing FORWAST <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20FORWAST.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20FORWAST.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20FORWAST.ipynb>`__)
* `Importing the World Food database (2.0, version 3) <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20the%20World%20Food%20database%20(2.0%20v3).ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20the%20World%20Food%20database%20(2.0%20v3).html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20importing%20the%20World%20Food%20database%20(2.0%20v3).ipynb>`__)
* `Importing from CMLCA using ExcelImporter <http://nbviewer.jupyter.org/urls/bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20CMLCA.ipynb>`__ (backup: `html <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20CMLCA.html>`__, `ipynb <https://bitbucket.org/cmutel/brightway2/raw/default/notebooks/IO%20-%20CMLCA.ipynb>`__)

Contributed notebooks
=====================

This section will highlight notebooks from people using or exploring Brightway2. Please email Chris Mutel if you have something to add!

* `Comparative static LCA <http://nbviewer.jupyter.org/github/PascalLesage/Shared-BW2-notebooks/blob/master/Comparative%20static%20LCA%20in%20Brightway2.ipynb>`__
* `The carbon efficiency of the Danish wind turbines fleet (combining Brightway2 with maps) <https://nbviewer.jupyter.org/gist/romainsacchi/8c41266e3f2d1a8951329964b8717c67>`__
