AgriFoodPy
AgriFoodPy: a package for modelling food systems - Published in JOSS (2024)
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 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
Collection of methods to handle food data
Basic Info
- Host: GitHub
- Owner: FixOurFood
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://agrifoodpy.readthedocs.io/en/latest/
- Size: 114 MB
Statistics
- Stars: 4
- Watchers: 0
- Forks: 5
- Open Issues: 9
- Releases: 2
Metadata Files
README.md
AgriFoodPy
AgriFoodPy is a collection of methods for manipulating and modelling agrifood data. It provides modelling for a variety of aspects of the food system, including food consumption paterns, environmental impact and emissions data, population and land use. It also provides an interface to run external models by using xarray as the data container.
AgriFoodPy also provides a pipeline manager to build end-to-end simulations and analysis toolchains. Modules can also be executed in standalone mode, which does not require a pipeline to be defined.
In addition to this package, we have also pre-packaged some datasets for use with agrifood. These can be found on the agrifoodpy_data repository https://github.com/FixOurFood/agrifoodpy-data
Installation:
AgriFoodPy can be installed using pip, by running
bash
pip install agrifoodpy
UK data to test the package is available from the agrifoodpy_data repository which currently can be installed using
bash
pip install git+https://github.com/FixOurFood/agrifoodpy-data.git@importable
Usage:
AgriFoodPy modules can be used to manipulate food system data in standalone mode or by constructing a pipeline of modules which can be executed partially or completely.
To build a pipeline ```python from agrifoodpy.pipeline import Pipeline from agrifoodpy.utils.loaddataset import loaddataset from agrifoodpy.food.model import import matplotlib.pyplot as plt
Create pipeline object
fs = Pipeline()
Add node to load food balance sheet data from external module.
fs.addnode(loaddataset, { "datablockpath": "food", "module": "agrifoodpydata.food", "data_attr": "FAOSTAT", "coords": {"Year":np.arange(1990, 2010), "Region":229} })
Add node convert scale Food Balance Sheet by a constant
fs.addnode(fbsconvert, { "fbs":"food", "convertion_arr":1e-6 # From 1000 Tonnes to kg })
fs.run()
results = fs.datablock ```
Examples and documentation
Examples demonstrating the functionality of AgriFoodPy can be the found in the package documentation. These include the use of accessors to manipulate data and access to basic models.
Contributing
AgriFoodPy is an open-source project which aims at improving the transparency of evidence base food system interventions and policy making. As such, we are happy to hear the input and ideas from the community.
If you want to contribute, have a look at the discussions page or open a new issue
For a comprehensive guide, please refer to the contributing guidelines to open a pull request to contribute new functionality
Owner
- Name: FixOurFood
- Login: FixOurFood
- Kind: organization
- Location: United Kingdom
- Website: https://fixourfood.org/
- Twitter: fixourfoodteam
- Repositories: 1
- Profile: https://github.com/FixOurFood
JOSS Publication
AgriFoodPy: a package for modelling food systems
Authors
Department of Environment and Geography Wentworth Way, University of York, Heslington, York, YO10 5NG, United Kingdom
Land, Environment, Economics and Policy Institute (LEEP), University of Exeter Business School, Exeter, United Kingdom
Department of Environment and Geography Wentworth Way, University of York, Heslington, York, YO10 5NG, United Kingdom
Centre for Environmental and Agricultural Informatics, School of Water, Energy and Environment, Cranfield University, Cranfield MK43 0AL, United Kingdom
Centre for Environmental and Agricultural Informatics, School of Water, Energy and Environment, Cranfield University, Cranfield MK43 0AL, United Kingdom
School of Environmental Sciences, University of East Anglia, Norwich, United Kingdom
Land, Environment, Economics and Policy Institute (LEEP), University of Exeter Business School, Exeter, United Kingdom
Centre for Novel Agricultural Products (CNAP), Department of Biology, University of York, York, YO10 5DD, United Kingdom
Equitable Development and Resilience Research Group, College of Engineering, Design and Physical Science, Brunel University London, London, UB8 3PH, United Kingdom
Global Academy of Agriculture and Food Systems, The University of Edinburgh. Charnock Bradley Building, Easter Bush Campus, EH25 9RG.
Centre for Food Policy, City, University of London, Northampton Square, London, EC1V 0HB, United Kingdom
GitHub Events
Total
- Watch event: 1
- Pull request event: 2
- Fork event: 1
Last Year
- Watch event: 1
- Pull request event: 2
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Juan | j****o@p****k | 71 |
| Sarah Bridle | g****b@s****t | 10 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 38
- Total pull requests: 48
- Average time to close issues: 5 months
- Average time to close pull requests: 9 days
- Total issue authors: 5
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.25
- Merged pull requests: 41
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 39 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jucordero (21)
- kanishkan91 (7)
- kaedonkers (5)
- sarahbridle (3)
- jsun (1)
Pull Request Authors
- jucordero (48)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 146 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: agrifoodpy
A package for modelling food systems
- Homepage: https://github.com/FixOurFood/AgriFoodPy
- Documentation: https://agrifoodpy.readthedocs.io/
- License: BSD-3-Clause license
-
Latest release: 0.2.0
published 4 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- myst-parser *
- netcdf4 *
- sphinx-autoapi *
- sphinx-gallery *
- sphinx_rtd_theme *
- fair *