np_prices: Get the spot prices for a specified price_date.

Description Usage Arguments References Examples

View source: R/np_prices.R

Description

The function will return hourly, daily, weekly, monthly or yearly spot prices. The hourly prices are the prices the Nordic end users pay and the price which the producers get. The daily, weekly, monthly and yearly prices are base (mean over a period) and not necessarily equal to the price the end user pays or the price the producer gets, as the consumption and production is not flat. Learn more at the website.

Usage

1
2
3
4
5
6
7
np_prices(
  time_unit = c("hourly", "daily", "weekly", "monthly", "yearly"),
  currency = c("EUR", "NOK", "DKK", "SEK"),
  price_date = Sys.Date() + lubridate::days(1),
  areas = NULL,
  long_data = FALSE
)

Arguments

time_unit

The time unit to return the data in.

currency

Price currency. EUR, NOK, DKK or SEK.

price_date

Date class object. The default is for tomorrow.

areas

A character vector with the areas you are interested in. Defaults to all.

long_data

Boolean. Do you want the data returned as a long or wide data.frame?

References

http://nordpoolspot.com/How-does-it-work/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  # Get the prices for tommorow.
  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.