Description Usage Arguments Value Examples
This function fetches MSOA (Middle Super Output Area) data from the DECC website. Since the format of these files tends to change just enough to be irritating for dependent code, there is also an option that allows you to cache a local copy.
1 2 | get_MSOA_data(year = max(get_MSOA_years()), sector = c("domestic",
"nondomestic"), fuel = c("electricity", "gas"), id, dir)
|
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 MSOA to fetch. If not specified, then all MSOAs are retrieved. |
dir |
an optional directory in which to save a copy of the data |
a long data frame with the requested data. The 'energy' column is measured in GWh.
1 2 3 4 | ## Not run:
msoa_data <- get_MSOA_data() # Gets all data
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.