format_request.R 252 Bytes
Newer Older
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
1
2
3
4
5
6
7
library(httr)
library(jsonlite)
library(rsdmx)
library(hash)


sdmx_request <- function(url) {
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
8
  as.data.frame(readSDMX(url))
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
9
10
11
12
13
14
15
16
}

json_request <- function(url) {
  fromJSON(rawToChar(GET(url)$content))
}

csv_request <- function(url) {
  read.csv(url)
17
}