A Python package to create neutral landscape models
Project description
NLMpy
NLMpy
is a Python package for the creation of neutral landscape models that
are widely used by landscape ecologists to model ecological patterns across
landscapes. NLMpy
can create both continuous patterns to represent landscape
characteristics such as elevation or moisture gradients, or categorical patterns
to represent landscape characteristics such as vegetation patches or land parcel
boundaries.
NLMpy
aims to:
- be open-source so it can be easily adapted or developed for specific modelling requirements.
- be cross-platform it can be used on any computer system.
- bring together a wide range of neutral landscape model algorithms.
- be easily integrated with geographic information system data.
- enable novel combinations and integrations of different neutral landscape model algorithms.
A full description of the package can be found in the accompanying software paper.
Quick examples
All the NLMpy
neutral landscape models are produced as two-dimensional NumPy arrays, so the
results can be easily incorporated into broader Python workflows.
Using NLMpy
to create a midpoint displacement neutral landscape model can be achieved with
only two lines of code:
from nlmpy import nlmpy
nlm = nlmpy.mpd(nRow=50, nCol=50, h=0.75)
But as described in the software paper a wide variety of different patterns can be produced.
Citation
If you use NLMpy
in your research we would be very grateful if you could please cite the
software using the following freely available software paper:
Some of the neutral landscape models available in NLMpy
were developed elsewhere. Therefore, we
think it is good practice to cite the original source a neutral landscape model so that there is appropriate
credit given not just for the implementation in NLMpy but also for the original idea. The freely available
NLMpy software paper and the
docstring preceding each function contains a reference when relevant.
We would then recommend formatting statements such as the following to give credit to both the idea and software implementation:
- "We used a midpoint displacement (Fournier et al. 1982) based neutral landscape model as implemented in NLMpy (Etherington et al. 2015)"
- "The NLMpy software (Etherington et al. 2015) was used to create Perlin noise neutral landscape models (Etherington 2022)."
Installation
NLMpy
is available on the Python Package Index, so it can be installed using:
pip install nlmpy
If that does not work you could also simply move the NLMpy.py
file to the same location
on your computer as a Python script that wants to import NLMpy
, then when those scripts are
executed they will import all the NLMpy
functions. So while this approach does not
actually install NLMpy
onto your computer, it does at least allow you to make use of the
functionality of NLMpy
within a neighbouring Python script.
Package dependencies
- numpy
- scipy
- numba
Community guidelines
We very much welcome input from others! If you find a bug, need some help, or can think of some extra functionality that would be useful, please raise an issue. Better still, please feel free to fork the project and raise a pull request if you think and can fix a bug, clarify the documentation, or improve the functionality yourself.
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
File details
Details for the file nlmpy-1.2.0.tar.gz
.
File metadata
- Download URL: nlmpy-1.2.0.tar.gz
- Upload date:
- Size: 215.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57ff0dbf2fa64a84b3b11f251e0e00da15f0c2e6961e18ca929af9a2658a0d61 |
|
MD5 | 42c9a8d6350d2b40cdf5f75f5816034c |
|
BLAKE2b-256 | 7f5660062576c59b327d04c5a85e26dc1af978cf0796a27b5541998a0c94e179 |
File details
Details for the file nlmpy-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: nlmpy-1.2.0-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 883a2a2f2bc68b8927b152bfd21b4c9f0e90292c87a56bd4f9e99e05f550a6a8 |
|
MD5 | c6f5084942fd33522e35ae353ceb6d6c |
|
BLAKE2b-256 | e80b60f84ac0bb126a68220c3e6a9a314a88b44bdffe0925e95009cc2f063ab2 |