Lcopt - An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models

Lcopt - An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models - Published in JOSS (2017)

https://github.com/pjamesjoyce/lcopt

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    3 of 4 committers (75.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

brightway2 foreground-models gui lca python

Scientific Fields

Computer Science Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Create foreground LCA models via an intuitive user interface and analyse them using Brightway2

Basic Info
  • Host: GitHub
  • Owner: pjamesjoyce
  • License: bsd-3-clause
  • Language: JavaScript
  • Default Branch: development
  • Homepage:
  • Size: 57 MB
Statistics
  • Stars: 23
  • Watchers: 5
  • Forks: 6
  • Open Issues: 18
  • Releases: 2
Topics
brightway2 foreground-models gui lca python
Created about 9 years ago · Last pushed over 5 years ago
Metadata Files
Readme License Codemeta

README.md

lcopt-dev

Development branch for the interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models (lcopt)

| Platform | Status | |---------------|---------------| | Unix | Build Status | | Windows | Windows Build status | | Test coverage | Coverage Status | |Citation | Publication|

Lcopt is a python module for creating fully parameterised LCA foreground models using a Flask based interactive GUI developed by James Joyce

It integrates directly with BrightWay2, and can export models to SimaPro

You can export and share your model and results as an .lcoptview file, and share them with a wider audience using lcoptview

Online documentation, including full installation instructions, is available here

Installation

Development installation

Lcopt is continuing to develop, with new features and extensions being added. The lcopt-dev conda package is updated each time an update is pushed to the development branch on github.

It's recommended that you create a new environment separate from the one with lcopt in to install lcopt-dev, as they will overwrite one another.

Create and activate a dev environment at the command line/terminal like this

conda create -y -n lcopt-dev -c conda-forge -c cmutel -c haasad -c pjamesjoyce lcopt-dev activate lcopt-dev # Note, use "source activate lcopt-dev" on Unix

Or to get the most up to date version of lcopt-dev in your existing environment:

activate lcopt-dev # Note, use "source activate lcopt-dev" on Unix conda update -c conda-forge -c cmutel -c haasad -c pjamesjoyce lcopt-dev

Linking lcopt to brightway

lcopt-dev makes this easy, by using the excellent eidl developed by Adrian Haas.

Lcopt-dev can create models using external LCI data from any version of the ecoinvent database (ecoinvent license required) or the FORWAST database

If you have an ecoinvent login, open up the command line/console and type:

lcopt-settings

This will launch the settings page in your web browser. Enter your username and password, and choose your preferred version of ecoinvent. Click save.

Lcopt settings

The first time you create a model, lcopt will automatically download and set up the ecoinvent database in brightway - just be patient as it takes a while. This only needs to happen once though.

If you don't have an ecoinvent login, leave this blank and lcopt will automatically download and use FORWAST instead.

Using lcopt (Easy)

Below are the basic commands to get lcopt's interactive GUI up and running to create your first model. A Getting Started guide, including a video runthrough, as well as more detailed instructions are available in the online documentation.

To launch lcopt and view an example model, at the command line use:

lcopt-launcher

Lcopt is written in Python, so you can also use it from within a Python shell. Open up a jupyter notebook or python shell and use the following commands:

Using Lcopt from the python shell/Jupyter notebooks (Recommended)

To import lcopt use:

python from lcopt import *

Creating a new model

To create a model, you need to create an instance of the LcoptModel class using the model name as the first argument:

python model = LcoptModel('My First Model')

By default the model will be populated in the background with the details to link to the version of ecoinvent you specify in settings. If you want your model to use a dirfferent version or system model you can specify this using:

python model = LcoptModel('My First Ecoinvent 3.4 APOS Model', ecoinvent_version="3.4", ecoinvent_system_model="apos")

Or if you want to use FORWAST instead use:

python model = LcoptModel('My First FORWAST Model', useForwast=True)

Loading an existing model

Lcopt saves models in your local APPDATA directory by default. In windows this is C:\Users[your_name]\AppData\Local\Lcopt\Lcopt.

You can optionally tell lcopt to save models in your current directory using lcopt-settings

To load a model, use the model name (with or without the .lcopt extension) or the full file path (if it's not in the current directory or defualt directory), in this command:

python model = LcoptModel(load='My First Model')

Note : If you accidentally forget to use load= and you see a blank model don't panic. Lcopt won't overwrite your saved model unless you tell it to. Simply don't save the model and re-run the command with load=

Launching the GUI

To launch the GUI for your model simply call the launch_interact method of your newly created model instance:

python model.launch_interact()

This will start a Flask server and launch your web browser to access the GUI. If it doesn't or you accidentally close the GUI tab, simply go to http://127.0.0.1:5000/.

Information on how to use the GUI is located in 'More info...' panels dotted around at sensible locations within it.

For more details on using it, see the documentation or the video

Contribute

If you have any problems, questions, comments, feature requests etc. please raise an issue here on github

If you want to contribute to Lcopt, you're more than welcome! Please fork the github repository and open a pull request.

Lcopt uses py.test and Travis for automated testing, so please accompany any new features with corresponding tests. See the tests folder in the source code for examples.

Cite

Lcopt has been published in the Journal of Open Source Software.

Publication

You can download the citation in BibTeX for use in LaTeX or importing into Mendeley/other reference management software from here.

Or use the following citation:

Joyce, P.J., 2017. Lcopt - An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models. Journal of Open Source Software, 2:16. doi:10.21105/joss.00339

Thanks

Thanks to Adrian Haas for contributing to the ongoing development of lcopt!

Owner

  • Name: James Joyce
  • Login: pjamesjoyce
  • Kind: user

Sustainability Scientist

JOSS Publication

Lcopt - An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models
Published
August 27, 2017
Volume 2, Issue 16, Page 339
Authors
P James Joyce ORCID
KTH Royal Institute of Technology
Editor
Kathryn Huff ORCID
Tags
example tags for the paper

CodeMeta (codemeta.json)

{
  "@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld",
  "@type": "Code",
  "author": [
    {
      "@id": "http://orcid.org/0000-0002-9560-3132",
      "@type": "Person",
      "email": "pjamesjoyce@gmail.com",
      "name": "James Joyce",
      "affiliation": "KTH Royal Institute of Technology"
    }
  ],
  "identifier": "",
  "codeRepository": "https://github.com/pjamesjoyce/lcopt/",
  "datePublished": "2017-07-24",
  "dateModified": "2017-07-24",
  "dateCreated": "2017-07-24",
  "description": "An interactive Life Cycle options appraisal tool",
  "keywords": "Life cycle assessment, foreground model, LCA",
  "license": "BSD 3-Clause",
  "title": "lcopt",
  "version": "v0.4.0"
}

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 225
  • Total Committers: 4
  • Avg Commits per committer: 56.25
  • Development Distribution Score (DDS): 0.049
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
James Joyce p****e@g****m 214
haasad h****d@s****h 7
Peter James Joyce p****e@U****E 3
unknown p****e@K****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 51
  • Total pull requests: 29
  • Average time to close issues: 13 days
  • Average time to close pull requests: about 14 hours
  • Total issue authors: 18
  • Total pull request authors: 2
  • Average comments per issue: 1.96
  • Average comments per pull request: 0.9
  • Merged pull requests: 24
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pjamesjoyce (23)
  • cmutel (5)
  • haasad (3)
  • cardosan (2)
  • ntropy-esa (2)
  • SamXHu (2)
  • amoeba (2)
  • iamz33 (2)
  • JeanSouv (1)
  • NoraKorp (1)
  • Haniezarafshani (1)
  • R2D2-ad (1)
  • alideoro (1)
  • bkuczenski (1)
  • xiaoshir (1)
Pull Request Authors
  • pjamesjoyce (20)
  • haasad (9)
Top Labels
Issue Labels
enhancement (4) feature request (2) discussion (1) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 29 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 8
  • Total maintainers: 1
pypi.org: lcopt

An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models

  • Homepage: https://github.com/pjamesjoyce/lcopt/
  • Documentation: https://lcopt.readthedocs.io/
  • License: Copyright 2017 P. James Joyce Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 0.4.2
    published over 8 years ago
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 22 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 13.0%
Forks count: 13.3%
Average: 19.8%
Dependent repos count: 21.5%
Downloads: 40.9%
Maintainers (1)
Last synced: 4 months ago
pypi.org: lcopt-dev

An interactive tool for creating fully parameterised Life Cycle Assessment (LCA) foreground models

  • Homepage: https://github.com/pjamesjoyce/lcopt/
  • Documentation: https://lcopt-dev.readthedocs.io/
  • License: Copyright 2017 P. James Joyce Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 0.4.2
    published about 7 years ago
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 7 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 13.0%
Forks count: 13.3%
Dependent repos count: 21.5%
Average: 26.4%
Downloads: 74.1%
Maintainers (1)
Last synced: 4 months ago

Dependencies

rtd-requirements.txt pypi
  • asteval *
  • brightway2 *
  • bw2analyzer *
  • eight *
  • flask *
  • jinja2 *
  • numpy *
  • pandas *
  • xlsxwriter *
travis-requirements.txt pypi
  • Werkzeug >=0.12.1
  • coveralls *
  • pandas >=0.19.2
  • pytest *
  • pytest-cov *
  • pytest-flask *