Skip to content

Commit

Permalink
Remove regex special character from dataset name variable and add in …
Browse files Browse the repository at this point in the history
…open_dataset() call
  • Loading branch information
pranavanba committed Jul 12, 2024
1 parent eac6b70 commit 3df7f23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/process-data/fitbitecg.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ecg_stat_summarize <- function(df) {
return(result)
}

dataset <- "fitbitecg$"
dataset <- "fitbitecg"

cat(paste0("\n----", glue::glue("Transforming data for {dataset}"), "----\n"))

Expand All @@ -112,7 +112,7 @@ vars <-

# Load the desired subset of this dataset in memory and do some feature engineering for derived variables
df <-
arrow::open_dataset(s3$path(str_subset(dataset_paths, dataset))) %>%
arrow::open_dataset(s3$path(str_subset(dataset_paths, paste0(dataset, "$")))) %>%
select(all_of(c(vars))) %>%
filter(ResultClassification %in% c("Normal Sinus Rhythm", "Atrial Fibrillation")) %>%
rename(StartDate = StartTime) %>%
Expand Down
4 changes: 2 additions & 2 deletions scripts/process-data/fitbitsleeplogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ sleeplogs_stat_summarize <- function(df) {
return(result)
}

dataset <- "fitbitsleeplogs$"
dataset <- "fitbitsleeplogs"

cat(paste0("\n----", glue::glue("Transforming data for {dataset}"), "----\n"))

Expand All @@ -138,7 +138,7 @@ vars <-

# Load the desired subset of this dataset in memory and do some feature engineering for derived variables
df <-
arrow::open_dataset(s3$path(str_subset(dataset_paths, dataset))) %>%
arrow::open_dataset(s3$path(str_subset(dataset_paths, paste0(dataset, "$")))) %>%
select(all_of(c(vars, "LogId"))) %>%
collect() %>%
distinct() %>%
Expand Down

0 comments on commit 3df7f23

Please sign in to comment.