Skip to content

Commit

Permalink
temporarily change extract_abs_data to use the cleaned data in excel #…
Browse files Browse the repository at this point in the history
…128

see issue #128 I have left previous code in to remind me to finish
getting it to work with the raw data
  • Loading branch information
maxwell8888 committed Nov 7, 2017
1 parent c238a5f commit 79e29e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/extract_ABS_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ extract_ABS_data <- function(
if(format == 2015) {
df <- df[, c(1, 6:12)]
} else if(format == 2016) {
df <- rbind(
df[, c(1, 4:11)],
df[5:86, 13:21] %>%
rename(DOMVAL = Checks))
df <-
rbind(
#df[, c(1, 4:11)], raw data
df[91:161, 13:21],
df[c(5:86, 89), 13:21]) %>%
rename(DOMVAL = Checks)
} else
stop("Invalid format argument")

Expand All @@ -121,8 +123,11 @@ extract_ABS_data <- function(
filter(!is.na(DOMVAL)) %>%
filter(!is.na(ABS)) %>%
mutate(year = as.integer(year)) %>%
mutate(SIC = eesectors::clean_sic(as.character(DOMVAL))) %>%

mutate(SIC = DOMVAL) %>%
select(-DOMVAL)
#mutate(SIC = eesectors::clean_sic(as.character(DOMVAL))) %>%
#select(-DOMVAL)

#check columns names
if(
Expand Down
Binary file modified tests/testthat/testdata/test_reference_ABS.Rds
Binary file not shown.

0 comments on commit 79e29e9

Please sign in to comment.