Skip to main content

💻 Scenario Assessment Tool for GOBLIN scenarios

license python Code style: black

This module was constructed to assess and rank GOBLIN (General Overview for a Backcasting approach of Livestock INtensification) scenarios.

The latest iterations of GOBLIN systematically produce a range of environmental impacts, as well as livestock ouput data (total protein). Scenario outputs are ranked according to thier overall environmental change, and the change to the baseline livestock outouts.

Scenarios the meet a specified environmental objective are sorted and ranked. The cost to livestock output is prioritised, with the environmental parameters then factored at varios weights.

    climate_weight = .4
    eutrophication_weight = .3
    ammonia_weight = .3

These weights can be adjusted by the user.

Installation

Install from git hub.

pip install "scenario_assessment@git+https://github.com/GOBLIN-Proj/scenario_assessment.git@main" 

Install from PyPI

pip install scenario_assessment

Usage

The results of the scenarios are passed, using a dictionary, to the FilterResults class.

In addition, the target amount is also passed, as a proportion. As well as the selected global warming gas.

The search() method is used to rank results.

import pandas as pd 
import os
from scenario_assessment.filter import FilterResults

def main():

    path = "./data"

    climate = pd.read_csv(os.path.join(path, "total_emissions.csv"), index_col =0)
    eutrophication = pd.read_csv(os.path.join(path, "eutrophication_total.csv"), index_col =0)
    air = pd.read_csv(os.path.join(path, "air_quality_total.csv"), index_col =0)
    products = pd.read_csv(os.path.join(path, "beef_and_milk.csv"), index_col =0)

    emission_dict = {"climate_change": climate,
        "air_quality": air,
        "eutrophication":eutrophication,
        "protein_output": products}

    target = 0.02
    gas = "CH4"

    filter_class = FilterResults(target, gas, emission_dict)

    print(filter_class.total_gwp_gas)

    search_results = filter_class.search()

    print(search_results)


if __name__ == "__main__":
    main()

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for scenario_assessment 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scenario_assessment 0.1.3
File Size Uploaded
scenario_assessment-0.1.3.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scenario_assessment 0.1.3
File Interpreter ABI Platform
scenario_assessment-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / scenario_assessment-0.1.3.tar.gz

Download URL scenario_assessment-0.1.3.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4b5efb1649356c8a5eefc01652850f7f9f1aed94ccc0d2eecf226160219f264d
BLAKE2b-256 checksum
How to use checksums
fc7d013b6342ea3e61aa4ac241125b9176e1533fb56204474143cf6d349e1aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.0 Linux/5.15.0-105-generic

Release files / scenario_assessment-0.1.3-py3-none-any.whl

Download URL scenario_assessment-0.1.3-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b896b21e349eeba142bd5ffa3ff97b30d2a5ffbf087e85b9a09b28e770fa56f0
BLAKE2b-256 checksum
How to use checksums
d4649f3d3db3bbdbc4cdc4fa0d098f057c88a8edebadab63c2c23812a53ec696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.0 Linux/5.15.0-105-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page