extract_GVA_data: extract GVA data from ONS working file spreadsheet

Description Usage Arguments Details

Description

The data which underlies the Economic Sectors for DCMS sectors data is typically provided to DCMS as a spreadsheet from the Office for National Statistics. This function extracts the ABS data from that spreadsheet, and saves it to .Rds format.

IT IS HIGHLY ADVISEABLE TO ENSURE THAT THE DATA WHICH ARE CREATED BY THIS FUNCTION ARE NOT STORED IN A FOLDER WHICH IS A GITHUB REPOSITORY TO MITIGATE AGAINST ACCIDENTAL COMMITTING OF OFFICIAL DATA TO GITHUB. TOOLS TO FURTHER HELP MITIGATE THIS RISK ARE AVAILABLE AT https://github.com/ukgovdatascience/dotfiles.

Usage

1
2
extract_GVA_data(path, sheet = "CP Millions", dstart = c(15, 3),
  dend = c(40, 184), cnames = 5)

Arguments

path

Location of the input spreadsheet file. Named something like "working_file_dcms_VXX.xlsm".

sheet

The name of the spreadsheet in which the data are stored. Defaults to New ABS Data.

dstart

numeric vector containing reference to excel cell c(<row number>, <column number>) where data (excluding column headings) starts

dend

numeric vector containing reference to excel cell c(<row number>, <column number>) where data (excluding column headings) ends

cnames

row containg column headings

Details

The best way to understand what happens when you run this function is to look at the source code, which is available at https://github.com/ukgovdatascience/eesectors/blob/master/R/. The code is relatively transparent and well documented.


DCMSstats/eesectors documentation built on May 3, 2019, 2:43 p.m.