require(masDMT)
require(knitr)
require(kableExtra)

knitr::opts_chunk$set(fig.path = "man/figures/", echo = TRUE)
register_path(list(dmt.data=system.file(package='masDMT', 'extdata')))

Collecting data paths

Many packages focus on the access to raster, vector, and tabular data, providing constant updates and improvements. For this reason, masDMT does not offer additional data access tools. Instead, it helps users locate relevant data. list_data() uses unique data identifiers as displayed in the MAS data catalog to find and report metadata on the relevant data files, including their format and location. As shown below, we can construct a data call in different levels of complexity, from a generic dataset request to a combination of dataset, subdataset, and spatial resolution.

# find all files for dataset "CCI_landCover"
list_data('CCI_landCover')

# find all files for subdataset "landCover" of dataset "CCI_landCover"
list_data('CCI_landCover/landCover')

# find all files subdataset "landCover" of dataset "CCI_landCover" with a resolution of "300m"
list_data('CCI_landCover/landCover/300m')

Calling `list_data()` without specifying a dataset call will return a data.frame listing all registered datasets. It is a useful tool to consult the complexity of the available data, helping us refine our search query.

wzxhzdk:2 wzxhzdk:3

macroecology-society/masDMT documentation built on July 2, 2024, 4:08 a.m.