Metadata-Version: 2.4
Name: lsapy
Version: 0.4.0
Summary: A Python package for Land Suitability Analysis.
Keywords: LSAPy,Land Suitability Analysis,Geospatial Analysis,GIS,Geography
Author-email: Baptiste Hamon <baptiste.hamon@pg.canterbury.ac.nz>
Maintainer-email: Baptiste Hamon <baptiste.hamon@pg.canterbury.ac.nz>
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: GIS
License-File: LICENSE
Requires-Dist: geopandas >=0.14.0
Requires-Dist: numpy >=1.26.0
Requires-Dist: pandas >=2.2.0
Requires-Dist: pooch >=1.8.2
Requires-Dist: regionmask >=0.13.0
Requires-Dist: scipy >=1.15.0
Requires-Dist: xarray >=2024.10.0
Requires-Dist: lsapy[dev] ; extra == "all"
Requires-Dist: lsapy[docs] ; extra == "all"
Requires-Dist: blackdoc >=0.3.9 ; extra == "dev"
Requires-Dist: bump-my-version >=1.1.4 ; extra == "dev"
Requires-Dist: codespell >=2.4.1 ; extra == "dev"
Requires-Dist: coverage[toml] >=7.7.0 ; extra == "dev"
Requires-Dist: flit >=3.11 ; extra == "dev"
Requires-Dist: h5netcdf >=1.4.0 ; extra == "dev"
Requires-Dist: h5py ; extra == "dev"
Requires-Dist: ipython >=8.20.0 ; extra == "dev"
Requires-Dist: matplotlib >=3.9.0 ; extra == "dev"
Requires-Dist: mypy >=1.17.1 ; extra == "dev"
Requires-Dist: nbval >=0.11.0 ; extra == "dev"
Requires-Dist: nox >=2024.10.09 ; extra == "dev"
Requires-Dist: numpydoc >=1.8.0 ; extra == "dev"
Requires-Dist: pre-commit >=4.0.0 ; extra == "dev"
Requires-Dist: pytest >=8.3.0 ; extra == "dev"
Requires-Dist: pytest-cov >=6.0.0 ; extra == "dev"
Requires-Dist: ruff >=0.10.0 ; extra == "dev"
Requires-Dist: vulture >=2.14 ; extra == "dev"
Requires-Dist: xclim >=0.54.0 ; extra == "dev"
Requires-Dist: yamllint >=1.37.1 ; extra == "dev"
Requires-Dist: ipykernel ; extra == "docs"
Requires-Dist: matplotlib >=3.9.0 ; extra == "docs"
Requires-Dist: nbsphinx >=0.9.5 ; extra == "docs"
Requires-Dist: pybtex >=0.24.0 ; extra == "docs"
Requires-Dist: pydata-sphinx-theme >=0.16.0 ; extra == "docs"
Requires-Dist: sphinx >=8.2.0 ; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints >=3.2.0 ; extra == "docs"
Requires-Dist: sphinx-copybutton ; extra == "docs"
Requires-Dist: sphinx-mdinclude ; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex >=2.6.0 ; extra == "docs"
Project-URL: Homepage, https://lsapy.readthedocs.io/en/stable/
Project-URL: Issues, https://github.com/baptistehamon/lsapy/issues
Project-URL: Source, https://github.com/baptistehamon/lsapy
Project-URL: Zenodo, https://doi.org/10.5281/zenodo.15015110
Provides-Extra: all
Provides-Extra: dev
Provides-Extra: docs

==========================================
LSAPy: Land Suitability Analysis in Python
==========================================

.. image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/lsapy/LSAPy_Logo_FullColour.png
    :class: dark-light
    :align: center
    :target: https://github.com/baptistehamon/lsapy
    :width: 400px
    :alt: LSAPy Logo

|pypi| |conda| |python-versions| |status| |testing| |coverage| |ruff| |pre-commit| |docs| |question| |preprint| |zenodo|

*LSAPy* (Land Suitability Analysis in Python) is a highly customizable, open-source Python library designed
to streamline and enhance Land Suitability Analysis (LSA) workflows. Its objective is to make conducting LSA
in Python easier and more accessible to users. The package implements a fuzzy-logic approach and provides a
set of objects that work together to deliver a flexible and user-defined LSA framework.

By relying on `xarray`_ objects for computation, *LSAPy* is specifically designed to facilitate LSA under climate
change projections. Moreover, the use of `xarray`_ allows for seamless integration with the broader Python ecosystem,
such as `dask`_ for efficient parallel processing and `matplotlib`_ for data visualisation. The modular design of
*LSAPy* addresses some limitations of existing LSA tools by offering greater flexibility, reproducibility, and
scalability for research and practical applications.

.. _`xarray`: https://xarray.pydata.org/en/stable/
.. _`dask`: https://docs.dask.org/en/stable/
.. _`matplotlib`: https://matplotlib.org/stable/

Quick Install
-------------
To install *LSAPy*, you can use `pip`:

.. code-block:: shell

    pip install lsapy

or `conda`:

.. code-block:: shell

    conda install -c conda-forge lsapy

You can find the development installation instructions in the `Contribution`_ section.

Land Suitability Analysis (LSA)
-------------------------------

Below is a quick example of how to conduct a land suitability analysis using *LSAPy*.

.. _`User Guide`: https://lsapy.readthedocs.io/en/latest/notebooks/index.html

.. code-block:: python

    # import modules
    from lsapy import LandSuitabilityAnalysis, SuitabilityCriteria

    # define your criteria
    criteria = {
        "crit1": SuitabilityCriteria(
            name="criteria1",
            indicator=indicator1,  # xarray object
            func="function_name",
            fparams={"param1": value1, "param2": value2},
        ),
        "crit2": SuitabilityCriteria(
            name="criteria2",
            indicator=indicator2,  # xarray object
            func="another_function_name",
            fparams={"param1": value1, "param2": value2},
        ),
        # add all necessary criteria
    }

    # define your land suitability
    lsa = LandSuitabilityAnalysis(
        land_use="land_use_name",
        criteria=criteria,
    )

    # run your analysis
    lsa.run(params)

For more detailed tutorials and examples, please refer to the `User Guide`_.

Contributing
------------

*LSAPy* is an open-source project and we welcome contributions from the community. If you are interested in contributing, please
refer to the `Contribution`_ section for guidelines on how to get started helping us improve the library.

How to cite *LSAPy*
-------------------

If you use *LSAPy* in your research or project, please consider citing it. The software is currently under review by
`pyOpenSci <https://github.com/pyOpenSci/software-submission/issues/261>`__  for publication in the `Journal of Open Source Software`
(JOSS), and we will update this section with the relevant reference once the review process is complete. In the meantime,
you can cite the preprint, which is available on `Research Square` : https://doi.org/10.21203/rs.3.rs-8399348/v1.

If you wish to cite a specific version of the software, you can find the relevant reference on `Zenodo` :
https://doi.org/10.5281/zenodo.15015110.

Credits
-------

The development of *LSAPy* started as part of a PhD, funded by the `Food Transition 2050`_  Joint Postgraduate School and hosted
by the `University of Canterbury`_ in New Zealand.

|FT2050| |UC-white| |UC-black|

The Python package has been created following the `pyOpenSci Guidebook`_.

.. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
.. _`Food Transition 2050`: https://www.foodtransitions2050.ac.nz/
.. _`University of Canterbury`: https://www.canterbury.ac.nz/
.. _`pyOpenSci Guidebook`: https://www.pyopensci.org/python-package-guide/

.. |logo| image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/lsapy/LSAPy_Logo_FullColour.png
    :class: dark-light
    :target: https://github.com/baptistehamon/lsapy
    :width: 400px
    :alt: LSAPy Logo

.. |FT2050| image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/FT2050-full_colour.png
    :class: dark-light
    :target: https://www.foodtransitions2050.ac.nz/
    :width: 200px
    :alt: Food Transition 2050 Logo

.. |UC-white| image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/UCWhite.png
    :class: only-dark
    :target: https://www.canterbury.ac.nz/
    :width: 100px
    :alt: University of Canterbury Logo

.. |UC-black| image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/UCBlack.png
    :class: only-light
    :target: https://www.canterbury.ac.nz/
    :width: 100px
    :alt: University of Canterbury Logo

.. |pypi| image:: https://img.shields.io/pypi/v/lsapy.svg
    :target: https://pypi.python.org/pypi/lsapy
    :alt: Python Package Index Build

.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/lsapy
    :target: https://anaconda.org/conda-forge/lsapy
    :alt: Conda Version

.. |status| image:: https://www.repostatus.org/badges/latest/active.svg
    :target: https://www.repostatus.org/#active
    :alt: Project Status: Active - The project has reached a stable, usable state and is being actively developed.

.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.15015111.svg
    :target: https://doi.org/10.5281/zenodo.15015111
    :alt: Zenodo DOI

.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. |docs| image:: https://readthedocs.org/projects/lsapy/badge/
    :target: https://lsapy.readthedocs.io/en/latest/
    :alt: Documentation Status

.. |question| image:: https://img.shields.io/badge/Question_%3F-blue?style=social&logo=github
    :target: https://github.com/baptistehamon/lsapy/labels/question
    :alt: Link to question issues

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/baptistehamon/lsapy/main.svg
   :target: https://results.pre-commit.ci/latest/github/baptistehamon/lsapy/main
   :alt: pre-commit.ci status

.. |testing| image:: https://github.com/baptistehamon/lsapy/actions/workflows/testing.yml/badge.svg
    :target: https://github.com/baptistehamon/lsapy/actions/workflows/testing.yml
    :alt: Testing Status

.. |coverage| image:: https://coveralls.io/repos/github/baptistehamon/lsapy/badge.svg
    :target: https://coveralls.io/github/baptistehamon/lsapy
    :alt: Coverage Status (Coveralls)

.. |python-versions| image:: https://img.shields.io/pypi/pyversions/lsapy
        :target: https://pypi.python.org/pypi/lsapy
        :alt: Supported Python Versions

.. |preprint| image:: https://img.shields.io/badge/preprint-10.21203%2Frs.3.rs--8399348%2Fv1-brightgreen?style=flat&color=brightgreen
    :target: https://doi.org/10.21203/rs.3.rs-8399348/v1
    :alt: Link to preprint on Research Square

