A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Plastics Prototype

This tool explores different policy interventions both regionally and globally to help countries exploring ways to reduce the impact of plastic.
https://github.com/schmidtdse/plastics-prototype

Category: Industrial Ecology
Sub Category: Circular Economy and Waste

Keywords from Contributors

archiving transforms measur generic optimize observation compose conversion projection animals

Last synced: about 18 hours ago
JSON representation

Repository metadata

Decision support tool for plastics policy.

README.md

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!

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:

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.

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.

Modeling

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

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.

Manual Environment

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

  • Java allows for ANTLR source generation as required for the plastics intervention language.
  • Node is required in order to run grunt and webpack, enabling preparation of the front-end.
  • Python acts as automation scripting.

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

  • Install Python dependencies: pip install -r requirements.txt.
  • Setup the local environment with bash support/setup_local.sh which includes downloading a copy of the underlying data.
  • Execute a local web server for example python -m http.server.

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

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.

Development standards

This project uses the following:

  • Primarily, front-end tests are supported through Grunt (grunt) and QUnit. Meanwhile style is generally enforced eslint (npx eslint ./js/*.js).
  • Note that CI / CD may execute other tests and all pull requests should be passing all test and lint operations before merge.
  • When in doubt, please follow the JavaScript Style Guide.
  • Try to provide docstrings / JSDoc for public members (note that the support directory is excluded from this requirement at this time).
  • Reviewers may also impose certain requirements around usability and accessibility as to be discussed during reviews.

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

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.

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.

Citation (CITATION.cff)

cff-version: '1.1.0'
message: 'Please cite the following works to reference this software.'
abstract: 'This multi-disciplinary case study details how a public web application combines information and game design to visualize effects of user-defined policies intended to reduce plastic waste. Contextualizing this open source software within a broader lineage of digital media research, this user experience exploration outlines potential directions for facilitating conversation between artificial intelligence, scientists, and decision makers during an iterative policy building process. Furthermore, this system dissection reveals how this interactive science effort considers the practicalities of a treaty''s shifting priorities and proposals in its designs. Specifically, this historically situated investigation of the tool''s approach highlights options for centering human decision making where artificial intelligence helps reason about interventions but does not prescribe them. Finally, analysis summarizes this application''s specific game design-inspired mechanics and their efforts to: enable users'' agency to explore solution possibilities freely, invite deep engagement with scientific findings, and simultaneously serve multiple audiences with divergent objectives and expertise.'
authors:
  - family-names: 'Pottinger'
    given-names: 'A Samuel'
  - family-names: 'Biyani'
    given-names: 'Nivedita'
  - family-names: 'Geyer'
    given-names: 'Roland'
  - family-names: 'McCauley'
    given-names: 'Douglas J'
  - family-names: 'de Bruyn'
    given-names: 'Magali'
  - family-names: 'Morse'
    given-names: 'Molly R'
  - family-names: 'Nathan'
    given-names: 'Neil'
  - family-names: 'Koy'
    given-names: 'Kevin'
  - family-names: 'Martinez'
    given-names: 'Ciera'
doi: '10.48550/ARXIV.2312.11359'
identifiers:
  - type: 'doi'
    value: '10.48550/ARXIV.2312.11359'
  - type: 'url'
    value: 'https://arxiv.org/abs/2312.11359'
title: 'Combining Game Design and Data Visualization to Inform Plastics Policy: Fostering Collaboration between Science, Decision-Makers, and Artificial Intelligence'
url: 'https://arxiv.org/abs/2312.11359'
version: '2'

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 1,177
Total Committers: 3
Avg Commits per committer: 392.333
Development Distribution Score (DDS): 0.002

Commits in past year: 206
Committers in past year: 2
Avg Commits per committer in past year: 103.0
Development Distribution Score (DDS) in past year: 0.005

Name Email Commits
A Samuel Pottinger s****m@g****g 1175
dependabot[bot] 4****] 1
Magali de Bruyn d****n@b****u 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 2
Total pull requests: 288
Average time to close issues: N/A
Average time to close pull requests: 2 days
Total issue authors: 1
Total pull request authors: 3
Average comments per issue: 0.0
Average comments per pull request: 0.01
Merged pull request: 276
Bot issues: 0
Bot pull requests: 1

Past year issues: 2
Past year pull requests: 92
Past year average time to close issues: N/A
Past year average time to close pull requests: 5 days
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.01
Past year merged pull request: 88
Past year bot issues: 0
Past year bot pull requests: 1

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/schmidtdse/plastics-prototype

Top Issue Authors

  • sampottinger (2)

Top Pull Request Authors

  • sampottinger (285)
  • magalidebruyn (2)
  • dependabot[bot] (1)

Top Issue Labels

  • enhancement (2)

Top Pull Request Labels

  • dependencies (1)

Dependencies

.github/workflows/build.yaml actions
  • Creepios/sftp-action v1.0.3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-java v3 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
.github/workflows/build_trigger.yaml actions
  • Creepios/sftp-action v1.0.3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-java v3 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
Dockerfile docker
  • ubuntu jammy-20230916 build
docker-compose.yml docker
  • globalplasticstool latest
js_standalone/package.json npm
  • @babel/core ^7.16.5 development
  • @babel/plugin-proposal-class-properties ^7.16.5 development
  • @babel/preset-env ^7.16.5 development
  • babel-loader ^9.1.2 development
  • eslint ^8.44.0 development
  • eslint-config-google ^0.14.0 development
  • antlr4 ^4.13.0
  • handlebars ^4.7.8
  • package.json ^0.0.0
  • papaparse ^5.4.1
package.json npm
  • @babel/core ^7.16.5 development
  • @babel/plugin-proposal-class-properties ^7.16.5 development
  • @babel/preset-env ^7.16.5 development
  • babel-loader ^9.1.2 development
  • eslint ^8.44.0 development
  • eslint-config-google ^0.14.0 development
  • webpack ^5.65.0 development
  • webpack-cli ^4.9.1 development
  • antlr4 ^4.13.0
  • grunt ^1.5.2
  • grunt-contrib-connect ^3.0.0
  • grunt-contrib-qunit ^6.1.0
  • package.json ^0.0.0
requirements.txt pypi
  • matplotlib ==3.8.0
  • pandas ==2.1.1

Score: 3.4965075614664807