get_SOA_data: Get SOA energy consumption data

Description Usage Arguments Value

View source: R/soa.r

Description

Gets SOA (Super Output Area) energy consumption data from the DECC website. You can select which SOA level, sector, year, and fuel type to fetch, as well as specifying a directory for local caching.

Usage

1
2
get_SOA_data(level, year = max(get_SOA_years()), sector = c("domestic",
  "nondomestic"), fuel = c("electricity", "gas"), id, dir)

Arguments

level

either "LSOA" or "MSOA"

year

the year for which you want data. Defaults to the most recent year available.

sector

the economic sector to fetch. Valid values are 'domestic', 'nondomestic'

fuel

the fuel type to fetch. Valid values are 'electricity', 'gas'

id

the unique id of the SOA to fetch. If not specified, then all SOAs are retrieved.

dir

an optional directory in which to save a copy of the data

Value

a long data frame with the requested data. The 'energy' column is measured in GWh.


jkeirstead/decctools documentation built on May 19, 2019, 11:41 a.m.