Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change 'RemFragmentationIndex' to 'RemFragmentationInd' #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default:

staging:
ontologyFileID: syn52050046
parquetDirID: syn61250818
parquetDirID: syn64135308
concept_replacements: !expr c("mins" = "minutes",
"avghr" = "averageheartrate",
"spo2" = "spo2_",
Expand All @@ -15,7 +15,7 @@ staging:
concept_filter_col: CONCEPT_CD
synFolderID: syn52504335
s3bucket: recover-main-project
s3basekey: main/archive/2024-06-13/
s3basekey: main/archive/2024-11-12/
selectedVarsFileID: syn53503994
outputConceptsDir: ./temp-output-concepts
tempOutputConceptSynID: syn53822708
Expand All @@ -26,5 +26,5 @@ prod:

internal:
inherits: staging
parquetDirID: syn63135213
s3basekey: staging/2024-09-10
parquetDirID: syn64050498
s3basekey: staging/2024-11-12
6 changes: 3 additions & 3 deletions scripts/process-data/fitbitsleeplogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ rem_fragmentation_index <-
by = join_by("ParticipantIdentifier", "LogId")) %>%
filter(SleepLevelRem > 0) %>%
mutate(SleepLevelRem = as.numeric(SleepLevelRem),
remFragmentationIndex = remTransitions/(SleepLevelRem/60)) %>%
select(ParticipantIdentifier, LogId, remFragmentationIndex)
remFragmentationInd = remTransitions/(SleepLevelRem/60)) %>%
select(ParticipantIdentifier, LogId, remFragmentationInd)

# Merge the original df with the numawakenings, remOnsetLatency, and
# remFragmentationIndex dfs to create a united df
# remFragmentationInd dfs to create a united df
df_joined <-
left_join(x = df, y = numawakenings_logid_filtered, by = join_by("ParticipantIdentifier", "LogId")) %>%
left_join(y = rem_onset_latency, by = join_by("ParticipantIdentifier", "LogId")) %>%
Expand Down
Loading