Skip to contents

Reads information from a datapackage.json file, i.e. the descriptor file that describes the Data Package metadata and its Data Resources.

Usage

read_package(file = "datapackage.json")

Arguments

file

Path or URL to a datapackage.json file.

Value

A Data Package object, see create_package().

Details

See vignette("data-package") to learn how this function implements the Data Package standard.

See also

Other read functions: read_resource(), resources()

Examples

# Read a datapackage.json file
package <- read_package(
  system.file("extdata", "v1", "datapackage.json", package = "frictionless")
)

package
#> A Data Package with 3 resources:
#> • deployments
#> • observations
#> • media
#> Use `unclass()` to print the Data Package as a list.

# Access the Data Package properties
package$name
#> [1] "example_package"
package$created
#> [1] "2021-03-02T17:22:33Z"