Skip to main content

Assessment of scenarios generated using the GOBLIN model

Project description

💻 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scenario_assessment-0.1.3.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

scenario_assessment-0.1.3-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page