Home

Awesome

Plastics Prototype

Prototype for the plastics decision support tool with transparent intervention code / authoring. The tool is primarily available at https://global-plastics-tool.org/. This tool is in pre-release (like preprint), feedback welcome!

<br>

Related

See also source code for "main" pipeline and source code for the GHG pipeline. Further documentation for this effort can be found in our supplemental scripts and documentation repositories. This final repository produces the following documentation chapters:

<br>

Purpose

This tool allows users to explore potential future plastic outcomes including waste and consumption under different policy scenarios. It does this primarily through an interactive browser-based tool but also offers some static visualizations and the ability to run these policy scenarios through Node outside the browser. Altogther, this tool provides new perspective to policy makers and other stakeholders on how to address global plastic waste, hoping to help inform efforts such as UN INC on Plastic Pollution.

<br>

Usage

There are multiple ways to interact with the tool. Note that many of these require pt/index.json rendered via support/render_index.py.

In-browser

The primary way to interact with the tool is through the browser. See https://global-plastics-tool.org/ for the publicly available hosted version. To host it yourself or run it on your own machine, see the instructions below.

Command line

The policy simulation engine can also run externally to the browswer through Node. See js_standlaone for more details.

Writing new interventions

See the pt subdirectory (pt) for more details on how to add new interventions.

<br>

Modeling

Note that the model repository including data and source code is available at https://github.com/SchmidtDSE/plastics-pipeline.

<br>

Container Environment

A containerized environment is available for both local execution of the application as well as development.

Containerized execution

The application can be run through a Docker container. This will build the application as well as generate the static supporting graphs and selected static scenario outputs.

Containerized development

Note that a containerized cloud development environment is also available. See .gitpod.yml and GitPod for more details. After opening the repository, start running the application with python -m http.server.

<br>

Manual Environment

To run the tool locally with a custom or manual environment setup, some prerequisites are required:

Having installed the above, execute the following to start the local server:

Note that optional static visualizations are also available under image_gen. See that sub-directory's README for more details.

<br>

Deployment

There are two options for deploying the application.

CI / CD

CI / CD can deploy changes after they merge to deploy, releasing to the public version. Note that this tool does not have a backend and the contents of this repository simply need to be hosted as static files after building (see support/setup_local.sh for a minimal build).

Container

The Docker container can also be deployed to various different environments. By default, it will use nginx to host the static files on port 8080 but this may require port forwarding in your hosting environment. Furthermore, it does not run in a daemon. Please adjust Dockerfile and docker-compose.yml to fit your desired secuirty profile and hosting environment before deployment.

<br>

Development standards

This project uses the following:

Please be kind. Open source is an act of love.

<br>

Data and Citation

Papers are still in process. Please cite preprint at 10.48550/arXiv.2312.11359 for now. Thank you! This tool's other repositories use the following:

We thank the community and authors for their contribution.

<br>

Open source

The project uses the following:

Note that the following may be invoked as executables like via the command line through CI / CD or by users of this tool but are not statically linked with the tool (and are not used during the execution of the web-based interactive tool):

Our CI / CD systems via GitHub Actions also use the libraries described in build.yml.

Meanwhile, the optional containerized environment uses the following:

Finally, thanks to the following some basic boilerplates / inspiration:

Note that additional open source libraries used by the model pipeline are discussed at https://github.com/SchmidtDSE/plastics-pipeline.