0

I need to get information from the following link https://dashboard-baltic.electricity-balancing.eu/en/bids-activated/index?period=search&show=report&start=2020-01-01&end=2020-10-16&type=normal

I tried following two methods, however with no result:

1)
url<-paste("https://dashboard-baltic.electricity-balancing.eu/en/bids-activated/index?period=search&show=report&start=2020-01-01&end=2020-10-16&type=normal")

df.np <- readHTMLTable(htmlTreeParse(getURL(url), useInternalNodes=TRUE))[[1]]

2)
url<-GET("https://dashboard-baltic.electricity-balancing.eu/en/bids-activated/index?period=search&show=report&start=2020-01-01&end=2020-10-16&type=normal")


data <- read.table(text = content(url, "text"), sep = ",",
                   header = TRUE,
                   na.strings  = c("-", "", "n/e"))

Can anybody help?

Epo Luusk
  • 37
  • 5

1 Answers1

0

You can read the data directly into R by find out the link where the csv is stored. Since this is semi-colon delimited file we use read.csv2.

data <- read.csv2('https://dashboard-baltic.electricity-balancing.eu/api/bids/activated/aggregated?report=normal&format=report&start=2019-12-31+22%3A00&end=2020-10-16+21%3A00&fields=_datetime%2Cupward%2Cdownward&language=en&format=csv')

Note that this file is structured in a different way than what is shown but it is the same file that you get when you click on 'Download' on the webpage.

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213