Metadata-Version: 2.4
Name: py-simba-pop
Version: 0.4.1
Summary: A transparent, reproducible Python implementation of the SIMBA-POP banana cohort model.
Author-email: Collins Patrick Ohagwu <cpohagwu@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/cpohagwu/py-simba-pop-docs
Project-URL: Documentation, https://py-simba-pop.readthedocs.io
Project-URL: Examples, https://github.com/cpohagwu/py-simba-pop-docs/tree/main/docs/examples
Project-URL: Issues, https://github.com/cpohagwu/py-simba-pop-docs/issues
Keywords: agriculture,crop-model,banana,cohort-model,population-dynamics,simba-pop
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas<3,>=2.2.2; python_version < "3.13"
Requires-Dist: pandas<3,>=2.2.3; python_version >= "3.13"
Requires-Dist: pyyaml>=6.0.1; python_version < "3.13"
Requires-Dist: pyyaml>=6.0.2; python_version >= "3.13"
Provides-Extra: viz
Requires-Dist: matplotlib==3.9.2; extra == "viz"
Provides-Extra: notebooks
Requires-Dist: plotly<7,>=5.24.1; extra == "notebooks"
Requires-Dist: openpyxl>=3.1.5; extra == "notebooks"
Requires-Dist: scipy>=1.13.1; python_version < "3.13" and extra == "notebooks"
Requires-Dist: scipy>=1.14.1; python_version >= "3.13" and extra == "notebooks"
Requires-Dist: nbconvert>=7; extra == "notebooks"
Requires-Dist: ipykernel>=6; extra == "notebooks"
Provides-Extra: test
Requires-Dist: pytest==8.3.5; extra == "test"
Requires-Dist: openpyxl==3.1.5; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest==8.3.5; extra == "dev"
Requires-Dist: ruff==0.16.1; extra == "dev"
Requires-Dist: openpyxl==3.1.5; extra == "dev"
Dynamic: license-file

# py-simba-pop

[![PyPI](https://img.shields.io/pypi/v/py-simba-pop.svg)](https://pypi.org/project/py-simba-pop/)
[![Python](https://img.shields.io/pypi/pyversions/py-simba-pop.svg)](https://pypi.org/project/py-simba-pop/)
[![Documentation](https://readthedocs.org/projects/py-simba-pop/badge/?version=latest)](https://py-simba-pop.readthedocs.io)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/cpohagwu/py-simba-pop-docs/blob/main/LICENSE)

**py-simba-pop** simulates a perennial banana plantation's population,
flowering and harvest week by week with **SIMBA-POP**, the banana cohort model
published by Tixier, Malézieux & Dorel (2004), *Ecological Modelling*
180:407–417. One `SimbaPopEngine` runs everything from daily temperatures.
Real ribbon-tag bagging and sucker-selection records can drive it directly,
and whenever a record isn't available the engine falls back to the model's
own prediction, always with an explicit notice. The engine is distributed as
compiled wheels.

## Installation

```bash
pip install py-simba-pop
```

Python 3.11–3.13. Wheels are published for Linux x86-64 (manylinux_2_28 and
musllinux), macOS (universal2) and Windows x86-64. To read `.xlsx` input
files, also install `openpyxl`; for the example notebooks, install
`py-simba-pop[notebooks]`.

## Quick start

```python
from py_simba_pop import ParameterSet, SimbaPopEngine, WeatherProvider

params = ParameterSet.from_tixier_defaults()
weather = WeatherProvider.from_file_and_params("weather.csv", params)  # date, tmean columns

engine = SimbaPopEngine.from_seed_population(params, weather, seed_population=1000.0)
output = engine.run(n_weeks=200)  # a pandas DataFrame, one row per week
```

Every parameter defaults to the published Tixier et al. (2004) value; load
your own calibration with `ParameterSet.from_yaml("my_farm_params.yaml")`.

## Documentation and examples

- User guide: https://py-simba-pop.readthedocs.io
- Example notebooks with synthetic farm data:
  https://github.com/cpohagwu/py-simba-pop-docs/tree/main/docs/examples
- Questions and bug reports: https://github.com/cpohagwu/py-simba-pop-docs/issues

## Citation

If you use py-simba-pop in your research, please cite it using the metadata in
[CITATION.cff](https://github.com/cpohagwu/py-simba-pop-docs/blob/main/CITATION.cff)
("Cite this repository" on the GitHub page).

## License

Apache License 2.0. See
[LICENSE](https://github.com/cpohagwu/py-simba-pop-docs/blob/main/LICENSE).
