This package is an R wrapper for the Syspower SKM API and the developer version of this package and README can be found on github.com/krose/skm
This package is in early beta and it will most likely not have backward compatibility. Pull requests are accepted.
Install the package from github.
if(!require("devtools")) install.packages("devtools") library("devtools") install_github("krose/skm")
Load the package.
library("skm")
SKM syspowers has made a new platform SYSPOWER5 where each user gets a token to use for webqueries. The new website is https://syspower5.skm.no. When entering this site for the first time you will have to follow these instructions:
• Push «Get access to new SYSPOWER». • A new page will pop up and you fill in all your details in «User credentials request». • After filling in your «E-Mail» in the last line, push «Save» and an e-mail with your new password will be sent to you. • Use your e-mail and new password when you log in to the new platform SYSPOWER5.
When you have completed the above steps and have logged in to SYSPOWER5 then go to Webquery and you will find your token in the url between "Webquery url" and "Export data".
(UMM webquery update in progress)
Let's load the daily closing prices for the contract ENOQ4-14 in 2014.
q414 <- skm_webquery(token = token, series_name = "NPENOQ414", interval = "day", start_time = "01-01-2014", end_time = "0") str(q414)
Let's take a look at the SPOT for the system and DK1. Notice i query more than one series.
spot <- skm_webquery(token = token, series_name = c("SPOT", "SPOTDK1"), interval = "day", start_time = "01-01-2014", end_time = "0") str(spot)
And then there is hourly SPOT. Notice the start time.
spot <- skm_webquery(token = token, series_name = c("SPOT", "SPOTDK1"), interval = "Hour", start_time = "w-2", end_time = "0") str(spot)
Here are just a few examples:
## transmission str(skm_ummquery(user_id = user_id, user_password = user_password, interval = "day", start_time = "2014-08-01", end_time = "2014-08-31", accrow = "no", type = "transmission", areas = c("Sweden", "Denmark"), internalorfuels = "no")) ## production str(skm_ummquery(user_id = user_id, user_password = user_password, interval = "hour", start_time = "2014-08-01", end_time = "2014-08-31", accrow = "no", type = "production", areas = "Nordpool", internalorfuels = "Nuclear")) ## station str(skm_ummquery(user_id = user_id, user_password = user_password, interval = "day", start_time = "2014-08-01", end_time = "2014-08-31", accrow = "no", type = "station", areas = NULL, internalorfuels = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.