A Python package for Land Suitability Analysis.
Project description
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.
The Python package has been created following the pyOpenSci Guidebook.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7f716f09b09508275a1ff907ad0d75b01c1dce22e92f566c0323b4da437f592
|
|
| MD5 |
d6208b331fcecbc3b5df0ce358fb5549
|
|
| BLAKE2b-256 |
197b0da2549092066bfa379777cd25901521f912fcf6b307938d0f9b0ab9be27
|
Provenance
The following attestation bundles were made for lsapy-0.4.0.tar.gz:
Publisher:
publish-pypi.yml on baptistehamon/lsapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lsapy-0.4.0.tar.gz -
Subject digest:
f7f716f09b09508275a1ff907ad0d75b01c1dce22e92f566c0323b4da437f592 - Sigstore transparency entry: 1530768809
- Sigstore integration time:
-
Permalink:
baptistehamon/lsapy@73e23b4a35221925a21f22d85e193dfbbdefd863 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/baptistehamon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@73e23b4a35221925a21f22d85e193dfbbdefd863 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e9be097314c2be6fed0b9d9662bc0fb7fc766a094a91bfb7511de9d8ab7ffd8
|
|
| MD5 |
8fdd1a90a75c2840f47de47f6a0e2866
|
|
| BLAKE2b-256 |
2459a5f24b6ed5a4b50e763b9bfb922acbb194d7306094e1192d8d9c45837047
|
Provenance
The following attestation bundles were made for lsapy-0.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on baptistehamon/lsapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lsapy-0.4.0-py3-none-any.whl -
Subject digest:
0e9be097314c2be6fed0b9d9662bc0fb7fc766a094a91bfb7511de9d8ab7ffd8 - Sigstore transparency entry: 1530768912
- Sigstore integration time:
-
Permalink:
baptistehamon/lsapy@73e23b4a35221925a21f22d85e193dfbbdefd863 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/baptistehamon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@73e23b4a35221925a21f22d85e193dfbbdefd863 -
Trigger Event:
release
-
Statement type: