get_LSOA_data: Get LSOA energy consumption data

Description Usage Arguments Value Examples

View source: R/lsoa.r

Description

This function fetches LSOA (Lower Super Output Area) data from the DECC website.

Usage

1
2
get_LSOA_data(year = max(get_LSOA_years()), fuel = c("electricity", "gas"),
  sector = "domestic", id, dir)

Arguments

year

the years of data to fetch. The default is the most recent year.

sector

a vector of economic sectors to fetch. For LSOA data, only 'domestic' is allowed.

fuel

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

id

a vector of LSOA ids to fetch. If not specified, then all LSOAs are retrieved.

dir

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

Value

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

Examples

1
2
3
4
## Not run: 
lsoa_data <- get_LSOA_data() # Gets all data

## End(Not run)

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