Learn R Programming

pxweb (version 0.19.2)

pxweb_interactive: Find and download data interactively from a PXWEB API

Description

Wrapper function (for pxweb_get) to simply find and download data to the current R session. interactive_pxweb() is a deprecated alias for pxweb_interactive().

Usage

pxweb_interactive(x = NULL)

interactive_pxweb(x = NULL)

Value

Invisibly returns a list with at least:

url

The URL to the selected data table.

query

A pxweb_query object that can be passed to pxweb_get.

If data is downloaded during the interactive session, the list also includes data, containing the downloaded data object returned by pxweb_get. This return value is not the same as calling pxweb_get() directly.

Arguments

x

The name or alias of the pxweb api to connect to, a pxweb object or an url.

See Also

pxweb_get

Examples

Run this code
pxweb_api_catalogue() # List apis

## The examples below can only be run in interactive mode
##  x <- pxweb_interactive()
##  x <- pxweb_interactive(x = "api.scb.se")
##  x <- pxweb_interactive(x = "https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/")
##  x <- pxweb_interactive(x = "https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/")

Run the code above in your browser using DataLab