Simple Layers for Species Distributions Modelling
This package offers very simple types and functions to interact with bioclimatic data and the output of species distribution models.
Curious to know more? Have a look at our paper in Journal of Open Source Software, our JuliaCon poster, our NextJournal demo notebook, and our extended documentation, or keep reading for a quick overview.
The currently released version of the package can be installed with:
] add SimpleSDMLayers
The package is also designed to work with
GBIF, so you may want to use the following line instead:
] add SimpleSDMLayers GBIF
All types belong to the abstract
SimpleSDMLayer, and are organised in the
same way: a
grid field storing a matrix of data (of any type!), and the
top coordinates (as floating point values).
The two core types of the package are
SimpleSDMResponse. The only difference between the two is that predictors
are immutable, but responses are.
Most of the methods are overloads from
Base. In particular,
objects can be accessed like normal two-dimensional arrays, in which case
they return an object of the same type if called with a range, and the value
if called with a single position.
It is also possible to crop a layer based on a bounding box:
p[left=left, right=right, bottom=bottom, top=top]
If the layer is of the
SimpleSDMResponse type, it is possible to write to it:
p[-74.3, 17.65] = 1.4
This is only defined for
|Data provider||Dataset||Layers||Future models||Future scenarios|
When downloaded (using
SimpleSDMPredictor), the layers are stored either in an
assets subfolder of the current project (strongly advised against), or at the
location determined by the
SDMLAYERS_PATH environment variable. The datasets/providers
with future models and scenarios also accept years.
Plots package, one can call the
plot methods. Note that
plot defaults to a
temperature = SimpleSDMPredictor(WorldClim, BioClim, 1) plot(temperature)
One can also use
scatter(l1, l2) where both
l2 are layers with the
same dimensions and bounding box, to get a scatterplot of the values. This will
only show the pixels that have non-
nothing values in both layers. Similarly,
How to contribute
Please read the Code of Conduct and the contributing guidelines.