SimpleSDMDatasets
SimpleSDMDatasets.blurb
— Methodblurb(::Type{P}) where {P <: RasterProvider}
SimpleSDMDatasets.destination
— Methoddestination(::RasterData{P, D}; kwargs...) where {P <: RasterProvider, D <: RasterDataset}
This method specifies where the data should be stored locally. By default, it is the _LAYER_PATH
, followed by the provider name, followed by the dataset name.
SimpleSDMDatasets.downloader
— MethodSimpleSDMDatasets.downloader
...
SimpleSDMDatasets.downloadtype
— Methoddownloadtype(::R) where {R <: RasterData}
This method returns a RasterDownloadType
that is used internally to be more explicit about the type of object that is downloaded from the raster source. The supported values are _file
(the default, which is an ascii, geotiff, NetCDF, etc. single file), and _zip
(a zip archive containing files). This is a trait because we cannot trust file extensions.
SimpleSDMDatasets.downloadtype
— Methoddownloadtype(data::R, ::F) where {R <: RasterData, F <: Future}
This method provides the type of the downloaded object for a combination of a raster source and a future scenario as a RasterDownloadType
.
If no overload is given, this will default to downloadtype(data)
, as we can assume that the type of downloaded object is the same for both current and future scenarios.
SimpleSDMDatasets.extrakeys
— Methodextrakeys(::R) where {R <: RasterData}
This method controls whether the dataset has additional keys. If this is nothing
(the default), it means that the dataset can be accessed using only the default keys specified in this interface.
An overload of this method is required when there are additional keywords needed to access the data (e.g. full=true
for the EarthEnv
land-cover data), and must return a Dict
, with Symbol
keys and Tuple
s of pairs as values.
The key is the keyword argument passed to downloader
and the tuple lists all accepted values, in the format value => explanation
.
Any dataset with a return value that is not nothing
must accept the keyword arguments specified in the return value.
SimpleSDMDatasets.filetype
— Methodfiletype(::R) where {R <: RasterData}
This method returns a RasterFileType
that represents the format of the raster data. RasterFileType
is an enumerated type. This overload is particularly important as it will determine how the returned file path should be read.
The default value is _tiff
.
SimpleSDMDatasets.filetype
— Methodfiletype(data::R, ::F) where {R <: RasterData, F <: Future}
This method provides the format of the stored raster for a combination of a raster source and a future scenario as a RasterFileType
.
If no overload is given, this will default to filetype(data)
, as we can assume that the raster format is the same for both current and future scenarios.
SimpleSDMDatasets.keychecker
— MethodSimpleSDMDatasets.keychecker(data::R; kwargs...) where {R <: RasterData}
Checks that the keyword arguments passed to a downloader are correct, i.e. the data provider / source being retrieved supports them.
SimpleSDMDatasets.layerdescriptions
— Methodlayerdescriptions(data::R) where {R <: RasterData}
Human-readable names the layers. This must be a dictionary mapping the layer names (as returned by layers
) to a string explaining the contents of the layers.
SimpleSDMDatasets.layers
— Methodlayers(::R) where {R <: RasterData}
This method controls whether the dataset has named layers. If this is nothing
(the default), it means that the dataset will have a single layer.
An overload of this method is required when there are multiple layers available, and must return a Vector
, usually of String
. Note that by default, the layers can also be accessed by using an Integer
, in which case layer=i
will be the i-th entry in layers(data)
.
Any dataset with a return value that is not nothing
must accept the layer
keyword.
SimpleSDMDatasets.months
— Methodmonths(::R) where {R <: RasterData}
This method controls whether the dataset has monthly layers. If this is nothing
(the default), it means that the dataset is not accessible at a monthly resolution.
An overload of this method is required when there are multiple months available, and must return a Vector{Dates.Month}
.
Any dataset with a return value that is not nothing
must accept the month
keyword.
SimpleSDMDatasets.provides
— Methodprovides(::Type{P}, ::Type{D}) where {P <: RasterProvider, D <: RasterDataset}
This is the core function upon which the entire interface is built. Its purpose is to specify whether a specific dataset is provided by a specific provider. Note that this function takes two arguments, as opposed to a RasterData
argument, because it is called in the inner constructor of RasterData
: you cannot instantiate a RasterData
with an incompatible provider/dataset combination.
The default value of this function is false
, and to allow the use of a dataset with a provider, it is required to overload it for this specific pair so that it returns true
.
SimpleSDMDatasets.provides
— Methodprovides(::R, ::F) where {R <: RasterData, F <: Future}
This method for provides
specifies whether a RasterData
combination has support for the value of the Future
(a combination of a FutureScenario
and a FutureModel
) given as the second argument. Note that this function is not called as part of the Future
constructor (because models and scenarios are messy and dataset dependent), but is still called when requesting data.
The default value of this function is false
, and to allow the use of a future dataset with a given provider, it is required to overload it so that it returns true
.
SimpleSDMDatasets.resolutions
— Methodresolutions(::R) where {R <: RasterData}
This method controls whether the dataset has a resolution, i.e. a grid size. If this is nothing
(the default), it means that the dataset is only given at a set resolution.
An overload of this method is required when there are multiple resolutions available, and must return a Dict
with numeric keys (for the resolution) and a string value giving an explanation of the resolution.
Any dataset with a return value that is not nothing
must accept the resolution
keyword.
SimpleSDMDatasets.resolutions
— Methodresolutions(data::R, ::F) where {R <: RasterData, F <: Future}
This methods control the resolutions
for a future dataset. Unless overloaded, it will return resolutions(data)
.
SimpleSDMDatasets.source
— Methodsource(::RasterData{P, D}; kwargs...) where {P <: RasterProvider, D <: RasterDataset}
This method specifies the URL for the data. It defaults to nothing
, so this method must be overloaded.
SimpleSDMDatasets.timespans
— Methodtimespans(data::R, ::F) where {R <: RasterData, F <: Future}
For datasets with a Future
scenario, this method should return a Vector
of Pairs
, which are formatted as
Year(start) => Year(end)
There is a method working on a single RasterData
argument, defaulting to returning nothing
, but it should never be overloaded.
SimpleSDMDatasets.url
— Methodurl(::P) where {P <: DataProvider}
The URL for the data provider - if there is no specific URL for each dataset, it is enough to define this one.
SimpleSDMDatasets.AmphibianRichness
— TypeAmphibianRichness
SimpleSDMDatasets.AverageTemperature
— TypeAverageTemperature
SimpleSDMDatasets.BioClim
— TypeBioClim
SimpleSDMDatasets.BiodiversityMapping
— TypeBiodiversityMapping
Global biodiveristy data from https://biodiversitymapping.org/ - see this website for citation information
SimpleSDMDatasets.BirdRichness
— TypeBirdRichness
SimpleSDMDatasets.CHELSA1
— TypeCHELSA1
SimpleSDMDatasets.CHELSA2
— TypeCHELSA2
SimpleSDMDatasets.Copernicus
— TypeCopernicus
Produced by the global component of the Copernicus Land Service, derived from PROBA-V satellite observations and ancillary datasets – see https://land.copernicus.eu/en/products/global-dynamic-land-cover
SimpleSDMDatasets.EarthEnv
— TypeEarthEnv
SimpleSDMDatasets.Elevation
— TypeElevation
SimpleSDMDatasets.HabitatHeterogeneity
— TypeHabitatHeterogeneity
SimpleSDMDatasets.LandCover
— TypeLandCover
SimpleSDMDatasets.MammalRichness
— TypeMammalRichness
SimpleSDMDatasets.MaximumTemperature
— TypeMaximumTemperature
SimpleSDMDatasets.MinimumTemperature
— TypeMinimumTemperature
SimpleSDMDatasets.PaleoClim
— TypePaleoClim
Paleoclimate data from http://www.paleoclim.org/ - see this website for citation information
SimpleSDMDatasets.Precipitation
— TypePrecipitation
SimpleSDMDatasets.Projection
— TypeFuture{S <: FutureScenario, M <: FutureModel}
This type is similar to RasterData
but describes a combination of a scenario and a model. Note that unlike RasterData
, there is no type check in the inner constructor; instead, the way to check that a provider/dataset/scenario/model combination exists is to overload the provides
method for a dataset and future.
SimpleSDMDatasets.RasterCRS
— TypeRasterCRS
This enum stores the possible coordinate representation system of returned files. They are listed with instances(RasterProjection)
.
SimpleSDMDatasets.RasterData
— TypeRasterData{P <: RasterProvider, D <: RasterDataset}
The RasterData
type is the main user-facing type for SimpleSDMDatasets
. Specifically, this is a singleton parametric type, where the two parameters are the type of the RasterProvider
and the RasterDataset
. Note that the inner constructor calls the provides
method on the provider/dataset pair to check that this combination exists.
SimpleSDMDatasets.RasterDataset
— TypeRasterDataset
This is an abstract type to label something as being a dataset. Datasets are given by RasterProvider
s, and the same dataset can have multiple providers.
SimpleSDMDatasets.RasterDownloadType
— TypeRasterDownloadType
This enum stores the possible types of downloaded files. They are listed with instances(RasterDownloadType)
, and are currently limited to _file
(a file, can be read directly) and _zip
(an archive, must be unzipped).
SimpleSDMDatasets.RasterFileType
— TypeRasterFileType
This enum stores the possible types of returned files. They are listed with instances(RasterFileType)
.
SimpleSDMDatasets.RasterProvider
— TypeRasterProvider
This is an abstract type to label something as a provider of RasterDataset
s. For example, WorldClim2 and CHELSA2 are RasterProvider
s.
SimpleSDMDatasets.SolarRadiation
— TypeSolarRadiation
SimpleSDMDatasets.Topography
— TypeTopography
SimpleSDMDatasets.WaterVaporPressure
— TypeWaterVaporPressure
SimpleSDMDatasets.WindSpeed
— TypeWindSpeed
SimpleSDMDatasets.WorldClim2
— TypeWorldClim2
This provider offers access to the version 2 of the WorldClim data, accessible from http://www.worldclim.com/version2
.