pxweb (version 0.9.1)

pxweb_get_data: Do a GET call to PXWEB API and return a data.frame

Description

Do a GET call to PXWEB API and return a data.frame

Usage

pxweb_get_data(url, query, verbose = TRUE, column.name.type = "text",
  variable.value.type = "text")

Arguments

url

a pxweb object or url that can be coherced to a pxweb object.

query

a json string, json file or list object that can be coherced to a pxweb_query object.

verbose

should large queries print out progress.

column.name.type

character: should code or text be used as column names?

variable.value.type

character: should code or text be used as values in columns?

Details

The functions use will do a pxweb_query to a PXWEB url and return a data.frame. This is a wrapper for the pxweb_get function.

See Also

See pxweb_get for mor general usage and pxweb_query for details on PXWEB queries.

Examples

Run this code
# NOT RUN {
url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy"
query <- file.path(system.file(package = "pxweb"), 
                   "extdata", "examples", "json_query_example.json")
df <- pxweb_get_data(url = url, query = query)

# }

Run the code above in your browser using DataLab