# Read a datapackage.json file
package <- read_package(
system.file("extdata", "datapackage.json", package = "frictionless")
)
package
# Read data from the resource "observations"
read_resource(package, "observations")
# The above tibble is merged from 2 files listed in the resource path
package$resources[[2]]$path
# The column names and types are derived from the resource schema
purrr::map_chr(package$resources[[2]]$schema$fields, "name")
purrr::map_chr(package$resources[[2]]$schema$fields, "type")
# Read data from the resource "deployments" with column selection
read_resource(package, "deployments", col_select = c("latitude", "longitude"))
Run the code above in your browser using DataLab