Introduction

Not much.. Just a single function package that wraps the NordPool Spot API.

The package is just a pet project and in early beta. Changes can happen and I'm also very open for suggestions. The project was inspired by the Python library.

Check out how it works below...

Known Issues

# This won't work

# DST ends
np_prices("hourly", "EUR", as.Date("2016-10-30"))

# DST starts
np_prices("hourly", "EUR", as.Date("2017-03-26"))

Installation

Install the package using Hadley's devtools package.

devtools::install_github("krose/nordpoolspotr")

Examples

Here are a few examples of how to use the function. All date values are returned with the timezone CET (as they are from the API).

# Load the package.
library(nordpoolspotr)

# Get the prices for tommorow (if they are published).
np_prices("hourly", "EUR")

# Get the prices for today
np_prices("hourly", "EUR", Sys.Date())

# Get a long data frame
np_prices("hourly", "EUR", long_data = TRUE)

# Get only the Danish prices in DKK
np_prices(time_unit = "hourly", currency = "DKK", areas = c("DK1", "DK2"))


krose/nordpoolspotr documentation built on Dec. 11, 2021, 8:09 p.m.