Learn R Programming

pxweb (version 0.5.3)

get_pxweb_metadata: Get data

Description

Get data from the API. If at the lowest node, provide the user with a friendly message about this.

Usage

get_pxweb_metadata(path = NULL, node = NULL, topnodes = NULL,
  quiet = TRUE, baseURL = NULL, ...)

Arguments

path
URL to fetch metadata from. If left empty, the function constructs a URL from the node and topnodes arguments
node
A string with the name of the node to fetch. This is ignored if path is supplied.
topnodes
A string or list of strings with the names of the parent nodes of node. This is ignored if path is supplied.
quiet
Quiet mode (never return a message to the user)
baseURL
The base URL to use, depending on the web service. Needed if path argument is not provided.
...
Further arguments passed to base_url().

Examples

Run this code
api_url <- base_url("api.scb.se", language = "sv")
top_node <- get_pxweb_metadata(api_url)

bottom_node <- get_pxweb_metadata("http://api.scb.se/OV0104/v1/doris/sv/ssd/AM/AM0114/LCIArbKv")

Run the code above in your browser using DataLab