Conversation
0e3780d to
c74e14e
Compare
rafdoodle
reviewed
Jan 15, 2026
inst/extdata/variables.csv
Outdated
| PAC_8B,Time bike work/school,Time spent - biking to go work/school,Categorical,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2009_s, cchs2010_s, cchs2012_s",[PAC_8B],Exercise,Health behaviour,N/A,,,2.2.0,2025-06-30,Variable metadata completed,,,active, | ||
| PACDEE,Physical activity,Daily energy expenditure - (D),Continuous,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2009_s, cchs2010_s, cchs2012_s","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",Exercise,Health behaviour,METS,,,2.2.0,2025-06-30,Variable metadata completed,,,active, | ||
| PACDEE_cat3,Physical activity,Categorical daily energy expenditure,Categorical,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2009_s, cchs2010_s, cchs2012_s","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",Exercise,Health behaviour,METS,,,2.2.0,2025-06-30,Variable metadata completed,,,active, | ||
| PACFLEI,Leisure physical activites,Leisure physical activity,Categorical,"cchs2001_m, cchs2005_m, cchs2007_2008_m, cchs2009_2010_m, cchs2011_2012_m, cchs2013_2014_m","cchs2001_m::PACAFLEI, cchs2005_m::PACEFLEI, [PACFLEI]",Exercise,Health behaviour,N/A,,,2.2.0,2025-06-30,Variable metadata completed,Yes,,active, |
Collaborator
There was a problem hiding this comment.
PACFLEI exists in cchs2003_m as PACCFLEI according to Data Dictionary.
rafdoodle
reviewed
Jan 16, 2026
Collaborator
rafdoodle
left a comment
There was a problem hiding this comment.
I've noticed that the worksheets for this branch only go up until 2017-2018. I only bring this up because the PAA_, PAA, and PAY variables are also in 2019-2020 and 2021.
Fixes applied: - PACFLEI: _i → _m suffix migration (5 rows) - PACFLEI: dummyVariable naming to PACFLEI_cat2_* convention - PAC_4B/PAC_4B_cont: corrected "walking" to "biking" labels (18 rows) Extensions: - PAADVTRV, PAYDVTTR: added cchs2019_2020_p coverage (+4 rows each) - active_transport: added cchs2019_2020_p (+1 row) - energy_exp: added cchs2019_2020_p (+2 rows) New variable: - PAADVWHO: WHO physical activity classification (2015-2022, 7 rows) Validation: Integration test confirms rec_with_table() produces valid output for all PA variables. See CEP-003 appendix for full report.
DougManuel
approved these changes
Jan 19, 2026
Contributor
DougManuel
left a comment
There was a problem hiding this comment.
Review complete — Ready to merge with worksheet fixes
- I went ahead and applied fixes based on validation review.
- I updated variables to the most recent years just as an exercise of development and validation infrasctructure I created to support smoking updates. I wanted to see how well it worked de novo on physical activity. I don't expect we'll need/want to do the same for variables other than smoking and adminstrative variables (survey weights, etc.) that we need for current smoking studies.
- I added files to cep-003-physcial-activity but those can be deleted. They include analyses of phsycial activity variables used to support this review.
- Key comments are Quarto publication, or you can render yourself. I suggest the Quarto pub be deleted after we've merged the PR. (Just posted to facilitate the review).
Fixes included
- PACFLEI
_i→_mmigration — All 5 rows now use Master suffix instead of deprecated ICES suffix - PACFLEI dummyVariable naming — Fixed from
cat_cat6toPACFLEI_cat2_*convention - PAC_4B label fix — Corrected "walking" to "biking" in variable labels
- 2019-2020 cycle extension — Added coverage for PAADVTRV, PAYDVTTR, active_transport, energy_exp
- PAADVWHO — New WHO physical activity classification variable (2015-2022 cycles)
- Added double year PUMF files, in addition to single years. i.e. cchs2007_2008_p. Double year PUMF data used for validation.
Validation
- Integration test confirms
rec_with_table()produces valid output for all variables - PUMF validation shows harmonised means consistent with ground truth (PACDEE: 2.02-2.32 kcal/kg/day)
- See CEP-003 integration test for full validation report
Not addressed (intentionally deferred)
- 2022 cycle for PAADVVIG — only this variable available in 2022 PUMF
Rewrote CSV files with proper quoting using readr::write_csv() to fix "excessive quoting" errors in the CSV formatting check.
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.
This PR updates the physical activity variables in the worksheets for the master file. The following variables were added/updated with each item linked to the commit with the change:
Recommend reviewing one commit at a time.
These changes were brought over from the phys-activity branch.