The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

UKgrid

lifecycle CRAN status License: MIT

An R data package with the UK National Grid historical demand for electricity between April 2005 and October 2019

Overview

The UKgrid dataset is an example of a multiple seasonality time series. This time series captures the demand for electricity and its components in the UK since April 2005 using half-hour intervals. In addition, the package provides a function to extract, subset and aggregate the series into tsibble, ts, xts, zoo, data.frame, data.table, or tbl.

The data was sourced from the National Grid UK website

Installation

Install the stable version from CRAN:

install.packages("UKgrid")

or install the development version from Github:

# install.packages("remotes")
remotes::install_github("RamiKrispin/UKgrid")

Usage

library(UKgrid)

# Load the full dataset (data.frame format)
data("UKgrid")

# Extract only the demand field (ND - National Demand) using tsibble format
extract_grid(type = "tsibble", 
             columns = "ND") 

# Extract the demand between 2016 and 2017 using tbl format
extract_grid(type = "tbl", 
             columns = "ND", 
             start = 2016, 
             end = 2017)

# Extract the first 10 days in 2018 and aggregate to hourly using zoo format
extract_grid(type = "zoo", 
             columns = "ND", 
             start = as.Date("2018-01-01"), 
             end = as.Date("2018-01-10"),
             aggregate = "hourly")

More details available on the package site and vignette

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.