sleep#161
Closed
caitlink12 wants to merge 13 commits intofeature/v3.0.0-validation-infrastructurefrom
Closed
Conversation
updated master survey cycle suffix from _i to _m
SLPG01_A and SLPG01_C had same variable categories so these surveys were merged into SLPG01_A. Master survey cycles added to SLPG01_cont.
added master survey cycles from 2001 and 2015-2016 into SLPG01_cont
SLPG01_A and SLPG01_C had same variable categories so these surveys were merged into SLPG01_A.
added master survey cycles from 2001 and 2015-2016 into SLPG01_cont
added SLPG01_cont values for 2011-2012 and 2013-2014 master survey cycles.
DougManuel
approved these changes
Jan 27, 2026
Contributor
There was a problem hiding this comment.
The PR correctly adds Master file cycles. Passes all tests, including integration testing.
Sleeping variables are optional content, which means the availability varies from cycle to cycle and from province to province.
This PR changes:
- Adds Master file cycles (2001, 2011-2012, 2013-2014, 2015-2016) to sleep variables
- Creates SLPG01_B for Master cycles 2011-2014
- Correctly maps source variables across eras
Key findings
Optional content warning: Sleep module was Optional Content from 2007-2018. Provincial availability varies by cycle - not all provinces have sleep data in all cycles. Added description notes to all 11 sleep variables to alert users.
Scale incompatibility:
- 2001 uses 3-point scale (Most/Sometimes/Never) with inverted direction (lower = worse)
- 2007+ uses 5-point scale (None to All) where higher = worse
- Correctly handled via
_Asuffix variables for 2001
Cycles without sleep data (Canada-wide PUMF):
- 2003, 2005, 2009-2010 - correctly excluded from worksheets
Verification
- ✓ Variable naming evolution verified across all eras
- ✓ Missing cycles correctly excluded
- ✓ Scale incompatibility handled with separate
_Avariables - ✓ Added optional content notes to variables.csv
Documentation
Full review documentation: https://dmanuel.quarto.pub/cep-005-sleep-variables
Notes
Added notes about data availability
Add documentation for PR #161 sleep variable review: - CEP-005 review documents with PUMF availability analysis - Integration tests for rec_with_table() validation - Scale incompatibility documentation (2001 vs 2007+) Add description notes to 11 sleep variables in variables.csv: - Sleep module was Optional Content from 2007-2018 - Provincial availability varies by cycle - 2001 uses incompatible 3-point scale with inverted direction Worksheets verified correct - no fixes required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sleep variables SLP_02, SLP_02_A, SLP_03, SLP_03_A, SLP_04, SLP_04_A, SLPG01_A, SLPG01_B, SLPG01_cont were harmonized into the variable and variable_details sheets for master survey cycles 2001, 2011-2012, 2013-2014, and 2015-2016.
master survey cycles 2011-2012, 2013-2014, and 2015-2016 were added to existing variables SLP_02, SLP_3, SLP_04.
master survey cycle 2001 was added to existing variables SLP_02_A, SLP_03_A, SLP_04_A.
master survey cycles 2001 and 2015-2016 were added to existing variable SLPG01_A
SLPG01_B was created for master survey cycles 2011-2012 and 2013-2014
master survey cycles 2001, 2011-2012, 2013-2014, and 2015-2016 were added to existing variable SLPG01_cont