Title: Access the 'PREDICTS' Biodiversity Database
Version: 0.1.0
Description: Fetches the 'PREDICTS' database and relevant metadata from the Data Portal at the Natural History Museum, London https://data.nhm.ac.uk. Data were collated from over 400 existing spatial comparisons of local-scale biodiversity exposed to different intensities and types of anthropogenic pressures, from sites around the world. These data are described in Hudson et al. (2013) <doi:10.1002/ece3.2579>.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: glue, httr2, jsonlite, logger
Suggests: dplyr, knitr, rmarkdown, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Depends: R (≥ 4.1.0)
Config/testthat/parallel: true
VignetteBuilder: knitr
URL: https://biodiversity-futures-lab.github.io/predictsr/
NeedsCompilation: no
Packaged: 2025-07-07 10:15:10 UTC; connd
Author: Connor Duffin [aut, cre, cph]
Maintainer: Connor Duffin <connor.p.duffin@gmail.com>
Repository: CRAN
Date/Publication: 2025-07-10 14:50:02 UTC

predictsr: Access the 'PREDICTS' Biodiversity Database

Description

Fetches the 'PREDICTS' database and relevant metadata from the Data Portal at the Natural History Museum, London https://data.nhm.ac.uk. Data were collated from over 400 existing spatial comparisons of local-scale biodiversity exposed to different intensities and types of anthropogenic pressures, from sites around the world. These data are described in Hudson et al. (2013) doi:10.1002/ece3.2579.

Author(s)

Maintainer: Connor Duffin connor.p.duffin@gmail.com [copyright holder]

See Also

Useful links:


Get a dataframe describing the columns in the PREDICTS database extract.

Description

Get a dataframe describing the columns in the PREDICTS database extract.

Usage

GetColumnDescriptions(...)

Arguments

...

extra arguments passed to read.csv.

Value

The column descriptions in the format as a dataframe.

Examples


  descriptions <- GetColumnDescriptions()



Read the PREDICTS database into either a dataframe.

Description

This returns the complete PREDICTS database extract from the latest release/s. The data were collected as part of the PREDICTS project - Projecting Responses of Ecological Diversity In Changing Terrestrial Systems, and comprise of two releases. The first was in 2016, and the second in 2022. This function accesses the 2016 and/or 2022 release.

Usage

GetPredictsData(extract = c(2016, 2022))

Arguments

extract

numeric, year/s corresponding to PREDICTS database releases to download. Options are 2016 or 2022. Defaults to c(2016, 2022) - the whole dataset.

Value

A dataframe containing the v1.1 PREDICTS database extract/s.

Examples


  predicts <- GetPredictsData()
  predicts_2016 <- GetPredictsData(extract = 2016)



Get the PREDICTS database site level summaries.

Description

This acesses summary data for the relevant PREDICTS database extract. There are two releases of the PREDICTS database, an initial release in 2016, and an additional release in 2022. The user chooses whether to pull summary data for the 2016 and/or 2022 release.

Usage

GetSitelevelSummaries(extract = c(2016, 2022))

Arguments

extract

Numeric, year/s corresponding to PREDICTS database releases to download. Options are 2016 or 2022. Defaults to c(2016, 2022) - the whole dataset.

Value

The site-level summary data as a dataframe.

Examples


  summaries <- GetSitelevelSummaries()
  summaries_2016 <- GetSitelevelSummaries(extract = 2016)