knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(tidyverse) library(TFP)
ABS
.abs_historic
. abs_historic
, removing any duplicate years. # ABS workflow # reshape the historic data abs_hist <- abs_historic %>% filter(sector == "food manufacturing") %>% select(-c(sector, sic_desc)) %>% gather(year, val, num_range("", 1900:2100)) %>% spread(attribute, val) %>% mutate(year = as.numeric(year)) head(abs_hist) # read in the latest manufacturing <- ABS(file = "~/TFP_code/data/abssectionsas.xls", sheets = c("Section C"), siccodes = c("10", "11")) %>% select(year, capex, employment_costs, employment_pit, gva, purchases, turnover) head(manufacturing) # bind the latest data to the older data manu_latest <- abs_hist %>% filter(year < min(manufacturing$year)) %>% bind_rows(manufacturing)
input_weights
on the ABS data we produced in section 1.iw <- input_weights(manu_latest, year, capex, purchases, employment_costs) head(iw)
We need to calculate all the input deflators
ONS series used: D7CW D7BU D7CA CBZW YBGB JVF4 K37L MC35 K37L
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.