Skip to main content

A Python package for Land Suitability Analysis.

Project description

LSAPy Logo

Python Package Index Build Conda Version Supported Python Versions Project Status: Active - The project has reached a stable, usable state and is being actively developed. Testing Status Coverage Status (Coveralls) Ruff pre-commit.ci status Documentation Status Link to question issues Link to preprint on Research Square Zenodo DOI

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.

Quick Install

To install LSAPy, you can use pip:

pip install lsapy

or conda:

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.

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

Food Transition 2050 Logo University of Canterbury Logo University of Canterbury Logo

The Python package has been created following the pyOpenSci Guidebook.

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

lsapy-0.4.0.tar.gz (857.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lsapy-0.4.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file lsapy-0.4.0.tar.gz.

File metadata

  • Download URL: lsapy-0.4.0.tar.gz
  • Upload date:
  • Size: 857.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lsapy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f7f716f09b09508275a1ff907ad0d75b01c1dce22e92f566c0323b4da437f592
MD5 d6208b331fcecbc3b5df0ce358fb5549
BLAKE2b-256 197b0da2549092066bfa379777cd25901521f912fcf6b307938d0f9b0ab9be27

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsapy-0.4.0.tar.gz:

Publisher: publish-pypi.yml on baptistehamon/lsapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lsapy-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: lsapy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lsapy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e9be097314c2be6fed0b9d9662bc0fb7fc766a094a91bfb7511de9d8ab7ffd8
MD5 8fdd1a90a75c2840f47de47f6a0e2866
BLAKE2b-256 2459a5f24b6ed5a4b50e763b9bfb922acbb194d7306094e1192d8d9c45837047

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsapy-0.4.0-py3-none-any.whl:

Publisher: publish-pypi.yml on baptistehamon/lsapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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