Alcohol#166
Conversation
included ICES survey cycles into existing binge_drinker derived variable
P0: ALW_2A1 row 1 had ALW_1's source variables (ALCA_5, ALCC_5, ALCE_5, ALW_005) instead of ALW_2A1's (ALCA_5A1, ALCC_5A1, ALCE_5A1, ALW_010). Copy-paste error that would produce silently wrong data at runtime. P1: Converted cchs2009_s/cchs2010_s/cchs2012_s to cchs2009_m/cchs2010_m/ cchs2012_m in databaseStart for 11 alcohol variables (48 rows). Verified against MCP metadata database and StatCan PDF codebooks. CEP-011 review artifacts included.
Review: PR #166 (Alcohol)Reviewed the Full review details in CEP-011. P0: ALW_2A1 row 1 — wrong source variables (fixed)ALW_2A1 row 1 ( Was (wrong): Now (corrected, matching rows 2-4): The P1:
|
… in variable_details.csv, and corrected their 2009-2012 singular _m order in variables.csv
rafdoodle
left a comment
There was a problem hiding this comment.
Alcohol variables — _m database update
Completed (11 variables)
Updated databaseStart and variableStart in both variables.csv and variable_details.csv:
- Replaced legacy
_sdatabase entries with full_mequivalents - Added missing singular-year
_mentries (cchs2009_m,cchs2010_m,cchs2011_2012_m,cchs2012_m) in correct chronological order - Added explicit
_msource variable mappings invariableStart - Fixed miscellaneous formatting issues (trailing spaces, double spaces, incorrect copy-row
variableStart)
Variables:
ALCDTTM— two-group structure preserved (pre-/post-2007)ALW_1ALW_2A1— also fixed copy-rowvariableStart; removed trailing spaceALW_2A2–ALW_2A7ALWDWKY— fixed space after::invariableStartbinge_drinker
Still needs _m updating
ALC_005— no_mentries; only covers 2001–2007/2008_pALC_1— has onlycchs2009_m, cchs2010_m, cchs2012_m; needs full_mset + explicitvariableStartmappingsALCDTYP— no_mentries; only covers 2001–2007/2008_pALCDTYP_A— typo2011_2012_m(missingcchsprefix); missingcchs2009_m,cchs2010_m,cchs2012_msingular yearsALWDDLY— has onlycchs2009_m, cchs2010_m, cchs2012_m; needs full_mset + explicitvariableStartmappings; double space indatabaseStart; trailing spaces invariableStartALWDVLTR_der— has onlycchs2009_m, cchs2010_m, cchs2012_m; needs full_mset; double space indatabaseStartALWDVSTR_der— has onlycchs2009_m, cchs2010_m, cchs2012_m; needs full_mset; double space indatabaseStartlow_drink_score— has onlycchs2009_m, cchs2010_m, cchs2012_m; needs full_mset + explicitvariableStartmappingslow_drink_score1— no_mentries; only covers select_pyears
Alcohol variables ALCDTTM, ALWDWKY, binge drinker and it's dependents (ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7) were updated for ICES survey cycles in variable and variable_details sheets.