read_resource: Read resource

Description Usage Arguments Value

View source: R/resource.R

Description

Read resource

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
read_resource(
  resource,
  sheet = NULL,
  layer = NULL,
  format = NULL,
  download_folder = NULL,
  simplify_json = TRUE,
  force_download = FALSE,
  quiet_download = TRUE,
  ...
)

Arguments

resource

Resource, an HDX resource

sheet

Character, the name of the sheet to read if XLS(X) resources. The first sheet is read by default.

layer

Character, the name of the layer to read if spatial data. The first sheet is read by default.

format

Character, file format, csv, zipped csv, excel, xlsx, zipped shapefile, etc.

download_folder

Character, the path of the folder to store the downloaded data

simplify_json

Logical, if TRUE simplifies nested lists into vectors and data frames for JSON resources

force_download

Logical, force download if TRUE

quiet_download

logical, silent download

...

extra parameters

Value

an tibble, a list, a stars or a sf object depending on the type of resource you are reading from HDX


dickoa/rhdx documentation built on Oct. 13, 2021, 8:36 p.m.