Access various datasets used in vignettes and studies associated with the broader lbmech project

getData(data, name = NULL, dir = tempdir(), timeout = 999)

Arguments

data

A character string indicating the name of the dataset to access. See details below.

name

For values of data that download data (see details), what will be the file/directory name of the downloaded items?

dir

Directory to which downloaded data will be saved. Default is tempdior().

timeout

How many seconds before downloads time out? Default is 999. Temporarily overrides value in getOptions("timeout").

Value

Various, depending on data selection:

data = 'baleares-currents' returns a SpatRaster with ocean current surface velocities in m/s.

data = 'baleares-gpx' does not return any object, but creates a sub-directory name in directory dir with 15,373 GPX files, of which 15,371 can be successfully imported using importGPX.

data = 'baleares-places' imports a SpatVector with twelve points.

Details

data = 'baleares-currents' imports ocean current data around Mallorca, Menorca, and Cabrera on June 13, 2022. Data originally downloaded from E.U. Copernicus Marine Service Information. See Clementi et al. (2021). An internet connection is not needed, and parameters name and dir are ignored.

data = 'baleares-gps' downloads GPS tracks for human hikes in the Balearic Islands in GPX format from https://osf.io/77n9t/. See Lera et al. (2017). The name parameter will define the folder name in the dir directory to which the .gpx files are saved. Default name = 'gpx'. getData will not import these tracks, for that, use importGPX. An internet connection is needed.

data = 'baleares-places' imports a SpatVector with twelve locations on Mallorca, Menorca, and Cabrera in the Balearic Islands.

References

Clementi, E., Aydogdu A., Goglio, A. C., Pistoia J., Escudier R., Drudi M., Grandi A., et al. (2021). Mediterranean Sea Physics Analysis and Forecast (CMEMS MED-Currents, EAS6 System). Copernicus Marine Service. https://doi.org/10.25423/CMCC/MEDSEA_ANALYSISFORECAST_PHY_006_013_EAS7.

Lera I., Perez T., Guerrero C., Eguiluz V. M., Juiz C. (2017). Analysing human mobility patterns of hiking activities through complex network theory. PLoS ONE 12(5): e0177712. https://doi.org/10.1371/journal.pone.0177712

Examples

# Import ocean current data for the Balearic Islands

currents <- getData('baleares-currents')