fetch_data: Fetch the data from the Google sheet

View source: R/data.R

fetch_dataR Documentation

Fetch the data from the Google sheet

Description

This function retrieves the raw data from a Google spreadsheet and format them.

Usage

fetch_data(keep_geometry = FALSE)

Arguments

keep_geometry

whether or not to keep a geometry column storing the polygons associated with each country/territory (default = FALSE)

Value

a tibble with the raw data

Examples

## Not run: 
## Here is how we created the data stored in this package:

data_rangers <- fetch_data(keep_geometry = FALSE)
data_rangers_with_geo <- fetch_data(keep_geometry = TRUE)

write.csv2(data_rangers, file = "inst/extdata/raw_data/data_rangers.csv", row.names = FALSE)

if (require(usethis)) {
  usethis::use_data(data_rangers, overwrite = TRUE)
  usethis::use_data(data_rangers_with_geo, overwrite = TRUE)
}

## End(Not run)


courtiol/rangeRinPA documentation built on Sept. 29, 2022, 9:54 a.m.