Datasets
SpectralIndices.get_datasets Function
get_datasets(; datasets=["S2_10m.json", "spectral.json"],
data_loc=joinpath(dirname(@__FILE__), "..", "data"))Download predefined datasets from a specified remote location and save them to a local directory.
Keyword Arguments
datasets::Array{String,1}: A list of dataset filenames to download. Defaults to["S2_10m.json", "spectral.json"].data_loc::String: The local directory path where the downloaded datasets will be saved. Defaults to adatadirectory located one level up from the script's directory.
SpectralIndices.load_dataset Function
load_dataset(dataset::String, T) -> YAXArray
load_dataset(dataset::String, T) -> DataFrameLoad a specified dataset and convert it into either a YAXArray or a DataFrame, depending on the loaded packages.
Arguments
dataset::String: The name of the dataset to load. Currently supports"sentinel"and"spectral".T: type of the dataset. To be set asYAXArrayfor "sentinel", andDataFramefor "spectral".
Returns
If YAXArrays is loaded in the namespace, returns a
YAXArrayobject containing the loaded dataset, with dimensions labeled as:x,:y, and:bands. The spatial dimensions (:xand:y) are assumed to have a size of 300 each, and the:bandsdimension includes ["B02", "B03", "B04", "B08"] bands.If DataFrames is loaded in the namespace, returns a
DataFramewith the dataset loaded into it.