year_sector_data: long data class

Description Usage Arguments Details Value Examples

View source: R/year_sector_data.R

Description

year_sector_data is the class used for the creation of tables 3.1, 4.1, 4.5, and 5.1 of the DCMS Sectors Economic Estimate (https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/544103/DCMS_Sectors_Economic_Estimates_-_August_2016.pdf).

Usage

1
year_sector_data(x, log_issues = FALSE)

Arguments

x

Input dataframe, see details.

log_issues

should issues with the data quality be logged to github? See ?raise_issue() for additional details.

Details

The year_sector_data class expects a data.frame with three columns: sector, year, and measure, where measure is one of GVA, exports, or enterprises. The data.frame should include historical data, which is used for checks on the quality of this year\'s data, and for producing tables and plots.

Once inititated, the class has five slots: df: the basic data.frame, colnames: a character vector containing the column names from the df, type: a character vector of length(type) == 1 describing the type of data (\"GVA\", \"exports\", or \"enterprises\") imputed from column names, sector_levels: a factor vector containing levels of df$sector of the factor sector, years: an integer vector containing unique(df$year).

Value

If the class is instantiated correctly, nothing is returned.

Examples

1
2
3

ukgovdatascience/eesectors documentation built on Sept. 11, 2020, 12:19 p.m.