Home

Awesome

Project Drawdown Model Engine

Project Drawdown is the most comprehensive plan yet published for how to solve Global Warming. Project Drawdown entered the climate conversation with the publication of the 2017 book. With The Drawdown Review in 2020, the project continues its mission to inspire and communicate solutions.

<img align="right" src="data/images/DrawdownReview2020.gif" />

This repository is an in-progress rewrite of the Project Drawdown model engine. This is intended to be a replacement for the series of interconnected Excel spreadsheets currently used by the project to do climate solution modeling. The intention is to create an implementation which will allow us to broaden the use of the climate solution models to policymakers, business leaders, and other decisionmakers and interested parties.

The codebase has some momentum already, has been continuously developed since September of 2018, and implements a substantial portion of the desired functionality. Planned deliverables and current status are listed below. We have also recorded a video of the goals, which allows demonstration where prototypes exist.


Background


Overview of the Project

Planned efforts include:


status codecov

Getting started

You will need Git, git-lfs, and Python 3 (>= 3.8) installed. The jupyter labextensions require nodejs and npm.

Get a copy of this source code:

$ git clone https://github.com/ProjectDrawdown/solutions.git
$ cd solutions

Tests are based on tox. The default test target runs in about two minutes.

$ tox

# The "ci" (continuous integration) target runs all tests, and takes roughly two hours to finish.
$ tox -e ci

# to run a specific test:
$ tox -- tools/tests/test_vma_xls_extract.py::test_read_xls

The main user interface is a Jupyter Notebook intended to run in the cloud via Jupyterhub. To run Jupyter locally we recommend using pipenv for a virtual environment. As we use tox to run tests within virtual environments, we set the WORKON_HOME environment variable to have pipenv not re-install the same support in a new location:

$ WORKON_HOME="${PWD}/.tox/common" pipenv shell
(solutions) $ pipenv install -r requirements.txt
(solutions) $ jupyter labextension install @jupyter-widgets/jupyterlab-manager
(solutions) $ jupyter labextension install bqplot ipyvolume jupyter-threejs qgrid
(solutions) $ jupyter lab ./Drawdown.ipynb

To use with VoilĂ :

$ WORKON_HOME="${PWD}/.tox/common" pipenv shell
(solutions) $ pipenv install -r requirements.txt
(solutions) $ jupyter nbextension install --py --sys-prefix vega
(solutions) $ jupyter nbextension enable vega --py --sys-prefix
(solutions) $ voila --enable_nbextensions=True --VoilaConfiguration.file_whitelist="['.*\.(png|jpg|gif|svg|csv|json|ico|js)']" ./VoilaDrawdown.ipynb

License

The python code for the model engine is licensed under the GNU Affero General Public license and subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/ProjectDrawdown/solutions. No part of this Project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.

Data supplied from Project Drawdown (mostly in the form of CSV files) is licensed under the CC-BY-NC-2.0 license for non-commercial use. The code for the model can be used (under the terms of the AGPL) to process whatever data the user wishes under whatever license the data carries. The data supplied for the Project Drawdown solutions is CC-BY-NC-2.0.


Acknowledgements

Many thanks to the contributors of the <code>earth hackathon held at the Internet Archive on Sept. 5, 6, and 7 of 2018 which began this project. They are: Owen Barton, Robert L. Read, Denton Gentry, Henry Poole, Greg Elin, Marc Jones, and Stephanie Liu, in addition to Project Drawdown scientists and volunteers, Ryan Allard, Catherine Foster, Chad Frischmann, Kevin Bayuk, and Nick Peters.

Huge thanks to Beni Bienz of The Climate Foundation for his work in implementing a substantial portion of the system.


Contact

Denton Gentry (dgentry@carboncaptu.re) is currently the technical point of contact for this project.