Assessment of scenarios generated using the GOBLIN model
Project description
💻 Scenario Assessment Tool for GOBLIN scenarios
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scenario_assessment-0.1.3.tar.gz
.
File metadata
- Download URL: scenario_assessment-0.1.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.0 Linux/5.15.0-105-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b5efb1649356c8a5eefc01652850f7f9f1aed94ccc0d2eecf226160219f264d |
|
MD5 | 0560c44a265552a5387f89e6eecb3c81 |
|
BLAKE2b-256 | fc7d013b6342ea3e61aa4ac241125b9176e1533fb56204474143cf6d349e1aba |
File details
Details for the file scenario_assessment-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: scenario_assessment-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.0 Linux/5.15.0-105-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b896b21e349eeba142bd5ffa3ff97b30d2a5ffbf087e85b9a09b28e770fa56f0 |
|
MD5 | 3fc1b6d478357177ebfe4bfd03991eae |
|
BLAKE2b-256 | d4649f3d3db3bbdbc4cdc4fa0d098f057c88a8edebadab63c2c23812a53ec696 |