diff --git a/DESCRIPTION b/DESCRIPTION index 16f8dc1d..99cbb405 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: cchsflow Type: Package Title: Transforming and Harmonizing CCHS Variables -Version: 1.8.3 -Date: 2021-08-20 +Version: 2.0.0 +Date: 2021-10-25 Authors@R: c( person(given = "Doug", family = "Manuel", @@ -17,6 +17,10 @@ Authors@R: c( family = "Vyuha", role = c("aut"), email = "rostikvyuha@gmail.com"), + person(given = "Kitty", + family = "Chen", + role = c("aut"), + email = "kitchen@ohri.ca"), person(given = "Carol", family = "Bennett", role = c("aut"), @@ -38,7 +42,7 @@ Depends: Description: Supporting the use of the Canadian Community Health Survey (CCHS) by transforming variables from each cycle into harmonized, consistent versions that span survey cycles (currently, 2001 to - 2014). CCHS data used in this library is accessed and adapted in + 2018). CCHS data used in this library is accessed and adapted in accordance to the Statistics Canada Open Licence Agreement. This package uses rec_with_table(), which was developed from 'sjmisc' rec(). Lüdecke D (2018). "sjmisc: Data and Variable Transformation @@ -49,6 +53,6 @@ Encoding: UTF-8 LazyData: true URL: https://github.com/Big-Life-Lab/cchsflow BugReports: https://github.com/Big-Life-Lab/cchsflow/issues -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Suggests: testthat (>= 2.1.0) diff --git a/NAMESPACE b/NAMESPACE index ad5f734b..10f89660 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,20 +13,32 @@ export(LBFA_31A) export(LBFA_31A_a) export(LBFA_31A_b) export(RACDPAL_fun) +export(SMKG040_fun) +export(adjusted_bmi_fun) export(adl_fun) export(adl_score_5_fun) export(age_cat_fun) export(binge_drinker_fun) export(bmi_fun) +export(bmi_fun_cat) export(diet_score_fun) +export(diet_score_fun_cat) +export(energy_exp_fun) export(food_insecurity_der) export(if_else2) +export(immigration_fun) export(is_equal) +export(low_drink_long_fun) +export(low_drink_score_fun) +export(low_drink_score_fun1) +export(low_drink_short_fun) export(merge_rec_data) export(multiple_conditions_fun1) export(multiple_conditions_fun2) export(pack_years_fun) +export(pack_years_fun_cat) export(pct_time_fun) +export(pct_time_fun_cat) export(rec_with_table) export(resp_condition_fun1) export(resp_condition_fun2) diff --git a/NEWS.md b/NEWS.md index b04fa1e2..d5365fb1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,53 @@ +# cchsflow 2.0.0 +2021-10-25 + +## Features +- Support for CCHS cycles up to 2018. + +## Bug Fixes +- Fixes to `rec_with_table()` to support round bracket interval notation. + +## Variables + +- **New** **ADL_01_A**: Help preparing meals. Used for CCHS 2015-2016. +- **New** **ADL_02_A**: Help appointments/errands. Used for CCHS 2015-2016. +- **New** **ADL_03_A**: Help housework. Used for CCHS 2015-2016. +- **New** **ADL_04_A**: Help personal care. Used for CCHS 2015-2016. +- **New** **ADL_05_A**: Help move inside house. Used for CCHS 2015-2016. +- **New** **ADL_06_A**: Help personal finances. Used for CCHS 2015-2016. +- **New** **ALC_005**: In lifetime, ever drank alcohol? Used for CCHS 2001-2008 and 2015-2018. +- **New** **ALWDVSTR_der**: Derived variable for short term risks due to drinking. Used for all CCHS cycles. +- **New** **ALWDVLTR_der**: Derived variable for long term risks due to drinking. Used for all CCHS cycles. +- **New** **DEPDVSEV**: Depression scale - severity of depression. Used for CCHS 2015-2018. +- **New** **diet_score_cat3**: Derived variable for categorical diet score. Used for all CCHS cycles. +- **New** **EDUDR03**: Derived variable for highest level/education - 3 categories. Used for all cycles. +- **New** **energy_exp**: Daily energy expenditure. Used for all cycles. +- **New** **HUIDHSI_cat10**: Categorical Health Utility Index into 10 categories. Used for CCHS 2001-2016. +- **New** **HUIDHSI_cat20**: Categorical Health Utility Index into 20 categories. Used for CCHS 2001-2016. +- **New** **HUIDHSI_cat50**: Categorical Health Utility Index into 50 categories. Used for CCHS 2001-2016. +- **New** **HWTGBMI_der_cat4**: Derived variable for categorical body mass index into 4 categories. Used for all CCHS cycles. +- **New** **HWTGCOR**: Adjusted BMI. Used for CCHS 2015-2018. +- **New** **HWTGCOR_der**: Derived variable for adjusted BMI. Used for all CCHS cycles. +- **New** **immigration_der**: Derived variable for immigration categories. Used for all CCHS cycles. +- **New** **low_drink_score**: Derived variable for low risk drinking score. Used for all CCHS cycles. +- **New** **low_drink_score1**: Derived variable for low risk drinking score that includes never drank and former drinker categories. Used for CCHS 2001-2008 and 2015-2018. +- **New** **PAA_045**: Sweat/breathe harder exercises - hours - 7d (18+ years old). Used for CCHS 2015-2016. +- **New** **PAA_050**: Sweat/breathe harder exercises - minutes - 7d (18+ years old). Used for CCHS 2015-2016. +- **New** **PAA_075**: Other physical activities - hours - 7d (18+ years old). Used for CCHS 2015-2016. +- **New** **PAA_080**: Other physical activities - minutes - 7d (18+ years old). Used for CCHS 2015-2016. +- **New** **PAADVDYS**: Active days - 7d (18+ years old). Used for CCHS 2015-2016. +- **New** **PAADVVIG**: Vigorous activity over a week (18+ years old). Used for CCHS 2015-2016. +- **New** **PAYDVADL**: Leisure activities - minutes - 7d (12-17 years old). Used for CCHS 2015-2016. +- **New** **PAYDVDYS**: Active days - 7d (12-17 years old). Used for CCHS 2015-2016. +- **New** **PAYDVTOA**: Other physical activities - minutes - 7d (12-17 years old). Used for CCHS 2015-2016. +- **New** **PAYDVVIG**: Vigorous activities - minutes - 7d (12-17 years old). Used for CCHS 2015-2016. +- **New** **pct_time_der_cat10**: Categorical percentage of time in Canada. Used for all CCHS cycles. +- **New** **SMKDSTY_B**: Smoker status into 5 categories. Used for CCHS 2015-2018. +- **New** **SMKDSTY_cat5**: Smoker status into 5 categories. Used for all CCHS cycles. +- **New** **SMKG040**: Age started to smoke daily - daily/former daily smoker. Used for CCHS 2015-2018. +- **New** **SMKG040_cont**: Derived variable for age started to smoke daily - daily/former daily smoker. Used for all CCHS cycles. +- **New** **CCC_075**: Do you have high blood cholesterol or lipids? Used for CCHS 2015-2018. + # cchsflow 1.8.3 2021-08-20 diff --git a/R/alcohol.R b/R/alcohol.R index 0bbdee63..203af381 100644 --- a/R/alcohol.R +++ b/R/alcohol.R @@ -226,4 +226,486 @@ binge_drinker_fun <- ALW_2A7 %in% (0:3))), 2, "NA(b)")))), # Respondents who didn't indicate they had alcohol in the last week "NA(a)") - } \ No newline at end of file + } + +#' @title Short term risks due to drinking +#' +#' @description This function creates a categorical variable that +#' flags for increased short term health risks due to their drinking habits, +#' according to Canada's Low-Risk Alcohol Drinking Guideline. +#' +#' @details The classification of drinkers according to their short term health +#' risks comes from guidelines in Alcohol and Health in Canada: A Summary of +#' Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +#' consumption reported over the past week. Short-term or acute risks include +#' injury and overdose. +#' +#' Categories are based on CCHS 2015-2016's variable (ALWDVSTR) where short +#' term health risk are increased when drinking more than 3 drinks (for women) +#' or 4 drinks (for men) on any single occasion. +#' +#' See \url{https://osf.io/ykau5/} for more details on the guideline. +#' See \url{https://osf.io/ycxaq/} for more details on derivation of the +#' function on page 9. +#' +#' @param DHH_SEX Sex of respondent (1 - male, 2 - female) +#' +#' @param ALW_1 Drinks in the last week (1 - yes, 2 - no) +#' +#' @param ALC_1 Drinks in the past year (1 - yes, 2 - no) +#' +#' @param ALW_2A1 Number of drinks on Sunday +#' +#' @param ALW_2A2 Number of drinks on Monday +#' +#' @param ALW_2A3 Number of drinks on Tuesday +#' +#' @param ALW_2A4 Number of drinks on Wednesday +#' +#' @param ALW_2A5 Number of drinks on Thursday +#' +#' @param ALW_2A6 Number of drinks on Friday +#' +#' @param ALW_2A7 Number of drinks on Saturday +#' +#' @param ALWDWKY Number of drinks consumed in the past week +#' +#' @return Categorical variable (ALWDVSTR_der) with two categories: +#' +#' \itemize{ +#' \item 1 - Increased short term health risk +#' \item 2 - No increased short term health risk +#' } +#' +#' @examples +#' +#' # Using low_drink_short_fun() to create ALWDVSTR_der values across CCHS cycles +#' # low_drink_short_fun() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform ALWDVSTR_der, use rec_with_table() for each CCHS cycle +#' # and specify ALWDVSTR_der, along with the various alcohol and sex +#' # variables. +#' # Using merge_rec_data(), you can combine ALWDVSTR_der across cycles. +#' +#' library(cchsflow) +#' short_low_drink2001 <- rec_with_table( +#' cchs2001_p, c( +#' "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", +#' "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der" +#' ) +#' ) +#' +#' head(short_low_drink2001) +#' +#' short_low_drink2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", +#' "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der" +#' ) +#' ) +#' +#' tail(short_low_drink2009_2010) +#' +#' combined_short_low_drink <- bind_rows(short_low_drink2001, +#' short_low_drink2009_2010) +#' +#' head(combined_short_low_drink) +#' +#' tail(combined_short_low_drink) +#' +#' # Using low_drink_short_fun() to generate ALWDVSTR_der with user-inputted +#' # values. +#' # +#' # Let's say you are a male, you had drinks in the last week and in the last +#' # year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on +#' # Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, +#' # and 2 drinks on Saturday with a total of 30 drinks in a week. +#' # Using low_drink_short_fun(), we can check if you would be classified as +#' # having an increased short term health risk due to drinking. +#' +#' short_term_drink <- low_drink_short_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1, +#' ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, +#' ALW_2A6 = 8, ALW_2A7 = 2) +#' +#' print(short_term_drink) +#' @export +#' +low_drink_short_fun <- + function(DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, + ALW_2A5, ALW_2A6, ALW_2A7){ + # Test if inputs are in valid range + if_else2(DHH_SEX %in% (1:2) & ALWDWKY %in% (0:995) & ALC_1 %in% (1:2) & + ALW_1 %in% (1:2) & ALW_2A1 %in% (0:995) & ALW_2A2 %in% (0:995) & + ALW_2A3 %in% (0:995) & ALW_2A4 %in% (0:995) & + ALW_2A5 %in% (0:995) & ALW_2A6 %in% (0:995) & + ALW_2A7 %in% (0:995), + # Increased short term risk from due to drinking (1) + if_else2(DHH_SEX == 1 & (ALW_2A1 %in%(5:995) | ALW_2A2 %in%(5:995) | + ALW_2A3 %in%(5:995) | ALW_2A4 %in%(5:995) | + ALW_2A5 %in%(5:995) | ALW_2A6 %in%(5:995) | + ALW_2A7 %in%(5:995) | ALWDWKY %in%(16:995)), 1, + if_else2(DHH_SEX == 2 & (ALW_2A1 %in%(4:995) | ALW_2A2 %in%(4:995) | + ALW_2A3 %in%(4:995) | ALW_2A4 %in%(4:995) | + ALW_2A5 %in%(4:995) | ALW_2A6 %in%(4:995) | + ALW_2A7 %in%(4:995) | ALWDWKY %in%(11:995)), 1, + # No increased short term health risks due to drinking (2) + # Includes those who did not drink in past 7 days or past 12 months + if_else2(ALC_1 == 2 |ALW_1 ==2, 2, + if_else2(DHH_SEX == 1 & (ALW_2A1 %in% (0:4) & ALW_2A2 %in% (0:4) & + ALW_2A3 %in% (0:4) & ALW_2A4 %in% (0:4) & + ALW_2A5 %in% (0:4) & ALW_2A6 %in% (0:4) & + ALW_2A7 %in% (0:4)) & ALWDWKY %in% (0:15), 2, + if_else2(DHH_SEX == 2 & (ALW_2A1 %in% (0:3) & ALW_2A2 %in% (0:3) & + ALW_2A3 %in% (0:3) & ALW_2A4 %in% (0:3) & + ALW_2A5 %in% (0:3) & ALW_2A6 %in% (0:3) & + ALW_2A7 %in% (0:3)) & ALWDWKY %in% (0:10), 2, + "NA(b)"))))), + "NA(b)") + } + +#' @title Long term risks due to drinking +#' +#' @description This function creates a categorical variable that +#' flags for increased long term health risks due to their drinking habits, +#' according to Canada's Low-Risk Alcohol Drinking Guideline. +#' +#' @details The classification of drinkers according to their long term health +#' risks comes from guidelines in Alcohol and Health in Canada: A Summary of +#' Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +#' consumption reported over the past week. Short-term or acute risks include +#' injury and overdose. +#' +#' Categories are based on CCHS 2015-2016's variable (ALWDVLTR) where long +#' term health risk are increased when drinking more than 10 drinks a week for +#' women, with no more than 2 drinks a day most days, and more than 15 drinks a +#' week for men, with no more than 3 drinks a day most days. +#' +#' See \url{https://osf.io/ykau5/} for more details on the guideline. +#' See \url{https://osf.io/ycxaq/} for more details on the derivation of the +#' function on page 8. +#' +#' @param DHH_SEX Sex of respondent (1 - male, 2 - female) +#' +#' @param ALW_1 Drinks in the last week (1 - yes, 2 - no) +#' +#' @param ALC_1 Drinks in the past year (1 - yes, 2 - no) +#' +#' @param ALW_2A1 Number of drinks on Sunday +#' +#' @param ALW_2A2 Number of drinks on Monday +#' +#' @param ALW_2A3 Number of drinks on Tuesday +#' +#' @param ALW_2A4 Number of drinks on Wednesday +#' +#' @param ALW_2A5 Number of drinks on Thursday +#' +#' @param ALW_2A6 Number of drinks on Friday +#' +#' @param ALW_2A7 Number of drinks on Saturday +#' +#' @param ALWDWKY Number of drinks consumed in the past week +#' +#' @return Categorical variable (ALWDVLTR_der) with two categories: +#' +#' \itemize{ +#' \item 1 - Increased long term health risk +#' \item 2 - No increased long term health risk +#' } +#' +#' @examples +#' +#' # Using low_drink_long_fun() to create ALWDVLTR_der values across CCHS cycles +#' # low_drink_long_fun() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform ALWDVLTR_der, use rec_with_table() for each CCHS cycle +#' # and specify ALWDVLTR_der, along with the various alcohol and sex +#' # variables. +#' # Using merge_rec_data(), you can combine ALWDVLTR_der across cycles. +#' +#' library(cchsflow) +#' long_low_drink2001 <- rec_with_table( +#' cchs2001_p, c( +#' "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", +#' "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der" +#' ) +#' ) +#' +#' head(long_low_drink2001) +#' +#' long_low_drink2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", +#' "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der" +#' ) +#' ) +#' +#' tail(long_low_drink2009_2010) +#' +#' combined_long_low_drink <- bind_rows(long_low_drink2001, +#' long_low_drink2009_2010) +#' +#' head(combined_long_low_drink) +#' +#' tail(combined_long_low_drink) +#' +#' # Using low_drink_long_fun() to generate ALWDVLTR_der with user-inputted +#' # values. +#' # +#' # Let's say you are a male, you had drinks in the last week and in the last +#' # year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on +#' # Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, +#' # and 2 drinks on Saturday with a total of 30 drinks in a week. +#' # Using low_drink_long_fun(), we can check if you would be classified as +#' # having an increased long term health risk due to drinking. +#' +#' long_term_drink <- low_drink_long_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1, +#' ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, +#' ALW_2A6 = 8, ALW_2A7 = 2) +#' +#' print(long_term_drink) +#' @export +#' +low_drink_long_fun <- + function(DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, + ALW_2A5, ALW_2A6, ALW_2A7){ + # Test if inputs are in valid range + if_else2(DHH_SEX %in% (1:2) & ALWDWKY %in% (0:995) & ALC_1 %in% (1:2) & + ALW_1 %in% (1:2) & ALW_2A1 %in% (0:995) & ALW_2A2 %in% (0:995) & + ALW_2A3 %in% (0:995) & ALW_2A4 %in% (0:995) & + ALW_2A5 %in% (0:995) & ALW_2A6 %in% (0:995) & + ALW_2A7 %in% (0:995), + # Increased long term risk from due to drinking (1) + if_else2(DHH_SEX == 1 & (ALW_2A1 %in%(4:995) | ALW_2A2 %in%(4:995) | + ALW_2A3 %in%(4:995) | ALW_2A4 %in%(4:995) | + ALW_2A5 %in%(4:995) | ALW_2A6 %in%(4:995) | + ALW_2A7 %in%(4:995) | ALWDWKY %in%(16:995)), 1, + if_else2(DHH_SEX == 2 & (ALW_2A1 %in%(3:995) | ALW_2A2 %in%(3:995) | + ALW_2A3 %in%(3:995) | ALW_2A4 %in%(3:995) | + ALW_2A5 %in%(3:995) | ALW_2A6 %in%(3:995) | + ALW_2A7 %in%(3:995) | ALWDWKY %in%(11:995)), 1, + # No increased long term health risks due to drinking (2) + # Includes those who did not drink in past 7 days or past 12 months + if_else2(ALC_1 == 2 |ALW_1 ==2, 2, + if_else2(DHH_SEX == 1 & (ALW_2A1 %in% (0:3) & ALW_2A2 %in% (0:3) & + ALW_2A3 %in% (0:3) & ALW_2A4 %in% (0:3) & + ALW_2A5 %in% (0:3) & ALW_2A6 %in% (0:3) & + ALW_2A7 %in% (0:3)) & ALWDWKY %in% (0:15), 2, + if_else2(DHH_SEX == 2 & (ALW_2A1 %in% (0:2) & ALW_2A2 %in% (0:2) & + ALW_2A3 %in% (0:2) & ALW_2A4 %in% (0:2) & + ALW_2A5 %in% (0:2) & ALW_2A6 %in% (0:2) & + ALW_2A7 %in% (0:2)) & ALWDWKY %in% (0:10), 2, + "NA(b)"))))), + "NA(b)") + + + } + +#' @title Low drinking score (all cycles) +#' +#' @description This function creates a derived variable based on their drinking +#' habits and flags for health and social problems from their pattern of +#' alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline. +#' +#' @details The low risk drinking score is based on the scoring system in +#' Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +#' steps. Step 1 allocates points based on sex and the number of drinks +#' that you usually have each week. In step 2, one point will be awarded for +#' each item that is true related to drinking habits. The total score is +#' obtained from adding the points in step 1 and step 2. +#' +#' @note Step 2 is not included in this function because the questions in +#' step 2 are not asked in any of the CCHS cycles. The score is only based on +#' step 1. +#' +#' See \url{https://osf.io/eprg7/} for more details on the guideline and score. +#' +#' @param DHH_SEX Sex of respondent (1 - male, 2 - female) +#' +#' @param ALWDWKY Number of drinks consumed in the past week +#' +#' @return Low risk drinking score (low_drink_score) with four categories: +#' \itemize{ +#' \item 1 - Low risk (0 points) +#' \item 2 - Marginal risk (1-2 points) +#' \item 3 - Medium risk (3-4 points) +#' \item 4 - High risk (5-9 points) +#' } +#' +#' @examples +#' +#' # Using low_drink_score_fun() to create low_drink_score values across +#' # CCHS cycles low_drink_score_fun() is specified in variable_details.csv +#' # along with the CCHS variables and cycles included. +#' +#' # To transform low_drink_score, use rec_with_table() for each CCHS cycle +#' # and specify low_drink_score, along with the various alcohol and sex +#' # variables. +#' # Using merge_rec_data(), you can combine low_drink_score across cycles. +#' +#' library(cchsflow) +#' low_drink2001 <- rec_with_table( +#' cchs2001_p, c( +#' "DHH_SEX", "ALWDWKY", "low_risk_score" +#' ) +#' ) +#' +#' head(low_drink2001) +#' +#' low_drink2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "DHH_SEX", "ALWDWKY", "low_risk_score" +#' ) +#' ) +#' +#' tail(low_drink2009_2010) +#' +#' combined_low_drink <- bind_rows(low_drink2001, +#' low_drink2009_2010) +#' +#' head(combined_low_drink) +#' +#' tail(combined_low_drink) +#' +#' @export +#' +low_drink_score_fun <- + function(DHH_SEX, ALWDWKY){ + ## Step 1 + # How many standard drinks did you have in a week? + step1<- + if_else2(DHH_SEX %in% (1:2) & ALWDWKY %in% (0:995), + if_else2(ALWDWKY %in% (0:10), 0, + if_else2(DHH_SEX == 1 & ALWDWKY > 10 & ALWDWKY <= 15, 0, + if_else2(DHH_SEX == 2 & ALWDWKY > 10 & ALWDWKY <= 15, 1, + if_else2(DHH_SEX == 1 & ALWDWKY > 15 & ALWDWKY <= 20, 1, + if_else2(DHH_SEX == 2 & ALWDWKY > 15 & ALWDWKY <= 20, 3, + if_else2(ALWDWKY >20, 3, NA)))))), + NA) + + ## Categorical score + low_drink_score <- + # Low risk + if_else2(step1 == 0, 1, + # Marginal risk + if_else2(step1 %in% (1:2), 2, + # Medium risk + if_else2(step1 %in% (3:4), 3, + # High risk + if_else2(step1 %in% (5:9), 4, tagged_na("b"))))) + + return(low_drink_score) + } + +#' @title Low drinking score (select cycles) +#' +#' @description This function creates a derived variable based on their drinking +#' habits and flags for health and social problems from their pattern of +#' alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline. +#' +#' @details The low risk drinking score is based on the scoring system in +#' Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +#' steps. Step 1 allocates points based on sex and the number of drinks +#' that you usually have each week. In step 2, one point will be awarded for +#' each item that is true related to drinking habits. The total score is +#' obtained from adding the points in step 1 and step 2. +#' +#' This score has two 0 point categories: low risk (never drank) and low risk +#' (former drinker). The two drinking groups are derived from 'ever had a drink +#' in lifetime'. 'Ever had a drink in lifetime' is only available in CCHS +#' 2001-2008 and 2015-2018. +#' +#' +#' @note Step 2 is not included in this function because the questions in +#' step 2 are not asked in any of the CCHS cycles. The score is only based on +#' step 1. +#' +#' See \url{https://osf.io/eprg7/} for more details on the guideline and score. +#' +#' @param DHH_SEX Sex of respondent (1 - male, 2 - female) +#' +#' @param ALWDWKY Number of drinks consumed in the past week +#' +#' @param ALC_005 In lifetime, ever had a drink? (1 - yes, 2 - no) +#' +#' @param ALC_1 Past year, have you drank alcohol? (1 - yes, 2 - no) +#' +#' @return Low risk drinking score (low_drink_score1) with four categories: +#' \itemize{ +#' \item 1 - Low risk - never drank (0 points) +#' \item 2 - Low risk - former drinker (0 points) +#' \item 3 - Marginal risk (1-2 points) +#' \item 4 - Medium risk (3-4 points) +#' \item 5 - High risk (5-9 points) +#' } +#' +#' @examples +#' +#' # Using low_drink_score_fun1() to create low_drink_score values across +#' # CCHS cycles low_drink_score_fun1() is specified in variable_details.csv +#' # along with the CCHS variables and cycles included. +#' +#' # To transform low_drink_score1, use rec_with_table() for each CCHS cycle +#' # and specify low_drink_score1, along with the various alcohol and sex +#' # variables. +#' # Using merge_rec_data(), you can combine low_drink_score1 across cycles. +#' +#' library(cchsflow) +#' low_drink2001 <- rec_with_table( +#' cchs2001_p, c( +#' "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score" +#' ) +#' ) +#' +#' head(low_drink2001) +#' +#' low_drink2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score" +#' ) +#' ) +#' +#' tail(low_drink2009_2010) +#' +#' combined_low_drink1 <- bind_rows(low_drink2001, +#' low_drink2009_2010) +#' +#' head(combined_low_drink1) +#' +#' tail(combined_low_drink1) +#' +#' @export +#' +low_drink_score_fun1 <- + function(DHH_SEX, ALWDWKY, ALC_005, ALC_1){ + ## Step 1 + # How many standard drinks did you have in a week? + step1<- + if_else2(DHH_SEX %in% (1:2) & ALWDWKY %in% (0:995) & ALC_005 %in% (1:2) & + ALC_1 %in% (1:2), + if_else2(ALWDWKY %in% (0:10), 0, + if_else2(DHH_SEX == 1 & ALWDWKY > 10 & ALWDWKY <= 15, 0, + if_else2(DHH_SEX == 2 & ALWDWKY > 10 & ALWDWKY <= 15, 1, + if_else2(DHH_SEX == 1 & ALWDWKY > 15 & ALWDWKY <= 20, 1, + if_else2(DHH_SEX == 2 & ALWDWKY > 15 & ALWDWKY <= 20, 3, + if_else2(ALWDWKY >20, 3, NA)))))), + NA) + + ## Categorical score + low_drink_score1 <- + # Low risk - never drank + if_else2(step1 == 0 & ALC_005 == 2 & ALC_1 ==2, 1, + # Low risk - former drinker + if_else2(step1 == 0 & ALC_005 == 1 & ALC_1 ==2, 2, + # Marginal risk + if_else2(step1 %in% (1:2), 3, + # Medium risk + if_else2(step1 %in% (3:4), 4, + # High risk + if_else2(step1 %in% (5:9), 5, tagged_na("b")))))) + + return(low_drink_score1) + } + diff --git a/R/bmi.R b/R/bmi.R index af01baf9..bb71e7bd 100644 --- a/R/bmi.R +++ b/R/bmi.R @@ -89,3 +89,183 @@ bmi_fun <- tagged_na("b") ) } + +#' @title Adjusted Body Mass Index (BMI) derived variable +#' +#' @description This function creates a harmonized adjusted BMI variable. +#' A systematic review of the literature concluded that the use of +#' self-reported data among adults underestimates weight and overestimates +#' height, resulting in lower estimates of obesity than those obtained from +#' measured data. Using data from the 2005 Canadian Community Health Survey +#' (CCHS) subsample, where both measured and self-reported values were +#' collected, correction equations have been developed +#' (Connor Gorber et al. 2008). Differences between corrected estimates of +#' obesity from the CCHS and measured estimates from the Canadian Health +#' Measures Survey is monitored over time to determine if the bias in +#' self-reported values is changing and if new correction equations need to be +#' developed. Adjusted BMI variable is first introduced in the CCHS 2015 cycle. +#' +#' adjusted_bmi_fun() creates a derived variable (HWTGCOR_der) that is +#' harmonized across all CCHS cycles. This function takes the BMI by dividing +#' weight by the square of height, and adds a correction value based on sex. +#' +#' @details For HWTGCOR_der, there are no restrictions to age, height, weight, +#' or pregnancy status. While pregnancy was consistent across all CCHS cycles, +#' its variable (MAM_037) was not available in the PUMF CCHS datasets so it +#' could not be harmonized and included into the function. +#' +#' HWTGCOR_der uses the CCHS variables for sex, height and weight that have been +#' transformed by cchsflow. In order to generate a value for adjusted BMI +#' across CCHS cycles, sex, height and weight must be transformed and +#' harmonized. +#' +#' @note In earlier CCHS cycles (2001 and 2003), height was collected in inches; +#' while in later CCHS cycles (2005+) it was collected in meters. To harmonize +#' values across cycles, height was converted to meters (to 3 decimal points). +#' Weight was collected in kilograms across all CCHS cycles, so no +#' transformations were required in the harmonization process. +#' +#' @param HWTGHTM CCHS variable for height (in meters) +#' +#' @param HWTGWTK CCHS variable for weight (in kilograms) +#' +#' @param DHH_SEX CCHS variable for sex; 1 = male, 2 = female +#' +#' @return numeric value for adjusted BMI in the HWTGCOR_der variable +#' +#' @examples +#' # Using adjusted_bmi_fun() to create adjusted BMI values between cycles +#' # adjusted_bmi_fun() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform the derived BMI variable, use rec_with_table() for each cycle +#' # and specify HWTGCOR_der, along with sex (DHH_SEX), height (HWTGHTM) and +#' # weight (HWTGWTK).Then by using merge_rec_data(), you can combined +#' # HWTGBMI_der across cycles. +#' +#' library(cchsflow) +#' adjustedbmi2001 <- rec_with_table( +#' cchs2001_p, c( +#' "HWTGHTM", +#' "HWTGWTK", +#' "DHH_SEX", +#' "HWTGCOR_der" +#' ) +#' ) +#' +#' head(adjustedbmi2001) +#' +#' adjustedbmi2011_2012 <- rec_with_table( +#' cchs2011_2012_p, c( +#' "HWTGHTM", +#' "HWTGWTK", +#' "DHH_SEX", +#' "HWTGCOR_der" +#' ) +#' ) +#' +#' tail(adjustedbmi2011_2012) +#' +#' combined_bmi <- merge_rec_data(adjustedbmi2001, adjustedbmi2011_2012) +#' head(combined_bmi) +#' tail(combined_bmi) +#' +#' # adjusted_bmi_fun() can also generate a value for BMI if you input your sex, +#' # and a value for height and weight. Let's say your sex is male, height is +#' # 170cm (1.7m) and your weight is 50kg, your BMI can be calculated as follows: +#' +#' library(cchsflow) +#' adjusted_BMI <- adjusted_bmi_fun(DHH_SEX = 1, HWTGHTM = 1.7, HWTGWTK = 50) +#' print(adjusted_BMI) +#' @export + +adjusted_bmi_fun <- + function(DHH_SEX, HWTGHTM, HWTGWTK) { + # BMI adjusted for male + if_else2( + (!is.na(HWTGHTM)) & (!is.na(HWTGWTK)) & DHH_SEX==1, + -1.07575 + 1.07592*(HWTGWTK / (HWTGHTM * HWTGHTM)), + # BMI adjusted for female + if_else2( + (!is.na(HWTGHTM)) & (!is.na(HWTGWTK)) & DHH_SEX==2, + -0.12374 + 1.05129*(HWTGWTK / (HWTGHTM * HWTGHTM)), + tagged_na("b") + ) + ) + } + +#' @title Categorical BMI (international standard) +#' +#' @description This function creates a categorical derived variable +#' (HWTGBMI_der_cat4) that categorizes derived BMI (HWTGBMI_der). +#' +#' @details The categories were based on international standards and are divided +#' into four categories: underweight for BMI < 18.5 (1), normal weight for BMI +#' between 18.5 to 25 (2), overweight for BMI between 25 to 30 (3), and obese +#' for BMI over 30 (4). +#' +#' HWTGBMI_der_cat4 uses the derived variable HWTGBMI_der. HWTGBMI_der uses +#' height and weight that have been transformed by cchsflow. In order to +#' categorize BMI across CCHS cycles, height and weight variables must be +#' transformed and harmonized. +#' +#' @param HWTGBMI_der derived variable that calculates numeric value for BMI. +#' See \code{\link{bmi_fun}} for documentation on how variable +#' was derived. +#' +#' @return value for BMI categories in the HWTGBMI_der_cat4 variable. +#' +#' @examples +#' # Using bmi_fun_cat() to categorize BMI across CCHS cycles +#' # bmi_fun_cat() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform HWTGBMI_der_cat4 across all cycles, use rec_with_table() for +#' # each CCHS cycle. +#' # Since HWTGBMI_der is also a derived variable, you will have to specify +#' # the variables that are derived from it. +#' +#' library(cchsflow) +#' +#' bmi_cat_2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "HWTGHTM", +#' "HWTGWTK", +#' "HWTGBMI_der", +#' "HWTGBMI_der_cat4" +#' ) +#' ) +#' +#' head(bmi_cat_2009_2010) +#' +#' bmi_cat_2011_2012 <- rec_with_table( +#' cchs2011_2012_p,c( +#' "HWTGHTM", +#' "HWTGWTK", +#' "HWTGBMI_der", +#' "HWTGBMI_der_cat4" +#' ) +#' ) +#' +#' tail(bmi_cat_2011_2012) +#' +#' combined_bmi_cat <- suppressWarnings(merge_rec_data +#' (bmi_cat_2009_2010,bmi_cat_2011_2012)) +#' +#' head(combined_bmi_cat) +#' tail(combined_bmi_cat) +#' @export + +bmi_fun_cat <- + function(HWTGBMI_der){ + # Underweight + if_else2(HWTGBMI_der < 18.5, 1, + # Normal weight + if_else2(HWTGBMI_der >= 18.5 & HWTGBMI_der < 25, 2, + # Overweight + if_else2(HWTGBMI_der >= 25 & HWTGBMI_der < 30, 3, + # Obese + if_else2(HWTGBMI_der >= 30, 4, + # No response + if_else2(HWTGBMI_der == tagged_na("a"), "NA(a)", "NA(b)"))))) + } diff --git a/R/data.R b/R/data.R index ccf4834f..11ab9a22 100644 --- a/R/data.R +++ b/R/data.R @@ -41,7 +41,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -72,7 +72,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -103,7 +103,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -134,7 +134,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -165,7 +165,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -200,7 +200,7 @@ NULL #' subset. Please see the "CCHS datasets that overlap each other" article to see #' how the two datasets contain overlap. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -231,7 +231,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -266,7 +266,7 @@ NULL #' subset. Please see the "CCHS datasets that overlap each other" article to see #' how the two datasets contain overlap. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -297,7 +297,7 @@ NULL #' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. #' The CCHS survey is conducted by Statistics Canada. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -332,7 +332,7 @@ NULL #' subset. Please see the "CCHS datasets that overlap each other" article to see #' how the two datasets contain overlap. #' -#' See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open #' license. Source from Statistics Canada, Canadian Community Health Survey #' PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with #' the permission of Statistics Canada. @@ -355,4 +355,75 @@ NULL #' @examples #' data(cchs2014_p) #' str(cchs2014_p) +NULL + +#' 2015-2016 CCHS PUMF subset data (200 respondents) +#' +#' This is a subset of 200 observations from the 2015-2016 cycle of the Canadian +#' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +#' The CCHS survey is conducted by Statistics Canada. +#' +#' \strong{NOTE:} this subset of respondents may also be in the 2015-2016 PUMF +#' subset. Please see the "CCHS datasets that overlap each other" article to see +#' how the two datasets contain overlap. +#' +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open +#' license. Source from Statistics Canada, Canadian Community Health Survey +#' PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +#' the permission of Statistics Canada. +#' +#' Long name: cchs-82M0013-E-2015-2016-Annual-component +#' +#' DDI: \url{https://osf.io/m948q/} +#' +#' Additional documentation (PDFs): \url{https://osf.io/hkuy3/} +#' +#' @name cchs2015_2016_p +#' @aliases cchs2015_2016_p +#' @docType data +#' @return \item{cchs2015_2016_p}{a data frame} +#' +#' @source +#' \url{https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=238854} +#' +#' @keywords datasets +#' @examples +#' data(cchs2015_2016_p) +#' str(cchs2015_2016_p) +NULL + + +#' 2017-2018 CCHS PUMF subset data (200 respondents) +#' +#' This is a subset of 200 observations from the 2017-2018 cycle of the Canadian +#' Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +#' The CCHS survey is conducted by Statistics Canada. +#' +#' \strong{NOTE:} this subset of respondents may also be in the 2017-2018 PUMF +#' subset. Please see the "CCHS datasets that overlap each other" article to see +#' how the two datasets contain overlap. +#' +#' See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open +#' license. Source from Statistics Canada, Canadian Community Health Survey +#' PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +#' the permission of Statistics Canada. +#' +#' Long name: cchs-82M0013-E-2017-2018-Annual-component +#' +#' DDI: \url{https://osf.io/q8g7y/} +#' +#' Additional documentation (PDFs): \url{https://osf.io/hkuy3/} +#' +#' @name cchs2017_2018_p +#' @aliases cchs2017_2018_p +#' @docType data +#' @return \item{cchs2017_2018_p}{a data frame} +#' +#' @source +#' \url{https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=329241} +#' +#' @keywords datasets +#' @examples +#' data(cchs2017_2018_p) +#' str(cchs2017_2018_p) NULL \ No newline at end of file diff --git a/R/diet.R b/R/diet.R index d5c18f34..61c7ce45 100644 --- a/R/diet.R +++ b/R/diet.R @@ -16,7 +16,8 @@ #' once/day (maximum -10 points) #' } #' -#' @details While diet score can be calculated for all survey respondents, in +#' @details +#' While diet score can be calculated for all survey respondents, in #' the 2005 CCHS survey cycle, fruit and vegetable consumption was an optional #' section in which certain provinces had opted in to be asked to respondents. #' In this survey cycle, fruit and vegetable consumption was asked to @@ -38,22 +39,22 @@ #' #' @param DHH_SEX sex; 1 = male, 2 = female #' -#' @examples -#' # Using the 'diet_score_fun' function to create the derived diet variable +#' @examples +#' # Using the diet_score_fun function to create the derived diet variable #' # across CCHS cycles. -#' # diet_score_fun() is specified in the variable_details.csv +#' # diet_score_fun() is specified in the variable_details.csv. #' #' # To create a harmonized diet_score variable across CCHS cycles, use #' # rec_with_table() for each CCHS cycle and specify diet_score_fun and the #' # required base variables. -#' # Using merge_rec_data(), you can combine smoke_simple across cycles +#' # Using merge_rec_data(), you can combine diet_score across cycles. #' #' library(cchsflow) #' #' diet_score2009_2010 <- rec_with_table( #' cchs2009_2010_p, c( #' "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", -#' "DHH_SEX", "diet_score_fun" +#' "DHH_SEX", "diet_score" #' ) #' ) #' @@ -62,7 +63,7 @@ #' diet_score2011_2012 <- rec_with_table( #' cchs2011_2012_p,c( #' "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", -#' "DHH_SEX", "diet_score_fun" +#' "DHH_SEX", "diet_score" #' ) #' ) #' @@ -118,3 +119,76 @@ diet_score_fun <- return(diet_score) } + +#' @title Categorized diet score +#' +#' @description This function creates a categorical derived diet variable +#' (diet_score_cat3) that categorizes derived diet score (diet_score). +#' +#' @details The diet score is based on consumption of fruit, salad, potatoes, +#' carrots, other vegetables and juice. 2 baseline points plus summation of +#' total points for diet attributes. Negative overall scores are recoded to 0, +#' resulting in a range from 0 to 10.The categories were based on the +#' Mortality Population Risk Tool (Douglas Manuel et al. 2016). +#' +#' diet_score_cat3 uses the derived variable diet_score. diet_score uses +#' sex, and fruit and vegetable variables that have been transformed by +#' cchsflow (see documentation on diet_score). In order to categorize diet +#' across CCHS cycles, sex, and fruit and vegetable variables must be +#' transformed and harmonized. +#' +#' @param diet_score derived variable that calculates diet score. +#' See \code{\link{diet_score_fun}} for documentation on how variable +#' was derived. +#' +#' @return value for diet score categories using diet_score_cat3 variable. +#' +#' @examples +#' # Using the diet_score_fun_cat function to categorize the derived diet +#' # variable across CCHS cycles. +#' # diet_score_fun_cat() is specified in the variable_details.csv. +#' +#' # To create a harmonized diet_score_cat3 variable across CCHS cycles, use +#' # rec_with_table() for each CCHS cycle. +#' # Since diet_score is also a derived variable, you will have to specify +#' # the variables that are derived from it. +#' # Using merge_rec_data(), you can combine diet_score_cat3 across cycles. +#' +#' library(cchsflow) +#' +#' diet_score_cat2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", +#' "DHH_SEX", "diet_score", "diet_score_cat3" +#' ) +#' ) +#' +#' head(diet_score_cat2009_2010) +#' +#' diet_score_cat2011_2012 <- rec_with_table( +#' cchs2011_2012_p,c( +#' "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", +#' "DHH_SEX", "diet_score", "diet_score_cat3" +#' ) +#' ) +#' +#' tail(diet_score_cat2011_2012) +#' +#' combined_diet_score_cat <- suppressWarnings(merge_rec_data( +#' diet_score_cat2009_2010, diet_score_cat2011_2012)) +#' +#' head(combined_diet_score_cat) +#' tail(combined_diet_score_cat) +#' @export + +diet_score_fun_cat <- + function(diet_score){ + # Poor diet + if_else2(diet_score >=0 & diet_score < 2, 1, + # Fair diet + if_else2(diet_score >=2 & diet_score < 8, 2, + # Adequate diet + if_else2(diet_score >=8 & diet_score <= 10, 3, + # No response + if_else2(diet_score == tagged_na("a"), "NA(a)", "NA(b)")))) + } diff --git a/R/immigration.R b/R/immigration.R new file mode 100644 index 00000000..60c40baf --- /dev/null +++ b/R/immigration.R @@ -0,0 +1,85 @@ +#' @title Immigration by ethnicity and settlement +#' +#' @description This function creates a categorical variable based on +#' immigrant status (SDCFIMM), country of birth (SDCGCBG), ethnicity (SDCGCGT), +#' and time in Canada (SDCGRES). +#' +#' @details +#' immigration_der uses the CCHS variables that have been transformed by +#' cchsflow. In order to generate a value for BMI across CCHS cycles, +#' the following SDC variables must be transformed and harmonized. +#' +#' +#' @param SDCFIMM Immigrant status (1-immigrant, 2-non-immigrant) +#' +#' @param SDCGCBG Country of birth (1-Canada, 2-Outside of Canada) +#' +#' @param SDCGCGT Cultural or racial origin (1-white, 2-visible minority) +#' +#' @param SDCGRES Length/time in Canada since immigration (1- 0-9 years, 2- 10+ +#' years) +#' +#' @return Categorical variable (immigration_der) with six categories: +#' +#' \itemize{ +#' \item 1 - White Canada-born +#' \item 2 - Non-white Canadian born +#' \item 3 - White immigrant born outside of Canada (0-9 years in Canada) +#' \item 4 - Non-white immigrant born outside of Canada (0-9 years in Canada) +#' \item 5 - White immigrant born outside of Canada (10+ years in Canada) +#' \item 6 - Non-white immigrant born outside of Canada (10+ years in Canada) +#' } +#' +#' @examples +#' # Using immigration_fun() to create immigration_der values across CCHS cycles +#' # immigration_fun() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform immigration_der, use rec_with_table() for each CCHS cycle +#' # and specify immigration_der, along with the various SDC variables. +#' # Then by using merge_rec_data() you can combine immigration_der across cycles. +#' +#' library(cchsflow) +#' immigration2001 <- rec_with_table( +#' cchs2001_p, c( +#' "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der" +#' ) +#' ) +#' +#' head(immigration2001) +#' +#' immigration2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der" +#' ) +#' ) +#' +#' tail(immigration2009_2010) +#' +#' combined_immigration <- merge_rec_data(immigration2001, immigration2009_2010) +#' +#' head(combined_immigration) +#' +#' tail(combined_immigration) +#' +#' @export + +immigration_fun <- + function(SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES){ + # White Canada-born + if_else2(SDCFIMM == 2 & SDCGCBG ==1 & SDCGCGT ==1, 1, + # Non-white Canadian born + if_else2(SDCFIMM == 2 & SDCGCBG ==1 & SDCGCGT ==2, 2, + # White immigrant born outside of Canada (0-9 years in Canada) + if_else2(SDCFIMM == 1 & SDCGCBG ==2 & SDCGCGT ==1 & SDCGRES ==1, 3, + # Non-white immigrant born outside of Canada (0-9 years in Canada) + if_else2(SDCFIMM == 1 & SDCGCBG ==2 & SDCGCGT ==2 & SDCGRES ==1, 4, + # White immigrant born outside of Canada (10+ years in Canada) + if_else2(SDCFIMM == 1 & SDCGCBG ==2 & SDCGCGT ==1 & SDCGRES ==2, 5, + # Non-white immigrant born outside of Canada (10+ years in Canada) + if_else2(SDCFIMM == 1 & SDCGCBG ==2 & SDCGCGT ==2 & SDCGRES ==2, 6, + + if_else2(SDCFIMM =="NA(a)"|SDCGCBG =="NA(a)"|SDCGCGT =="NA(a)" + |SDCGRES =="NA(a)","NA(a)", "NA(b)" + ))))))) + } diff --git a/R/percent-time-canada.R b/R/percent-time-canada.R index 9ba71bf8..8780e415 100644 --- a/R/percent-time-canada.R +++ b/R/percent-time-canada.R @@ -74,3 +74,76 @@ pct_time_fun <- if_else2(SDCGCBG == 2, (SDCGRES / DHHGAGE_cont * 100), tagged_na("b")) } + +#' @title Categorical percent time in Canada +#' +#' @description This function creates a categorical derived variable +#' (pct_time_der_cat10) that categorizes the derived percent time in Canada +#' variable (pct_time_der). +#' +#' @details The percent time in Canada provides an estimated percentage of the +#' time a person's life was spent in Canada.The categorical percent time in +#' Canada divides the continuous value into 10 percent intervals. +#' +#' pct_time_der_cat10 uses the derived variable pct_time_der. pct_time_der uses +#' various variables that have been transformed by cchsflow (see documentation +#' on pct_time_der). In order to categorize percent time in Canada across CCHS +#' cycles, the variables must be transformed and harmonized. +#' +#' @param pct_time_der derived continuous percent time in Canada. +#' See \code{\link{pct_time_fun}} for documentation on how variable was derived. +#' +#' @return value for categorical percent time in Canada using pct_time_der +#' variable. +#' +#' @examples +#' # Using pct_time_fun_cat() to create categorical percent time values +#' # between CCHS cycles. +#' # pct_time_fun_cat() is specified in variable_details.csv along with the CCHS +#' # variables and cycles included. +#' +#' # To transform pct_time_der_cat10 across cycles, use rec_with_table() for +#' # each CCHS cycle. +#' # Since pct_time_der is a derived variable, you will have to specify the +#' # variables that are derived from it. +#' # Then by using merge_rec_data(), you can combine pct_time_der_cat10 across +#' # cycles. +#' +#' library(cchsflow) +#' pct_time_cat2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "DHHGAGE_cont", "SDCGCBG", +#' "SDCGRES", "pct_time_der", "pct_time_der_cat10" +#' ) +#' ) +#' head(pct_time_cat2009_2010) +#' +#' pct_time_cat2011_2012 <- rec_with_table( +#' cchs2011_2012_p, c( +#' "DHHGAGE_cont", "SDCGCBG", +#' "SDCGRES", "pct_time_der", "pct_time_der_cat10" +#' ) +#' ) +#' tail(pct_time_cat2011_2012) +#' +#' combined_pct_time_cat <- merge_rec_data(pct_time_cat2009_2010, +#' pct_time_cat2011_2012) +#' head(combined_pct_time_cat) +#' tail(combined_pct_time_cat) +#' +#' @export +#' +pct_time_fun_cat <- + function(pct_time_der){ + if_else2(pct_time_der >= 0 & pct_time_der <= 10, 1, + if_else2(pct_time_der > 10 & pct_time_der <= 20, 2, + if_else2(pct_time_der > 20 & pct_time_der <= 30, 3, + if_else2(pct_time_der > 30 & pct_time_der <= 40, 4, + if_else2(pct_time_der > 40 & pct_time_der <= 50, 5, + if_else2(pct_time_der > 50 & pct_time_der <= 60, 6, + if_else2(pct_time_der > 60 & pct_time_der <= 70, 7, + if_else2(pct_time_der > 70 & pct_time_der <= 80, 8, + if_else2(pct_time_der > 80 & pct_time_der <= 90, 9, + if_else2(pct_time_der > 90 & pct_time_der <= 100, 10, + if_else2(pct_time_der == tagged_na("a"), "NA(a)", "NA(b)"))))))))))) + } diff --git a/R/physical-activity.R b/R/physical-activity.R new file mode 100644 index 00000000..82a67e94 --- /dev/null +++ b/R/physical-activity.R @@ -0,0 +1,134 @@ +#' @title Daily energy expenditure in leisure activity +#' +#' @description This function creates a derived variable for +#' A MET is a conceptual value that represents energy expended during physical activity. +#' The volume of activity is calculated by multiplying the amount of minutes of +#' activity (by level of intensity) by the MET value associated with that +#' intensity. A MET (metabolic equivalent) is the energy cost of activity +#' expressed as kilocalories expended per kilogram of body +#' weight per hour of activity. +#' +#' In CCHS 2001-2014, PACDEE is the variable used to determine the daily +#' expenditure of leisure activity for all ages. In CCHS 2015-2018, ages 12-17 +#' and 18+ years old have separate activity variables, where 12-17 year olds +#' use PAY_XXX and 18+ year olds use PAA_XXX. Leisure activity is not directly +#' measured. We used the derived variable, PAADVVOL, and removed active +#' transportation in the new function. With this function, we combined leisure +#' activity for ages 12+. We calculate the daily energy expenditure which uses +#' the frequency and duration per session of the physical activity as well as +#' the MET value (3 METS for leisure and 6 METS for vigorous activity). +#' +#' EE (Daily Energy Expenditure) = ((N X D X METvalue) / 60)/7 +#' Where: +#' N = the number of times a respondent engaged in an activity over a 7 day period +#' D = the average duration in minutes of the activity +#' MET value = the energy cost of the activity expressed as kilocalories +#' expended per kilogram of body +#' weight per hour of activity (kcal/kg per hour) +#' +#' +#' @param DHHGAGE_cont continuous age variable. +#' +#' @param PAA_045 number of hours of sports, fitness, or recreational activity +#' that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old. +#' +#' @param PAA_050 number of minutes of sports, fitness, or recreational activity +#' that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old. +#' +#' @param PAA_075 number of hours of other physical activity while at work, +#' home or volunteering for CCHS 2015-2018 for 18+ years old. +#' +#' @param PAA_080 number of minutes of other physical activity while at work, +#' home or volunteering for CCHS 2015-2018 for 18+ years old. +#' +#' @param PAADVVIG number of minutes of vigorous activity over 7 days or CCHS +#' 2015-2018 for 18+ years old. +#' +#' @param PAADVDYS number of active days - 7 day for CCHS 2015-2018 for 18+ +#' years old. +#' +#' @param PAYDVTOA total minutes of other activities - 7 day for CCHS 2015-2018 +#' for 12-17 years old. +#' +#' @param PAYDVADL total minutes of physical activity - leisure - 7 day for +#' CCHS 2015-2018 for 12-17 years old. +#' +#' @param PAYDVVIG total minutes - vigorous physical activity - 7 d for CCHS +#' 2015-2018 for 12-17 years old. +#' +#' @param PAYDVDYS total days physically active - 7 day for CCHS 2015-2018 for +#' 12-17 years old. +#' +#' @return Continuous variable for energy expenditure (energy_exp) +#' +#' @examples +#' # Using energy_exp_fun() to create energy expenditure values across CCHS +#' # cycles +#' # energy_exp_fun() is specified in variable_details.csv along with the CCHS +#' # variables and cycles included. +#' +#' # To transform energy_exp across cycles, use rec_with_table() for each +#' # CCHS cycle and specify energy_exp, along with each activity variable. +#' # Then by using merge_rec_data(), you can combine energy_exp across +#' # cycles +#' +#' library(cchsflow) +#' energy_exp2015_2016 <- rec_with_table( +#' cchs2015_2016_p, c( +#' "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", +#' "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" +#' ) +#' ) +#' +#' head(energy_exp2015_2016) +#' +#' energy_exp2017_2018 <- rec_with_table( +#' cchs2017_2018_p, c( +#' "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", +#' "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" +#' ) +#' ) +#' +#' tail(energy_exp2015_2016) +#' +#' combined_energy_exp <- suppressWarnings(merge_rec_data(energy_exp2015_2016, +#' energy_exp2017_2018)) +#' +#' head(combined_energy_exp) +#' tail(combined_energy_exp) +#' @export + +energy_exp_fun <- + function(DHHGAGE_cont, PAA_045, PAA_050, PAA_075, PAA_080, PAADVDYS, + PAADVVIG, PAYDVTOA, PAYDVADL, PAYDVVIG, PAYDVDYS){ + # Leisure activity for adults + leisure_adult <- + if_else2(DHHGAGE_cont >= 18 & !is.na(PAA_045) & !is.na(PAA_050) & + !is.na(PAA_075) & !is.na(PAA_080), + ((PAA_045)*60 +(PAA_050) +(PAA_075)*60 +(PAA_080)), + if_else2(PAA_045 == "NA(a)"|PAA_050 == "NA(a)"| + PAA_075 == "NA(a)"|PAA_080 == "NA(a)", + tagged_na("a"), tagged_na("b"))) + + # Leisure activity for youth + leisure_youth <- + if_else2(DHHGAGE_cont < 18 & !is.na(PAYDVTOA) & !is.na(PAYDVADL), + ((PAYDVTOA) + (PAYDVADL)), + if_else2(PAYDVTOA == "NA(a)"|PAYDVADL == "NA(a)", + tagged_na("a"), tagged_na("b"))) + + # Energy expenditure calculation + physical_activity <- + if_else2(!is.na(PAYDVVIG) & !is.na(leisure_youth) & !is.na(PAYDVDYS), + (((leisure_youth) - (PAYDVVIG))*3 + (PAYDVVIG)*6)/7*PAYDVDYS/60, + if_else2(!is.na(PAADVDYS) & !is.na(PAADVVIG) & + !is.na(leisure_adult) & !is.na(PAADVVIG), + ((((leisure_adult) - (PAADVVIG))*3 + (PAADVVIG)*6)/7*(PAADVDYS)/60), + if_else2(leisure_youth == "NA(a)"| + PAYDVDYS == "NA(a)"|PAADVVIG == "NA(a)"| + leisure_adult == "NA(a)"|PAADVDYS == "NA(a)", + tagged_na("a"), tagged_na("b")))) + return(physical_activity) + } + + diff --git a/R/recode-with-table.R b/R/recode-with-table.R index 4598a868..a830db33 100644 --- a/R/recode-with-table.R +++ b/R/recode-with-table.R @@ -565,7 +565,9 @@ recode_columns <- from_values <- list() interval <- "" if (grepl("\\[*\\]", as.character(row_being_checked[[ - pkg.globals$argument.From]]))) { + pkg.globals$argument.From]])) || + grepl("\\(*\\)", as.character(row_being_checked[[ + pkg.globals$argument.From]]))) { from_values <- strsplit(as.character(row_being_checked[[ pkg.globals$argument.From]]), ",")[[1]] @@ -574,9 +576,20 @@ recode_columns <- interval_left <- substr(from_values[[1]], 1, 1) interval_right <- substr(from_values[[2]], nchar(from_values[[2]]), nchar(from_values[[2]])) interval <- paste0(interval_left,",",interval_right) - from_values[[1]] <- gsub("\\[|\\]", "", from_values[[1]]) - from_values[[2]] <- gsub("\\[|\\]", "", from_values[[2]]) - } else { + if(grepl("\\[", from_values[[1]])){ + from_values[[1]] <- gsub("\\[", "", from_values[[1]]) + } + else{ + from_values[[1]] <- gsub("\\(", "", from_values[[1]]) + } + if(grepl("\\]", from_values[[2]])){ + from_values[[2]] <- gsub("|]", "", from_values[[2]]) + } + else{ + from_values[[2]] <- gsub("|)", "", from_values[[2]]) + } + } + else { temp_from <- as.character(row_being_checked[[pkg.globals$argument.From]]) from_values[[1]] <- temp_from @@ -719,7 +732,16 @@ compare_value_based_on_interval <- as.numeric(left_boundary) < data[[compare_columns]] & data[[compare_columns]] <= as.numeric(right_boundary) )] - } else { + } + else if (interval == "(,)") { + return_boolean <- + data[[compare_columns]] %in% data[[ + compare_columns]][which( + as.numeric(left_boundary) < data[[compare_columns]] & + data[[compare_columns]] < as.numeric(right_boundary) + )] + } + else { stop("Invalid Argument was passed") } } diff --git a/R/smoking.R b/R/smoking.R index 857bbced..70f70ce5 100644 --- a/R/smoking.R +++ b/R/smoking.R @@ -90,8 +90,8 @@ time_quit_smoking_fun <- function(SMK_09A_B, SMKG09C) { #' \item former daily smoker quit >5 years #' } #' -#' @param SMKDSTY derived variable that classifies an individual's smoking -#' status. +#' @param SMKDSTY_cat5 derived variable that classifies an individual's smoking +#' status. This variable captures cycles 2001-2018. #' #' @param time_quit_smoking derived variable that calculates the approximate #' time a former smoker has quit smoking. @@ -136,27 +136,27 @@ time_quit_smoking_fun <- function(SMK_09A_B, SMKG09C) { #' tail(combined_smoke_simple) #' @export smoke_simple_fun <- - function(SMKDSTY, time_quit_smoking) { + function(SMKDSTY_cat5, time_quit_smoking) { # Nested function: current smoker status - derive_current_smoker <- function(SMKDSTY) { + derive_current_smoker <- function(SMKDSTY_cat5) { smoker <- - ifelse(SMKDSTY %in% c(1, 2, 3), 1, - ifelse(SMKDSTY %in% c(4, 5, 6), 0, - ifelse(SMKDSTY == "NA(a)", "NA(a)", "NA(b)"))) + ifelse(SMKDSTY_cat5 %in% c(1, 2), 1, + ifelse(SMKDSTY_cat5 %in% c(3, 4, 5), 0, + ifelse(SMKDSTY_cat5 == "NA(a)", "NA(a)", "NA(b)"))) return(smoker) } - smoker <- derive_current_smoker(SMKDSTY) + smoker <- derive_current_smoker(SMKDSTY_cat5) # Nested function: ever smoker status - derive_ever_smoker <- function(SMKDSTY) { + derive_ever_smoker <- function(SMKDSTY_cat5) { eversmoker <- - ifelse(SMKDSTY %in% c(1, 2, 3, 4, 5), 1, - ifelse(SMKDSTY == 6, 0, - ifelse(SMKDSTY == "NA(a)", "NA(a)", "NA(b)"))) + ifelse(SMKDSTY_cat5 %in% c(1, 2, 3, 4), 1, + ifelse(SMKDSTY_cat5 == 5, 0, + ifelse(SMKDSTY_cat5 == "NA(a)", "NA(a)", "NA(b)"))) return(eversmoker) } - eversmoker <- derive_ever_smoker(SMKDSTY) + eversmoker <- derive_ever_smoker(SMKDSTY_cat5) # smoke_simple 0 = non-smoker smoke_simple <- @@ -166,7 +166,7 @@ smoke_simple_fun <- # smoke_simple 2 = former daily smoker quit =<5 years or former occasional # smoker ifelse(smoker == 0 & eversmoker == 1 & time_quit_smoking <= 5 | - SMKDSTY == 5, 2, + SMKDSTY_cat5 == 4, 2, # smoke_simple 3 = former daily smoker quit > 5 years ifelse(smoker == 0 & eversmoker == 1 & time_quit_smoking > 5, 3, @@ -190,8 +190,8 @@ smoke_simple_fun <- #' 20 years and smoked half a pack of cigarettes until age 40 years smoked for #' 10 pack-years. #' -#' @param SMKDSTY derived variable that classifies an individual's smoking -#' status. +#' @param SMKDSTY_A variable used in CCHS cycles 2001-2014 that classifies an +#' individual's smoking status. #' #' @param DHHGAGE_cont continuous age variable. #' @@ -239,7 +239,7 @@ smoke_simple_fun <- #' #' pack_years2009_2010 <- rec_with_table( #' cchs2009_2010_p, c( -#' "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", +#' "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", #' "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", #' "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" #' ) @@ -249,7 +249,7 @@ smoke_simple_fun <- #' #' pack_years2011_2012 <- rec_with_table( #' cchs2011_2012_p,c( -#' "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", +#' "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", #' "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", #' "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" #' ) @@ -264,7 +264,7 @@ smoke_simple_fun <- #' tail(combined_pack_years) #' @export pack_years_fun <- - function(SMKDSTY, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, + function(SMKDSTY_A, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A) { # Age verification @@ -277,34 +277,34 @@ pack_years_fun <- # PackYears for Daily Smoker pack_years <- if_else2( - SMKDSTY == 1, pmax(((DHHGAGE_cont - SMKG203_cont) * + SMKDSTY_A == 1, pmax(((DHHGAGE_cont - SMKG203_cont) * (SMK_204 / 20)), 0.0137), # PackYears for Occasional Smoker (former daily) if_else2( - SMKDSTY == 2, pmax(((DHHGAGE_cont - SMKG207_cont - + SMKDSTY_A == 2, pmax(((DHHGAGE_cont - SMKG207_cont - time_quit_smoking) * (SMK_208 / 20)), 0.0137) + (pmax((SMK_05B * SMK_05C / 30), 1) *time_quit_smoking), # PackYears for Occasional Smoker (never daily) if_else2( - SMKDSTY == 3, (pmax((SMK_05B * SMK_05C / 30), 1) / 20) * + SMKDSTY_A == 3, (pmax((SMK_05B * SMK_05C / 30), 1) / 20) * (DHHGAGE_cont - SMKG01C_cont), # PackYears for former daily smoker (non-smoker now) if_else2( - SMKDSTY == 4, pmax(((DHHGAGE_cont - SMKG207_cont - + SMKDSTY_A == 4, pmax(((DHHGAGE_cont - SMKG207_cont - time_quit_smoking) * (SMK_208 / 20)), 0.0137), # PackYears for former occasional smoker (non-smoker now) who # smoked at least 100 cigarettes lifetime if_else2( - SMKDSTY == 5 & SMK_01A == 1, 0.0137, + SMKDSTY_A == 5 & SMK_01A == 1, 0.0137, # PackYears for former occasional smoker (non-smoker now) who # have not smoked at least 100 cigarettes lifetime if_else2( - SMKDSTY == 5 & SMK_01A == 2, 0.007, + SMKDSTY_A == 5 & SMK_01A == 2, 0.007, # Non-smoker - if_else2(SMKDSTY == 6, 0, + if_else2(SMKDSTY_A == 6, 0, # Account for NA(a) - if_else2(SMKDSTY == "NA(a)", tagged_na("a"), + if_else2(SMKDSTY_A == "NA(a)", tagged_na("a"), tagged_na("b")) ) ) @@ -315,3 +315,153 @@ pack_years_fun <- ) return(pack_years) } + +#' @title Age started smoking daily - daily/former daily smokers +#' +#' @description This function creates a continuous derived variable +#' (SMKG040_fun) that calculates the approximate age that a daily or former +#' daily smoker began smoking daily. +#' +#' @details SMKG203 (daily smoker) and SMKG207 (former daily) are present in +#' CCHS 2001-2014, and are separate variables. For CCHS 2015 and onward, SMKG040 +#' (daily/former daily) combines the two previous variables. SMKG040_fun takes +#' the continuous functions (SMKG203_cont and SMKG207_cont) to create SMKG040 +#' for 2001-2014. +#' +#' @note In previous cycles, both SMKG203 and SMKG207 included respondents who +#' did not state their smoking status. From CCHS 2015 and onward, SMKG040 only +#' included respondents who specified daily smoker or former daily smoker. As +#' a result, SMKG040 has a large number of missing respondents for CCHS 2015 +#' survey cycles and onward. +#' +#' @param SMKG203_cont age started smoking daily. Variable asked to daily +#' smokers. +#' +#' @param SMKG207_cont age started smoking daily. Variable asked to former +#' daily smokers. +#' +#' @return value for age started smoking daily for daily/former daily smokers in +#' the SMKG040_cont +#' +#' @examples +#' # Using SMKG040_fun() to create age values across CCHS cycles +#' # SMKG040_fun() is specified in variable_details.csv under SMKG040_cont. +#' +#' # To create a continuous harmonized variable for SMKG040, use rec_with_table() +#' # for each CCHS cycle and specify SMKG040_cont. +#' +#' library(cchsflow) +#' +#' age_smoke_dfd_2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "SMKG203_cont", "SMKG207_cont","SMKG040_cont" +#' ) +#' ) +#' +#' head(age_smoke_dfd_2009_2010) +#' +#' age_smoke_dfd_2011_2012 <- rec_with_table( +#' cchs2011_2012_p,c( +#' "SMKG203_cont", "SMKG207_cont","SMKG040_cont" +#' ) +#' ) +#' +#' tail(age_smoke_dfd_2011_2012) +#' +#' combined_age_smoke_dfd <- suppressWarnings(merge_rec_data +#' (age_smoke_dfd_2009_2010,age_smoke_dfd_2011_2012)) +#' +#' head(combined_age_smoke_dfd) +#' tail(combined_age_smoke_dfd) +#' @export + +SMKG040_fun <- function(SMKG203_cont, SMKG207_cont){ + SMKG040_cont <- + if_else2((SMKG203_cont == tagged_na("a") & SMKG207_cont == tagged_na("a")), + tagged_na("a"), + if_else2((SMKG203_cont == tagged_na("b") & + SMKG207_cont == tagged_na("b")), tagged_na("b"), + if_else2(!is.na(SMKG203_cont), SMKG203_cont, + if_else2(!is.na(SMKG207_cont), SMKG207_cont, + tagged_na("b"))))) + return(SMKG040_cont) +} + +#' @title Categorical smoking pack-years +#' +#' @description This function creates a categorical derived variable +#' (pack_years_cat) that categorizes smoking pack-years (pack_years_der). +#' +#' @details pack-years is calculated by multiplying the number of cigarette +#' packs per day (20 cigarettes per pack) by the number of years.The categories +#' were based on the Cardiovascular Disease Population Risk Tool +#' (Douglas Manuel et al. 2018). +#' +#' pack_years_cat uses the derived variable pack_years_der. Pack_years_der uses +#' age and various smoking variables that have been transformed by cchsflow (see +#' documentation on pack_year_der). In order to categorize pack years across CCHS +#' cycles, age and smoking variables must be transformed and harmonized. +#' +#' @param pack_years_der derived variable that calculates smoking pack-years +#' See \code{\link{pack_years_fun}} for documentation on how variable +#' was derived. +#' +#' @return value for pack year categories in the pack_years_cat variable. +#' +#' @examples +#' # Using pack_years_fun_cat() to categorize pack year values across CCHS cycles +#' # pack_years_fun_cat() is specified in variable_details.csv along with the +#' # CCHS variables and cycles included. +#' +#' # To transform pack_years_cat across cycles, use rec_with_table() for each +#' # CCHS cycle and specify pack_years_cat. +#' # Since pack_year_der is also also derived variable, you will have to specify +#' # the variables that are derived from it. +#' # Since time_quit_smoking_der is also a derived variable in pack_year_der, +#' # you will have to specify the variables that are derived from it. +#' # Then by using merge_rec_data(), you can combine pack_years_cat across +#' # cycles. +#' +#' library(cchsflow) +#' +#' pack_years_cat_2009_2010 <- rec_with_table( +#' cchs2009_2010_p, c( +#' "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", +#' "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", +#' "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat" +#' ) +#' ) +#' +#' head(pack_years_cat_2009_2010) +#' +#' pack_years_cat_2011_2012 <- rec_with_table( +#' cchs2011_2012_p,c( +#' "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", +#' "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", +#' "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat" +#' ) +#' ) +#' +#' tail(pack_years_cat_2011_2012) +#' +#' combined_pack_years_cat <- suppressWarnings(merge_rec_data +#' (pack_years_cat_2009_2010,pack_years_cat_2011_2012)) +#' +#' head(combined_pack_years_cat) +#' tail(combined_pack_years_cat) +#' @export +#' +pack_years_fun_cat <- function(pack_years_der){ + pack_years_cat <- + if_else2(pack_years_der == 0, 1, + if_else2(pack_years_der > 0 & pack_years_der <= 0.01, 2, + if_else2(pack_years_der > 0.01 & pack_years_der <= 3.0, 3, + if_else2(pack_years_der > 3.0 & pack_years_der <= 9.0, 4, + if_else2(pack_years_der > 9.0 & pack_years_der <= 16.2, 5, + if_else2(pack_years_der > 16.2 & pack_years_der <= 25.7, 6, + if_else2(pack_years_der > 25.7 & pack_years_der <= 40.0, 7, + if_else2(pack_years_der > 40.0, 8, + if_else2(pack_years_der == tagged_na("a"), "NA(a)", "NA(b)"))))))))) + + return(pack_years_cat) +} diff --git a/README.md b/README.md index bca3a439..4c40b6b4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ development](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://l *cchsflow* supports the use of the Canadian Community Health Survey (CCHS) by transforming variables from each cycle into harmonized, consistent versions that -span survey cycles (currently, 2001 to 2014). +span survey cycles (currently, 2001 to 2018). The CCHS is a population-based cross-sectional survey of Canadians that has been administered every two years since 2001. There are approximately 130,000 @@ -33,7 +33,7 @@ combine them together to increase sample size; however, you soon realize a challenge... Imagine you want to use BMI (body mass index) for a study that spans CCHS 2001 -to 2014. BMI _seems_ like a straightforward measure that is routinely-collected +to 2018. BMI _seems_ like a straightforward measure that is routinely-collected worldwide. Indeed, BMI is included in all CCHS cycles. You examine the documentation and find the variable `HWTAGBMI` in the CCHS 2001 corresponds to body mass index, but that in other cycles, the variable name changes to @@ -122,15 +122,15 @@ variables that are listed in `variables.csv`. Transformations are performed using `rec_with_table()`. `variables.csv` and `variable_details.csv` can be used with other statistics programs (see [issue](https://github.com/Big-Life-Lab/cchsflow/issues)). 4. Demonstration CCHS data - `cchsflow` includes a random sample of 200 -respondents from each CCHS PUMF file from 2001 to 2014. These data are used for +respondents from each CCHS PUMF file from 2001 to 2018. These data are used for the vignettes. The CCHS test data is stored in /data as .RData files. They can be read as a package database. ``` -# read the CCHS 2014 PUMF test data +# read the CCHS 2017-2018 PUMF test data -test_data <- cchs2014_p +test_data <- cchs2017_2018_p ``` This repository does not include the full CCHS data. Information on how to diff --git a/_pkgdown.yml b/_pkgdown.yml index 3f885a1a..c0fdaf1d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -55,6 +55,8 @@ reference: desc: Functions for deriving custom CCHS variables contents: - bmi_fun + - adjusted_bmi_fun + - bmi_fun_cat - pack_years_fun - pct_time_fun - resp_condition_fun1 @@ -65,12 +67,23 @@ reference: - multiple_conditions_fun1 - multiple_conditions_fun2 - adl_fun + - RACDPAL_fun - adl_score_5_fun - COPD_Emph_der_fun1 - COPD_Emph_der_fun2 - diet_score_fun + - diet_score_fun_cat - smoke_simple_fun - time_quit_smoking_fun + - low_drink_short_fun + - low_drink_long_fun + - low_drink_score_fun + - low_drink_score_fun1 + - immigration_fun + - pct_time_fun_cat + - energy_exp_fun + - SMKG040_fun + - pack_years_fun_cat - title: "Potentially problematic variables" desc: Derived variables in cchsflow that users may run into issues with contents: @@ -98,6 +111,8 @@ reference: - cchs2012_p - cchs2013_2014_p - cchs2014_p + - cchs2015_2016_p + - cchs2017_2018_p - title: "Processing functions" desc: Functions used to manipulate CCHS datasets contents: diff --git a/cran-comments.md b/cran-comments.md index aaa01be4..78460b91 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,9 @@ ## Resubmission This is a resubmission. In this version we have: -* Fixed a breaking error for a derived variable function. -* Corrected documentations to two functions. +* Added support for CCHS survey up to 2018. +* Fixed `rec_with_table()` to support round bracket interval notation. +* Added new variables and derived functions. ## Test environments * local OS X install, R 4.0.0 diff --git a/data/cchs2015_2016_p.RData b/data/cchs2015_2016_p.RData new file mode 100644 index 00000000..7c5aabe9 Binary files /dev/null and b/data/cchs2015_2016_p.RData differ diff --git a/data/cchs2017_2018_p.RData b/data/cchs2017_2018_p.RData new file mode 100644 index 00000000..dc3ad4b3 Binary files /dev/null and b/data/cchs2017_2018_p.RData differ diff --git a/data/variable_details.RData b/data/variable_details.RData index 18ade47e..d760834d 100644 Binary files a/data/variable_details.RData and b/data/variable_details.RData differ diff --git a/data/variables.RData b/data/variables.RData index 642c6d80..9ef2501a 100644 Binary files a/data/variables.RData and b/data/variables.RData differ diff --git a/docs/404.html b/docs/404.html index cb4dcb59..29fe4cfa 100644 --- a/docs/404.html +++ b/docs/404.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@
+ + diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 5b8d0cbe..34f362d3 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@
+ + diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index d657661e..e0571023 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@

@@ -223,17 +226,23 @@

+ + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index a8053861..a472f134 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@
+ + diff --git a/docs/articles/derived_variables.html b/docs/articles/derived_variables.html index 6ba8633a..76fe3756 100644 --- a/docs/articles/derived_variables.html +++ b/docs/articles/derived_variables.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
+
-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/derived_variables_files/header-attrs-2.11/header-attrs.js b/docs/articles/derived_variables_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/derived_variables_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/duplicate_datasets.html b/docs/articles/duplicate_datasets.html index 8756844b..4f6e92a7 100644 --- a/docs/articles/duplicate_datasets.html +++ b/docs/articles/duplicate_datasets.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
+
@@ -165,30 +167,22 @@

-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/duplicate_datasets_files/header-attrs-2.11/header-attrs.js b/docs/articles/duplicate_datasets_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/duplicate_datasets_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/get_started.html b/docs/articles/get_started.html index aa26b49d..bd8527d3 100644 --- a/docs/articles/get_started.html +++ b/docs/articles/get_started.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
+
-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/get_started_files/figure-html/fig1-1.png b/docs/articles/get_started_files/figure-html/fig1-1.png index e131e9a9..3fc4a087 100644 Binary files a/docs/articles/get_started_files/figure-html/fig1-1.png and b/docs/articles/get_started_files/figure-html/fig1-1.png differ diff --git a/docs/articles/get_started_files/header-attrs-2.11/header-attrs.js b/docs/articles/get_started_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/get_started_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/how_to_add_variables.html b/docs/articles/how_to_add_variables.html index 43190eb5..5246e02e 100644 --- a/docs/articles/how_to_add_variables.html +++ b/docs/articles/how_to_add_variables.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
+

@@ -357,7 +358,7 @@

  1. -databaseStart: BMI was captured in all CCHS surveys between 2001 and 2014, so in the first row with the continuous “category” and the else row, the CCHS identifiers will be listed this column:
  2. +databaseStart: BMI was captured in all CCHS surveys between 2001 and 2018, so in the first row with the continuous “category” and the else row, the CCHS identifiers will be listed this column:
@@ -529,7 +530,7 @@

  1. -variableStart: In the 2001, 2003, and 2005 CCHS surveys the BMI variable differs from the common name, while in the CCHS surveys from 2007-2014, the BMI variable is the same as the common name. However, the values for not applicable and missing categories changes after 2003. Therefore for the first & else rows, the variableStart column will look like this:
  2. +variableStart: In the 2001, 2003, and 2005 CCHS surveys the BMI variable differs from the common name, while in the CCHS surveys from 2007-2018, the BMI variable is the same as the common name. However, the values for not applicable and missing categories changes after 2003. Therefore for the first & else rows, the variableStart column will look like this:
@@ -1932,7 +1933,7 @@

  1. -recFrom: Going through the CCHS data documentation from 2001 to 2014, it was found that the lowest BMI value was 11.91 and the highest BMI value was 57.9. Therefore the recFrom for the first row is written as [11.91,57.9]. In the 2001 and 2003 CCHS surveys not applicable was coded as 999.6 so the recFrom for this row would be [999.6,999.6]. Similarly, in the 2001 and 2003 CCHS surveys don’t know was coded as 999.7, refusal was coded as 999.8, and not stated was coded as 999.9. Therefore the recFrom for the missing row for CCHS 2001 and 2003 would be [999.7,999.9]. In the not applicable row for the 2005 CCHS survey onwards, the recFrom is [999.96,999.96]. In the missing row for CCHS 2005 onwards, the recFrom is [999.97,999.99]. For the else row, just write else.
  2. +recFrom: Going through the CCHS data documentation from 2001 to 2018, it was found that the lowest BMI value was 11.91 and the highest BMI value was 57.9. Therefore the recFrom for the first row is written as [11.91,57.9]. In the 2001 and 2003 CCHS surveys not applicable was coded as 999.6 so the recFrom for this row would be [999.6,999.6]. Similarly, in the 2001 and 2003 CCHS surveys don’t know was coded as 999.7, refusal was coded as 999.8, and not stated was coded as 999.9. Therefore the recFrom for the missing row for CCHS 2001 and 2003 would be [999.7,999.9]. In the not applicable row for the 2005 CCHS survey onwards, the recFrom is [999.96,999.96]. In the missing row for CCHS 2005 onwards, the recFrom is [999.97,999.99]. For the else row, just write else.
@@ -3593,38 +3594,39 @@

Step 1. Creating a derived function

With complex derived variables, sometimes it is necessary to create functions within the custom function. For pack-years, a nested function was used to create an intermediate smoking variable that was used in the main function.

-
Pack_years_fun <-
-  function(SMKDSTY, DHHGAGE_cont, SMK_09A_B, SMKG09C, SMKG203_cont, SMKG207_cont,
-           SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A) {
-    #Time since quit for former daily smokers
-    tsq_ds_fun <- function(SMK_09A_B, SMKG09C) {
-      SMKG09C <-
-        ifelse2(SMKG09C==1, 4,
-        ifelse2(SMKG09C==2, 8,
-        ifelse2(SMKG09C==3, 12, NA)))
-      tsq_ds <-
-        ifelse2(SMK_09A_B==1, 0.5,
-        ifelse2(SMK_09A_B==2, 1.5,
-        ifelse2(SMK_09A_B==3, 2.5,
-        ifelse2(SMK_09A_B==4, SMKG09C, NA))))
-    }
-    tsq_ds<-tsq_ds_fun(SMK_09A_B, SMKG09C)
-    # PackYears for Daily Smoker
-    ifelse2(SMKDSTY==1, pmax(((DHHGAGE_cont - SMKG203_cont)*(SMK_204/20)), 0.0137),
-    # PackYears for Occasional Smoker (former daily)     
-    ifelse2(SMKDSTY==2, pmax(((DHHGAGE_cont - SMKG207_cont - tsq_ds)*(SMK_208/20)), 0.0137) 
-            + (pmax((SMK_05B*SMK_05C/30), 1)*tsq_ds),
-    # PackYears for Occasional Smoker (never daily)      
-    ifelse2(SMKDSTY==3, (pmax((SMK_05B*SMK_05C/30), 1)/20)*(DHHGAGE_cont - SMKG01C_cont),
-    # PackYears for former daily smoker (non-smoker now)      
-    ifelse2(SMKDSTY==4, pmax(((DHHGAGE_cont - SMKG207_cont - tsq_ds)*(SMK_208/20)), 0.0137),
-    # PackYears for former occasional smoker (non-smoker now) who smoked at least 100 cigarettes lifetime      
-    ifelse2(SMKDSTY==5 & SMK_01A==1, 0.0137,
-    # PackYears for former occasional smoker (non-smoker now) who have not smoked at least 100 cigarettes lifetime      
-    ifelse2(SMKDSTY==5 & SMK_01A==2, 0.007,
-    # Non-smoker      
-    ifelse2(SMKDSTY==6, 0, NA)))))))
-  }
+
+Pack_years_fun <-
+  function(SMKDSTY, DHHGAGE_cont, SMK_09A_B, SMKG09C, SMKG203_cont, SMKG207_cont,
+           SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A) {
+    #Time since quit for former daily smokers
+    tsq_ds_fun <- function(SMK_09A_B, SMKG09C) {
+      SMKG09C <-
+        ifelse2(SMKG09C==1, 4,
+        ifelse2(SMKG09C==2, 8,
+        ifelse2(SMKG09C==3, 12, NA)))
+      tsq_ds <-
+        ifelse2(SMK_09A_B==1, 0.5,
+        ifelse2(SMK_09A_B==2, 1.5,
+        ifelse2(SMK_09A_B==3, 2.5,
+        ifelse2(SMK_09A_B==4, SMKG09C, NA))))
+    }
+    tsq_ds<-tsq_ds_fun(SMK_09A_B, SMKG09C)
+    # PackYears for Daily Smoker
+    ifelse2(SMKDSTY==1, pmax(((DHHGAGE_cont - SMKG203_cont)*(SMK_204/20)), 0.0137),
+    # PackYears for Occasional Smoker (former daily)     
+    ifelse2(SMKDSTY==2, pmax(((DHHGAGE_cont - SMKG207_cont - tsq_ds)*(SMK_208/20)), 0.0137) 
+            + (pmax((SMK_05B*SMK_05C/30), 1)*tsq_ds),
+    # PackYears for Occasional Smoker (never daily)      
+    ifelse2(SMKDSTY==3, (pmax((SMK_05B*SMK_05C/30), 1)/20)*(DHHGAGE_cont - SMKG01C_cont),
+    # PackYears for former daily smoker (non-smoker now)      
+    ifelse2(SMKDSTY==4, pmax(((DHHGAGE_cont - SMKG207_cont - tsq_ds)*(SMK_208/20)), 0.0137),
+    # PackYears for former occasional smoker (non-smoker now) who smoked at least 100 cigarettes lifetime      
+    ifelse2(SMKDSTY==5 & SMK_01A==1, 0.0137,
+    # PackYears for former occasional smoker (non-smoker now) who have not smoked at least 100 cigarettes lifetime      
+    ifelse2(SMKDSTY==5 & SMK_01A==2, 0.007,
+    # Non-smoker      
+    ifelse2(SMKDSTY==6, 0, NA)))))))
+  }

More information on what each smoking variable means can be found in the Reference section.

@@ -4572,7 +4574,7 @@

Creating a derived variable that exists in other CCHS cycles

-

In order to harmonize a variable across all cycles, you may need to create a derived variable for the years in which the variable is not present. An example of this is RACDPAL, a variable that was derived from 2003 to 2014. To create and specify RACDPAL for 2001, the same derived variable conventions apply with a few slight differences. In variables.csv, the DerivedVar is enclosed with the database in which it is derived.

+

In order to harmonize a variable across all cycles, you may need to create a derived variable for the years in which the variable is not present. An example of this is RACDPAL, a variable that was derived from 2003 to 2018. To create and specify RACDPAL for 2001, the same derived variable conventions apply with a few slight differences. In variables.csv, the DerivedVar is enclosed with the database in which it is derived.

')); + $table.find('thead tr').clone().appendTo($table.find('tfoot')); + } + } + + // column filters + var filterRow; + switch (data.filter) { + case 'top': + $table.children('thead').append(data.filterHTML); + filterRow = $table.find('thead tr:last td'); + break; + case 'bottom': + if ($table.children('tfoot').length === 0) { + $table.append($('')); + } + $table.children('tfoot').prepend(data.filterHTML); + filterRow = $table.find('tfoot tr:first td'); + break; + } + + var options = { searchDelay: 1000 }; + if (cells !== null) $.extend(options, { + data: cells + }); + + // options for fillContainer + var bootstrapActive = typeof($.fn.popover) != 'undefined'; + if (instance.fillContainer) { + + // force scrollX/scrollY and turn off autoWidth + options.scrollX = true; + options.scrollY = "100px"; // can be any value, we'll adjust below + + // if we aren't paginating then move around the info/filter controls + // to save space at the bottom and rephrase the info callback + if (data.options.paging === false) { + + // we know how to do this cleanly for bootstrap, not so much + // for other themes/layouts + if (bootstrapActive) { + options.dom = "<'row'<'col-sm-4'i><'col-sm-8'f>>" + + "<'row'<'col-sm-12'tr>>"; + } + + options.fnInfoCallback = function(oSettings, iStart, iEnd, + iMax, iTotal, sPre) { + return Number(iTotal).toLocaleString() + " records"; + }; + } + } + + // auto hide navigation if requested + // Note, this only works on client-side processing mode as on server-side, + // cells (data.data) is null; In addition, we require the pageLength option + // being provided explicitly to enable this. Despite we may be able to deduce + // the default value of pageLength, it may complicate things so we'd rather + // put this responsiblity to users and warn them on the R side. + if (data.autoHideNavigation === true && data.options.paging !== false) { + // strip all nav if length >= cells + if ((cells instanceof Array) && data.options.pageLength >= cells.length) + options.dom = bootstrapActive ? "<'row'<'col-sm-12'tr>>" : "t"; + // alternatively lean things out for flexdashboard mobile portrait + else if (bootstrapActive && window.FlexDashboard && window.FlexDashboard.isMobilePhone()) + options.dom = "<'row'<'col-sm-12'f>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12'p>>"; + } + + $.extend(true, options, data.options || {}); + + var searchCols = options.searchCols; + if (searchCols) { + searchCols = searchCols.map(function(x) { + return x === null ? '' : x.search; + }); + // FIXME: this means I don't respect the escapeRegex setting + delete options.searchCols; + } + + // server-side processing? + var server = options.serverSide === true; + + // use the dataSrc function to pre-process JSON data returned from R + var DT_rows_all = [], DT_rows_current = []; + if (server && HTMLWidgets.shinyMode && typeof options.ajax === 'object' && + /^session\/[\da-z]+\/dataobj/.test(options.ajax.url) && !options.ajax.dataSrc) { + options.ajax.dataSrc = function(json) { + DT_rows_all = $.makeArray(json.DT_rows_all); + DT_rows_current = $.makeArray(json.DT_rows_current); + var data = json.data; + if (!colReorderEnabled()) return data; + var table = $table.DataTable(), order = table.colReorder.order(), flag = true, i, j, row; + for (i = 0; i < order.length; ++i) if (order[i] !== i) flag = false; + if (flag) return data; + for (i = 0; i < data.length; ++i) { + row = data[i].slice(); + for (j = 0; j < order.length; ++j) data[i][j] = row[order[j]]; + } + return data; + }; + } + + var thiz = this; + if (instance.fillContainer) $table.on('init.dt', function(e) { + thiz.fillAvailableHeight(el, $(el).innerHeight()); + }); + // If the page contains serveral datatables and one of which enables colReorder, + // the table.colReorder.order() function will exist but throws error when called. + // So it seems like the only way to know if colReorder is enabled or not is to + // check the options. + var colReorderEnabled = function() { return "colReorder" in options; }; + var table = $table.DataTable(options); + $el.data('datatable', table); + + // Unregister previous Crosstalk event subscriptions, if they exist + if (instance.ctfilterSubscription) { + instance.ctfilterHandle.off("change", instance.ctfilterSubscription); + instance.ctfilterSubscription = null; + } + if (instance.ctselectSubscription) { + instance.ctselectHandle.off("change", instance.ctselectSubscription); + instance.ctselectSubscription = null; + } + + if (!crosstalkOptions.group) { + $table[0].ctfilter = null; + $table[0].ctselect = null; + } else { + var key = crosstalkOptions.key; + function keysToMatches(keys) { + if (!keys) { + return null; + } else { + var selectedKeys = {}; + for (var i = 0; i < keys.length; i++) { + selectedKeys[keys[i]] = true; + } + var matches = {}; + for (var j = 0; j < key.length; j++) { + if (selectedKeys[key[j]]) + matches[j] = true; + } + return matches; + } + } + + function applyCrosstalkFilter(e) { + $table[0].ctfilter = keysToMatches(e.value); + table.draw(); + } + instance.ctfilterSubscription = instance.ctfilterHandle.on("change", applyCrosstalkFilter); + applyCrosstalkFilter({value: instance.ctfilterHandle.filteredKeys}); + + function applyCrosstalkSelection(e) { + if (e.sender !== instance.ctselectHandle) { + table + .rows('.' + selClass, {search: 'applied'}) + .nodes() + .to$() + .removeClass(selClass); + if (selectedRows) + changeInput('rows_selected', selectedRows(), void 0, true); + } + + if (e.sender !== instance.ctselectHandle && e.value && e.value.length) { + var matches = keysToMatches(e.value); + + // persistent selection with plotly (& leaflet) + var ctOpts = crosstalk.var("plotlyCrosstalkOpts").get() || {}; + if (ctOpts.persistent === true) { + var matches = $.extend(matches, $table[0].ctselect); + } + + $table[0].ctselect = matches; + table.draw(); + } else { + if ($table[0].ctselect) { + $table[0].ctselect = null; + table.draw(); + } + } + } + instance.ctselectSubscription = instance.ctselectHandle.on("change", applyCrosstalkSelection); + // TODO: This next line doesn't seem to work when renderDataTable is used + applyCrosstalkSelection({value: instance.ctselectHandle.value}); + } + + var inArray = function(val, array) { + return $.inArray(val, $.makeArray(array)) > -1; + }; + + // encode + to %2B when searching in the table on server side, because + // shiny::parseQueryString() treats + as spaces, and DataTables does not + // encode + to %2B (or % to %25) when sending the request + var encode_plus = function(x) { + return server ? x.replace(/%/g, '%25').replace(/\+/g, '%2B') : x; + }; + + // search the i-th column + var searchColumn = function(i, value) { + var regex = false, ci = true; + if (options.search) { + regex = options.search.regex, + ci = options.search.caseInsensitive !== false; + } + return table.column(i).search(encode_plus(value), regex, !regex, ci); + }; + + if (data.filter !== 'none') { + + filterRow.each(function(i, td) { + + var $td = $(td), type = $td.data('type'), filter; + var $input = $td.children('div').first().children('input'); + $input.prop('disabled', !table.settings()[0].aoColumns[i].bSearchable || type === 'disabled'); + $input.on('input blur', function() { + $input.next('span').toggle(Boolean($input.val())); + }); + // Bootstrap sets pointer-events to none and we won't be able to click + // the clear button + $input.next('span').css('pointer-events', 'auto').hide().click(function() { + $(this).hide().prev('input').val('').trigger('input').focus(); + }); + var searchCol; // search string for this column + if (searchCols && searchCols[i]) { + searchCol = searchCols[i]; + $input.val(searchCol).trigger('input'); + } + var $x = $td.children('div').last(); + + // remove the overflow: hidden attribute of the scrollHead + // (otherwise the scrolling table body obscures the filters) + // The workaround and the discussion from + // https://github.com/rstudio/DT/issues/554#issuecomment-518007347 + // Otherwise the filter selection will not be anchored to the values + // when the columns number is many and scrollX is enabled. + var scrollHead = $(el).find('.dataTables_scrollHead,.dataTables_scrollFoot'); + var cssOverflowHead = scrollHead.css('overflow'); + var scrollBody = $(el).find('.dataTables_scrollBody'); + var cssOverflowBody = scrollBody.css('overflow'); + var scrollTable = $(el).find('.dataTables_scroll'); + var cssOverflowTable = scrollTable.css('overflow'); + if (cssOverflowHead === 'hidden') { + $x.on('show hide', function(e) { + if (e.type === 'show') { + scrollHead.css('overflow', 'visible'); + scrollBody.css('overflow', 'visible'); + scrollTable.css('overflow-x', 'scroll'); + } else { + scrollHead.css('overflow', cssOverflowHead); + scrollBody.css('overflow', cssOverflowBody); + scrollTable.css('overflow-x', cssOverflowTable); + } + }); + $x.css('z-index', 25); + } + + if (inArray(type, ['factor', 'logical'])) { + $input.on({ + click: function() { + $input.parent().hide(); $x.show().trigger('show'); filter[0].selectize.focus(); + }, + input: function() { + if ($input.val() === '') filter[0].selectize.setValue([]); + } + }); + var $input2 = $x.children('select'); + filter = $input2.selectize({ + options: $input2.data('options').map(function(v, i) { + return ({text: v, value: v}); + }), + plugins: ['remove_button'], + hideSelected: true, + onChange: function(value) { + if (value === null) value = []; // compatibility with jQuery 3.0 + $input.val(value.length ? JSON.stringify(value) : ''); + if (value.length) $input.trigger('input'); + $input.attr('title', $input.val()); + if (server) { + table.column(i).search(value.length ? encode_plus(JSON.stringify(value)) : '').draw(); + return; + } + // turn off filter if nothing selected + $td.data('filter', value.length > 0); + table.draw(); // redraw table, and filters will be applied + } + }); + if (searchCol) filter[0].selectize.setValue(JSON.parse(searchCol)); + filter[0].selectize.on('blur', function() { + $x.hide().trigger('hide'); $input.parent().show(); $input.trigger('blur'); + }); + filter.next('div').css('margin-bottom', 'auto'); + } else if (type === 'character') { + var fun = function() { + searchColumn(i, $input.val()).draw(); + }; + if (server) { + fun = $.fn.dataTable.util.throttle(fun, options.searchDelay); + } + $input.on('input', fun); + } else if (inArray(type, ['number', 'integer', 'date', 'time'])) { + var $x0 = $x; + $x = $x0.children('div').first(); + $x0.css({ + 'background-color': '#fff', + 'border': '1px #ddd solid', + 'border-radius': '4px', + 'padding': data.vertical ? '35px 20px': '20px 20px 10px 20px' + }); + var $spans = $x0.children('span').css({ + 'margin-top': data.vertical ? '0' : '10px', + 'white-space': 'nowrap' + }); + var $span1 = $spans.first(), $span2 = $spans.last(); + var r1 = +$x.data('min'), r2 = +$x.data('max'); + // when the numbers are too small or have many decimal places, the + // slider may have numeric precision problems (#150) + var scale = Math.pow(10, Math.max(0, +$x.data('scale') || 0)); + r1 = Math.round(r1 * scale); r2 = Math.round(r2 * scale); + var scaleBack = function(x, scale) { + if (scale === 1) return x; + var d = Math.round(Math.log(scale) / Math.log(10)); + // to avoid problems like 3.423/100 -> 0.034230000000000003 + return (x / scale).toFixed(d); + }; + var slider_min = function() { + return filter.noUiSlider('options').range.min; + }; + var slider_max = function() { + return filter.noUiSlider('options').range.max; + }; + $input.on({ + focus: function() { + $x0.show().trigger('show'); + // first, make sure the slider div leaves at least 20px between + // the two (slider value) span's + $x0.width(Math.max(160, $span1.outerWidth() + $span2.outerWidth() + 20)); + // then, if the input is really wide or slider is vertical, + // make the slider the same width as the input + if ($x0.outerWidth() < $input.outerWidth() || data.vertical) { + $x0.outerWidth($input.outerWidth()); + } + // make sure the slider div does not reach beyond the right margin + if ($(window).width() < $x0.offset().left + $x0.width()) { + $x0.offset({ + 'left': $input.offset().left + $input.outerWidth() - $x0.outerWidth() + }); + } + }, + blur: function() { + $x0.hide().trigger('hide'); + }, + input: function() { + if ($input.val() === '') filter.val([slider_min(), slider_max()]); + }, + change: function() { + var v = $input.val().replace(/\s/g, ''); + if (v === '') return; + v = v.split('...'); + if (v.length !== 2) { + $input.parent().addClass('has-error'); + return; + } + if (v[0] === '') v[0] = slider_min(); + if (v[1] === '') v[1] = slider_max(); + $input.parent().removeClass('has-error'); + // treat date as UTC time at midnight + var strTime = function(x) { + var s = type === 'date' ? 'T00:00:00Z' : ''; + var t = new Date(x + s).getTime(); + // add 10 minutes to date since it does not hurt the date, and + // it helps avoid the tricky floating point arithmetic problems, + // e.g. sometimes the date may be a few milliseconds earlier + // than the midnight due to precision problems in noUiSlider + return type === 'date' ? t + 3600000 : t; + }; + if (inArray(type, ['date', 'time'])) { + v[0] = strTime(v[0]); + v[1] = strTime(v[1]); + } + if (v[0] != slider_min()) v[0] *= scale; + if (v[1] != slider_max()) v[1] *= scale; + filter.val(v); + } + }); + var formatDate = function(d, isoFmt) { + d = scaleBack(d, scale); + if (type === 'number') return d; + if (type === 'integer') return parseInt(d); + var x = new Date(+d); + var fmt = ('filterDateFmt' in data) ? data.filterDateFmt[i] : undefined; + if (fmt !== undefined && isoFmt === false) return x[fmt.method].apply(x, fmt.params); + if (type === 'date') { + var pad0 = function(x) { + return ('0' + x).substr(-2, 2); + }; + return x.getUTCFullYear() + '-' + pad0(1 + x.getUTCMonth()) + + '-' + pad0(x.getUTCDate()); + } else { + return x.toISOString(); + } + }; + var opts = type === 'date' ? { step: 60 * 60 * 1000 } : + type === 'integer' ? { step: 1 } : {}; + + opts.orientation = data.vertical ? 'vertical': 'horizontal'; + opts.direction = data.vertical ? 'rtl': 'ltr'; + + filter = $x.noUiSlider($.extend({ + start: [r1, r2], + range: {min: r1, max: r2}, + connect: true + }, opts)); + if (scale > 1) (function() { + var t1 = r1, t2 = r2; + var val = filter.val(); + while (val[0] > r1 || val[1] < r2) { + if (val[0] > r1) { + t1 -= val[0] - r1; + } + if (val[1] < r2) { + t2 += r2 - val[1]; + } + filter = $x.noUiSlider($.extend({ + start: [t1, t2], + range: {min: t1, max: t2}, + connect: true + }, opts), true); + val = filter.val(); + } + r1 = t1; r2 = t2; + })(); + var updateSliderText = function(v1, v2) { + $span1.text(formatDate(v1, false)); $span2.text(formatDate(v2, false)); + }; + updateSliderText(r1, r2); + var updateSlider = function(e) { + var val = filter.val(); + // turn off filter if in full range + $td.data('filter', val[0] > slider_min() || val[1] < slider_max()); + var v1 = formatDate(val[0]), v2 = formatDate(val[1]), ival; + if ($td.data('filter')) { + ival = v1 + ' ... ' + v2; + $input.attr('title', ival).val(ival).trigger('input'); + } else { + $input.attr('title', '').val(''); + } + updateSliderText(val[0], val[1]); + if (e.type === 'slide') return; // no searching when sliding only + if (server) { + table.column(i).search($td.data('filter') ? ival : '').draw(); + return; + } + table.draw(); + }; + filter.on({ + set: updateSlider, + slide: updateSlider + }); + } + + // server-side processing will be handled by R (or whatever server + // language you use); the following code is only needed for client-side + // processing + if (server) { + // if a search string has been pre-set, search now + if (searchCol) searchColumn(i, searchCol).draw(); + return; + } + + var customFilter = function(settings, data, dataIndex) { + // there is no way to attach a search function to a specific table, + // and we need to make sure a global search function is not applied to + // all tables (i.e. a range filter in a previous table should not be + // applied to the current table); we use the settings object to + // determine if we want to perform searching on the current table, + // since settings.sTableId will be different to different tables + if (table.settings()[0] !== settings) return true; + // no filter on this column or no need to filter this column + if (typeof filter === 'undefined' || !$td.data('filter')) return true; + + var r = filter.val(), v, r0, r1; + var i_data = function(i) { + if (!colReorderEnabled()) return i; + var order = table.colReorder.order(), k; + for (k = 0; k < order.length; ++k) if (order[k] === i) return k; + return i; // in theory it will never be here... + } + v = data[i_data(i)]; + if (type === 'number' || type === 'integer') { + v = parseFloat(v); + // how to handle NaN? currently exclude these rows + if (isNaN(v)) return(false); + r0 = parseFloat(scaleBack(r[0], scale)) + r1 = parseFloat(scaleBack(r[1], scale)); + if (v >= r0 && v <= r1) return true; + } else if (type === 'date' || type === 'time') { + v = new Date(v); + r0 = new Date(r[0] / scale); r1 = new Date(r[1] / scale); + if (v >= r0 && v <= r1) return true; + } else if (type === 'factor') { + if (r.length === 0 || inArray(v, r)) return true; + } else if (type === 'logical') { + if (r.length === 0) return true; + if (inArray(v === '' ? 'na' : v, r)) return true; + } + return false; + }; + + $.fn.dataTable.ext.search.push(customFilter); + + // search for the preset search strings if it is non-empty + if (searchCol) { + if (inArray(type, ['factor', 'logical'])) { + filter[0].selectize.setValue(JSON.parse(searchCol)); + } else if (type === 'character') { + $input.trigger('input'); + } else if (inArray(type, ['number', 'integer', 'date', 'time'])) { + $input.trigger('change'); + } + } + + }); + + } + + // highlight search keywords + var highlight = function() { + var body = $(table.table().body()); + // removing the old highlighting first + body.unhighlight(); + + // don't highlight the "not found" row, so we get the rows using the api + if (table.rows({ filter: 'applied' }).data().length === 0) return; + // highlight global search keywords + body.highlight($.trim(table.search()).split(/\s+/)); + // then highlight keywords from individual column filters + if (filterRow) filterRow.each(function(i, td) { + var $td = $(td), type = $td.data('type'); + if (type !== 'character') return; + var $input = $td.children('div').first().children('input'); + var column = table.column(i).nodes().to$(), + val = $.trim($input.val()); + if (type !== 'character' || val === '') return; + column.highlight(val.split(/\s+/)); + }); + }; + + if (options.searchHighlight) { + table + .on('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth', highlight) + .on('destroy', function() { + // remove event handler + table.off('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth'); + }); + + // Set the option for escaping regex characters in our search string. This will be used + // for all future matching. + jQuery.fn.highlight.options.escapeRegex = (!options.search || !options.search.regex); + + // initial highlight for state saved conditions and initial states + highlight(); + } + + // run the callback function on the table instance + if (typeof data.callback === 'function') data.callback(table); + + // double click to edit the cell, row, column, or all cells + if (data.editable) table.on('dblclick.dt', 'tbody td', function(e) { + // only bring up the editor when the cell itself is dbclicked, and ignore + // other dbclick events bubbled up (e.g. from the ) + if (e.target !== this) return; + var target = [], immediate = false; + switch (data.editable.target) { + case 'cell': + target = [this]; + immediate = true; // edit will take effect immediately + break; + case 'row': + target = table.cells(table.cell(this).index().row, '*').nodes(); + break; + case 'column': + target = table.cells('*', table.cell(this).index().column).nodes(); + break; + case 'all': + target = table.cells().nodes(); + break; + default: + throw 'The editable parameter must be "cell", "row", "column", or "all"'; + } + var disableCols = data.editable.disable ? data.editable.disable.columns : null; + var numericCols = data.editable.numeric; + var areaCols = data.editable.area; + for (var i = 0; i < target.length; i++) { + (function(cell, current) { + var $cell = $(cell), html = $cell.html(); + var _cell = table.cell(cell), value = _cell.data(), index = _cell.index().column; + var $input; + if (inArray(index, numericCols)) { + $input = $(''); + } else if (inArray(index, areaCols)) { + $input = $(''); + } else { + $input = $(''); + } + if (!immediate) { + $cell.data('input', $input).data('html', html); + $input.attr('title', 'Hit Ctrl+Enter to finish editing, or Esc to cancel'); + } + $input.val(value); + if (inArray(index, disableCols)) { + $input.attr('readonly', '').css('filter', 'invert(25%)'); + } + $cell.empty().append($input); + if (cell === current) $input.focus(); + $input.css('width', '100%'); + + if (immediate) $input.on('blur', function(e) { + var valueNew = $input.val(); + if (valueNew != value) { + _cell.data(valueNew); + if (HTMLWidgets.shinyMode) { + changeInput('cell_edit', [cellInfo(cell)], 'DT.cellInfo', null, {priority: 'event'}); + } + // for server-side processing, users have to call replaceData() to update the table + if (!server) table.draw(false); + } else { + $cell.html(html); + } + }).on('keyup', function(e) { + // hit Escape to cancel editing + if (e.keyCode === 27) $input.trigger('blur'); + }); + + // bulk edit (row, column, or all) + if (!immediate) $input.on('keyup', function(e) { + var removeInput = function($cell, restore) { + $cell.data('input').remove(); + if (restore) $cell.html($cell.data('html')); + } + if (e.keyCode === 27) { + for (var i = 0; i < target.length; i++) { + removeInput($(target[i]), true); + } + } else if (e.keyCode === 13 && e.ctrlKey) { + // Ctrl + Enter + var cell, $cell, _cell, cellData = []; + for (var i = 0; i < target.length; i++) { + cell = target[i]; $cell = $(cell); _cell = table.cell(cell); + _cell.data($cell.data('input').val()); + HTMLWidgets.shinyMode && cellData.push(cellInfo(cell)); + removeInput($cell, false); + } + if (HTMLWidgets.shinyMode) { + changeInput('cell_edit', cellData, 'DT.cellInfo', null, {priority: "event"}); + } + if (!server) table.draw(false); + } + }); + })(target[i], this); + } + }); + + // interaction with shiny + if (!HTMLWidgets.shinyMode && !crosstalkOptions.group) return; + + var methods = {}; + var shinyData = {}; + + methods.updateCaption = function(caption) { + if (!caption) return; + $table.children('caption').replaceWith(caption); + } + + // register clear functions to remove input values when the table is removed + instance.clearInputs = {}; + + var changeInput = function(id, value, type, noCrosstalk, opts) { + var event = id; + id = el.id + '_' + id; + if (type) id = id + ':' + type; + // do not update if the new value is the same as old value + if (event !== 'cell_edit' && !/_clicked$/.test(event) && shinyData.hasOwnProperty(id) && shinyData[id] === JSON.stringify(value)) + return; + shinyData[id] = JSON.stringify(value); + if (HTMLWidgets.shinyMode && Shiny.setInputValue) { + Shiny.setInputValue(id, value, opts); + if (!instance.clearInputs[id]) instance.clearInputs[id] = function() { + Shiny.setInputValue(id, null); + } + } + + // HACK + if (event === "rows_selected" && !noCrosstalk) { + if (crosstalkOptions.group) { + var keys = crosstalkOptions.key; + var selectedKeys = null; + if (value) { + selectedKeys = []; + for (var i = 0; i < value.length; i++) { + // The value array's contents use 1-based row numbers, so we must + // convert to 0-based before indexing into the keys array. + selectedKeys.push(keys[value[i] - 1]); + } + } + instance.ctselectHandle.set(selectedKeys); + } + } + }; + + var addOne = function(x) { + return x.map(function(i) { return 1 + i; }); + }; + + var unique = function(x) { + var ux = []; + $.each(x, function(i, el){ + if ($.inArray(el, ux) === -1) ux.push(el); + }); + return ux; + } + + // change the row index of a cell + var tweakCellIndex = function(cell) { + var info = cell.index(); + // some cell may not be valid. e.g, #759 + // when using the RowGroup extension, datatables will + // generate the row label and the cells are not part of + // the data thus contain no row/col info + if (info === undefined) + return {row: null, col: null}; + if (server) { + info.row = DT_rows_current[info.row]; + } else { + info.row += 1; + } + return {row: info.row, col: info.column}; + } + + var cleanSelectedValues = function() { + changeInput('rows_selected', []); + changeInput('columns_selected', []); + changeInput('cells_selected', transposeArray2D([]), 'shiny.matrix'); + } + // #828 we should clean the selection on the server-side when the table reloads + cleanSelectedValues(); + + // a flag to indicates if select extension is initialized or not + var flagSelectExt = table.settings()[0]._select !== undefined; + // the Select extension should only be used in the client mode and + // when the selection.mode is set to none + if (data.selection.mode === 'none' && !server && flagSelectExt) { + var updateRowsSelected = function() { + var rows = table.rows({selected: true}); + var selected = []; + $.each(rows.indexes().toArray(), function(i, v) { + selected.push(v + 1); + }); + changeInput('rows_selected', selected); + } + var updateColsSelected = function() { + var columns = table.columns({selected: true}); + changeInput('columns_selected', columns.indexes().toArray()); + } + var updateCellsSelected = function() { + var cells = table.cells({selected: true}); + var selected = []; + cells.every(function() { + var row = this.index().row; + var col = this.index().column; + selected = selected.concat([[row + 1, col]]); + }); + changeInput('cells_selected', transposeArray2D(selected), 'shiny.matrix'); + } + table.on('select deselect', function(e, dt, type, indexes) { + updateRowsSelected(); + updateColsSelected(); + updateCellsSelected(); + }) + } + + var selMode = data.selection.mode, selTarget = data.selection.target; + var selDisable = data.selection.selectable === false; + if (inArray(selMode, ['single', 'multiple'])) { + var selClass = inArray(data.style, ['bootstrap', 'bootstrap4']) ? 'active' : 'selected'; + // selected1: row indices; selected2: column indices + var initSel = function(x) { + if (x === null || typeof x === 'boolean' || selTarget === 'cell') { + return {rows: [], cols: []}; + } else if (selTarget === 'row') { + return {rows: $.makeArray(x), cols: []}; + } else if (selTarget === 'column') { + return {rows: [], cols: $.makeArray(x)}; + } else if (selTarget === 'row+column') { + return {rows: $.makeArray(x.rows), cols: $.makeArray(x.cols)}; + } + } + var selected = data.selection.selected; + var selected1 = initSel(selected).rows, selected2 = initSel(selected).cols; + // selectable should contain either all positive or all non-positive values, not both + // positive values indicate "selectable" while non-positive values means "nonselectable" + // the assertion is performed on R side. (only column indicides could be zero which indicates + // the row name) + var selectable = data.selection.selectable; + var selectable1 = initSel(selectable).rows, selectable2 = initSel(selectable).cols; + + // After users reorder the rows or filter the table, we cannot use the table index + // directly. Instead, we need this function to find out the rows between the two clicks. + // If user filter the table again between the start click and the end click, the behavior + // would be undefined, but it should not be a problem. + var shiftSelRowsIndex = function(start, end) { + var indexes = server ? DT_rows_all : table.rows({ search: 'applied' }).indexes().toArray(); + start = indexes.indexOf(start); end = indexes.indexOf(end); + // if start is larger than end, we need to swap + if (start > end) { + var tmp = end; end = start; start = tmp; + } + return indexes.slice(start, end + 1); + } + + var serverRowIndex = function(clientRowIndex) { + return server ? DT_rows_current[clientRowIndex] : clientRowIndex + 1; + } + + // row, column, or cell selection + var lastClickedRow; + if (inArray(selTarget, ['row', 'row+column'])) { + // Get the current selected rows. It will also + // update the selected1's value based on the current row selection state + // Note we can't put this function inside selectRows() directly, + // the reason is method.selectRows() will override selected1's value but this + // function will add rows to selected1 (keep the existing selection), which is + // inconsistent with column and cell selection. + var selectedRows = function() { + var rows = table.rows('.' + selClass); + var idx = rows.indexes().toArray(); + if (!server) { + selected1 = addOne(idx); + return selected1; + } + idx = idx.map(function(i) { + return DT_rows_current[i]; + }); + selected1 = selMode === 'multiple' ? unique(selected1.concat(idx)) : idx; + return selected1; + } + // Change selected1's value based on selectable1, then refresh the row state + var onlyKeepSelectableRows = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected1 = []; + return; + } + if (selectable1.length === 0) return; + var nonselectable = selectable1[0] <= 0; + if (nonselectable) { + // should make selectable1 positive + selected1 = $(selected1).not(selectable1.map(function(i) { return -i; })).get(); + } else { + selected1 = $(selected1).filter(selectable1).get(); + } + } + // Change selected1's value based on selectable1, then + // refresh the row selection state according to values in selected1 + var selectRows = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableRows(); + table.$('tr.' + selClass).removeClass(selClass); + if (selected1.length === 0) return; + if (server) { + table.rows({page: 'current'}).every(function() { + if (inArray(DT_rows_current[this.index()], selected1)) { + $(this.node()).addClass(selClass); + } + }); + } else { + var selected0 = selected1.map(function(i) { return i - 1; }); + $(table.rows(selected0).nodes()).addClass(selClass); + } + } + table.on('mousedown.dt', 'tbody tr', function(e) { + var $this = $(this), thisRow = table.row(this); + if (selMode === 'multiple') { + if (e.shiftKey && lastClickedRow !== undefined) { + // select or de-select depends on the last clicked row's status + var flagSel = !$this.hasClass(selClass); + var crtClickedRow = serverRowIndex(thisRow.index()); + if (server) { + var rowsIndex = shiftSelRowsIndex(lastClickedRow, crtClickedRow); + // update current page's selClass + rowsIndex.map(function(i) { + var rowIndex = DT_rows_current.indexOf(i); + if (rowIndex >= 0) { + var row = table.row(rowIndex).nodes().to$(); + var flagRowSel = !row.hasClass(selClass); + if (flagSel === flagRowSel) row.toggleClass(selClass); + } + }); + // update selected1 + if (flagSel) { + selected1 = unique(selected1.concat(rowsIndex)); + } else { + selected1 = selected1.filter(function(index) { + return !inArray(index, rowsIndex); + }); + } + } else { + // js starts from 0 + shiftSelRowsIndex(lastClickedRow - 1, crtClickedRow - 1).map(function(value) { + var row = table.row(value).nodes().to$(); + var flagRowSel = !row.hasClass(selClass); + if (flagSel === flagRowSel) row.toggleClass(selClass); + }); + } + e.preventDefault(); + } else { + $this.toggleClass(selClass); + } + } else { + if ($this.hasClass(selClass)) { + $this.removeClass(selClass); + } else { + table.$('tr.' + selClass).removeClass(selClass); + $this.addClass(selClass); + } + } + if (server && !$this.hasClass(selClass)) { + var id = DT_rows_current[thisRow.index()]; + // remove id from selected1 since its class .selected has been removed + if (inArray(id, selected1)) selected1.splice($.inArray(id, selected1), 1); + } + selectedRows(); // update selected1's value based on selClass + selectRows(false); // only keep the selectable rows + changeInput('rows_selected', selected1); + changeInput('row_last_clicked', serverRowIndex(thisRow.index()), null, null, {priority: 'event'}); + lastClickedRow = serverRowIndex(thisRow.index()); + }); + selectRows(false); // in case users have specified pre-selected rows + // restore selected rows after the table is redrawn (e.g. sort/search/page); + // client-side tables will preserve the selections automatically; for + // server-side tables, we have to *real* row indices are in `selected1` + changeInput('rows_selected', selected1); + if (server) table.on('draw.dt', function(e) { selectRows(false); }); + methods.selectRows = function(selected, ignoreSelectable) { + selected1 = $.makeArray(selected); + selectRows(ignoreSelectable); + changeInput('rows_selected', selected1); + } + } + + if (inArray(selTarget, ['column', 'row+column'])) { + if (selTarget === 'row+column') { + $(table.columns().footer()).css('cursor', 'pointer'); + } + // update selected2's value based on selectable2 + var onlyKeepSelectableCols = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected2 = []; + return; + } + if (selectable2.length === 0) return; + var nonselectable = selectable2[0] <= 0; + if (nonselectable) { + // need to make selectable2 positive + selected2 = $(selected2).not(selectable2.map(function(i) { return -i; })).get(); + } else { + selected2 = $(selected2).filter(selectable2).get(); + } + } + // update selected2 and then + // refresh the col selection state according to values in selected2 + var selectCols = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableCols(); + // if selected2 is not a valide index (e.g., larger than the column number) + // table.columns(selected2) will fail and result in a blank table + // this is different from the table.rows(), where the out-of-range indexes + // doesn't affect at all + selected2 = $(selected2).filter(table.columns().indexes()).get(); + table.columns().nodes().flatten().to$().removeClass(selClass); + if (selected2.length > 0) + table.columns(selected2).nodes().flatten().to$().addClass(selClass); + } + var callback = function() { + var colIdx = selTarget === 'column' ? table.cell(this).index().column : + $.inArray(this, table.columns().footer()), + thisCol = $(table.column(colIdx).nodes()); + if (colIdx === -1) return; + if (thisCol.hasClass(selClass)) { + thisCol.removeClass(selClass); + selected2.splice($.inArray(colIdx, selected2), 1); + } else { + if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass); + thisCol.addClass(selClass); + selected2 = selMode === 'single' ? [colIdx] : unique(selected2.concat([colIdx])); + } + selectCols(false); // update selected2 based on selectable + changeInput('columns_selected', selected2); + } + if (selTarget === 'column') { + $(table.table().body()).on('click.dt', 'td', callback); + } else { + $(table.table().footer()).on('click.dt', 'tr th', callback); + } + selectCols(false); // in case users have specified pre-selected columns + changeInput('columns_selected', selected2); + if (server) table.on('draw.dt', function(e) { selectCols(false); }); + methods.selectColumns = function(selected, ignoreSelectable) { + selected2 = $.makeArray(selected); + selectCols(ignoreSelectable); + changeInput('columns_selected', selected2); + } + } + + if (selTarget === 'cell') { + var selected3 = [], selectable3 = []; + if (selected !== null) selected3 = selected; + if (selectable !== null && typeof selectable !== 'boolean') selectable3 = selectable; + var findIndex = function(ij, sel) { + for (var i = 0; i < sel.length; i++) { + if (ij[0] === sel[i][0] && ij[1] === sel[i][1]) return i; + } + return -1; + } + // Change selected3's value based on selectable3, then refresh the cell state + var onlyKeepSelectableCells = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected3 = []; + return; + } + if (selectable3.length === 0) return; + var nonselectable = selectable3[0][0] <= 0; + var out = []; + if (nonselectable) { + selected3.map(function(ij) { + // should make selectable3 positive + if (findIndex([-ij[0], -ij[1]], selectable3) === -1) { out.push(ij); } + }); + } else { + selected3.map(function(ij) { + if (findIndex(ij, selectable3) > -1) { out.push(ij); } + }); + } + selected3 = out; + } + // Change selected3's value based on selectable3, then + // refresh the cell selection state according to values in selected3 + var selectCells = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableCells(); + table.$('td.' + selClass).removeClass(selClass); + if (selected3.length === 0) return; + if (server) { + table.cells({page: 'current'}).every(function() { + var info = tweakCellIndex(this); + if (findIndex([info.row, info.col], selected3) > -1) + $(this.node()).addClass(selClass); + }); + } else { + selected3.map(function(ij) { + $(table.cell(ij[0] - 1, ij[1]).node()).addClass(selClass); + }); + } + }; + table.on('click.dt', 'tbody td', function() { + var $this = $(this), info = tweakCellIndex(table.cell(this)); + if ($this.hasClass(selClass)) { + $this.removeClass(selClass); + selected3.splice(findIndex([info.row, info.col], selected3), 1); + } else { + if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass); + $this.addClass(selClass); + selected3 = selMode === 'single' ? [[info.row, info.col]] : + unique(selected3.concat([[info.row, info.col]])); + } + selectCells(false); // must call this to update selected3 based on selectable3 + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + }); + selectCells(false); // in case users have specified pre-selected columns + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + + if (server) table.on('draw.dt', function(e) { selectCells(false); }); + methods.selectCells = function(selected, ignoreSelectable) { + selected3 = selected ? selected : []; + selectCells(ignoreSelectable); + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + } + } + } + + // expose some table info to Shiny + var updateTableInfo = function(e, settings) { + // TODO: is anyone interested in the page info? + // changeInput('page_info', table.page.info()); + var updateRowInfo = function(id, modifier) { + var idx; + if (server) { + idx = modifier.page === 'current' ? DT_rows_current : DT_rows_all; + } else { + var rows = table.rows($.extend({ + search: 'applied', + page: 'all' + }, modifier)); + idx = addOne(rows.indexes().toArray()); + } + changeInput('rows' + '_' + id, idx); + }; + updateRowInfo('current', {page: 'current'}); + updateRowInfo('all', {}); + } + table.on('draw.dt', updateTableInfo); + updateTableInfo(); + + // state info + table.on('draw.dt column-visibility.dt', function() { + changeInput('state', table.state()); + }); + changeInput('state', table.state()); + + // search info + var updateSearchInfo = function() { + changeInput('search', table.search()); + if (filterRow) changeInput('search_columns', filterRow.toArray().map(function(td) { + return $(td).find('input').first().val(); + })); + } + table.on('draw.dt', updateSearchInfo); + updateSearchInfo(); + + var cellInfo = function(thiz) { + var info = tweakCellIndex(table.cell(thiz)); + info.value = table.cell(thiz).data(); + return info; + } + // the current cell clicked on + table.on('click.dt', 'tbody td', function() { + changeInput('cell_clicked', cellInfo(this), null, null, {priority: 'event'}); + }) + changeInput('cell_clicked', {}); + + // do not trigger table selection when clicking on links unless they have classes + table.on('click.dt', 'tbody td a', function(e) { + if (this.className === '') e.stopPropagation(); + }); + + methods.addRow = function(data, rowname, resetPaging) { + var n = table.columns().indexes().length, d = n - data.length; + if (d === 1) { + data = rowname.concat(data) + } else if (d !== 0) { + console.log(data); + console.log(table.columns().indexes()); + throw 'New data must be of the same length as current data (' + n + ')'; + }; + table.row.add(data).draw(resetPaging); + } + + methods.updateSearch = function(keywords) { + if (keywords.global !== null) + $(table.table().container()).find('input[type=search]').first() + .val(keywords.global).trigger('input'); + var columns = keywords.columns; + if (!filterRow || columns === null) return; + filterRow.toArray().map(function(td, i) { + var v = typeof columns === 'string' ? columns : columns[i]; + if (typeof v === 'undefined') { + console.log('The search keyword for column ' + i + ' is undefined') + return; + } + $(td).find('input').first().val(v); + searchColumn(i, v); + }); + table.draw(); + } + + methods.hideCols = function(hide, reset) { + if (reset) table.columns().visible(true, false); + table.columns(hide).visible(false); + } + + methods.showCols = function(show, reset) { + if (reset) table.columns().visible(false, false); + table.columns(show).visible(true); + } + + methods.colReorder = function(order, origOrder) { + table.colReorder.order(order, origOrder); + } + + methods.selectPage = function(page) { + if (table.page.info().pages < page || page < 1) { + throw 'Selected page is out of range'; + }; + table.page(page - 1).draw(false); + } + + methods.reloadData = function(resetPaging, clearSelection) { + // empty selections first if necessary + if (methods.selectRows && inArray('row', clearSelection)) methods.selectRows([]); + if (methods.selectColumns && inArray('column', clearSelection)) methods.selectColumns([]); + if (methods.selectCells && inArray('cell', clearSelection)) methods.selectCells([]); + table.ajax.reload(null, resetPaging); + } + + table.shinyMethods = methods; + }, + resize: function(el, width, height, instance) { + if (instance.data) this.renderValue(el, instance.data, instance); + + // dynamically adjust height if fillContainer = TRUE + if (instance.fillContainer) + this.fillAvailableHeight(el, height); + + this.adjustWidth(el); + }, + + // dynamically set the scroll body to fill available height + // (used with fillContainer = TRUE) + fillAvailableHeight: function(el, availableHeight) { + + // see how much of the table is occupied by header/footer elements + // and use that to compute a target scroll body height + var dtWrapper = $(el).find('div.dataTables_wrapper'); + var dtScrollBody = $(el).find($('div.dataTables_scrollBody')); + var framingHeight = dtWrapper.innerHeight() - dtScrollBody.innerHeight(); + var scrollBodyHeight = availableHeight - framingHeight; + + // set the height + dtScrollBody.height(scrollBodyHeight + 'px'); + }, + + // adjust the width of columns; remove the hard-coded widths on table and the + // scroll header when scrollX/Y are enabled + adjustWidth: function(el) { + var $el = $(el), table = $el.data('datatable'); + if (table) table.columns.adjust(); + $el.find('.dataTables_scrollHeadInner').css('width', '') + .children('table').css('margin-left', ''); + } +}); + + if (!HTMLWidgets.shinyMode) return; + + Shiny.addCustomMessageHandler('datatable-calls', function(data) { + var id = data.id; + var el = document.getElementById(id); + var table = el ? $(el).data('datatable') : null; + if (!table) { + console.log("Couldn't find table with id " + id); + return; + } + + var methods = table.shinyMethods, call = data.call; + if (methods[call.method]) { + methods[call.method].apply(table, call.args); + } else { + console.log("Unknown method " + call.method); + } + }); + +})(); diff --git a/docs/articles/variable_details_files/datatables-css-0.0.0/datatables-crosstalk.css b/docs/articles/variable_details_files/datatables-css-0.0.0/datatables-crosstalk.css index 43422d25..fb5bae84 100644 --- a/docs/articles/variable_details_files/datatables-css-0.0.0/datatables-crosstalk.css +++ b/docs/articles/variable_details_files/datatables-css-0.0.0/datatables-crosstalk.css @@ -5,3 +5,19 @@ html body div.DTS div.dataTables_scrollBody { background: none; } + + +/* +Fix https://github.com/rstudio/DT/issues/563 +If the `table.display` is set to "block" (e.g., pkgdown), the browser will display +datatable objects strangely. The search panel and the page buttons will still be +in full-width but the table body will be "compact" and shorter. +In therory, having this attributes will affect `dom="t"` +with `display: block` users. But in reality, there should be no one. +We may remove the below lines in the future if the upstream agree to have this there. +See https://github.com/DataTables/DataTablesSrc/issues/160 +*/ + +table.dataTable { + display: table; +} diff --git a/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.extra.css b/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.extra.css new file mode 100644 index 00000000..b2dd141f --- /dev/null +++ b/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.extra.css @@ -0,0 +1,28 @@ +/* Selected rows/cells */ +table.dataTable tr.selected td, table.dataTable td.selected { + background-color: #b0bed9 !important; +} +/* In case of scrollX/Y or FixedHeader */ +.dataTables_scrollBody .dataTables_sizing { + visibility: hidden; +} + +/* The datatables' theme CSS file doesn't define +the color but with white background. It leads to an issue that +when the HTML's body color is set to 'white', the user can't +see the text since the background is white. One case happens in the +RStudio's IDE when inline viewing the DT table inside an Rmd file, +if the IDE theme is set to "Cobalt". + +See https://github.com/rstudio/DT/issues/447 for more info + +This fixes should have little side-effects because all the other elements +of the default theme use the #333 font color. + +TODO: The upstream may use relative colors for both the table background +and the color. It means the table can display well without this patch +then. At that time, we need to remove the below CSS attributes. +*/ +div.datatables { + color: #333; +} diff --git a/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.min.css b/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.min.css new file mode 100644 index 00000000..71ae98a4 --- /dev/null +++ b/docs/articles/variable_details_files/dt-core-1.10.20/css/jquery.dataTables.min.css @@ -0,0 +1 @@ +table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}} diff --git a/docs/articles/variable_details_files/dt-core-1.10.20/js/jquery.dataTables.min.js b/docs/articles/variable_details_files/dt-core-1.10.20/js/jquery.dataTables.min.js new file mode 100644 index 00000000..d297f256 --- /dev/null +++ b/docs/articles/variable_details_files/dt-core-1.10.20/js/jquery.dataTables.min.js @@ -0,0 +1,180 @@ +/*! + Copyright 2008-2019 SpryMedia Ltd. + + This source file is free software, available under the following license: + MIT license - http://datatables.net/license + + This source file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + + For details please refer to: http://www.datatables.net + DataTables 1.10.20 + ©2008-2019 SpryMedia Ltd - datatables.net/license +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,z,y){f instanceof String&&(f=String(f));for(var p=f.length,H=0;H").css({position:"fixed",top:0,left:-1*f(z).scrollLeft(),height:1,width:1, +overflow:"hidden"}).append(f("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(f("
").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}f.extend(a.oBrowser,q.__browser);a.oScroll.iBarWidth=q.__browser.barWidth} +function mb(a,b,c,d,e,h){var g=!1;if(c!==p){var k=c;g=!0}for(;d!==e;)a.hasOwnProperty(d)&&(k=g?b(k,a[d],d,a):a[d],g=!0,d+=h);return k}function Ia(a,b){var c=q.defaults.column,d=a.aoColumns.length;c=f.extend({},q.models.oColumn,c,{nTh:b?b:y.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=f.extend({},q.models.oSearch,c[d]);ma(a,d,f(b).data())}function ma(a,b,c){b=a.aoColumns[b]; +var d=a.oClasses,e=f(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==p&&null!==c&&(kb(c),L(q.defaults.column,c,!0),c.mDataProp===p||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),f.extend(b,c),M(b,c,"sWidth","sWidthOrig"),c.iDataSort!==p&&(b.aDataSort=[c.iDataSort]),M(b,c,"aDataSort"));var g=b.mData,k=U(g), +l=b.mRender?U(b.mRender):null;c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=f.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=k(a,b,p,c);return l&&b?l(d,b,a,c):d};b.fnSetData=function(a,b,c){return Q(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==f.inArray("asc",b.asSorting);c=-1!==f.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass= +d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function aa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ja(a);for(var c=0,d=b.length;cn[m])d(k.length+ +n[m],l);else if("string"===typeof n[m]){var w=0;for(g=k.length;wb&&a[e]--; -1!=d&&c===p&&a.splice(d,1)}function ea(a,b,c,d){var e=a.aoData[b],h,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=I(a,b,d,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var k=e.anCells;if(k)if(d!==p)g(k[d],d);else for(c=0,h=k.length;c").appendTo(d));var l=0;for(b=k.length;ltr").attr("role","row");f(d).find(">tr>th, >tr>td").addClass(g.sHeaderTH);f(e).find(">tr>th, >tr>td").addClass(g.sFooterTH);if(null!==e)for(a=a.aoFooter[0],l=0,b=a.length;l=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);g=a._iDisplayStart;var n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,K(a,!1);else if(!k)a.iDraw++;else if(!a.bDestroying&&!qb(a))return;if(0!==l.length)for(h=k?a.aoData.length:n,k=k?0:g;k",{"class":e?d[0]:""}).append(f("
").appendTo(w));r.nTBody=b[0];b=w.children("tfoot");0===b.length&&0").appendTo(w));0===b.length||0===b.children().length?w.addClass(x.sNoFooter):0/g,cc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,dc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,bb=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,P=function(a){return a&&!0!==a&&"-"!==a?!1: +!0},Sb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Tb=function(a,b){cb[b]||(cb[b]=new RegExp(Ua(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(cb[b],"."):a},db=function(a,b,c){var d="string"===typeof a;if(P(a))return!0;b&&d&&(a=Tb(a,b));c&&d&&(a=a.replace(bb,""));return!isNaN(parseFloat(a))&&isFinite(a)},Ub=function(a,b,c){return P(a)?!0:P(a)||"string"===typeof a?db(a.replace(Ea,""),b,c)?!0:null:null},J=function(a,b,c){var d=[],e=0,h=a.length;if(c!== +p)for(;ea.length)){var b=a.slice().sort();for(var c=b[0],d=1, +e=b.length;d")[0],$b=ya.textContent!==p,bc=/<.*?>/g,Sa=q.util.throttle,Wb=[],G=Array.prototype,ec=function(a){var b,c=q.settings,d=f.map(c,function(a,b){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=f.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=f(a):a instanceof f&&(b=a)}else return[];if(b)return b.map(function(a){e=f.inArray(this, +d);return-1!==e?c[e]:null}).toArray()};var v=function(a,b){if(!(this instanceof v))return new v(a,b);var c=[],d=function(a){(a=ec(a))&&c.push.apply(c,a)};if(f.isArray(a))for(var e=0,h=a.length;ea?new v(b[a],this[a]):null},filter:function(a){var b=[];if(G.filter)b=G.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(c),f("td",d).addClass(c).html(b)[0].colSpan=W(a),e.push(d[0]))};h(c,d);b._details&&b._details.detach();b._details=f(e);b._detailsShow&&b._details.insertAfter(b.nTr)},hb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==p?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=p,a._details=p)},Yb=function(a,b){var c=a.context;c.length&&a.length&&(a=c[0].aoData[a[0]],a._details&&((a._detailsShow=b)?a._details.insertAfter(a.nTr): +a._details.detach(),ic(c[0])))},ic=function(a){var b=new v(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0g){var m=f.map(d,function(a,b){return a.bVisible?b:null});return[m[m.length+g]]}return[ba(a,g)];case "name":return f.map(e,function(a,b){return a===n[1]?b:null});default:return[]}if(b.nodeName&&b._DT_CellIndex)return[b._DT_CellIndex.column];g=f(h).filter(b).map(function(){return f.inArray(this, +h)}).toArray();if(g.length||!b.nodeName)return g;g=f(b).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};t("columns()",function(a,b){a===p?a="":f.isPlainObject(a)&&(b=a,a="");b=fb(b);var c=this.iterator("table",function(c){return kc(c,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});x("columns().header()","column().header()",function(a,b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});x("columns().footer()","column().footer()",function(a, +b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});x("columns().data()","column().data()",function(){return this.iterator("column-rows",Zb,1)});x("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});x("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return la(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});x("columns().nodes()", +"column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return la(a.aoData,e,"anCells",b)},1)});x("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(b,c){if(a===p)return b.aoColumns[c].bVisible;var d=b.aoColumns,e=d[c],h=b.aoData,n;if(a!==p&&e.bVisible!==a){if(a){var m=f.inArray(!0,J(d,"bVisible"),c+1);d=0;for(n=h.length;dd;return!0};q.isDataTable=q.fnIsDataTable=function(a){var b=f(a).get(0),c=!1;if(a instanceof +q.Api)return!0;f.each(q.settings,function(a,e){a=e.nScrollHead?f("table",e.nScrollHead)[0]:null;var d=e.nScrollFoot?f("table",e.nScrollFoot)[0]:null;if(e.nTable===b||a===b||d===b)c=!0});return c};q.tables=q.fnTables=function(a){var b=!1;f.isPlainObject(a)&&(b=a.api,a=a.visible);var c=f.map(q.settings,function(b){if(!a||a&&f(b.nTable).is(":visible"))return b.nTable});return b?new v(c):c};q.camelToHungarian=L;t("$()",function(a,b){b=this.rows(b).nodes();b=f(b);return f([].concat(b.filter(a).toArray(), +b.find(a).toArray()))});f.each(["on","one","off"],function(a,b){t(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=f.map(a[0].split(/\s/),function(a){return a.match(/\.dt\b/)?a:a+".dt"}).join(" ");var d=f(this.tables().nodes());d[b].apply(d,a);return this})});t("clear()",function(){return this.iterator("table",function(a){qa(a)})});t("settings()",function(){return new v(this.context,this.context)});t("init()",function(){var a=this.context;return a.length?a[0].oInit:null});t("data()", +function(){return this.iterator("table",function(a){return J(a.aoData,"_aData")}).flatten()});t("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,h=b.nTBody,g=b.nTHead,k=b.nTFoot,l=f(e);h=f(h);var n=f(b.nTableWrapper),m=f.map(b.aoData,function(a){return a.nTr}),p;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);a||(new v(b)).columns().visible(!0);n.off(".DT").find(":not(tbody *)").off(".DT");f(z).off(".DT-"+b.sInstance); +e!=g.parentNode&&(l.children("thead").detach(),l.append(g));k&&e!=k.parentNode&&(l.children("tfoot").detach(),l.append(k));b.aaSorting=[];b.aaSortingFixed=[];Aa(b);f(m).removeClass(b.asStripeClasses.join(" "));f("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);h.children().detach();h.append(m);g=a?"remove":"detach";l[g]();n[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),l.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&& +h.children().each(function(a){f(this).addClass(b.asDestroyStripes[a%p])}));c=f.inArray(b,q.settings);-1!==c&&q.settings.splice(c,1)})});f.each(["column","row","cell"],function(a,b){t(b+"s().every()",function(a){var c=this.selector.opts,e=this;return this.iterator(b,function(d,f,k,l,n){a.call(e[b](f,"cell"===b?k:c,"cell"===b?c:p),f,k,l,n)})})});t("i18n()",function(a,b,c){var d=this.context[0];a=U(a)(d.oLanguage);a===p&&(a=b);c!==p&&f.isPlainObject(a)&&(a=a[c]!==p?a[c]:a._);return a.replace("%d",c)}); +q.version="1.10.20";q.settings=[];q.models={};q.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};q.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};q.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null, +sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};q.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1, +bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}}, +fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last", +sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:f.extend({},q.models.oSearch),sAjaxDataProp:"data", +sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};H(q.defaults);q.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};H(q.defaults.column);q.models.oSettings= +{oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{}, +aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0, +aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:p,oAjaxData:p,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==D(this)?1*this._iRecordsTotal: +this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==D(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};q.ext=C={buttons:{}, +classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:q.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:q.version};f.extend(C,{afnFiltering:C.search,aTypes:C.type.detect,ofnSearch:C.type.search,oSort:C.type.order,afnSortData:C.order,aoFeatures:C.feature,oApi:C.internal,oStdClasses:C.classes,oPagination:C.pager}); +f.extend(q.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled", +sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"", +sJUIHeader:"",sJUIFooter:""});var Pb=q.ext.pager;f.extend(Pb,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[ka(a,b)]},simple_numbers:function(a,b){return["previous",ka(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ka(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ka(a,b),"last"]},_numbers:ka,numbers_length:7});f.extend(!0,q.ext.renderer,{pageButton:{_:function(a,b, +c,d,e,h){var g=a.oClasses,k=a.oLanguage.oPaginate,l=a.oLanguage.oAria.paginate||{},n,m,q=0,t=function(b,d){var p,r=g.sPageButtonDisabled,u=function(b){Xa(a,b.data.action,!0)};var w=0;for(p=d.length;w").appendTo(b);t(x,v)}else{n=null;m=v;x=a.iTabIndex;switch(v){case "ellipsis":b.append('');break;case "first":n=k.sFirst;0===e&&(x=-1,m+=" "+r);break;case "previous":n=k.sPrevious;0===e&&(x=-1,m+= +" "+r);break;case "next":n=k.sNext;e===h-1&&(x=-1,m+=" "+r);break;case "last":n=k.sLast;e===h-1&&(x=-1,m+=" "+r);break;default:n=v+1,m=e===v?g.sPageButtonActive:""}null!==n&&(x=f("",{"class":g.sPageButton+" "+m,"aria-controls":a.sTableId,"aria-label":l[v],"data-dt-idx":q,tabindex:x,id:0===c&&"string"===typeof v?a.sTableId+"_"+v:null}).html(n).appendTo(b),$a(x,{action:v},u),q++)}}};try{var v=f(b).find(y.activeElement).data("dt-idx")}catch(mc){}t(f(b).empty(),d);v!==p&&f(b).find("[data-dt-idx="+ +v+"]").focus()}}});f.extend(q.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return db(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!cc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||P(a)?"date":null},function(a,b){b=b.oLanguage.sDecimal;return db(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Ub(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Ub(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return P(a)||"string"=== +typeof a&&-1!==a.indexOf("<")?"html":null}]);f.extend(q.ext.type.search,{html:function(a){return P(a)?a:"string"===typeof a?a.replace(Rb," ").replace(Ea,""):""},string:function(a){return P(a)?a:"string"===typeof a?a.replace(Rb," "):a}});var Da=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Tb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};f.extend(C.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return P(a)? +"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return P(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});Ha("");f.extend(!0,q.ext.renderer,{header:{_:function(a,b,c,d){f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc: +c.sSortingClass))})},jqueryui:function(a,b,c,d){f("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(f("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"== +k[e]?d.sSortJUIAsc:"desc"==k[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var ib=function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g,"""):a};q.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return ib(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g, +a)+f+(e||"")}}},text:function(){return{display:ib,filter:ib}}};f.extend(q.ext.internal,{_fnExternApiFunc:Qb,_fnBuildAjax:va,_fnAjaxUpdate:qb,_fnAjaxParameters:zb,_fnAjaxUpdateDraw:Ab,_fnAjaxDataSrc:wa,_fnAddColumn:Ia,_fnColumnOptions:ma,_fnAdjustColumnSizing:aa,_fnVisibleToColumnIndex:ba,_fnColumnIndexToVisible:ca,_fnVisbleColumns:W,_fnGetColumns:oa,_fnColumnTypes:Ka,_fnApplyColumnDefs:nb,_fnHungarianMap:H,_fnCamelToHungarian:L,_fnLanguageCompat:Ga,_fnBrowserDetect:lb,_fnAddData:R,_fnAddTr:pa,_fnNodeToDataIndex:function(a, +b){return b._DT_RowIndex!==p?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return f.inArray(c,a.aoData[b].anCells)},_fnGetCellData:I,_fnSetCellData:ob,_fnSplitObjNotation:Na,_fnGetObjectDataFn:U,_fnSetObjectDataFn:Q,_fnGetDataMaster:Oa,_fnClearTable:qa,_fnDeleteIndex:ra,_fnInvalidate:ea,_fnGetRowElements:Ma,_fnCreateTr:La,_fnBuildHead:pb,_fnDrawHead:ha,_fnDraw:S,_fnReDraw:V,_fnAddOptionsHtml:sb,_fnDetectHeader:fa,_fnGetUniqueThs:ua,_fnFeatureHtmlFilter:ub,_fnFilterComplete:ia,_fnFilterCustom:Db, +_fnFilterColumn:Cb,_fnFilter:Bb,_fnFilterCreateSearch:Ta,_fnEscapeRegex:Ua,_fnFilterData:Eb,_fnFeatureHtmlInfo:xb,_fnUpdateInfo:Hb,_fnInfoMacros:Ib,_fnInitialise:ja,_fnInitComplete:xa,_fnLengthChange:Va,_fnFeatureHtmlLength:tb,_fnFeatureHtmlPaginate:yb,_fnPageChange:Xa,_fnFeatureHtmlProcessing:vb,_fnProcessingDisplay:K,_fnFeatureHtmlTable:wb,_fnScrollDraw:na,_fnApplyToChildren:N,_fnCalculateColumnWidths:Ja,_fnThrottle:Sa,_fnConvertToWidth:Jb,_fnGetWidestNode:Kb,_fnGetMaxLenString:Lb,_fnStringToCss:B, +_fnSortFlatten:Y,_fnSort:rb,_fnSortAria:Nb,_fnSortListener:Za,_fnSortAttachListener:Qa,_fnSortingClasses:Aa,_fnSortData:Mb,_fnSaveState:Ba,_fnLoadState:Ob,_fnSettingsFromNode:Ca,_fnLog:O,_fnMap:M,_fnBindAction:$a,_fnCallbackReg:E,_fnCallbackFire:A,_fnLengthOverflow:Wa,_fnRenderer:Ra,_fnDataSource:D,_fnRowAttributes:Pa,_fnExtend:ab,_fnCalculateEnd:function(){}});f.fn.dataTable=q;q.$=f;f.fn.dataTableSettings=q.settings;f.fn.dataTableExt=q.ext;f.fn.DataTable=function(a){return f(this).dataTable(a).api()}; +f.each(q,function(a,b){f.fn.DataTable[a]=b});return f.fn.dataTable}); diff --git a/docs/articles/variable_details_files/header-attrs-2.11/header-attrs.js b/docs/articles/variable_details_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/variable_details_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/variable_details_files/htmlwidgets-1.5.4/htmlwidgets.js b/docs/articles/variable_details_files/htmlwidgets-1.5.4/htmlwidgets.js new file mode 100644 index 00000000..da8b2367 --- /dev/null +++ b/docs/articles/variable_details_files/htmlwidgets-1.5.4/htmlwidgets.js @@ -0,0 +1,903 @@ +(function() { + // If window.HTMLWidgets is already defined, then use it; otherwise create a + // new object. This allows preceding code to set options that affect the + // initialization process (though none currently exist). + window.HTMLWidgets = window.HTMLWidgets || {}; + + // See if we're running in a viewer pane. If not, we're in a web browser. + var viewerMode = window.HTMLWidgets.viewerMode = + /\bviewer_pane=1\b/.test(window.location); + + // See if we're running in Shiny mode. If not, it's a static document. + // Note that static widgets can appear in both Shiny and static modes, but + // obviously, Shiny widgets can only appear in Shiny apps/documents. + var shinyMode = window.HTMLWidgets.shinyMode = + typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings; + + // We can't count on jQuery being available, so we implement our own + // version if necessary. + function querySelectorAll(scope, selector) { + if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) { + return scope.find(selector); + } + if (scope.querySelectorAll) { + return scope.querySelectorAll(selector); + } + } + + function asArray(value) { + if (value === null) + return []; + if ($.isArray(value)) + return value; + return [value]; + } + + // Implement jQuery's extend + function extend(target /*, ... */) { + if (arguments.length == 1) { + return target; + } + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var prop in source) { + if (source.hasOwnProperty(prop)) { + target[prop] = source[prop]; + } + } + } + return target; + } + + // IE8 doesn't support Array.forEach. + function forEach(values, callback, thisArg) { + if (values.forEach) { + values.forEach(callback, thisArg); + } else { + for (var i = 0; i < values.length; i++) { + callback.call(thisArg, values[i], i, values); + } + } + } + + // Replaces the specified method with the return value of funcSource. + // + // Note that funcSource should not BE the new method, it should be a function + // that RETURNS the new method. funcSource receives a single argument that is + // the overridden method, it can be called from the new method. The overridden + // method can be called like a regular function, it has the target permanently + // bound to it so "this" will work correctly. + function overrideMethod(target, methodName, funcSource) { + var superFunc = target[methodName] || function() {}; + var superFuncBound = function() { + return superFunc.apply(target, arguments); + }; + target[methodName] = funcSource(superFuncBound); + } + + // Add a method to delegator that, when invoked, calls + // delegatee.methodName. If there is no such method on + // the delegatee, but there was one on delegator before + // delegateMethod was called, then the original version + // is invoked instead. + // For example: + // + // var a = { + // method1: function() { console.log('a1'); } + // method2: function() { console.log('a2'); } + // }; + // var b = { + // method1: function() { console.log('b1'); } + // }; + // delegateMethod(a, b, "method1"); + // delegateMethod(a, b, "method2"); + // a.method1(); + // a.method2(); + // + // The output would be "b1", "a2". + function delegateMethod(delegator, delegatee, methodName) { + var inherited = delegator[methodName]; + delegator[methodName] = function() { + var target = delegatee; + var method = delegatee[methodName]; + + // The method doesn't exist on the delegatee. Instead, + // call the method on the delegator, if it exists. + if (!method) { + target = delegator; + method = inherited; + } + + if (method) { + return method.apply(target, arguments); + } + }; + } + + // Implement a vague facsimilie of jQuery's data method + function elementData(el, name, value) { + if (arguments.length == 2) { + return el["htmlwidget_data_" + name]; + } else if (arguments.length == 3) { + el["htmlwidget_data_" + name] = value; + return el; + } else { + throw new Error("Wrong number of arguments for elementData: " + + arguments.length); + } + } + + // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex + function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + } + + function hasClass(el, className) { + var re = new RegExp("\\b" + escapeRegExp(className) + "\\b"); + return re.test(el.className); + } + + // elements - array (or array-like object) of HTML elements + // className - class name to test for + // include - if true, only return elements with given className; + // if false, only return elements *without* given className + function filterByClass(elements, className, include) { + var results = []; + for (var i = 0; i < elements.length; i++) { + if (hasClass(elements[i], className) == include) + results.push(elements[i]); + } + return results; + } + + function on(obj, eventName, func) { + if (obj.addEventListener) { + obj.addEventListener(eventName, func, false); + } else if (obj.attachEvent) { + obj.attachEvent(eventName, func); + } + } + + function off(obj, eventName, func) { + if (obj.removeEventListener) + obj.removeEventListener(eventName, func, false); + else if (obj.detachEvent) { + obj.detachEvent(eventName, func); + } + } + + // Translate array of values to top/right/bottom/left, as usual with + // the "padding" CSS property + // https://developer.mozilla.org/en-US/docs/Web/CSS/padding + function unpackPadding(value) { + if (typeof(value) === "number") + value = [value]; + if (value.length === 1) { + return {top: value[0], right: value[0], bottom: value[0], left: value[0]}; + } + if (value.length === 2) { + return {top: value[0], right: value[1], bottom: value[0], left: value[1]}; + } + if (value.length === 3) { + return {top: value[0], right: value[1], bottom: value[2], left: value[1]}; + } + if (value.length === 4) { + return {top: value[0], right: value[1], bottom: value[2], left: value[3]}; + } + } + + // Convert an unpacked padding object to a CSS value + function paddingToCss(paddingObj) { + return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px"; + } + + // Makes a number suitable for CSS + function px(x) { + if (typeof(x) === "number") + return x + "px"; + else + return x; + } + + // Retrieves runtime widget sizing information for an element. + // The return value is either null, or an object with fill, padding, + // defaultWidth, defaultHeight fields. + function sizingPolicy(el) { + var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']"); + if (!sizingEl) + return null; + var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}"); + if (viewerMode) { + return sp.viewer; + } else { + return sp.browser; + } + } + + // @param tasks Array of strings (or falsy value, in which case no-op). + // Each element must be a valid JavaScript expression that yields a + // function. Or, can be an array of objects with "code" and "data" + // properties; in this case, the "code" property should be a string + // of JS that's an expr that yields a function, and "data" should be + // an object that will be added as an additional argument when that + // function is called. + // @param target The object that will be "this" for each function + // execution. + // @param args Array of arguments to be passed to the functions. (The + // same arguments will be passed to all functions.) + function evalAndRun(tasks, target, args) { + if (tasks) { + forEach(tasks, function(task) { + var theseArgs = args; + if (typeof(task) === "object") { + theseArgs = theseArgs.concat([task.data]); + task = task.code; + } + var taskFunc = tryEval(task); + if (typeof(taskFunc) !== "function") { + throw new Error("Task must be a function! Source:\n" + task); + } + taskFunc.apply(target, theseArgs); + }); + } + } + + // Attempt eval() both with and without enclosing in parentheses. + // Note that enclosing coerces a function declaration into + // an expression that eval() can parse + // (otherwise, a SyntaxError is thrown) + function tryEval(code) { + var result = null; + try { + result = eval("(" + code + ")"); + } catch(error) { + if (!(error instanceof SyntaxError)) { + throw error; + } + try { + result = eval(code); + } catch(e) { + if (e instanceof SyntaxError) { + throw error; + } else { + throw e; + } + } + } + return result; + } + + function initSizing(el) { + var sizing = sizingPolicy(el); + if (!sizing) + return; + + var cel = document.getElementById("htmlwidget_container"); + if (!cel) + return; + + if (typeof(sizing.padding) !== "undefined") { + document.body.style.margin = "0"; + document.body.style.padding = paddingToCss(unpackPadding(sizing.padding)); + } + + if (sizing.fill) { + document.body.style.overflow = "hidden"; + document.body.style.width = "100%"; + document.body.style.height = "100%"; + document.documentElement.style.width = "100%"; + document.documentElement.style.height = "100%"; + if (cel) { + cel.style.position = "absolute"; + var pad = unpackPadding(sizing.padding); + cel.style.top = pad.top + "px"; + cel.style.right = pad.right + "px"; + cel.style.bottom = pad.bottom + "px"; + cel.style.left = pad.left + "px"; + el.style.width = "100%"; + el.style.height = "100%"; + } + + return { + getWidth: function() { return cel.offsetWidth; }, + getHeight: function() { return cel.offsetHeight; } + }; + + } else { + el.style.width = px(sizing.width); + el.style.height = px(sizing.height); + + return { + getWidth: function() { return el.offsetWidth; }, + getHeight: function() { return el.offsetHeight; } + }; + } + } + + // Default implementations for methods + var defaults = { + find: function(scope) { + return querySelectorAll(scope, "." + this.name); + }, + renderError: function(el, err) { + var $el = $(el); + + this.clearError(el); + + // Add all these error classes, as Shiny does + var errClass = "shiny-output-error"; + if (err.type !== null) { + // use the classes of the error condition as CSS class names + errClass = errClass + " " + $.map(asArray(err.type), function(type) { + return errClass + "-" + type; + }).join(" "); + } + errClass = errClass + " htmlwidgets-error"; + + // Is el inline or block? If inline or inline-block, just display:none it + // and add an inline error. + var display = $el.css("display"); + $el.data("restore-display-mode", display); + + if (display === "inline" || display === "inline-block") { + $el.hide(); + if (err.message !== "") { + var errorSpan = $("").addClass(errClass); + errorSpan.text(err.message); + $el.after(errorSpan); + } + } else if (display === "block") { + // If block, add an error just after the el, set visibility:none on the + // el, and position the error to be on top of the el. + // Mark it with a unique ID and CSS class so we can remove it later. + $el.css("visibility", "hidden"); + if (err.message !== "") { + var errorDiv = $("
").addClass(errClass).css("position", "absolute") + .css("top", el.offsetTop) + .css("left", el.offsetLeft) + // setting width can push out the page size, forcing otherwise + // unnecessary scrollbars to appear and making it impossible for + // the element to shrink; so use max-width instead + .css("maxWidth", el.offsetWidth) + .css("height", el.offsetHeight); + errorDiv.text(err.message); + $el.after(errorDiv); + + // Really dumb way to keep the size/position of the error in sync with + // the parent element as the window is resized or whatever. + var intId = setInterval(function() { + if (!errorDiv[0].parentElement) { + clearInterval(intId); + return; + } + errorDiv + .css("top", el.offsetTop) + .css("left", el.offsetLeft) + .css("maxWidth", el.offsetWidth) + .css("height", el.offsetHeight); + }, 500); + } + } + }, + clearError: function(el) { + var $el = $(el); + var display = $el.data("restore-display-mode"); + $el.data("restore-display-mode", null); + + if (display === "inline" || display === "inline-block") { + if (display) + $el.css("display", display); + $(el.nextSibling).filter(".htmlwidgets-error").remove(); + } else if (display === "block"){ + $el.css("visibility", "inherit"); + $(el.nextSibling).filter(".htmlwidgets-error").remove(); + } + }, + sizing: {} + }; + + // Called by widget bindings to register a new type of widget. The definition + // object can contain the following properties: + // - name (required) - A string indicating the binding name, which will be + // used by default as the CSS classname to look for. + // - initialize (optional) - A function(el) that will be called once per + // widget element; if a value is returned, it will be passed as the third + // value to renderValue. + // - renderValue (required) - A function(el, data, initValue) that will be + // called with data. Static contexts will cause this to be called once per + // element; Shiny apps will cause this to be called multiple times per + // element, as the data changes. + window.HTMLWidgets.widget = function(definition) { + if (!definition.name) { + throw new Error("Widget must have a name"); + } + if (!definition.type) { + throw new Error("Widget must have a type"); + } + // Currently we only support output widgets + if (definition.type !== "output") { + throw new Error("Unrecognized widget type '" + definition.type + "'"); + } + // TODO: Verify that .name is a valid CSS classname + + // Support new-style instance-bound definitions. Old-style class-bound + // definitions have one widget "object" per widget per type/class of + // widget; the renderValue and resize methods on such widget objects + // take el and instance arguments, because the widget object can't + // store them. New-style instance-bound definitions have one widget + // object per widget instance; the definition that's passed in doesn't + // provide renderValue or resize methods at all, just the single method + // factory(el, width, height) + // which returns an object that has renderValue(x) and resize(w, h). + // This enables a far more natural programming style for the widget + // author, who can store per-instance state using either OO-style + // instance fields or functional-style closure variables (I guess this + // is in contrast to what can only be called C-style pseudo-OO which is + // what we required before). + if (definition.factory) { + definition = createLegacyDefinitionAdapter(definition); + } + + if (!definition.renderValue) { + throw new Error("Widget must have a renderValue function"); + } + + // For static rendering (non-Shiny), use a simple widget registration + // scheme. We also use this scheme for Shiny apps/documents that also + // contain static widgets. + window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || []; + // Merge defaults into the definition; don't mutate the original definition. + var staticBinding = extend({}, defaults, definition); + overrideMethod(staticBinding, "find", function(superfunc) { + return function(scope) { + var results = superfunc(scope); + // Filter out Shiny outputs, we only want the static kind + return filterByClass(results, "html-widget-output", false); + }; + }); + window.HTMLWidgets.widgets.push(staticBinding); + + if (shinyMode) { + // Shiny is running. Register the definition with an output binding. + // The definition itself will not be the output binding, instead + // we will make an output binding object that delegates to the + // definition. This is because we foolishly used the same method + // name (renderValue) for htmlwidgets definition and Shiny bindings + // but they actually have quite different semantics (the Shiny + // bindings receive data that includes lots of metadata that it + // strips off before calling htmlwidgets renderValue). We can't + // just ignore the difference because in some widgets it's helpful + // to call this.renderValue() from inside of resize(), and if + // we're not delegating, then that call will go to the Shiny + // version instead of the htmlwidgets version. + + // Merge defaults with definition, without mutating either. + var bindingDef = extend({}, defaults, definition); + + // This object will be our actual Shiny binding. + var shinyBinding = new Shiny.OutputBinding(); + + // With a few exceptions, we'll want to simply use the bindingDef's + // version of methods if they are available, otherwise fall back to + // Shiny's defaults. NOTE: If Shiny's output bindings gain additional + // methods in the future, and we want them to be overrideable by + // HTMLWidget binding definitions, then we'll need to add them to this + // list. + delegateMethod(shinyBinding, bindingDef, "getId"); + delegateMethod(shinyBinding, bindingDef, "onValueChange"); + delegateMethod(shinyBinding, bindingDef, "onValueError"); + delegateMethod(shinyBinding, bindingDef, "renderError"); + delegateMethod(shinyBinding, bindingDef, "clearError"); + delegateMethod(shinyBinding, bindingDef, "showProgress"); + + // The find, renderValue, and resize are handled differently, because we + // want to actually decorate the behavior of the bindingDef methods. + + shinyBinding.find = function(scope) { + var results = bindingDef.find(scope); + + // Only return elements that are Shiny outputs, not static ones + var dynamicResults = results.filter(".html-widget-output"); + + // It's possible that whatever caused Shiny to think there might be + // new dynamic outputs, also caused there to be new static outputs. + // Since there might be lots of different htmlwidgets bindings, we + // schedule execution for later--no need to staticRender multiple + // times. + if (results.length !== dynamicResults.length) + scheduleStaticRender(); + + return dynamicResults; + }; + + // Wrap renderValue to handle initialization, which unfortunately isn't + // supported natively by Shiny at the time of this writing. + + shinyBinding.renderValue = function(el, data) { + Shiny.renderDependencies(data.deps); + // Resolve strings marked as javascript literals to objects + if (!(data.evals instanceof Array)) data.evals = [data.evals]; + for (var i = 0; data.evals && i < data.evals.length; i++) { + window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]); + } + if (!bindingDef.renderOnNullValue) { + if (data.x === null) { + el.style.visibility = "hidden"; + return; + } else { + el.style.visibility = "inherit"; + } + } + if (!elementData(el, "initialized")) { + initSizing(el); + + elementData(el, "initialized", true); + if (bindingDef.initialize) { + var result = bindingDef.initialize(el, el.offsetWidth, + el.offsetHeight); + elementData(el, "init_result", result); + } + } + bindingDef.renderValue(el, data.x, elementData(el, "init_result")); + evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]); + }; + + // Only override resize if bindingDef implements it + if (bindingDef.resize) { + shinyBinding.resize = function(el, width, height) { + // Shiny can call resize before initialize/renderValue have been + // called, which doesn't make sense for widgets. + if (elementData(el, "initialized")) { + bindingDef.resize(el, width, height, elementData(el, "init_result")); + } + }; + } + + Shiny.outputBindings.register(shinyBinding, bindingDef.name); + } + }; + + var scheduleStaticRenderTimerId = null; + function scheduleStaticRender() { + if (!scheduleStaticRenderTimerId) { + scheduleStaticRenderTimerId = setTimeout(function() { + scheduleStaticRenderTimerId = null; + window.HTMLWidgets.staticRender(); + }, 1); + } + } + + // Render static widgets after the document finishes loading + // Statically render all elements that are of this widget's class + window.HTMLWidgets.staticRender = function() { + var bindings = window.HTMLWidgets.widgets || []; + forEach(bindings, function(binding) { + var matches = binding.find(document.documentElement); + forEach(matches, function(el) { + var sizeObj = initSizing(el, binding); + + if (hasClass(el, "html-widget-static-bound")) + return; + el.className = el.className + " html-widget-static-bound"; + + var initResult; + if (binding.initialize) { + initResult = binding.initialize(el, + sizeObj ? sizeObj.getWidth() : el.offsetWidth, + sizeObj ? sizeObj.getHeight() : el.offsetHeight + ); + elementData(el, "init_result", initResult); + } + + if (binding.resize) { + var lastSize = { + w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, + h: sizeObj ? sizeObj.getHeight() : el.offsetHeight + }; + var resizeHandler = function(e) { + var size = { + w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, + h: sizeObj ? sizeObj.getHeight() : el.offsetHeight + }; + if (size.w === 0 && size.h === 0) + return; + if (size.w === lastSize.w && size.h === lastSize.h) + return; + lastSize = size; + binding.resize(el, size.w, size.h, initResult); + }; + + on(window, "resize", resizeHandler); + + // This is needed for cases where we're running in a Shiny + // app, but the widget itself is not a Shiny output, but + // rather a simple static widget. One example of this is + // an rmarkdown document that has runtime:shiny and widget + // that isn't in a render function. Shiny only knows to + // call resize handlers for Shiny outputs, not for static + // widgets, so we do it ourselves. + if (window.jQuery) { + window.jQuery(document).on( + "shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets", + resizeHandler + ); + window.jQuery(document).on( + "hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets", + resizeHandler + ); + } + + // This is needed for the specific case of ioslides, which + // flips slides between display:none and display:block. + // Ideally we would not have to have ioslide-specific code + // here, but rather have ioslides raise a generic event, + // but the rmarkdown package just went to CRAN so the + // window to getting that fixed may be long. + if (window.addEventListener) { + // It's OK to limit this to window.addEventListener + // browsers because ioslides itself only supports + // such browsers. + on(document, "slideenter", resizeHandler); + on(document, "slideleave", resizeHandler); + } + } + + var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']"); + if (scriptData) { + var data = JSON.parse(scriptData.textContent || scriptData.text); + // Resolve strings marked as javascript literals to objects + if (!(data.evals instanceof Array)) data.evals = [data.evals]; + for (var k = 0; data.evals && k < data.evals.length; k++) { + window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]); + } + binding.renderValue(el, data.x, initResult); + evalAndRun(data.jsHooks.render, initResult, [el, data.x]); + } + }); + }); + + invokePostRenderHandlers(); + } + + + function has_jQuery3() { + if (!window.jQuery) { + return false; + } + var $version = window.jQuery.fn.jquery; + var $major_version = parseInt($version.split(".")[0]); + return $major_version >= 3; + } + + /* + / Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's + / on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now + / really means $(setTimeout(fn)). + / https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous + / + / Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny + / one tick later than it did before, which means staticRender() is + / called renderValue() earlier than (advanced) widget authors might be expecting. + / https://github.com/rstudio/shiny/issues/2630 + / + / For a concrete example, leaflet has some methods (e.g., updateBounds) + / which reference Shiny methods registered in initShiny (e.g., setInputValue). + / Since leaflet is privy to this life-cycle, it knows to use setTimeout() to + / delay execution of those methods (until Shiny methods are ready) + / https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268 + / + / Ideally widget authors wouldn't need to use this setTimeout() hack that + / leaflet uses to call Shiny methods on a staticRender(). In the long run, + / the logic initShiny should be broken up so that method registration happens + / right away, but binding happens later. + */ + function maybeStaticRenderLater() { + if (shinyMode && has_jQuery3()) { + window.jQuery(window.HTMLWidgets.staticRender); + } else { + window.HTMLWidgets.staticRender(); + } + } + + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function() { + document.removeEventListener("DOMContentLoaded", arguments.callee, false); + maybeStaticRenderLater(); + }, false); + } else if (document.attachEvent) { + document.attachEvent("onreadystatechange", function() { + if (document.readyState === "complete") { + document.detachEvent("onreadystatechange", arguments.callee); + maybeStaticRenderLater(); + } + }); + } + + + window.HTMLWidgets.getAttachmentUrl = function(depname, key) { + // If no key, default to the first item + if (typeof(key) === "undefined") + key = 1; + + var link = document.getElementById(depname + "-" + key + "-attachment"); + if (!link) { + throw new Error("Attachment " + depname + "/" + key + " not found in document"); + } + return link.getAttribute("href"); + }; + + window.HTMLWidgets.dataframeToD3 = function(df) { + var names = []; + var length; + for (var name in df) { + if (df.hasOwnProperty(name)) + names.push(name); + if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") { + throw new Error("All fields must be arrays"); + } else if (typeof(length) !== "undefined" && length !== df[name].length) { + throw new Error("All fields must be arrays of the same length"); + } + length = df[name].length; + } + var results = []; + var item; + for (var row = 0; row < length; row++) { + item = {}; + for (var col = 0; col < names.length; col++) { + item[names[col]] = df[names[col]][row]; + } + results.push(item); + } + return results; + }; + + window.HTMLWidgets.transposeArray2D = function(array) { + if (array.length === 0) return array; + var newArray = array[0].map(function(col, i) { + return array.map(function(row) { + return row[i] + }) + }); + return newArray; + }; + // Split value at splitChar, but allow splitChar to be escaped + // using escapeChar. Any other characters escaped by escapeChar + // will be included as usual (including escapeChar itself). + function splitWithEscape(value, splitChar, escapeChar) { + var results = []; + var escapeMode = false; + var currentResult = ""; + for (var pos = 0; pos < value.length; pos++) { + if (!escapeMode) { + if (value[pos] === splitChar) { + results.push(currentResult); + currentResult = ""; + } else if (value[pos] === escapeChar) { + escapeMode = true; + } else { + currentResult += value[pos]; + } + } else { + currentResult += value[pos]; + escapeMode = false; + } + } + if (currentResult !== "") { + results.push(currentResult); + } + return results; + } + // Function authored by Yihui/JJ Allaire + window.HTMLWidgets.evaluateStringMember = function(o, member) { + var parts = splitWithEscape(member, '.', '\\'); + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i]; + // part may be a character or 'numeric' member name + if (o !== null && typeof o === "object" && part in o) { + if (i == (l - 1)) { // if we are at the end of the line then evalulate + if (typeof o[part] === "string") + o[part] = tryEval(o[part]); + } else { // otherwise continue to next embedded object + o = o[part]; + } + } + } + }; + + // Retrieve the HTMLWidget instance (i.e. the return value of an + // HTMLWidget binding's initialize() or factory() function) + // associated with an element, or null if none. + window.HTMLWidgets.getInstance = function(el) { + return elementData(el, "init_result"); + }; + + // Finds the first element in the scope that matches the selector, + // and returns the HTMLWidget instance (i.e. the return value of + // an HTMLWidget binding's initialize() or factory() function) + // associated with that element, if any. If no element matches the + // selector, or the first matching element has no HTMLWidget + // instance associated with it, then null is returned. + // + // The scope argument is optional, and defaults to window.document. + window.HTMLWidgets.find = function(scope, selector) { + if (arguments.length == 1) { + selector = scope; + scope = document; + } + + var el = scope.querySelector(selector); + if (el === null) { + return null; + } else { + return window.HTMLWidgets.getInstance(el); + } + }; + + // Finds all elements in the scope that match the selector, and + // returns the HTMLWidget instances (i.e. the return values of + // an HTMLWidget binding's initialize() or factory() function) + // associated with the elements, in an array. If elements that + // match the selector don't have an associated HTMLWidget + // instance, the returned array will contain nulls. + // + // The scope argument is optional, and defaults to window.document. + window.HTMLWidgets.findAll = function(scope, selector) { + if (arguments.length == 1) { + selector = scope; + scope = document; + } + + var nodes = scope.querySelectorAll(selector); + var results = []; + for (var i = 0; i < nodes.length; i++) { + results.push(window.HTMLWidgets.getInstance(nodes[i])); + } + return results; + }; + + var postRenderHandlers = []; + function invokePostRenderHandlers() { + while (postRenderHandlers.length) { + var handler = postRenderHandlers.shift(); + if (handler) { + handler(); + } + } + } + + // Register the given callback function to be invoked after the + // next time static widgets are rendered. + window.HTMLWidgets.addPostRenderHandler = function(callback) { + postRenderHandlers.push(callback); + }; + + // Takes a new-style instance-bound definition, and returns an + // old-style class-bound definition. This saves us from having + // to rewrite all the logic in this file to accomodate both + // types of definitions. + function createLegacyDefinitionAdapter(defn) { + var result = { + name: defn.name, + type: defn.type, + initialize: function(el, width, height) { + return defn.factory(el, width, height); + }, + renderValue: function(el, x, instance) { + return instance.renderValue(x); + }, + resize: function(el, width, height, instance) { + return instance.resize(width, height); + } + }; + + if (defn.find) + result.find = defn.find; + if (defn.renderError) + result.renderError = defn.renderError; + if (defn.clearError) + result.clearError = defn.clearError; + + return result; + } +})(); + diff --git a/docs/articles/variable_details_files/jquery-3.6.0/jquery-3.6.0.js b/docs/articles/variable_details_files/jquery-3.6.0/jquery-3.6.0.js new file mode 100644 index 00000000..fc6c299b --- /dev/null +++ b/docs/articles/variable_details_files/jquery-3.6.0/jquery-3.6.0.js @@ -0,0 +1,10881 @@ +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.6.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.6 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2021-02-16 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting
or other required elements. + thead: [ 1, "
@@ -5167,29 +5169,22 @@

-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/how_to_add_variables_files/header-attrs-2.11/header-attrs.js b/docs/articles/how_to_add_variables_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/how_to_add_variables_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/index.html b/docs/articles/index.html index 3320ed56..22a879c9 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@
@@ -180,11 +190,11 @@

All vignettes

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/tagged_na_usage.html b/docs/articles/tagged_na_usage.html index 618187b8..b6709ba5 100644 --- a/docs/articles/tagged_na_usage.html +++ b/docs/articles/tagged_na_usage.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
+
-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/tagged_na_usage_files/header-attrs-2.11/header-attrs.js b/docs/articles/tagged_na_usage_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/tagged_na_usage_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/variable_details.html b/docs/articles/variable_details.html index 1bdfeee8..75f9f365 100644 --- a/docs/articles/variable_details.html +++ b/docs/articles/variable_details.html @@ -12,22 +12,22 @@ - - - - - + + + + + + - - - + + - +
- - - -
+ + + + +

@@ -154,7 +155,7 @@

Naming convention for not applicable and missing values

-

rec_with_table() uses the tagged_na() function from the haven package to tag not applicable responses as NA(a), and missing values (don’t know, refusal, not stated) as NA(b). As you will see later, not applicable values are transformed to NA::a, and missing values are transformed to NA::b. See here for more information about tagged_na().

+

rec_with_table() uses the tagged_na() function from the haven package to tag not applicable responses as NA(a), and missing values (don’t know, refusal, not stated) as NA(b). As you will see later, not applicable values are transformed to NA::a, and missing values are transformed to NA::b. See here for more information about tagged_na().

@@ -162,7 +163,7 @@

The following are the columns that are listed in variable_details.csv. Many of these columns need to be specified in order for rec_with_table() to be functional. We will use the sex variable to illustrate how each column is specified:

  1. -variable: the name of the final transformed variable. In variable_details.csv, we have designated the variable names used in CCHS cycles from 2007 to 2014 as the final transformed variable name.
  2. +variable: the name of the final transformed variable. In variable_details.csv, we have designated the variable names used in CCHS cycles from 2007 to 2018 as the final transformed variable name.
@@ -216,7 +217,7 @@

@@ -498,7 +499,7 @@

-247 +337 DHH_SEX @@ -227,7 +228,7 @@

-248 +338 DHH_SEX @@ -238,7 +239,7 @@

-249 +339 DHH_SEX @@ -249,7 +250,7 @@

-250 +340 DHH_SEX @@ -260,7 +261,7 @@

-251 +341 DHH_SEX @@ -292,7 +293,7 @@

-247 +337 DHH_SEX @@ -306,7 +307,7 @@

-248 +338 DHH_SEX @@ -320,7 +321,7 @@

-249 +339 DHH_SEX @@ -334,7 +335,7 @@

-250 +340 DHH_SEX @@ -348,7 +349,7 @@

-251 +341 DHH_SEX @@ -386,7 +387,7 @@

-247 +337 DHH_SEX @@ -398,12 +399,12 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p
-248 +338 DHH_SEX @@ -415,12 +416,12 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p
-249 +339 DHH_SEX @@ -432,12 +433,12 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p
-250 +340 DHH_SEX @@ -449,12 +450,12 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p
-251 +341 DHH_SEX @@ -466,7 +467,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p
-247 +337 DHH_SEX @@ -510,7 +511,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -518,7 +519,7 @@

-248 +338 DHH_SEX @@ -530,7 +531,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -538,7 +539,7 @@

-249 +339 DHH_SEX @@ -550,7 +551,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -558,7 +559,7 @@

-250 +340 DHH_SEX @@ -570,7 +571,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -578,7 +579,7 @@

-251 +341 DHH_SEX @@ -590,7 +591,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -600,7 +601,7 @@

  • The categorical sex variable in the 2001 CCHS survey is DHHA_SEX. If the final variable name for categorical age in the variable column is DHH_SEX, you would write the following in this column: cchs2001::DHH_SEX

  • -
  • The categorical age variable in the CCHS surveys from 2007 to 2014 is DHH_SEX. Since it is the same as the final variable name, you would write in this column [DHH_SEX] once. The variable name that is denoted within the square brackets is the default variable name.

  • +
  • The categorical age variable in the CCHS surveys from 2007 to 2018 is DHH_SEX. Since it is the same as the final variable name, you would write in this column [DHH_SEX] once. The variable name that is denoted within the square brackets is the default variable name.

  1. @@ -632,7 +633,7 @@

-247 +337 DHH_SEX @@ -644,7 +645,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -655,7 +656,7 @@

-248 +338 DHH_SEX @@ -667,7 +668,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -678,7 +679,7 @@

-249 +339 DHH_SEX @@ -690,7 +691,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -701,7 +702,7 @@

-250 +340 DHH_SEX @@ -713,7 +714,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -724,7 +725,7 @@

-251 +341 DHH_SEX @@ -736,7 +737,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -781,7 +782,7 @@

-247 +337 DHH_SEX @@ -793,7 +794,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -807,7 +808,7 @@

-248 +338 DHH_SEX @@ -819,7 +820,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -833,7 +834,7 @@

-249 +339 DHH_SEX @@ -845,7 +846,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -859,7 +860,7 @@

-250 +340 DHH_SEX @@ -871,7 +872,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -885,7 +886,7 @@

-251 +341 DHH_SEX @@ -897,7 +898,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -950,7 +951,7 @@

-247 +337 DHH_SEX @@ -962,7 +963,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -979,7 +980,7 @@

-248 +338 DHH_SEX @@ -991,7 +992,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1008,7 +1009,7 @@

-249 +339 DHH_SEX @@ -1020,7 +1021,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1037,7 +1038,7 @@

-250 +340 DHH_SEX @@ -1049,7 +1050,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1066,7 +1067,7 @@

-251 +341 DHH_SEX @@ -1078,7 +1079,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1134,7 +1135,7 @@

-247 +337 DHH_SEX @@ -1146,7 +1147,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1166,7 +1167,7 @@

-248 +338 DHH_SEX @@ -1178,7 +1179,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1198,7 +1199,7 @@

-249 +339 DHH_SEX @@ -1210,7 +1211,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1230,7 +1231,7 @@

-250 +340 DHH_SEX @@ -1242,7 +1243,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1262,7 +1263,7 @@

-251 +341 DHH_SEX @@ -1274,7 +1275,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1336,7 +1337,7 @@

-247 +337 DHH_SEX @@ -1348,7 +1349,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1371,7 +1372,7 @@

-248 +338 DHH_SEX @@ -1383,7 +1384,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1406,7 +1407,7 @@

-249 +339 DHH_SEX @@ -1418,7 +1419,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1441,7 +1442,7 @@

-250 +340 DHH_SEX @@ -1453,7 +1454,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1476,7 +1477,7 @@

-251 +341 DHH_SEX @@ -1488,7 +1489,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1556,7 +1557,7 @@

-247 +337 DHH_SEX @@ -1568,7 +1569,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1594,7 +1595,7 @@

-248 +338 DHH_SEX @@ -1606,7 +1607,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1632,7 +1633,7 @@

-249 +339 DHH_SEX @@ -1644,7 +1645,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1670,7 +1671,7 @@

-250 +340 DHH_SEX @@ -1682,7 +1683,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1708,7 +1709,7 @@

-251 +341 DHH_SEX @@ -1720,7 +1721,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1795,7 +1796,7 @@

-247 +337 DHH_SEX @@ -1807,7 +1808,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1836,7 +1837,7 @@

-248 +338 DHH_SEX @@ -1848,7 +1849,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1877,7 +1878,7 @@

-249 +339 DHH_SEX @@ -1889,7 +1890,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1918,7 +1919,7 @@

-250 +340 DHH_SEX @@ -1930,7 +1931,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -1959,7 +1960,7 @@

-251 +341 DHH_SEX @@ -1971,7 +1972,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2051,7 +2052,7 @@

-247 +337 DHH_SEX @@ -2063,7 +2064,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2095,7 +2096,7 @@

-248 +338 DHH_SEX @@ -2107,7 +2108,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2139,7 +2140,7 @@

-249 +339 DHH_SEX @@ -2151,7 +2152,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2183,7 +2184,7 @@

-250 +340 DHH_SEX @@ -2195,7 +2196,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2227,7 +2228,7 @@

-251 +341 DHH_SEX @@ -2239,7 +2240,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2325,7 +2326,7 @@

-247 +337 DHH_SEX @@ -2337,7 +2338,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2372,7 +2373,7 @@

-248 +338 DHH_SEX @@ -2384,7 +2385,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2419,7 +2420,7 @@

-249 +339 DHH_SEX @@ -2431,7 +2432,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2466,7 +2467,7 @@

-250 +340 DHH_SEX @@ -2478,7 +2479,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2513,7 +2514,7 @@

-251 +341 DHH_SEX @@ -2525,7 +2526,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2617,7 +2618,7 @@

-247 +337 DHH_SEX @@ -2629,7 +2630,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2667,7 +2668,7 @@

-248 +338 DHH_SEX @@ -2679,7 +2680,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2717,7 +2718,7 @@

-249 +339 DHH_SEX @@ -2729,7 +2730,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2767,7 +2768,7 @@

-250 +340 DHH_SEX @@ -2779,7 +2780,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2817,7 +2818,7 @@

-251 +341 DHH_SEX @@ -2829,7 +2830,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2927,7 +2928,7 @@

-247 +337 DHH_SEX @@ -2939,7 +2940,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -2979,7 +2980,7 @@

-248 +338 DHH_SEX @@ -2991,7 +2992,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -3031,7 +3032,7 @@

-249 +339 DHH_SEX @@ -3043,7 +3044,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -3083,7 +3084,7 @@

-250 +340 DHH_SEX @@ -3095,7 +3096,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -3135,7 +3136,7 @@

-251 +341 DHH_SEX @@ -3147,7 +3148,7 @@

cat

-cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p +cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX] @@ -3316,29 +3317,22 @@

-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/variable_details_files/crosstalk-1.1.1/css/crosstalk.css b/docs/articles/variable_details_files/crosstalk-1.1.1/css/crosstalk.css new file mode 100644 index 00000000..46befd2e --- /dev/null +++ b/docs/articles/variable_details_files/crosstalk-1.1.1/css/crosstalk.css @@ -0,0 +1,27 @@ +/* Adjust margins outwards, so column contents line up with the edges of the + parent of container-fluid. */ +.container-fluid.crosstalk-bscols { + margin-left: -30px; + margin-right: -30px; + white-space: normal; +} + +/* But don't adjust the margins outwards if we're directly under the body, + i.e. we were the top-level of something at the console. */ +body > .container-fluid.crosstalk-bscols { + margin-left: auto; + margin-right: auto; +} + +.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { + display: inline-block; + padding-right: 12px; + vertical-align: top; +} + +@media only screen and (max-width:480px) { + .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { + display: block; + padding-right: inherit; + } +} diff --git a/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js new file mode 100644 index 00000000..fd9eb53d --- /dev/null +++ b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js @@ -0,0 +1,1474 @@ +(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o b) { + return 1; + } +} + +/** + * @private + */ + +var FilterSet = function () { + function FilterSet() { + _classCallCheck(this, FilterSet); + + this.reset(); + } + + _createClass(FilterSet, [{ + key: "reset", + value: function reset() { + // Key: handle ID, Value: array of selected keys, or null + this._handles = {}; + // Key: key string, Value: count of handles that include it + this._keys = {}; + this._value = null; + this._activeHandles = 0; + } + }, { + key: "update", + value: function update(handleId, keys) { + if (keys !== null) { + keys = keys.slice(0); // clone before sorting + keys.sort(naturalComparator); + } + + var _diffSortedLists = (0, _util.diffSortedLists)(this._handles[handleId], keys), + added = _diffSortedLists.added, + removed = _diffSortedLists.removed; + + this._handles[handleId] = keys; + + for (var i = 0; i < added.length; i++) { + this._keys[added[i]] = (this._keys[added[i]] || 0) + 1; + } + for (var _i = 0; _i < removed.length; _i++) { + this._keys[removed[_i]]--; + } + + this._updateValue(keys); + } + + /** + * @param {string[]} keys Sorted array of strings that indicate + * a superset of possible keys. + * @private + */ + + }, { + key: "_updateValue", + value: function _updateValue() { + var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._allKeys; + + var handleCount = Object.keys(this._handles).length; + if (handleCount === 0) { + this._value = null; + } else { + this._value = []; + for (var i = 0; i < keys.length; i++) { + var count = this._keys[keys[i]]; + if (count === handleCount) { + this._value.push(keys[i]); + } + } + } + } + }, { + key: "clear", + value: function clear(handleId) { + if (typeof this._handles[handleId] === "undefined") { + return; + } + + var keys = this._handles[handleId]; + if (!keys) { + keys = []; + } + + for (var i = 0; i < keys.length; i++) { + this._keys[keys[i]]--; + } + delete this._handles[handleId]; + + this._updateValue(); + } + }, { + key: "value", + get: function get() { + return this._value; + } + }, { + key: "_allKeys", + get: function get() { + var allKeys = Object.keys(this._keys); + allKeys.sort(naturalComparator); + return allKeys; + } + }]); + + return FilterSet; +}(); + +exports.default = FilterSet; + +},{"./util":11}],4:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.default = group; + +var _var2 = require("./var"); + +var _var3 = _interopRequireDefault(_var2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// Use a global so that multiple copies of crosstalk.js can be loaded and still +// have groups behave as singletons across all copies. +global.__crosstalk_groups = global.__crosstalk_groups || {}; +var groups = global.__crosstalk_groups; + +function group(groupName) { + if (groupName && typeof groupName === "string") { + if (!groups.hasOwnProperty(groupName)) { + groups[groupName] = new Group(groupName); + } + return groups[groupName]; + } else if ((typeof groupName === "undefined" ? "undefined" : _typeof(groupName)) === "object" && groupName._vars && groupName.var) { + // Appears to already be a group object + return groupName; + } else if (Array.isArray(groupName) && groupName.length == 1 && typeof groupName[0] === "string") { + return group(groupName[0]); + } else { + throw new Error("Invalid groupName argument"); + } +} + +var Group = function () { + function Group(name) { + _classCallCheck(this, Group); + + this.name = name; + this._vars = {}; + } + + _createClass(Group, [{ + key: "var", + value: function _var(name) { + if (!name || typeof name !== "string") { + throw new Error("Invalid var name"); + } + + if (!this._vars.hasOwnProperty(name)) this._vars[name] = new _var3.default(this, name); + return this._vars[name]; + } + }, { + key: "has", + value: function has(name) { + if (!name || typeof name !== "string") { + throw new Error("Invalid var name"); + } + + return this._vars.hasOwnProperty(name); + } + }]); + + return Group; +}(); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./var":12}],5:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _group = require("./group"); + +var _group2 = _interopRequireDefault(_group); + +var _selection = require("./selection"); + +var _filter = require("./filter"); + +var _input = require("./input"); + +require("./input_selectize"); + +require("./input_checkboxgroup"); + +require("./input_slider"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultGroup = (0, _group2.default)("default"); + +function var_(name) { + return defaultGroup.var(name); +} + +function has(name) { + return defaultGroup.has(name); +} + +if (global.Shiny) { + global.Shiny.addCustomMessageHandler("update-client-value", function (message) { + if (typeof message.group === "string") { + (0, _group2.default)(message.group).var(message.name).set(message.value); + } else { + var_(message.name).set(message.value); + } + }); +} + +var crosstalk = { + group: _group2.default, + var: var_, + has: has, + SelectionHandle: _selection.SelectionHandle, + FilterHandle: _filter.FilterHandle, + bind: _input.bind +}; + +/** + * @namespace crosstalk + */ +exports.default = crosstalk; + +global.crosstalk = crosstalk; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./group":4,"./input":6,"./input_checkboxgroup":7,"./input_selectize":8,"./input_slider":9,"./selection":10}],6:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.register = register; +exports.bind = bind; +var $ = global.jQuery; + +var bindings = {}; + +function register(reg) { + bindings[reg.className] = reg; + if (global.document && global.document.readyState !== "complete") { + $(function () { + bind(); + }); + } else if (global.document) { + setTimeout(bind, 100); + } +} + +function bind() { + Object.keys(bindings).forEach(function (className) { + var binding = bindings[className]; + $("." + binding.className).not(".crosstalk-input-bound").each(function (i, el) { + bindInstance(binding, el); + }); + }); +} + +// Escape jQuery identifier +function $escape(val) { + return val.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1"); +} + +function bindEl(el) { + var $el = $(el); + Object.keys(bindings).forEach(function (className) { + if ($el.hasClass(className) && !$el.hasClass("crosstalk-input-bound")) { + var binding = bindings[className]; + bindInstance(binding, el); + } + }); +} + +function bindInstance(binding, el) { + var jsonEl = $(el).find("script[type='application/json'][data-for='" + $escape(el.id) + "']"); + var data = JSON.parse(jsonEl[0].innerText); + + var instance = binding.factory(el, data); + $(el).data("crosstalk-instance", instance); + $(el).addClass("crosstalk-input-bound"); +} + +if (global.Shiny) { + var inputBinding = new global.Shiny.InputBinding(); + var _$ = global.jQuery; + _$.extend(inputBinding, { + find: function find(scope) { + return _$(scope).find(".crosstalk-input"); + }, + initialize: function initialize(el) { + if (!_$(el).hasClass("crosstalk-input-bound")) { + bindEl(el); + } + }, + getId: function getId(el) { + return el.id; + }, + getValue: function getValue(el) {}, + setValue: function setValue(el, value) {}, + receiveMessage: function receiveMessage(el, data) {}, + subscribe: function subscribe(el, callback) { + _$(el).data("crosstalk-instance").resume(); + }, + unsubscribe: function unsubscribe(el) { + _$(el).data("crosstalk-instance").suspend(); + } + }); + global.Shiny.inputBindings.register(inputBinding, "crosstalk.inputBinding"); +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],7:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; + +input.register({ + className: "crosstalk-input-checkboxgroup", + + factory: function factory(el, data) { + /* + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + var ctHandle = new _filter.FilterHandle(data.group); + + var lastKnownKeys = void 0; + var $el = $(el); + $el.on("change", "input[type='checkbox']", function () { + var checked = $el.find("input[type='checkbox']:checked"); + if (checked.length === 0) { + lastKnownKeys = null; + ctHandle.clear(); + } else { + var keys = {}; + checked.each(function () { + data.map[this.value].forEach(function (key) { + keys[key] = true; + }); + }); + var keyArray = Object.keys(keys); + keyArray.sort(); + lastKnownKeys = keyArray; + ctHandle.set(keyArray); + } + }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6}],8:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _util = require("./util"); + +var util = _interopRequireWildcard(_util); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; + +input.register({ + className: "crosstalk-input-select", + + factory: function factory(el, data) { + /* + * items: {value: [...], label: [...]} + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + + var first = [{ value: "", label: "(All)" }]; + var items = util.dataframeToD3(data.items); + var opts = { + options: first.concat(items), + valueField: "value", + labelField: "label", + searchField: "label" + }; + + var select = $(el).find("select")[0]; + + var selectize = $(select).selectize(opts)[0].selectize; + + var ctHandle = new _filter.FilterHandle(data.group); + + var lastKnownKeys = void 0; + selectize.on("change", function () { + if (selectize.items.length === 0) { + lastKnownKeys = null; + ctHandle.clear(); + } else { + var keys = {}; + selectize.items.forEach(function (group) { + data.map[group].forEach(function (key) { + keys[key] = true; + }); + }); + var keyArray = Object.keys(keys); + keyArray.sort(); + lastKnownKeys = keyArray; + ctHandle.set(keyArray); + } + }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6,"./util":11}],9:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; +var strftime = global.strftime; + +input.register({ + className: "crosstalk-input-slider", + + factory: function factory(el, data) { + /* + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + var ctHandle = new _filter.FilterHandle(data.group); + + var opts = {}; + var $el = $(el).find("input"); + var dataType = $el.data("data-type"); + var timeFormat = $el.data("time-format"); + var round = $el.data("round"); + var timeFormatter = void 0; + + // Set up formatting functions + if (dataType === "date") { + timeFormatter = strftime.utc(); + opts.prettify = function (num) { + return timeFormatter(timeFormat, new Date(num)); + }; + } else if (dataType === "datetime") { + var timezone = $el.data("timezone"); + if (timezone) timeFormatter = strftime.timezone(timezone);else timeFormatter = strftime; + + opts.prettify = function (num) { + return timeFormatter(timeFormat, new Date(num)); + }; + } else if (dataType === "number") { + if (typeof round !== "undefined") opts.prettify = function (num) { + var factor = Math.pow(10, round); + return Math.round(num * factor) / factor; + }; + } + + $el.ionRangeSlider(opts); + + function getValue() { + var result = $el.data("ionRangeSlider").result; + + // Function for converting numeric value from slider to appropriate type. + var convert = void 0; + var dataType = $el.data("data-type"); + if (dataType === "date") { + convert = function convert(val) { + return formatDateUTC(new Date(+val)); + }; + } else if (dataType === "datetime") { + convert = function convert(val) { + // Convert ms to s + return +val / 1000; + }; + } else { + convert = function convert(val) { + return +val; + }; + } + + if ($el.data("ionRangeSlider").options.type === "double") { + return [convert(result.from), convert(result.to)]; + } else { + return convert(result.from); + } + } + + var lastKnownKeys = null; + + $el.on("change.crosstalkSliderInput", function (event) { + if (!$el.data("updating") && !$el.data("animating")) { + var _getValue = getValue(), + _getValue2 = _slicedToArray(_getValue, 2), + from = _getValue2[0], + to = _getValue2[1]; + + var keys = []; + for (var i = 0; i < data.values.length; i++) { + var val = data.values[i]; + if (val >= from && val <= to) { + keys.push(data.keys[i]); + } + } + keys.sort(); + ctHandle.set(keys); + lastKnownKeys = keys; + } + }); + + // let $el = $(el); + // $el.on("change", "input[type="checkbox"]", function() { + // let checked = $el.find("input[type="checkbox"]:checked"); + // if (checked.length === 0) { + // ctHandle.clear(); + // } else { + // let keys = {}; + // checked.each(function() { + // data.map[this.value].forEach(function(key) { + // keys[key] = true; + // }); + // }); + // let keyArray = Object.keys(keys); + // keyArray.sort(); + // ctHandle.set(keyArray); + // } + // }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +// Convert a number to a string with leading zeros +function padZeros(n, digits) { + var str = n.toString(); + while (str.length < digits) { + str = "0" + str; + }return str; +} + +// Given a Date object, return a string in yyyy-mm-dd format, using the +// UTC date. This may be a day off from the date in the local time zone. +function formatDateUTC(date) { + if (date instanceof Date) { + return date.getUTCFullYear() + "-" + padZeros(date.getUTCMonth() + 1, 2) + "-" + padZeros(date.getUTCDate(), 2); + } else { + return null; + } +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6}],10:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SelectionHandle = undefined; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _events = require("./events"); + +var _events2 = _interopRequireDefault(_events); + +var _group = require("./group"); + +var _group2 = _interopRequireDefault(_group); + +var _util = require("./util"); + +var util = _interopRequireWildcard(_util); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Use this class to read and write (and listen for changes to) the selection + * for a Crosstalk group. This is intended to be used for linked brushing. + * + * If two (or more) `SelectionHandle` instances in the same webpage share the + * same group name, they will share the same state. Setting the selection using + * one `SelectionHandle` instance will result in the `value` property instantly + * changing across the others, and `"change"` event listeners on all instances + * (including the one that initiated the sending) will fire. + * + * @param {string} [group] - The name of the Crosstalk group, or if none, + * null or undefined (or any other falsy value). This can be changed later + * via the [SelectionHandle#setGroup](#setGroup) method. + * @param {Object} [extraInfo] - An object whose properties will be copied to + * the event object whenever an event is emitted. + */ +var SelectionHandle = exports.SelectionHandle = function () { + function SelectionHandle() { + var group = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var extraInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + _classCallCheck(this, SelectionHandle); + + this._eventRelay = new _events2.default(); + this._emitter = new util.SubscriptionTracker(this._eventRelay); + + // Name of the group we're currently tracking, if any. Can change over time. + this._group = null; + // The Var we're currently tracking, if any. Can change over time. + this._var = null; + // The event handler subscription we currently have on var.on("change"). + this._varOnChangeSub = null; + + this._extraInfo = util.extend({ sender: this }, extraInfo); + + this.setGroup(group); + } + + /** + * Changes the Crosstalk group membership of this SelectionHandle. The group + * being switched away from (if any) will not have its selection value + * modified as a result of calling `setGroup`, even if this handle was the + * most recent handle to set the selection of the group. + * + * The group being switched to (if any) will also not have its selection value + * modified as a result of calling `setGroup`. If you want to set the + * selection value of the new group, call `set` explicitly. + * + * @param {string} group - The name of the Crosstalk group, or null (or + * undefined) to clear the group. + */ + + + _createClass(SelectionHandle, [{ + key: "setGroup", + value: function setGroup(group) { + var _this = this; + + // If group is unchanged, do nothing + if (this._group === group) return; + // Treat null, undefined, and other falsy values the same + if (!this._group && !group) return; + + if (this._var) { + this._var.off("change", this._varOnChangeSub); + this._var = null; + this._varOnChangeSub = null; + } + + this._group = group; + + if (group) { + this._var = (0, _group2.default)(group).var("selection"); + var sub = this._var.on("change", function (e) { + _this._eventRelay.trigger("change", e, _this); + }); + this._varOnChangeSub = sub; + } + } + + /** + * Retrieves the current selection for the group represented by this + * `SelectionHandle`. + * + * - If no selection is active, then this value will be falsy. + * - If a selection is active, but no data points are selected, then this + * value will be an empty array. + * - If a selection is active, and data points are selected, then the keys + * of the selected data points will be present in the array. + */ + + }, { + key: "_mergeExtraInfo", + + + /** + * Combines the given `extraInfo` (if any) with the handle's default + * `_extraInfo` (if any). + * @private + */ + value: function _mergeExtraInfo(extraInfo) { + // Important incidental effect: shallow clone is returned + return util.extend({}, this._extraInfo ? this._extraInfo : null, extraInfo ? extraInfo : null); + } + + /** + * Overwrites the current selection for the group, and raises the `"change"` + * event among all of the group's '`SelectionHandle` instances (including + * this one). + * + * @fires SelectionHandle#change + * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see + * {@link SelectionHandle#value}). + * @param {Object} [extraInfo] - Extra properties to be included on the event + * object that's passed to listeners (in addition to any options that were + * passed into the `SelectionHandle` constructor). + */ + + }, { + key: "set", + value: function set(selectedKeys, extraInfo) { + if (this._var) this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo)); + } + + /** + * Overwrites the current selection for the group, and raises the `"change"` + * event among all of the group's '`SelectionHandle` instances (including + * this one). + * + * @fires SelectionHandle#change + * @param {Object} [extraInfo] - Extra properties to be included on the event + * object that's passed to listeners (in addition to any that were passed + * into the `SelectionHandle` constructor). + */ + + }, { + key: "clear", + value: function clear(extraInfo) { + if (this._var) this.set(void 0, this._mergeExtraInfo(extraInfo)); + } + + /** + * Subscribes to events on this `SelectionHandle`. + * + * @param {string} eventType - Indicates the type of events to listen to. + * Currently, only `"change"` is supported. + * @param {SelectionHandle~listener} listener - The callback function that + * will be invoked when the event occurs. + * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel + * this subscription. + */ + + }, { + key: "on", + value: function on(eventType, listener) { + return this._emitter.on(eventType, listener); + } + + /** + * Cancels event subscriptions created by {@link SelectionHandle#on}. + * + * @param {string} eventType - The type of event to unsubscribe. + * @param {string|SelectionHandle~listener} listener - Either the callback + * function previously passed into {@link SelectionHandle#on}, or the + * string that was returned from {@link SelectionHandle#on}. + */ + + }, { + key: "off", + value: function off(eventType, listener) { + return this._emitter.off(eventType, listener); + } + + /** + * Shuts down the `SelectionHandle` object. + * + * Removes all event listeners that were added through this handle. + */ + + }, { + key: "close", + value: function close() { + this._emitter.removeAllListeners(); + this.setGroup(null); + } + }, { + key: "value", + get: function get() { + return this._var ? this._var.get() : null; + } + }]); + + return SelectionHandle; +}(); + +/** + * @callback SelectionHandle~listener + * @param {Object} event - An object containing details of the event. For + * `"change"` events, this includes the properties `value` (the new + * value of the selection, or `undefined` if no selection is active), + * `oldValue` (the previous value of the selection), and `sender` (the + * `SelectionHandle` instance that made the change). + */ + +/** + * @event SelectionHandle#change + * @type {object} + * @property {object} value - The new value of the selection, or `undefined` + * if no selection is active. + * @property {object} oldValue - The previous value of the selection. + * @property {SelectionHandle} sender - The `SelectionHandle` instance that + * changed the value. + */ + +},{"./events":1,"./group":4,"./util":11}],11:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.extend = extend; +exports.checkSorted = checkSorted; +exports.diffSortedLists = diffSortedLists; +exports.dataframeToD3 = dataframeToD3; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function extend(target) { + for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + sources[_key - 1] = arguments[_key]; + } + + for (var i = 0; i < sources.length; i++) { + var src = sources[i]; + if (typeof src === "undefined" || src === null) continue; + + for (var key in src) { + if (src.hasOwnProperty(key)) { + target[key] = src[key]; + } + } + } + return target; +} + +function checkSorted(list) { + for (var i = 1; i < list.length; i++) { + if (list[i] <= list[i - 1]) { + throw new Error("List is not sorted or contains duplicate"); + } + } +} + +function diffSortedLists(a, b) { + var i_a = 0; + var i_b = 0; + + if (!a) a = []; + if (!b) b = []; + + var a_only = []; + var b_only = []; + + checkSorted(a); + checkSorted(b); + + while (i_a < a.length && i_b < b.length) { + if (a[i_a] === b[i_b]) { + i_a++; + i_b++; + } else if (a[i_a] < b[i_b]) { + a_only.push(a[i_a++]); + } else { + b_only.push(b[i_b++]); + } + } + + if (i_a < a.length) a_only = a_only.concat(a.slice(i_a)); + if (i_b < b.length) b_only = b_only.concat(b.slice(i_b)); + return { + removed: a_only, + added: b_only + }; +} + +// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... } +// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ] +function dataframeToD3(df) { + var names = []; + var length = void 0; + for (var name in df) { + if (df.hasOwnProperty(name)) names.push(name); + if (_typeof(df[name]) !== "object" || typeof df[name].length === "undefined") { + throw new Error("All fields must be arrays"); + } else if (typeof length !== "undefined" && length !== df[name].length) { + throw new Error("All fields must be arrays of the same length"); + } + length = df[name].length; + } + var results = []; + var item = void 0; + for (var row = 0; row < length; row++) { + item = {}; + for (var col = 0; col < names.length; col++) { + item[names[col]] = df[names[col]][row]; + } + results.push(item); + } + return results; +} + +/** + * Keeps track of all event listener additions/removals and lets all active + * listeners be removed with a single operation. + * + * @private + */ + +var SubscriptionTracker = exports.SubscriptionTracker = function () { + function SubscriptionTracker(emitter) { + _classCallCheck(this, SubscriptionTracker); + + this._emitter = emitter; + this._subs = {}; + } + + _createClass(SubscriptionTracker, [{ + key: "on", + value: function on(eventType, listener) { + var sub = this._emitter.on(eventType, listener); + this._subs[sub] = eventType; + return sub; + } + }, { + key: "off", + value: function off(eventType, listener) { + var sub = this._emitter.off(eventType, listener); + if (sub) { + delete this._subs[sub]; + } + return sub; + } + }, { + key: "removeAllListeners", + value: function removeAllListeners() { + var _this = this; + + var current_subs = this._subs; + this._subs = {}; + Object.keys(current_subs).forEach(function (sub) { + _this._emitter.off(current_subs[sub], sub); + }); + } + }]); + + return SubscriptionTracker; +}(); + +},{}],12:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _events = require("./events"); + +var _events2 = _interopRequireDefault(_events); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Var = function () { + function Var(group, name, /*optional*/value) { + _classCallCheck(this, Var); + + this._group = group; + this._name = name; + this._value = value; + this._events = new _events2.default(); + } + + _createClass(Var, [{ + key: "get", + value: function get() { + return this._value; + } + }, { + key: "set", + value: function set(value, /*optional*/event) { + if (this._value === value) { + // Do nothing; the value hasn't changed + return; + } + var oldValue = this._value; + this._value = value; + // Alert JavaScript listeners that the value has changed + var evt = {}; + if (event && (typeof event === "undefined" ? "undefined" : _typeof(event)) === "object") { + for (var k in event) { + if (event.hasOwnProperty(k)) evt[k] = event[k]; + } + } + evt.oldValue = oldValue; + evt.value = value; + this._events.trigger("change", evt, this); + + // TODO: Make this extensible, to let arbitrary back-ends know that + // something has changed + if (global.Shiny && global.Shiny.onInputChange) { + global.Shiny.onInputChange(".clientValue-" + (this._group.name !== null ? this._group.name + "-" : "") + this._name, typeof value === "undefined" ? null : value); + } + } + }, { + key: "on", + value: function on(eventType, listener) { + return this._events.on(eventType, listener); + } + }, { + key: "off", + value: function off(eventType, listener) { + return this._events.off(eventType, listener); + } + }]); + + return Var; +}(); + +exports.default = Var; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./events":1}]},{},[5]) +//# sourceMappingURL=crosstalk.js.map diff --git a/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js.map b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js.map new file mode 100644 index 00000000..cff94f08 --- /dev/null +++ b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.js.map @@ -0,0 +1,37 @@ +{ + "version": 3, + "sources": [ + "node_modules/browser-pack/_prelude.js", + "javascript/src/events.js", + "javascript/src/filter.js", + "javascript/src/filterset.js", + "javascript/src/group.js", + "javascript/src/index.js", + "javascript/src/input.js", + "javascript/src/input_checkboxgroup.js", + "javascript/src/input_selectize.js", + "javascript/src/input_slider.js", + "javascript/src/selection.js", + "javascript/src/util.js", + "javascript/src/var.js" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;ICAqB,M;AACnB,oBAAc;AAAA;;AACZ,SAAK,MAAL,GAAc,EAAd;AACA,SAAK,IAAL,GAAY,CAAZ;AACD;;;;uBAEE,S,EAAW,Q,EAAU;AACtB,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,UAAI,CAAC,IAAL,EAAW;AACT,eAAO,KAAK,MAAL,CAAY,SAAZ,IAAyB,EAAhC;AACD;AACD,UAAI,MAAM,QAAS,KAAK,IAAL,EAAnB;AACA,WAAK,GAAL,IAAY,QAAZ;AACA,aAAO,GAAP;AACD;;AAED;;;;wBACI,S,EAAW,Q,EAAU;AACvB,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,UAAI,OAAO,QAAP,KAAqB,UAAzB,EAAqC;AACnC,aAAK,IAAI,GAAT,IAAgB,IAAhB,EAAsB;AACpB,cAAI,KAAK,cAAL,CAAoB,GAApB,CAAJ,EAA8B;AAC5B,gBAAI,KAAK,GAAL,MAAc,QAAlB,EAA4B;AAC1B,qBAAO,KAAK,GAAL,CAAP;AACA,qBAAO,GAAP;AACD;AACF;AACF;AACD,eAAO,KAAP;AACD,OAVD,MAUO,IAAI,OAAO,QAAP,KAAqB,QAAzB,EAAmC;AACxC,YAAI,QAAQ,KAAK,QAAL,CAAZ,EAA4B;AAC1B,iBAAO,KAAK,QAAL,CAAP;AACA,iBAAO,QAAP;AACD;AACD,eAAO,KAAP;AACD,OANM,MAMA;AACL,cAAM,IAAI,KAAJ,CAAU,8BAAV,CAAN;AACD;AACF;;;4BAEO,S,EAAW,G,EAAK,O,EAAS;AAC/B,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,WAAK,IAAI,GAAT,IAAgB,IAAhB,EAAsB;AACpB,YAAI,KAAK,cAAL,CAAoB,GAApB,CAAJ,EAA8B;AAC5B,eAAK,GAAL,EAAU,IAAV,CAAe,OAAf,EAAwB,GAAxB;AACD;AACF;AACF;;;;;;kBA/CkB,M;;;;;;;;;;;;ACArB;;;;AACA;;;;AACA;;;;AACA;;IAAY,I;;;;;;;;AAEZ,SAAS,YAAT,CAAsB,KAAtB,EAA6B;AAC3B,MAAI,QAAQ,MAAM,GAAN,CAAU,WAAV,CAAZ;AACA,MAAI,SAAS,MAAM,GAAN,EAAb;AACA,MAAI,CAAC,MAAL,EAAa;AACX,aAAS,yBAAT;AACA,UAAM,GAAN,CAAU,MAAV;AACD;AACD,SAAO,MAAP;AACD;;AAED,IAAI,KAAK,CAAT;AACA,SAAS,MAAT,GAAkB;AAChB,SAAO,IAAP;AACD;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;IAwBa,Y,WAAA,Y;AACX,wBAAY,KAAZ,EAAmB,SAAnB,EAA8B;AAAA;;AAC5B,SAAK,WAAL,GAAmB,sBAAnB;AACA,SAAK,QAAL,GAAgB,IAAI,KAAK,mBAAT,CAA6B,KAAK,WAAlC,CAAhB;;AAEA;AACA,SAAK,MAAL,GAAc,IAAd;AACA;AACA,SAAK,UAAL,GAAkB,IAAlB;AACA;AACA,SAAK,UAAL,GAAkB,IAAlB;AACA;AACA,SAAK,eAAL,GAAuB,IAAvB;;AAEA,SAAK,UAAL,GAAkB,KAAK,MAAL,CAAY,EAAE,QAAQ,IAAV,EAAZ,EAA8B,SAA9B,CAAlB;;AAEA,SAAK,GAAL,GAAW,WAAW,QAAtB;;AAEA,SAAK,QAAL,CAAc,KAAd;AACD;;AAED;;;;;;;;;;;;;;6BAUS,K,EAAO;AAAA;;AACd;AACA,UAAI,KAAK,MAAL,KAAgB,KAApB,EACE;AACF;AACA,UAAI,CAAC,KAAK,MAAN,IAAgB,CAAC,KAArB,EACE;;AAEF,UAAI,KAAK,UAAT,EAAqB;AACnB,aAAK,UAAL,CAAgB,GAAhB,CAAoB,QAApB,EAA8B,KAAK,eAAnC;AACA,aAAK,KAAL;AACA,aAAK,eAAL,GAAuB,IAAvB;AACA,aAAK,UAAL,GAAkB,IAAlB;AACA,aAAK,UAAL,GAAkB,IAAlB;AACD;;AAED,WAAK,MAAL,GAAc,KAAd;;AAEA,UAAI,KAAJ,EAAW;AACT,gBAAQ,qBAAI,KAAJ,CAAR;AACA,aAAK,UAAL,GAAkB,aAAa,KAAb,CAAlB;AACA,aAAK,UAAL,GAAkB,qBAAI,KAAJ,EAAW,GAAX,CAAe,QAAf,CAAlB;AACA,YAAI,MAAM,KAAK,UAAL,CAAgB,EAAhB,CAAmB,QAAnB,EAA6B,UAAC,CAAD,EAAO;AAC5C,gBAAK,WAAL,CAAiB,OAAjB,CAAyB,QAAzB,EAAmC,CAAnC;AACD,SAFS,CAAV;AAGA,aAAK,eAAL,GAAuB,GAAvB;AACD;AACF;;AAED;;;;;;;;oCAKgB,S,EAAW;AACzB,aAAO,KAAK,MAAL,CAAY,EAAZ,EACL,KAAK,UAAL,GAAkB,KAAK,UAAvB,GAAoC,IAD/B,EAEL,YAAY,SAAZ,GAAwB,IAFnB,CAAP;AAGD;;AAED;;;;;;;4BAIQ;AACN,WAAK,QAAL,CAAc,kBAAd;AACA,WAAK,KAAL;AACA,WAAK,QAAL,CAAc,IAAd;AACD;;AAED;;;;;;;;;;;;0BASM,S,EAAW;AACf,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,KAAhB,CAAsB,KAAK,GAA3B;AACA,WAAK,SAAL,CAAe,SAAf;AACD;;AAED;;;;;;;;;;;;;;;;;;;;wBAiBI,I,EAAM,S,EAAW;AACnB,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,MAAhB,CAAuB,KAAK,GAA5B,EAAiC,IAAjC;AACA,WAAK,SAAL,CAAe,SAAf;AACD;;AAED;;;;;;;;;;AASA;;;;;;;;;;uBAUG,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;AAED;;;;;;;;;;;wBAQI,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAP;AACD;;;8BAES,S,EAAW;AACnB,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,GAAhB,CAAoB,KAAK,UAAL,CAAgB,KAApC,EAA2C,KAAK,eAAL,CAAqB,SAArB,CAA3C;AACD;;AAED;;;;;;;;;;;wBApCmB;AACjB,aAAO,KAAK,UAAL,GAAkB,KAAK,UAAL,CAAgB,KAAlC,GAA0C,IAAjD;AACD;;;;;;AA6CH;;;;;;;;;;;;;;;;;;;ACzNA;;;;AAEA,SAAS,iBAAT,CAA2B,CAA3B,EAA8B,CAA9B,EAAiC;AAC/B,MAAI,MAAM,CAAV,EAAa;AACX,WAAO,CAAP;AACD,GAFD,MAEO,IAAI,IAAI,CAAR,EAAW;AAChB,WAAO,CAAC,CAAR;AACD,GAFM,MAEA,IAAI,IAAI,CAAR,EAAW;AAChB,WAAO,CAAP;AACD;AACF;;AAED;;;;IAGqB,S;AACnB,uBAAc;AAAA;;AACZ,SAAK,KAAL;AACD;;;;4BAEO;AACN;AACA,WAAK,QAAL,GAAgB,EAAhB;AACA;AACA,WAAK,KAAL,GAAa,EAAb;AACA,WAAK,MAAL,GAAc,IAAd;AACA,WAAK,cAAL,GAAsB,CAAtB;AACD;;;2BAMM,Q,EAAU,I,EAAM;AACrB,UAAI,SAAS,IAAb,EAAmB;AACjB,eAAO,KAAK,KAAL,CAAW,CAAX,CAAP,CADiB,CACK;AACtB,aAAK,IAAL,CAAU,iBAAV;AACD;;AAJoB,6BAME,2BAAgB,KAAK,QAAL,CAAc,QAAd,CAAhB,EAAyC,IAAzC,CANF;AAAA,UAMhB,KANgB,oBAMhB,KANgB;AAAA,UAMT,OANS,oBAMT,OANS;;AAOrB,WAAK,QAAL,CAAc,QAAd,IAA0B,IAA1B;;AAEA,WAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,MAAM,MAA1B,EAAkC,GAAlC,EAAuC;AACrC,aAAK,KAAL,CAAW,MAAM,CAAN,CAAX,IAAuB,CAAC,KAAK,KAAL,CAAW,MAAM,CAAN,CAAX,KAAwB,CAAzB,IAA8B,CAArD;AACD;AACD,WAAK,IAAI,KAAI,CAAb,EAAgB,KAAI,QAAQ,MAA5B,EAAoC,IAApC,EAAyC;AACvC,aAAK,KAAL,CAAW,QAAQ,EAAR,CAAX;AACD;;AAED,WAAK,YAAL,CAAkB,IAAlB;AACD;;AAED;;;;;;;;mCAKmC;AAAA,UAAtB,IAAsB,uEAAf,KAAK,QAAU;;AACjC,UAAI,cAAc,OAAO,IAAP,CAAY,KAAK,QAAjB,EAA2B,MAA7C;AACA,UAAI,gBAAgB,CAApB,EAAuB;AACrB,aAAK,MAAL,GAAc,IAAd;AACD,OAFD,MAEO;AACL,aAAK,MAAL,GAAc,EAAd;AACA,aAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,cAAI,QAAQ,KAAK,KAAL,CAAW,KAAK,CAAL,CAAX,CAAZ;AACA,cAAI,UAAU,WAAd,EAA2B;AACzB,iBAAK,MAAL,CAAY,IAAZ,CAAiB,KAAK,CAAL,CAAjB;AACD;AACF;AACF;AACF;;;0BAEK,Q,EAAU;AACd,UAAI,OAAO,KAAK,QAAL,CAAc,QAAd,CAAP,KAAoC,WAAxC,EAAqD;AACnD;AACD;;AAED,UAAI,OAAO,KAAK,QAAL,CAAc,QAAd,CAAX;AACA,UAAI,CAAC,IAAL,EAAW;AACT,eAAO,EAAP;AACD;;AAED,WAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,aAAK,KAAL,CAAW,KAAK,CAAL,CAAX;AACD;AACD,aAAO,KAAK,QAAL,CAAc,QAAd,CAAP;;AAEA,WAAK,YAAL;AACD;;;wBA3DW;AACV,aAAO,KAAK,MAAZ;AACD;;;wBA2Dc;AACb,UAAI,UAAU,OAAO,IAAP,CAAY,KAAK,KAAjB,CAAd;AACA,cAAQ,IAAR,CAAa,iBAAb;AACA,aAAO,OAAP;AACD;;;;;;kBA/EkB,S;;;;;;;;;;;;;;kBCRG,K;;AAPxB;;;;;;;;AAEA;AACA;AACA,OAAO,kBAAP,GAA4B,OAAO,kBAAP,IAA6B,EAAzD;AACA,IAAI,SAAS,OAAO,kBAApB;;AAEe,SAAS,KAAT,CAAe,SAAf,EAA0B;AACvC,MAAI,aAAa,OAAO,SAAP,KAAsB,QAAvC,EAAiD;AAC/C,QAAI,CAAC,OAAO,cAAP,CAAsB,SAAtB,CAAL,EAAuC;AACrC,aAAO,SAAP,IAAoB,IAAI,KAAJ,CAAU,SAAV,CAApB;AACD;AACD,WAAO,OAAO,SAAP,CAAP;AACD,GALD,MAKO,IAAI,QAAO,SAAP,yCAAO,SAAP,OAAsB,QAAtB,IAAkC,UAAU,KAA5C,IAAqD,UAAU,GAAnE,EAAwE;AAC7E;AACA,WAAO,SAAP;AACD,GAHM,MAGA,IAAI,MAAM,OAAN,CAAc,SAAd,KACP,UAAU,MAAV,IAAoB,CADb,IAEP,OAAO,UAAU,CAAV,CAAP,KAAyB,QAFtB,EAEgC;AACrC,WAAO,MAAM,UAAU,CAAV,CAAN,CAAP;AACD,GAJM,MAIA;AACL,UAAM,IAAI,KAAJ,CAAU,4BAAV,CAAN;AACD;AACF;;IAEK,K;AACJ,iBAAY,IAAZ,EAAkB;AAAA;;AAChB,SAAK,IAAL,GAAY,IAAZ;AACA,SAAK,KAAL,GAAa,EAAb;AACD;;;;yBAEG,I,EAAM;AACR,UAAI,CAAC,IAAD,IAAS,OAAO,IAAP,KAAiB,QAA9B,EAAwC;AACtC,cAAM,IAAI,KAAJ,CAAU,kBAAV,CAAN;AACD;;AAED,UAAI,CAAC,KAAK,KAAL,CAAW,cAAX,CAA0B,IAA1B,CAAL,EACE,KAAK,KAAL,CAAW,IAAX,IAAmB,kBAAQ,IAAR,EAAc,IAAd,CAAnB;AACF,aAAO,KAAK,KAAL,CAAW,IAAX,CAAP;AACD;;;wBAEG,I,EAAM;AACR,UAAI,CAAC,IAAD,IAAS,OAAO,IAAP,KAAiB,QAA9B,EAAwC;AACtC,cAAM,IAAI,KAAJ,CAAU,kBAAV,CAAN;AACD;;AAED,aAAO,KAAK,KAAL,CAAW,cAAX,CAA0B,IAA1B,CAAP;AACD;;;;;;;;;;;;;;;;AC/CH;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAM,eAAe,qBAAM,SAAN,CAArB;;AAEA,SAAS,IAAT,CAAc,IAAd,EAAoB;AAClB,SAAO,aAAa,GAAb,CAAiB,IAAjB,CAAP;AACD;;AAED,SAAS,GAAT,CAAa,IAAb,EAAmB;AACjB,SAAO,aAAa,GAAb,CAAiB,IAAjB,CAAP;AACD;;AAED,IAAI,OAAO,KAAX,EAAkB;AAChB,SAAO,KAAP,CAAa,uBAAb,CAAqC,qBAArC,EAA4D,UAAS,OAAT,EAAkB;AAC5E,QAAI,OAAO,QAAQ,KAAf,KAA0B,QAA9B,EAAwC;AACtC,2BAAM,QAAQ,KAAd,EAAqB,GAArB,CAAyB,QAAQ,IAAjC,EAAuC,GAAvC,CAA2C,QAAQ,KAAnD;AACD,KAFD,MAEO;AACL,WAAK,QAAQ,IAAb,EAAmB,GAAnB,CAAuB,QAAQ,KAA/B;AACD;AACF,GAND;AAOD;;AAED,IAAM,YAAY;AAChB,wBADgB;AAEhB,OAAK,IAFW;AAGhB,OAAK,GAHW;AAIhB,6CAJgB;AAKhB,oCALgB;AAMhB;AANgB,CAAlB;;AASA;;;kBAGe,S;;AACf,OAAO,SAAP,GAAmB,SAAnB;;;;;;;;;;;QCrCgB,Q,GAAA,Q;QAWA,I,GAAA,I;AAfhB,IAAI,IAAI,OAAO,MAAf;;AAEA,IAAI,WAAW,EAAf;;AAEO,SAAS,QAAT,CAAkB,GAAlB,EAAuB;AAC5B,WAAS,IAAI,SAAb,IAA0B,GAA1B;AACA,MAAI,OAAO,QAAP,IAAmB,OAAO,QAAP,CAAgB,UAAhB,KAA+B,UAAtD,EAAkE;AAChE,MAAE,YAAM;AACN;AACD,KAFD;AAGD,GAJD,MAIO,IAAI,OAAO,QAAX,EAAqB;AAC1B,eAAW,IAAX,EAAiB,GAAjB;AACD;AACF;;AAEM,SAAS,IAAT,GAAgB;AACrB,SAAO,IAAP,CAAY,QAAZ,EAAsB,OAAtB,CAA8B,UAAS,SAAT,EAAoB;AAChD,QAAI,UAAU,SAAS,SAAT,CAAd;AACA,MAAE,MAAM,QAAQ,SAAhB,EAA2B,GAA3B,CAA+B,wBAA/B,EAAyD,IAAzD,CAA8D,UAAS,CAAT,EAAY,EAAZ,EAAgB;AAC5E,mBAAa,OAAb,EAAsB,EAAtB;AACD,KAFD;AAGD,GALD;AAMD;;AAED;AACA,SAAS,OAAT,CAAiB,GAAjB,EAAsB;AACpB,SAAO,IAAI,OAAJ,CAAY,uCAAZ,EAAqD,MAArD,CAAP;AACD;;AAED,SAAS,MAAT,CAAgB,EAAhB,EAAoB;AAClB,MAAI,MAAM,EAAE,EAAF,CAAV;AACA,SAAO,IAAP,CAAY,QAAZ,EAAsB,OAAtB,CAA8B,UAAS,SAAT,EAAoB;AAChD,QAAI,IAAI,QAAJ,CAAa,SAAb,KAA2B,CAAC,IAAI,QAAJ,CAAa,uBAAb,CAAhC,EAAuE;AACrE,UAAI,UAAU,SAAS,SAAT,CAAd;AACA,mBAAa,OAAb,EAAsB,EAAtB;AACD;AACF,GALD;AAMD;;AAED,SAAS,YAAT,CAAsB,OAAtB,EAA+B,EAA/B,EAAmC;AACjC,MAAI,SAAS,EAAE,EAAF,EAAM,IAAN,CAAW,+CAA+C,QAAQ,GAAG,EAAX,CAA/C,GAAgE,IAA3E,CAAb;AACA,MAAI,OAAO,KAAK,KAAL,CAAW,OAAO,CAAP,EAAU,SAArB,CAAX;;AAEA,MAAI,WAAW,QAAQ,OAAR,CAAgB,EAAhB,EAAoB,IAApB,CAAf;AACA,IAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,QAAjC;AACA,IAAE,EAAF,EAAM,QAAN,CAAe,uBAAf;AACD;;AAED,IAAI,OAAO,KAAX,EAAkB;AAChB,MAAI,eAAe,IAAI,OAAO,KAAP,CAAa,YAAjB,EAAnB;AACA,MAAI,KAAI,OAAO,MAAf;AACA,KAAE,MAAF,CAAS,YAAT,EAAuB;AACrB,UAAM,cAAS,KAAT,EAAgB;AACpB,aAAO,GAAE,KAAF,EAAS,IAAT,CAAc,kBAAd,CAAP;AACD,KAHoB;AAIrB,gBAAY,oBAAS,EAAT,EAAa;AACvB,UAAI,CAAC,GAAE,EAAF,EAAM,QAAN,CAAe,uBAAf,CAAL,EAA8C;AAC5C,eAAO,EAAP;AACD;AACF,KARoB;AASrB,WAAO,eAAS,EAAT,EAAa;AAClB,aAAO,GAAG,EAAV;AACD,KAXoB;AAYrB,cAAU,kBAAS,EAAT,EAAa,CAEtB,CAdoB;AAerB,cAAU,kBAAS,EAAT,EAAa,KAAb,EAAoB,CAE7B,CAjBoB;AAkBrB,oBAAgB,wBAAS,EAAT,EAAa,IAAb,EAAmB,CAElC,CApBoB;AAqBrB,eAAW,mBAAS,EAAT,EAAa,QAAb,EAAuB;AAChC,SAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,MAAjC;AACD,KAvBoB;AAwBrB,iBAAa,qBAAS,EAAT,EAAa;AACxB,SAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,OAAjC;AACD;AA1BoB,GAAvB;AA4BA,SAAO,KAAP,CAAa,aAAb,CAA2B,QAA3B,CAAoC,YAApC,EAAkD,wBAAlD;AACD;;;;;;;;AChFD;;IAAY,K;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,+BADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;AAIA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,sBAAJ;AACA,QAAI,MAAM,EAAE,EAAF,CAAV;AACA,QAAI,EAAJ,CAAO,QAAP,EAAiB,wBAAjB,EAA2C,YAAW;AACpD,UAAI,UAAU,IAAI,IAAJ,CAAS,gCAAT,CAAd;AACA,UAAI,QAAQ,MAAR,KAAmB,CAAvB,EAA0B;AACxB,wBAAgB,IAAhB;AACA,iBAAS,KAAT;AACD,OAHD,MAGO;AACL,YAAI,OAAO,EAAX;AACA,gBAAQ,IAAR,CAAa,YAAW;AACtB,eAAK,GAAL,CAAS,KAAK,KAAd,EAAqB,OAArB,CAA6B,UAAS,GAAT,EAAc;AACzC,iBAAK,GAAL,IAAY,IAAZ;AACD,WAFD;AAGD,SAJD;AAKA,YAAI,WAAW,OAAO,IAAP,CAAY,IAAZ,CAAf;AACA,iBAAS,IAAT;AACA,wBAAgB,QAAhB;AACA,iBAAS,GAAT,CAAa,QAAb;AACD;AACF,KAjBD;;AAmBA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AAxCY,CAAf;;;;;;;;ACLA;;IAAY,K;;AACZ;;IAAY,I;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,wBADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;;;AAMA,QAAI,QAAQ,CAAC,EAAC,OAAO,EAAR,EAAY,OAAO,OAAnB,EAAD,CAAZ;AACA,QAAI,QAAQ,KAAK,aAAL,CAAmB,KAAK,KAAxB,CAAZ;AACA,QAAI,OAAO;AACT,eAAS,MAAM,MAAN,CAAa,KAAb,CADA;AAET,kBAAY,OAFH;AAGT,kBAAY,OAHH;AAIT,mBAAa;AAJJ,KAAX;;AAOA,QAAI,SAAS,EAAE,EAAF,EAAM,IAAN,CAAW,QAAX,EAAqB,CAArB,CAAb;;AAEA,QAAI,YAAY,EAAE,MAAF,EAAU,SAAV,CAAoB,IAApB,EAA0B,CAA1B,EAA6B,SAA7C;;AAEA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,sBAAJ;AACA,cAAU,EAAV,CAAa,QAAb,EAAuB,YAAW;AAChC,UAAI,UAAU,KAAV,CAAgB,MAAhB,KAA2B,CAA/B,EAAkC;AAChC,wBAAgB,IAAhB;AACA,iBAAS,KAAT;AACD,OAHD,MAGO;AACL,YAAI,OAAO,EAAX;AACA,kBAAU,KAAV,CAAgB,OAAhB,CAAwB,UAAS,KAAT,EAAgB;AACtC,eAAK,GAAL,CAAS,KAAT,EAAgB,OAAhB,CAAwB,UAAS,GAAT,EAAc;AACpC,iBAAK,GAAL,IAAY,IAAZ;AACD,WAFD;AAGD,SAJD;AAKA,YAAI,WAAW,OAAO,IAAP,CAAY,IAAZ,CAAf;AACA,iBAAS,IAAT;AACA,wBAAgB,QAAhB;AACA,iBAAS,GAAT,CAAa,QAAb;AACD;AACF,KAhBD;;AAkBA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AArDY,CAAf;;;;;;;;;;ACNA;;IAAY,K;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;AACA,IAAI,WAAW,OAAO,QAAtB;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,wBADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;AAIA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,OAAO,EAAX;AACA,QAAI,MAAM,EAAE,EAAF,EAAM,IAAN,CAAW,OAAX,CAAV;AACA,QAAI,WAAW,IAAI,IAAJ,CAAS,WAAT,CAAf;AACA,QAAI,aAAa,IAAI,IAAJ,CAAS,aAAT,CAAjB;AACA,QAAI,QAAQ,IAAI,IAAJ,CAAS,OAAT,CAAZ;AACA,QAAI,sBAAJ;;AAEA;AACA,QAAI,aAAa,MAAjB,EAAyB;AACvB,sBAAgB,SAAS,GAAT,EAAhB;AACA,WAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,eAAO,cAAc,UAAd,EAA0B,IAAI,IAAJ,CAAS,GAAT,CAA1B,CAAP;AACD,OAFD;AAID,KAND,MAMO,IAAI,aAAa,UAAjB,EAA6B;AAClC,UAAI,WAAW,IAAI,IAAJ,CAAS,UAAT,CAAf;AACA,UAAI,QAAJ,EACE,gBAAgB,SAAS,QAAT,CAAkB,QAAlB,CAAhB,CADF,KAGE,gBAAgB,QAAhB;;AAEF,WAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,eAAO,cAAc,UAAd,EAA0B,IAAI,IAAJ,CAAS,GAAT,CAA1B,CAAP;AACD,OAFD;AAGD,KAVM,MAUA,IAAI,aAAa,QAAjB,EAA2B;AAChC,UAAI,OAAO,KAAP,KAAiB,WAArB,EACE,KAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,YAAI,SAAS,KAAK,GAAL,CAAS,EAAT,EAAa,KAAb,CAAb;AACA,eAAO,KAAK,KAAL,CAAW,MAAM,MAAjB,IAA2B,MAAlC;AACD,OAHD;AAIH;;AAED,QAAI,cAAJ,CAAmB,IAAnB;;AAEA,aAAS,QAAT,GAAoB;AAClB,UAAI,SAAS,IAAI,IAAJ,CAAS,gBAAT,EAA2B,MAAxC;;AAEA;AACA,UAAI,gBAAJ;AACA,UAAI,WAAW,IAAI,IAAJ,CAAS,WAAT,CAAf;AACA,UAAI,aAAa,MAAjB,EAAyB;AACvB,kBAAU,iBAAS,GAAT,EAAc;AACtB,iBAAO,cAAc,IAAI,IAAJ,CAAS,CAAC,GAAV,CAAd,CAAP;AACD,SAFD;AAGD,OAJD,MAIO,IAAI,aAAa,UAAjB,EAA6B;AAClC,kBAAU,iBAAS,GAAT,EAAc;AACtB;AACA,iBAAO,CAAC,GAAD,GAAO,IAAd;AACD,SAHD;AAID,OALM,MAKA;AACL,kBAAU,iBAAS,GAAT,EAAc;AAAE,iBAAO,CAAC,GAAR;AAAc,SAAxC;AACD;;AAED,UAAI,IAAI,IAAJ,CAAS,gBAAT,EAA2B,OAA3B,CAAmC,IAAnC,KAA4C,QAAhD,EAA0D;AACxD,eAAO,CAAC,QAAQ,OAAO,IAAf,CAAD,EAAuB,QAAQ,OAAO,EAAf,CAAvB,CAAP;AACD,OAFD,MAEO;AACL,eAAO,QAAQ,OAAO,IAAf,CAAP;AACD;AACF;;AAED,QAAI,gBAAgB,IAApB;;AAEA,QAAI,EAAJ,CAAO,6BAAP,EAAsC,UAAS,KAAT,EAAgB;AACpD,UAAI,CAAC,IAAI,IAAJ,CAAS,UAAT,CAAD,IAAyB,CAAC,IAAI,IAAJ,CAAS,WAAT,CAA9B,EAAqD;AAAA,wBAClC,UADkC;AAAA;AAAA,YAC9C,IAD8C;AAAA,YACxC,EADwC;;AAEnD,YAAI,OAAO,EAAX;AACA,aAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAL,CAAY,MAAhC,EAAwC,GAAxC,EAA6C;AAC3C,cAAI,MAAM,KAAK,MAAL,CAAY,CAAZ,CAAV;AACA,cAAI,OAAO,IAAP,IAAe,OAAO,EAA1B,EAA8B;AAC5B,iBAAK,IAAL,CAAU,KAAK,IAAL,CAAU,CAAV,CAAV;AACD;AACF;AACD,aAAK,IAAL;AACA,iBAAS,GAAT,CAAa,IAAb;AACA,wBAAgB,IAAhB;AACD;AACF,KAdD;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AApHY,CAAf;;AAwHA;AACA,SAAS,QAAT,CAAkB,CAAlB,EAAqB,MAArB,EAA6B;AAC3B,MAAI,MAAM,EAAE,QAAF,EAAV;AACA,SAAO,IAAI,MAAJ,GAAa,MAApB;AACE,UAAM,MAAM,GAAZ;AADF,GAEA,OAAO,GAAP;AACD;;AAED;AACA;AACA,SAAS,aAAT,CAAuB,IAAvB,EAA6B;AAC3B,MAAI,gBAAgB,IAApB,EAA0B;AACxB,WAAO,KAAK,cAAL,KAAwB,GAAxB,GACA,SAAS,KAAK,WAAL,KAAmB,CAA5B,EAA+B,CAA/B,CADA,GACoC,GADpC,GAEA,SAAS,KAAK,UAAL,EAAT,EAA4B,CAA5B,CAFP;AAID,GALD,MAKO;AACL,WAAO,IAAP;AACD;AACF;;;;;;;;;;;;;;ACjJD;;;;AACA;;;;AACA;;IAAY,I;;;;;;;;AAEZ;;;;;;;;;;;;;;;;IAgBa,e,WAAA,e;AAEX,6BAA4C;AAAA,QAAhC,KAAgC,uEAAxB,IAAwB;AAAA,QAAlB,SAAkB,uEAAN,IAAM;;AAAA;;AAC1C,SAAK,WAAL,GAAmB,sBAAnB;AACA,SAAK,QAAL,GAAgB,IAAI,KAAK,mBAAT,CAA6B,KAAK,WAAlC,CAAhB;;AAEA;AACA,SAAK,MAAL,GAAc,IAAd;AACA;AACA,SAAK,IAAL,GAAY,IAAZ;AACA;AACA,SAAK,eAAL,GAAuB,IAAvB;;AAEA,SAAK,UAAL,GAAkB,KAAK,MAAL,CAAY,EAAE,QAAQ,IAAV,EAAZ,EAA8B,SAA9B,CAAlB;;AAEA,SAAK,QAAL,CAAc,KAAd;AACD;;AAED;;;;;;;;;;;;;;;;;6BAaS,K,EAAO;AAAA;;AACd;AACA,UAAI,KAAK,MAAL,KAAgB,KAApB,EACE;AACF;AACA,UAAI,CAAC,KAAK,MAAN,IAAgB,CAAC,KAArB,EACE;;AAEF,UAAI,KAAK,IAAT,EAAe;AACb,aAAK,IAAL,CAAU,GAAV,CAAc,QAAd,EAAwB,KAAK,eAA7B;AACA,aAAK,IAAL,GAAY,IAAZ;AACA,aAAK,eAAL,GAAuB,IAAvB;AACD;;AAED,WAAK,MAAL,GAAc,KAAd;;AAEA,UAAI,KAAJ,EAAW;AACT,aAAK,IAAL,GAAY,qBAAI,KAAJ,EAAW,GAAX,CAAe,WAAf,CAAZ;AACA,YAAI,MAAM,KAAK,IAAL,CAAU,EAAV,CAAa,QAAb,EAAuB,UAAC,CAAD,EAAO;AACtC,gBAAK,WAAL,CAAiB,OAAjB,CAAyB,QAAzB,EAAmC,CAAnC;AACD,SAFS,CAAV;AAGA,aAAK,eAAL,GAAuB,GAAvB;AACD;AACF;;AAED;;;;;;;;;;;;;;;AAcA;;;;;oCAKgB,S,EAAW;AACzB;AACA,aAAO,KAAK,MAAL,CAAY,EAAZ,EACL,KAAK,UAAL,GAAkB,KAAK,UAAvB,GAAoC,IAD/B,EAEL,YAAY,SAAZ,GAAwB,IAFnB,CAAP;AAGD;;AAED;;;;;;;;;;;;;;;wBAYI,Y,EAAc,S,EAAW;AAC3B,UAAI,KAAK,IAAT,EACE,KAAK,IAAL,CAAU,GAAV,CAAc,YAAd,EAA4B,KAAK,eAAL,CAAqB,SAArB,CAA5B;AACH;;AAED;;;;;;;;;;;;;0BAUM,S,EAAW;AACf,UAAI,KAAK,IAAT,EACE,KAAK,GAAL,CAAS,KAAK,CAAd,EAAiB,KAAK,eAAL,CAAqB,SAArB,CAAjB;AACH;;AAED;;;;;;;;;;;;;uBAUG,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;AAED;;;;;;;;;;;wBAQI,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAP;AACD;;AAED;;;;;;;;4BAKQ;AACN,WAAK,QAAL,CAAc,kBAAd;AACA,WAAK,QAAL,CAAc,IAAd;AACD;;;wBAlFW;AACV,aAAO,KAAK,IAAL,GAAY,KAAK,IAAL,CAAU,GAAV,EAAZ,GAA8B,IAArC;AACD;;;;;;AAmFH;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;QCpLgB,M,GAAA,M;QAeA,W,GAAA,W;QAQA,e,GAAA,e;QAoCA,a,GAAA,a;;;;AA3DT,SAAS,MAAT,CAAgB,MAAhB,EAAoC;AAAA,oCAAT,OAAS;AAAT,WAAS;AAAA;;AACzC,OAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,QAAQ,MAA5B,EAAoC,GAApC,EAAyC;AACvC,QAAI,MAAM,QAAQ,CAAR,CAAV;AACA,QAAI,OAAO,GAAP,KAAgB,WAAhB,IAA+B,QAAQ,IAA3C,EACE;;AAEF,SAAK,IAAI,GAAT,IAAgB,GAAhB,EAAqB;AACnB,UAAI,IAAI,cAAJ,CAAmB,GAAnB,CAAJ,EAA6B;AAC3B,eAAO,GAAP,IAAc,IAAI,GAAJ,CAAd;AACD;AACF;AACF;AACD,SAAO,MAAP;AACD;;AAEM,SAAS,WAAT,CAAqB,IAArB,EAA2B;AAChC,OAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,QAAI,KAAK,CAAL,KAAW,KAAK,IAAE,CAAP,CAAf,EAA0B;AACxB,YAAM,IAAI,KAAJ,CAAU,0CAAV,CAAN;AACD;AACF;AACF;;AAEM,SAAS,eAAT,CAAyB,CAAzB,EAA4B,CAA5B,EAA+B;AACpC,MAAI,MAAM,CAAV;AACA,MAAI,MAAM,CAAV;;AAEA,MAAI,CAAC,CAAL,EAAQ,IAAI,EAAJ;AACR,MAAI,CAAC,CAAL,EAAQ,IAAI,EAAJ;;AAER,MAAI,SAAS,EAAb;AACA,MAAI,SAAS,EAAb;;AAEA,cAAY,CAAZ;AACA,cAAY,CAAZ;;AAEA,SAAO,MAAM,EAAE,MAAR,IAAkB,MAAM,EAAE,MAAjC,EAAyC;AACvC,QAAI,EAAE,GAAF,MAAW,EAAE,GAAF,CAAf,EAAuB;AACrB;AACA;AACD,KAHD,MAGO,IAAI,EAAE,GAAF,IAAS,EAAE,GAAF,CAAb,EAAqB;AAC1B,aAAO,IAAP,CAAY,EAAE,KAAF,CAAZ;AACD,KAFM,MAEA;AACL,aAAO,IAAP,CAAY,EAAE,KAAF,CAAZ;AACD;AACF;;AAED,MAAI,MAAM,EAAE,MAAZ,EACE,SAAS,OAAO,MAAP,CAAc,EAAE,KAAF,CAAQ,GAAR,CAAd,CAAT;AACF,MAAI,MAAM,EAAE,MAAZ,EACE,SAAS,OAAO,MAAP,CAAc,EAAE,KAAF,CAAQ,GAAR,CAAd,CAAT;AACF,SAAO;AACL,aAAS,MADJ;AAEL,WAAO;AAFF,GAAP;AAID;;AAED;AACA;AACO,SAAS,aAAT,CAAuB,EAAvB,EAA2B;AAChC,MAAI,QAAQ,EAAZ;AACA,MAAI,eAAJ;AACA,OAAK,IAAI,IAAT,IAAiB,EAAjB,EAAqB;AACnB,QAAI,GAAG,cAAH,CAAkB,IAAlB,CAAJ,EACE,MAAM,IAAN,CAAW,IAAX;AACF,QAAI,QAAO,GAAG,IAAH,CAAP,MAAqB,QAArB,IAAiC,OAAO,GAAG,IAAH,EAAS,MAAhB,KAA4B,WAAjE,EAA8E;AAC5E,YAAM,IAAI,KAAJ,CAAU,2BAAV,CAAN;AACD,KAFD,MAEO,IAAI,OAAO,MAAP,KAAmB,WAAnB,IAAkC,WAAW,GAAG,IAAH,EAAS,MAA1D,EAAkE;AACvE,YAAM,IAAI,KAAJ,CAAU,8CAAV,CAAN;AACD;AACD,aAAS,GAAG,IAAH,EAAS,MAAlB;AACD;AACD,MAAI,UAAU,EAAd;AACA,MAAI,aAAJ;AACA,OAAK,IAAI,MAAM,CAAf,EAAkB,MAAM,MAAxB,EAAgC,KAAhC,EAAuC;AACrC,WAAO,EAAP;AACA,SAAK,IAAI,MAAM,CAAf,EAAkB,MAAM,MAAM,MAA9B,EAAsC,KAAtC,EAA6C;AAC3C,WAAK,MAAM,GAAN,CAAL,IAAmB,GAAG,MAAM,GAAN,CAAH,EAAe,GAAf,CAAnB;AACD;AACD,YAAQ,IAAR,CAAa,IAAb;AACD;AACD,SAAO,OAAP;AACD;;AAED;;;;;;;IAMa,mB,WAAA,mB;AACX,+BAAY,OAAZ,EAAqB;AAAA;;AACnB,SAAK,QAAL,GAAgB,OAAhB;AACA,SAAK,KAAL,GAAa,EAAb;AACD;;;;uBAEE,S,EAAW,Q,EAAU;AACtB,UAAI,MAAM,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAV;AACA,WAAK,KAAL,CAAW,GAAX,IAAkB,SAAlB;AACA,aAAO,GAAP;AACD;;;wBAEG,S,EAAW,Q,EAAU;AACvB,UAAI,MAAM,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAV;AACA,UAAI,GAAJ,EAAS;AACP,eAAO,KAAK,KAAL,CAAW,GAAX,CAAP;AACD;AACD,aAAO,GAAP;AACD;;;yCAEoB;AAAA;;AACnB,UAAI,eAAe,KAAK,KAAxB;AACA,WAAK,KAAL,GAAa,EAAb;AACA,aAAO,IAAP,CAAY,YAAZ,EAA0B,OAA1B,CAAkC,UAAC,GAAD,EAAS;AACzC,cAAK,QAAL,CAAc,GAAd,CAAkB,aAAa,GAAb,CAAlB,EAAqC,GAArC;AACD,OAFD;AAGD;;;;;;;;;;;;;;;;;;ACpHH;;;;;;;;IAEqB,G;AACnB,eAAY,KAAZ,EAAmB,IAAnB,EAAyB,YAAa,KAAtC,EAA6C;AAAA;;AAC3C,SAAK,MAAL,GAAc,KAAd;AACA,SAAK,KAAL,GAAa,IAAb;AACA,SAAK,MAAL,GAAc,KAAd;AACA,SAAK,OAAL,GAAe,sBAAf;AACD;;;;0BAEK;AACJ,aAAO,KAAK,MAAZ;AACD;;;wBAEG,K,EAAO,YAAa,K,EAAO;AAC7B,UAAI,KAAK,MAAL,KAAgB,KAApB,EAA2B;AACzB;AACA;AACD;AACD,UAAI,WAAW,KAAK,MAApB;AACA,WAAK,MAAL,GAAc,KAAd;AACA;AACA,UAAI,MAAM,EAAV;AACA,UAAI,SAAS,QAAO,KAAP,yCAAO,KAAP,OAAkB,QAA/B,EAAyC;AACvC,aAAK,IAAI,CAAT,IAAc,KAAd,EAAqB;AACnB,cAAI,MAAM,cAAN,CAAqB,CAArB,CAAJ,EACE,IAAI,CAAJ,IAAS,MAAM,CAAN,CAAT;AACH;AACF;AACD,UAAI,QAAJ,GAAe,QAAf;AACA,UAAI,KAAJ,GAAY,KAAZ;AACA,WAAK,OAAL,CAAa,OAAb,CAAqB,QAArB,EAA+B,GAA/B,EAAoC,IAApC;;AAEA;AACA;AACA,UAAI,OAAO,KAAP,IAAgB,OAAO,KAAP,CAAa,aAAjC,EAAgD;AAC9C,eAAO,KAAP,CAAa,aAAb,CACE,mBACG,KAAK,MAAL,CAAY,IAAZ,KAAqB,IAArB,GAA4B,KAAK,MAAL,CAAY,IAAZ,GAAmB,GAA/C,GAAqD,EADxD,IAEE,KAAK,KAHT,EAIE,OAAO,KAAP,KAAkB,WAAlB,GAAgC,IAAhC,GAAuC,KAJzC;AAMD;AACF;;;uBAEE,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,OAAL,CAAa,EAAb,CAAgB,SAAhB,EAA2B,QAA3B,CAAP;AACD;;;wBAEG,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,OAAL,CAAa,GAAb,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;;;;;kBAjDkB,G", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Combine the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Close the handle. This clears this handle's contribution to the filter set,\n * and unsubscribes all event listeners.\n */\n close() {\n this._emitter.removeAllListeners();\n this.clear();\n this.setGroup(null);\n }\n\n /**\n * Clear this handle's contribution to the filter set.\n *\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n clear(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.clear(this._id);\n this._onChange(extraInfo);\n }\n\n /**\n * Set this handle's contribution to the filter set. This array should consist\n * of the keys of the rows that _should_ be displayed; any keys that are not\n * present in the array will be considered _filtered out_. Note that multiple\n * `FilterHandle` instances in the group may each contribute an array of keys,\n * and only those keys that appear in _all_ of the arrays make it through the\n * filter.\n *\n * @param {string[]} keys - Empty array, or array of keys. To clear the\n * filter, don't pass an empty array; instead, use the\n * {@link FilterHandle#clear} method.\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n set(keys, extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.update(this._id, keys);\n this._onChange(extraInfo);\n }\n\n /**\n * @return {string[]|null} - Either: 1) an array of keys that made it through\n * all of the `FilterHandle` instances, or, 2) `null`, which means no filter\n * is being applied (all data should be displayed).\n */\n get filteredKeys() {\n return this._filterSet ? this._filterSet.value : null;\n }\n\n /**\n * Subscribe to events on this `FilterHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {FilterHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link FilterHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancel event subscriptions created by {@link FilterHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|FilterHandle~listener} listener - Either the callback\n * function previously passed into {@link FilterHandle#on}, or the\n * string that was returned from {@link FilterHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n _onChange(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterVar.set(this._filterSet.value, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * @callback FilterHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the filter set, or `null` if no filter set is active),\n * `oldValue` (the previous value of the filter set), and `sender` (the\n * `FilterHandle` instance that made the change).\n */\n\n}\n\n/**\n * @event FilterHandle#change\n * @type {object}\n * @property {object} value - The new value of the filter set, or `null`\n * if no filter set is active.\n * @property {object} oldValue - The previous value of the filter set.\n * @property {FilterHandle} sender - The `FilterHandle` instance that\n * changed the value.\n */\n", + "import { diffSortedLists } from \"./util\";\n\nfunction naturalComparator(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n }\n}\n\n/**\n * @private\n */\nexport default class FilterSet {\n constructor() {\n this.reset();\n }\n\n reset() {\n // Key: handle ID, Value: array of selected keys, or null\n this._handles = {};\n // Key: key string, Value: count of handles that include it\n this._keys = {};\n this._value = null;\n this._activeHandles = 0;\n }\n\n get value() {\n return this._value;\n }\n\n update(handleId, keys) {\n if (keys !== null) {\n keys = keys.slice(0); // clone before sorting\n keys.sort(naturalComparator);\n }\n\n let {added, removed} = diffSortedLists(this._handles[handleId], keys);\n this._handles[handleId] = keys;\n\n for (let i = 0; i < added.length; i++) {\n this._keys[added[i]] = (this._keys[added[i]] || 0) + 1;\n }\n for (let i = 0; i < removed.length; i++) {\n this._keys[removed[i]]--;\n }\n\n this._updateValue(keys);\n }\n\n /**\n * @param {string[]} keys Sorted array of strings that indicate\n * a superset of possible keys.\n * @private\n */\n _updateValue(keys = this._allKeys) {\n let handleCount = Object.keys(this._handles).length;\n if (handleCount === 0) {\n this._value = null;\n } else {\n this._value = [];\n for (let i = 0; i < keys.length; i++) {\n let count = this._keys[keys[i]];\n if (count === handleCount) {\n this._value.push(keys[i]);\n }\n }\n }\n }\n\n clear(handleId) {\n if (typeof(this._handles[handleId]) === \"undefined\") {\n return;\n }\n\n let keys = this._handles[handleId];\n if (!keys) {\n keys = [];\n }\n\n for (let i = 0; i < keys.length; i++) {\n this._keys[keys[i]]--;\n }\n delete this._handles[handleId];\n\n this._updateValue();\n }\n\n get _allKeys() {\n let allKeys = Object.keys(this._keys);\n allKeys.sort(naturalComparator);\n return allKeys;\n }\n}\n", + "import Var from \"./var\";\n\n// Use a global so that multiple copies of crosstalk.js can be loaded and still\n// have groups behave as singletons across all copies.\nglobal.__crosstalk_groups = global.__crosstalk_groups || {};\nlet groups = global.__crosstalk_groups;\n\nexport default function group(groupName) {\n if (groupName && typeof(groupName) === \"string\") {\n if (!groups.hasOwnProperty(groupName)) {\n groups[groupName] = new Group(groupName);\n }\n return groups[groupName];\n } else if (typeof(groupName) === \"object\" && groupName._vars && groupName.var) {\n // Appears to already be a group object\n return groupName;\n } else if (Array.isArray(groupName) &&\n groupName.length == 1 &&\n typeof(groupName[0]) === \"string\") {\n return group(groupName[0]);\n } else {\n throw new Error(\"Invalid groupName argument\");\n }\n}\n\nclass Group {\n constructor(name) {\n this.name = name;\n this._vars = {};\n }\n\n var(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n if (!this._vars.hasOwnProperty(name))\n this._vars[name] = new Var(this, name);\n return this._vars[name];\n }\n\n has(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n return this._vars.hasOwnProperty(name);\n }\n}\n", + "import group from \"./group\";\nimport { SelectionHandle } from \"./selection\";\nimport { FilterHandle } from \"./filter\";\nimport { bind } from \"./input\";\nimport \"./input_selectize\";\nimport \"./input_checkboxgroup\";\nimport \"./input_slider\";\n\nconst defaultGroup = group(\"default\");\n\nfunction var_(name) {\n return defaultGroup.var(name);\n}\n\nfunction has(name) {\n return defaultGroup.has(name);\n}\n\nif (global.Shiny) {\n global.Shiny.addCustomMessageHandler(\"update-client-value\", function(message) {\n if (typeof(message.group) === \"string\") {\n group(message.group).var(message.name).set(message.value);\n } else {\n var_(message.name).set(message.value);\n }\n });\n}\n\nconst crosstalk = {\n group: group,\n var: var_,\n has: has,\n SelectionHandle: SelectionHandle,\n FilterHandle: FilterHandle,\n bind: bind\n};\n\n/**\n * @namespace crosstalk\n */\nexport default crosstalk;\nglobal.crosstalk = crosstalk;\n", + "let $ = global.jQuery;\n\nlet bindings = {};\n\nexport function register(reg) {\n bindings[reg.className] = reg;\n if (global.document && global.document.readyState !== \"complete\") {\n $(() => {\n bind();\n });\n } else if (global.document) {\n setTimeout(bind, 100);\n }\n}\n\nexport function bind() {\n Object.keys(bindings).forEach(function(className) {\n let binding = bindings[className];\n $(\".\" + binding.className).not(\".crosstalk-input-bound\").each(function(i, el) {\n bindInstance(binding, el);\n });\n });\n}\n\n// Escape jQuery identifier\nfunction $escape(val) {\n return val.replace(/([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n}\n\nfunction bindEl(el) {\n let $el = $(el);\n Object.keys(bindings).forEach(function(className) {\n if ($el.hasClass(className) && !$el.hasClass(\"crosstalk-input-bound\")) {\n let binding = bindings[className];\n bindInstance(binding, el);\n }\n });\n}\n\nfunction bindInstance(binding, el) {\n let jsonEl = $(el).find(\"script[type='application/json'][data-for='\" + $escape(el.id) + \"']\");\n let data = JSON.parse(jsonEl[0].innerText);\n\n let instance = binding.factory(el, data);\n $(el).data(\"crosstalk-instance\", instance);\n $(el).addClass(\"crosstalk-input-bound\");\n}\n\nif (global.Shiny) {\n let inputBinding = new global.Shiny.InputBinding();\n let $ = global.jQuery;\n $.extend(inputBinding, {\n find: function(scope) {\n return $(scope).find(\".crosstalk-input\");\n },\n initialize: function(el) {\n if (!$(el).hasClass(\"crosstalk-input-bound\")) {\n bindEl(el);\n }\n },\n getId: function(el) {\n return el.id;\n },\n getValue: function(el) {\n\n },\n setValue: function(el, value) {\n\n },\n receiveMessage: function(el, data) {\n\n },\n subscribe: function(el, callback) {\n $(el).data(\"crosstalk-instance\").resume();\n },\n unsubscribe: function(el) {\n $(el).data(\"crosstalk-instance\").suspend();\n }\n });\n global.Shiny.inputBindings.register(inputBinding, \"crosstalk.inputBinding\");\n}\n", + "import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-checkboxgroup\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n let $el = $(el);\n $el.on(\"change\", \"input[type='checkbox']\", function() {\n let checked = $el.find(\"input[type='checkbox']:checked\");\n if (checked.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n checked.each(function() {\n data.map[this.value].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n", + "import * as input from \"./input\";\nimport * as util from \"./util\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-select\",\n\n factory: function(el, data) {\n /*\n * items: {value: [...], label: [...]}\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n\n let first = [{value: \"\", label: \"(All)\"}];\n let items = util.dataframeToD3(data.items);\n let opts = {\n options: first.concat(items),\n valueField: \"value\",\n labelField: \"label\",\n searchField: \"label\"\n };\n\n let select = $(el).find(\"select\")[0];\n\n let selectize = $(select).selectize(opts)[0].selectize;\n\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n selectize.on(\"change\", function() {\n if (selectize.items.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n selectize.items.forEach(function(group) {\n data.map[group].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n", + "import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\nlet strftime = global.strftime;\n\ninput.register({\n className: \"crosstalk-input-slider\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let opts = {};\n let $el = $(el).find(\"input\");\n let dataType = $el.data(\"data-type\");\n let timeFormat = $el.data(\"time-format\");\n let round = $el.data(\"round\");\n let timeFormatter;\n\n // Set up formatting functions\n if (dataType === \"date\") {\n timeFormatter = strftime.utc();\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n\n } else if (dataType === \"datetime\") {\n let timezone = $el.data(\"timezone\");\n if (timezone)\n timeFormatter = strftime.timezone(timezone);\n else\n timeFormatter = strftime;\n\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n } else if (dataType === \"number\") {\n if (typeof round !== \"undefined\")\n opts.prettify = function(num) {\n let factor = Math.pow(10, round);\n return Math.round(num * factor) / factor;\n };\n }\n\n $el.ionRangeSlider(opts);\n\n function getValue() {\n let result = $el.data(\"ionRangeSlider\").result;\n\n // Function for converting numeric value from slider to appropriate type.\n let convert;\n let dataType = $el.data(\"data-type\");\n if (dataType === \"date\") {\n convert = function(val) {\n return formatDateUTC(new Date(+val));\n };\n } else if (dataType === \"datetime\") {\n convert = function(val) {\n // Convert ms to s\n return +val / 1000;\n };\n } else {\n convert = function(val) { return +val; };\n }\n\n if ($el.data(\"ionRangeSlider\").options.type === \"double\") {\n return [convert(result.from), convert(result.to)];\n } else {\n return convert(result.from);\n }\n }\n\n let lastKnownKeys = null;\n\n $el.on(\"change.crosstalkSliderInput\", function(event) {\n if (!$el.data(\"updating\") && !$el.data(\"animating\")) {\n let [from, to] = getValue();\n let keys = [];\n for (let i = 0; i < data.values.length; i++) {\n let val = data.values[i];\n if (val >= from && val <= to) {\n keys.push(data.keys[i]);\n }\n }\n keys.sort();\n ctHandle.set(keys);\n lastKnownKeys = keys;\n }\n });\n\n\n // let $el = $(el);\n // $el.on(\"change\", \"input[type=\"checkbox\"]\", function() {\n // let checked = $el.find(\"input[type=\"checkbox\"]:checked\");\n // if (checked.length === 0) {\n // ctHandle.clear();\n // } else {\n // let keys = {};\n // checked.each(function() {\n // data.map[this.value].forEach(function(key) {\n // keys[key] = true;\n // });\n // });\n // let keyArray = Object.keys(keys);\n // keyArray.sort();\n // ctHandle.set(keyArray);\n // }\n // });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n\n\n// Convert a number to a string with leading zeros\nfunction padZeros(n, digits) {\n let str = n.toString();\n while (str.length < digits)\n str = \"0\" + str;\n return str;\n}\n\n// Given a Date object, return a string in yyyy-mm-dd format, using the\n// UTC date. This may be a day off from the date in the local time zone.\nfunction formatDateUTC(date) {\n if (date instanceof Date) {\n return date.getUTCFullYear() + \"-\" +\n padZeros(date.getUTCMonth()+1, 2) + \"-\" +\n padZeros(date.getUTCDate(), 2);\n\n } else {\n return null;\n }\n}\n", + "import Events from \"./events\";\nimport grp from \"./group\";\nimport * as util from \"./util\";\n\n/**\n * Use this class to read and write (and listen for changes to) the selection\n * for a Crosstalk group. This is intended to be used for linked brushing.\n *\n * If two (or more) `SelectionHandle` instances in the same webpage share the\n * same group name, they will share the same state. Setting the selection using\n * one `SelectionHandle` instance will result in the `value` property instantly\n * changing across the others, and `\"change\"` event listeners on all instances\n * (including the one that initiated the sending) will fire.\n *\n * @param {string} [group] - The name of the Crosstalk group, or if none,\n * null or undefined (or any other falsy value). This can be changed later\n * via the [SelectionHandle#setGroup](#setGroup) method.\n * @param {Object} [extraInfo] - An object whose properties will be copied to\n * the event object whenever an event is emitted.\n */\nexport class SelectionHandle {\n\n constructor(group = null, extraInfo = null) {\n this._eventRelay = new Events();\n this._emitter = new util.SubscriptionTracker(this._eventRelay);\n\n // Name of the group we're currently tracking, if any. Can change over time.\n this._group = null;\n // The Var we're currently tracking, if any. Can change over time.\n this._var = null;\n // The event handler subscription we currently have on var.on(\"change\").\n this._varOnChangeSub = null;\n\n this._extraInfo = util.extend({ sender: this }, extraInfo);\n\n this.setGroup(group);\n }\n\n /**\n * Changes the Crosstalk group membership of this SelectionHandle. The group\n * being switched away from (if any) will not have its selection value\n * modified as a result of calling `setGroup`, even if this handle was the\n * most recent handle to set the selection of the group.\n *\n * The group being switched to (if any) will also not have its selection value\n * modified as a result of calling `setGroup`. If you want to set the\n * selection value of the new group, call `set` explicitly.\n *\n * @param {string} group - The name of the Crosstalk group, or null (or\n * undefined) to clear the group.\n */\n setGroup(group) {\n // If group is unchanged, do nothing\n if (this._group === group)\n return;\n // Treat null, undefined, and other falsy values the same\n if (!this._group && !group)\n return;\n\n if (this._var) {\n this._var.off(\"change\", this._varOnChangeSub);\n this._var = null;\n this._varOnChangeSub = null;\n }\n\n this._group = group;\n\n if (group) {\n this._var = grp(group).var(\"selection\");\n let sub = this._var.on(\"change\", (e) => {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Retrieves the current selection for the group represented by this\n * `SelectionHandle`.\n *\n * - If no selection is active, then this value will be falsy.\n * - If a selection is active, but no data points are selected, then this\n * value will be an empty array.\n * - If a selection is active, and data points are selected, then the keys\n * of the selected data points will be present in the array.\n */\n get value() {\n return this._var ? this._var.get() : null;\n }\n\n /**\n * Combines the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n // Important incidental effect: shallow clone is returned\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see\n * {@link SelectionHandle#value}).\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `SelectionHandle` constructor).\n */\n set(selectedKeys, extraInfo) {\n if (this._var)\n this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any that were passed\n * into the `SelectionHandle` constructor).\n */\n clear(extraInfo) {\n if (this._var)\n this.set(void 0, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Subscribes to events on this `SelectionHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {SelectionHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancels event subscriptions created by {@link SelectionHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|SelectionHandle~listener} listener - Either the callback\n * function previously passed into {@link SelectionHandle#on}, or the\n * string that was returned from {@link SelectionHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n /**\n * Shuts down the `SelectionHandle` object.\n *\n * Removes all event listeners that were added through this handle.\n */\n close() {\n this._emitter.removeAllListeners();\n this.setGroup(null);\n }\n}\n\n/**\n * @callback SelectionHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the selection, or `undefined` if no selection is active),\n * `oldValue` (the previous value of the selection), and `sender` (the\n * `SelectionHandle` instance that made the change).\n */\n\n/**\n * @event SelectionHandle#change\n * @type {object}\n * @property {object} value - The new value of the selection, or `undefined`\n * if no selection is active.\n * @property {object} oldValue - The previous value of the selection.\n * @property {SelectionHandle} sender - The `SelectionHandle` instance that\n * changed the value.\n */\n", + "export function extend(target, ...sources) {\n for (let i = 0; i < sources.length; i++) {\n let src = sources[i];\n if (typeof(src) === \"undefined\" || src === null)\n continue;\n\n for (let key in src) {\n if (src.hasOwnProperty(key)) {\n target[key] = src[key];\n }\n }\n }\n return target;\n}\n\nexport function checkSorted(list) {\n for (let i = 1; i < list.length; i++) {\n if (list[i] <= list[i-1]) {\n throw new Error(\"List is not sorted or contains duplicate\");\n }\n }\n}\n\nexport function diffSortedLists(a, b) {\n let i_a = 0;\n let i_b = 0;\n\n if (!a) a = [];\n if (!b) b = [];\n\n let a_only = [];\n let b_only = [];\n\n checkSorted(a);\n checkSorted(b);\n\n while (i_a < a.length && i_b < b.length) {\n if (a[i_a] === b[i_b]) {\n i_a++;\n i_b++;\n } else if (a[i_a] < b[i_b]) {\n a_only.push(a[i_a++]);\n } else {\n b_only.push(b[i_b++]);\n }\n }\n\n if (i_a < a.length)\n a_only = a_only.concat(a.slice(i_a));\n if (i_b < b.length)\n b_only = b_only.concat(b.slice(i_b));\n return {\n removed: a_only,\n added: b_only\n };\n}\n\n// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... }\n// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ]\nexport function dataframeToD3(df) {\n let names = [];\n let length;\n for (let name in df) {\n if (df.hasOwnProperty(name))\n names.push(name);\n if (typeof(df[name]) !== \"object\" || typeof(df[name].length) === \"undefined\") {\n throw new Error(\"All fields must be arrays\");\n } else if (typeof(length) !== \"undefined\" && length !== df[name].length) {\n throw new Error(\"All fields must be arrays of the same length\");\n }\n length = df[name].length;\n }\n let results = [];\n let item;\n for (let row = 0; row < length; row++) {\n item = {};\n for (let col = 0; col < names.length; col++) {\n item[names[col]] = df[names[col]][row];\n }\n results.push(item);\n }\n return results;\n}\n\n/**\n * Keeps track of all event listener additions/removals and lets all active\n * listeners be removed with a single operation.\n *\n * @private\n */\nexport class SubscriptionTracker {\n constructor(emitter) {\n this._emitter = emitter;\n this._subs = {};\n }\n\n on(eventType, listener) {\n let sub = this._emitter.on(eventType, listener);\n this._subs[sub] = eventType;\n return sub;\n }\n\n off(eventType, listener) {\n let sub = this._emitter.off(eventType, listener);\n if (sub) {\n delete this._subs[sub];\n }\n return sub;\n }\n\n removeAllListeners() {\n let current_subs = this._subs;\n this._subs = {};\n Object.keys(current_subs).forEach((sub) => {\n this._emitter.off(current_subs[sub], sub);\n });\n }\n}\n", + "import Events from \"./events\";\n\nexport default class Var {\n constructor(group, name, /*optional*/ value) {\n this._group = group;\n this._name = name;\n this._value = value;\n this._events = new Events();\n }\n\n get() {\n return this._value;\n }\n\n set(value, /*optional*/ event) {\n if (this._value === value) {\n // Do nothing; the value hasn't changed\n return;\n }\n let oldValue = this._value;\n this._value = value;\n // Alert JavaScript listeners that the value has changed\n let evt = {};\n if (event && typeof(event) === \"object\") {\n for (let k in event) {\n if (event.hasOwnProperty(k))\n evt[k] = event[k];\n }\n }\n evt.oldValue = oldValue;\n evt.value = value;\n this._events.trigger(\"change\", evt, this);\n\n // TODO: Make this extensible, to let arbitrary back-ends know that\n // something has changed\n if (global.Shiny && global.Shiny.onInputChange) {\n global.Shiny.onInputChange(\n \".clientValue-\" +\n (this._group.name !== null ? this._group.name + \"-\" : \"\") +\n this._name,\n typeof(value) === \"undefined\" ? null : value\n );\n }\n }\n\n on(eventType, listener) {\n return this._events.on(eventType, listener);\n }\n\n off(eventType, listener) {\n return this._events.off(eventType, listener);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.min.js b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.min.js new file mode 100644 index 00000000..b7ec0ac9 --- /dev/null +++ b/docs/articles/variable_details_files/crosstalk-1.1.1/js/crosstalk.min.js @@ -0,0 +1,2 @@ +!function o(u,a,l){function s(n,e){if(!a[n]){if(!u[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(f)return f(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[n]={exports:{}};u[n][0].call(i.exports,function(e){var t=u[n][1][e];return s(t||e)},i,i.exports,o,u,a,l)}return a[n].exports}for(var f="function"==typeof require&&require,e=0;e?@[\\\]^`{|}~])/g,"\\$1")+"']"),r=JSON.parse(n[0].innerText),i=e.factory(t,r);o(t).data("crosstalk-instance",i),o(t).addClass("crosstalk-input-bound")}if(t.Shiny){var e=new t.Shiny.InputBinding,u=t.jQuery;u.extend(e,{find:function(e){return u(e).find(".crosstalk-input")},initialize:function(e){var t,n;u(e).hasClass("crosstalk-input-bound")||(n=o(t=e),Object.keys(r).forEach(function(e){n.hasClass(e)&&!n.hasClass("crosstalk-input-bound")&&i(r[e],t)}))},getId:function(e){return e.id},getValue:function(e){},setValue:function(e,t){},receiveMessage:function(e,t){},subscribe:function(e,t){u(e).data("crosstalk-instance").resume()},unsubscribe:function(e){u(e).data("crosstalk-instance").suspend()}}),t.Shiny.inputBindings.register(e,"crosstalk.inputBinding")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(r,e,t){(function(e){"use strict";var t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(r("./input")),n=r("./filter");var a=e.jQuery;t.register({className:"crosstalk-input-checkboxgroup",factory:function(e,r){var i=new n.FilterHandle(r.group),o=void 0,u=a(e);return u.on("change","input[type='checkbox']",function(){var e=u.find("input[type='checkbox']:checked");if(0===e.length)o=null,i.clear();else{var t={};e.each(function(){r.map[this.value].forEach(function(e){t[e]=!0})});var n=Object.keys(t);n.sort(),o=n,i.set(n)}}),{suspend:function(){i.clear()},resume:function(){o&&i.set(o)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6}],8:[function(r,e,t){(function(e){"use strict";var t=n(r("./input")),l=n(r("./util")),s=r("./filter");function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var f=e.jQuery;t.register({className:"crosstalk-input-select",factory:function(e,n){var t=l.dataframeToD3(n.items),r={options:[{value:"",label:"(All)"}].concat(t),valueField:"value",labelField:"label",searchField:"label"},i=f(e).find("select")[0],o=f(i).selectize(r)[0].selectize,u=new s.FilterHandle(n.group),a=void 0;return o.on("change",function(){if(0===o.items.length)a=null,u.clear();else{var t={};o.items.forEach(function(e){n.map[e].forEach(function(e){t[e]=!0})});var e=Object.keys(t);e.sort(),a=e,u.set(e)}}),{suspend:function(){u.clear()},resume:function(){a&&u.set(a)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6,"./util":11}],9:[function(n,e,t){(function(e){"use strict";var d=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n("./input")),a=n("./filter");var v=e.jQuery,p=e.strftime;function y(e,t){for(var n=e.toString();n.length {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Combine the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Close the handle. This clears this handle's contribution to the filter set,\n * and unsubscribes all event listeners.\n */\n close() {\n this._emitter.removeAllListeners();\n this.clear();\n this.setGroup(null);\n }\n\n /**\n * Clear this handle's contribution to the filter set.\n *\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n clear(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.clear(this._id);\n this._onChange(extraInfo);\n }\n\n /**\n * Set this handle's contribution to the filter set. This array should consist\n * of the keys of the rows that _should_ be displayed; any keys that are not\n * present in the array will be considered _filtered out_. Note that multiple\n * `FilterHandle` instances in the group may each contribute an array of keys,\n * and only those keys that appear in _all_ of the arrays make it through the\n * filter.\n *\n * @param {string[]} keys - Empty array, or array of keys. To clear the\n * filter, don't pass an empty array; instead, use the\n * {@link FilterHandle#clear} method.\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n set(keys, extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.update(this._id, keys);\n this._onChange(extraInfo);\n }\n\n /**\n * @return {string[]|null} - Either: 1) an array of keys that made it through\n * all of the `FilterHandle` instances, or, 2) `null`, which means no filter\n * is being applied (all data should be displayed).\n */\n get filteredKeys() {\n return this._filterSet ? this._filterSet.value : null;\n }\n\n /**\n * Subscribe to events on this `FilterHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {FilterHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link FilterHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancel event subscriptions created by {@link FilterHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|FilterHandle~listener} listener - Either the callback\n * function previously passed into {@link FilterHandle#on}, or the\n * string that was returned from {@link FilterHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n _onChange(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterVar.set(this._filterSet.value, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * @callback FilterHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the filter set, or `null` if no filter set is active),\n * `oldValue` (the previous value of the filter set), and `sender` (the\n * `FilterHandle` instance that made the change).\n */\n\n}\n\n/**\n * @event FilterHandle#change\n * @type {object}\n * @property {object} value - The new value of the filter set, or `null`\n * if no filter set is active.\n * @property {object} oldValue - The previous value of the filter set.\n * @property {FilterHandle} sender - The `FilterHandle` instance that\n * changed the value.\n */\n","import { diffSortedLists } from \"./util\";\n\nfunction naturalComparator(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n }\n}\n\n/**\n * @private\n */\nexport default class FilterSet {\n constructor() {\n this.reset();\n }\n\n reset() {\n // Key: handle ID, Value: array of selected keys, or null\n this._handles = {};\n // Key: key string, Value: count of handles that include it\n this._keys = {};\n this._value = null;\n this._activeHandles = 0;\n }\n\n get value() {\n return this._value;\n }\n\n update(handleId, keys) {\n if (keys !== null) {\n keys = keys.slice(0); // clone before sorting\n keys.sort(naturalComparator);\n }\n\n let {added, removed} = diffSortedLists(this._handles[handleId], keys);\n this._handles[handleId] = keys;\n\n for (let i = 0; i < added.length; i++) {\n this._keys[added[i]] = (this._keys[added[i]] || 0) + 1;\n }\n for (let i = 0; i < removed.length; i++) {\n this._keys[removed[i]]--;\n }\n\n this._updateValue(keys);\n }\n\n /**\n * @param {string[]} keys Sorted array of strings that indicate\n * a superset of possible keys.\n * @private\n */\n _updateValue(keys = this._allKeys) {\n let handleCount = Object.keys(this._handles).length;\n if (handleCount === 0) {\n this._value = null;\n } else {\n this._value = [];\n for (let i = 0; i < keys.length; i++) {\n let count = this._keys[keys[i]];\n if (count === handleCount) {\n this._value.push(keys[i]);\n }\n }\n }\n }\n\n clear(handleId) {\n if (typeof(this._handles[handleId]) === \"undefined\") {\n return;\n }\n\n let keys = this._handles[handleId];\n if (!keys) {\n keys = [];\n }\n\n for (let i = 0; i < keys.length; i++) {\n this._keys[keys[i]]--;\n }\n delete this._handles[handleId];\n\n this._updateValue();\n }\n\n get _allKeys() {\n let allKeys = Object.keys(this._keys);\n allKeys.sort(naturalComparator);\n return allKeys;\n }\n}\n","import Var from \"./var\";\n\n// Use a global so that multiple copies of crosstalk.js can be loaded and still\n// have groups behave as singletons across all copies.\nglobal.__crosstalk_groups = global.__crosstalk_groups || {};\nlet groups = global.__crosstalk_groups;\n\nexport default function group(groupName) {\n if (groupName && typeof(groupName) === \"string\") {\n if (!groups.hasOwnProperty(groupName)) {\n groups[groupName] = new Group(groupName);\n }\n return groups[groupName];\n } else if (typeof(groupName) === \"object\" && groupName._vars && groupName.var) {\n // Appears to already be a group object\n return groupName;\n } else if (Array.isArray(groupName) &&\n groupName.length == 1 &&\n typeof(groupName[0]) === \"string\") {\n return group(groupName[0]);\n } else {\n throw new Error(\"Invalid groupName argument\");\n }\n}\n\nclass Group {\n constructor(name) {\n this.name = name;\n this._vars = {};\n }\n\n var(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n if (!this._vars.hasOwnProperty(name))\n this._vars[name] = new Var(this, name);\n return this._vars[name];\n }\n\n has(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n return this._vars.hasOwnProperty(name);\n }\n}\n","import group from \"./group\";\nimport { SelectionHandle } from \"./selection\";\nimport { FilterHandle } from \"./filter\";\nimport { bind } from \"./input\";\nimport \"./input_selectize\";\nimport \"./input_checkboxgroup\";\nimport \"./input_slider\";\n\nconst defaultGroup = group(\"default\");\n\nfunction var_(name) {\n return defaultGroup.var(name);\n}\n\nfunction has(name) {\n return defaultGroup.has(name);\n}\n\nif (global.Shiny) {\n global.Shiny.addCustomMessageHandler(\"update-client-value\", function(message) {\n if (typeof(message.group) === \"string\") {\n group(message.group).var(message.name).set(message.value);\n } else {\n var_(message.name).set(message.value);\n }\n });\n}\n\nconst crosstalk = {\n group: group,\n var: var_,\n has: has,\n SelectionHandle: SelectionHandle,\n FilterHandle: FilterHandle,\n bind: bind\n};\n\n/**\n * @namespace crosstalk\n */\nexport default crosstalk;\nglobal.crosstalk = crosstalk;\n","let $ = global.jQuery;\n\nlet bindings = {};\n\nexport function register(reg) {\n bindings[reg.className] = reg;\n if (global.document && global.document.readyState !== \"complete\") {\n $(() => {\n bind();\n });\n } else if (global.document) {\n setTimeout(bind, 100);\n }\n}\n\nexport function bind() {\n Object.keys(bindings).forEach(function(className) {\n let binding = bindings[className];\n $(\".\" + binding.className).not(\".crosstalk-input-bound\").each(function(i, el) {\n bindInstance(binding, el);\n });\n });\n}\n\n// Escape jQuery identifier\nfunction $escape(val) {\n return val.replace(/([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n}\n\nfunction bindEl(el) {\n let $el = $(el);\n Object.keys(bindings).forEach(function(className) {\n if ($el.hasClass(className) && !$el.hasClass(\"crosstalk-input-bound\")) {\n let binding = bindings[className];\n bindInstance(binding, el);\n }\n });\n}\n\nfunction bindInstance(binding, el) {\n let jsonEl = $(el).find(\"script[type='application/json'][data-for='\" + $escape(el.id) + \"']\");\n let data = JSON.parse(jsonEl[0].innerText);\n\n let instance = binding.factory(el, data);\n $(el).data(\"crosstalk-instance\", instance);\n $(el).addClass(\"crosstalk-input-bound\");\n}\n\nif (global.Shiny) {\n let inputBinding = new global.Shiny.InputBinding();\n let $ = global.jQuery;\n $.extend(inputBinding, {\n find: function(scope) {\n return $(scope).find(\".crosstalk-input\");\n },\n initialize: function(el) {\n if (!$(el).hasClass(\"crosstalk-input-bound\")) {\n bindEl(el);\n }\n },\n getId: function(el) {\n return el.id;\n },\n getValue: function(el) {\n\n },\n setValue: function(el, value) {\n\n },\n receiveMessage: function(el, data) {\n\n },\n subscribe: function(el, callback) {\n $(el).data(\"crosstalk-instance\").resume();\n },\n unsubscribe: function(el) {\n $(el).data(\"crosstalk-instance\").suspend();\n }\n });\n global.Shiny.inputBindings.register(inputBinding, \"crosstalk.inputBinding\");\n}\n","import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-checkboxgroup\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n let $el = $(el);\n $el.on(\"change\", \"input[type='checkbox']\", function() {\n let checked = $el.find(\"input[type='checkbox']:checked\");\n if (checked.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n checked.each(function() {\n data.map[this.value].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n","import * as input from \"./input\";\nimport * as util from \"./util\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-select\",\n\n factory: function(el, data) {\n /*\n * items: {value: [...], label: [...]}\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n\n let first = [{value: \"\", label: \"(All)\"}];\n let items = util.dataframeToD3(data.items);\n let opts = {\n options: first.concat(items),\n valueField: \"value\",\n labelField: \"label\",\n searchField: \"label\"\n };\n\n let select = $(el).find(\"select\")[0];\n\n let selectize = $(select).selectize(opts)[0].selectize;\n\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n selectize.on(\"change\", function() {\n if (selectize.items.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n selectize.items.forEach(function(group) {\n data.map[group].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n","import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\nlet strftime = global.strftime;\n\ninput.register({\n className: \"crosstalk-input-slider\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let opts = {};\n let $el = $(el).find(\"input\");\n let dataType = $el.data(\"data-type\");\n let timeFormat = $el.data(\"time-format\");\n let round = $el.data(\"round\");\n let timeFormatter;\n\n // Set up formatting functions\n if (dataType === \"date\") {\n timeFormatter = strftime.utc();\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n\n } else if (dataType === \"datetime\") {\n let timezone = $el.data(\"timezone\");\n if (timezone)\n timeFormatter = strftime.timezone(timezone);\n else\n timeFormatter = strftime;\n\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n } else if (dataType === \"number\") {\n if (typeof round !== \"undefined\")\n opts.prettify = function(num) {\n let factor = Math.pow(10, round);\n return Math.round(num * factor) / factor;\n };\n }\n\n $el.ionRangeSlider(opts);\n\n function getValue() {\n let result = $el.data(\"ionRangeSlider\").result;\n\n // Function for converting numeric value from slider to appropriate type.\n let convert;\n let dataType = $el.data(\"data-type\");\n if (dataType === \"date\") {\n convert = function(val) {\n return formatDateUTC(new Date(+val));\n };\n } else if (dataType === \"datetime\") {\n convert = function(val) {\n // Convert ms to s\n return +val / 1000;\n };\n } else {\n convert = function(val) { return +val; };\n }\n\n if ($el.data(\"ionRangeSlider\").options.type === \"double\") {\n return [convert(result.from), convert(result.to)];\n } else {\n return convert(result.from);\n }\n }\n\n let lastKnownKeys = null;\n\n $el.on(\"change.crosstalkSliderInput\", function(event) {\n if (!$el.data(\"updating\") && !$el.data(\"animating\")) {\n let [from, to] = getValue();\n let keys = [];\n for (let i = 0; i < data.values.length; i++) {\n let val = data.values[i];\n if (val >= from && val <= to) {\n keys.push(data.keys[i]);\n }\n }\n keys.sort();\n ctHandle.set(keys);\n lastKnownKeys = keys;\n }\n });\n\n\n // let $el = $(el);\n // $el.on(\"change\", \"input[type=\"checkbox\"]\", function() {\n // let checked = $el.find(\"input[type=\"checkbox\"]:checked\");\n // if (checked.length === 0) {\n // ctHandle.clear();\n // } else {\n // let keys = {};\n // checked.each(function() {\n // data.map[this.value].forEach(function(key) {\n // keys[key] = true;\n // });\n // });\n // let keyArray = Object.keys(keys);\n // keyArray.sort();\n // ctHandle.set(keyArray);\n // }\n // });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n\n\n// Convert a number to a string with leading zeros\nfunction padZeros(n, digits) {\n let str = n.toString();\n while (str.length < digits)\n str = \"0\" + str;\n return str;\n}\n\n// Given a Date object, return a string in yyyy-mm-dd format, using the\n// UTC date. This may be a day off from the date in the local time zone.\nfunction formatDateUTC(date) {\n if (date instanceof Date) {\n return date.getUTCFullYear() + \"-\" +\n padZeros(date.getUTCMonth()+1, 2) + \"-\" +\n padZeros(date.getUTCDate(), 2);\n\n } else {\n return null;\n }\n}\n","import Events from \"./events\";\nimport grp from \"./group\";\nimport * as util from \"./util\";\n\n/**\n * Use this class to read and write (and listen for changes to) the selection\n * for a Crosstalk group. This is intended to be used for linked brushing.\n *\n * If two (or more) `SelectionHandle` instances in the same webpage share the\n * same group name, they will share the same state. Setting the selection using\n * one `SelectionHandle` instance will result in the `value` property instantly\n * changing across the others, and `\"change\"` event listeners on all instances\n * (including the one that initiated the sending) will fire.\n *\n * @param {string} [group] - The name of the Crosstalk group, or if none,\n * null or undefined (or any other falsy value). This can be changed later\n * via the [SelectionHandle#setGroup](#setGroup) method.\n * @param {Object} [extraInfo] - An object whose properties will be copied to\n * the event object whenever an event is emitted.\n */\nexport class SelectionHandle {\n\n constructor(group = null, extraInfo = null) {\n this._eventRelay = new Events();\n this._emitter = new util.SubscriptionTracker(this._eventRelay);\n\n // Name of the group we're currently tracking, if any. Can change over time.\n this._group = null;\n // The Var we're currently tracking, if any. Can change over time.\n this._var = null;\n // The event handler subscription we currently have on var.on(\"change\").\n this._varOnChangeSub = null;\n\n this._extraInfo = util.extend({ sender: this }, extraInfo);\n\n this.setGroup(group);\n }\n\n /**\n * Changes the Crosstalk group membership of this SelectionHandle. The group\n * being switched away from (if any) will not have its selection value\n * modified as a result of calling `setGroup`, even if this handle was the\n * most recent handle to set the selection of the group.\n *\n * The group being switched to (if any) will also not have its selection value\n * modified as a result of calling `setGroup`. If you want to set the\n * selection value of the new group, call `set` explicitly.\n *\n * @param {string} group - The name of the Crosstalk group, or null (or\n * undefined) to clear the group.\n */\n setGroup(group) {\n // If group is unchanged, do nothing\n if (this._group === group)\n return;\n // Treat null, undefined, and other falsy values the same\n if (!this._group && !group)\n return;\n\n if (this._var) {\n this._var.off(\"change\", this._varOnChangeSub);\n this._var = null;\n this._varOnChangeSub = null;\n }\n\n this._group = group;\n\n if (group) {\n this._var = grp(group).var(\"selection\");\n let sub = this._var.on(\"change\", (e) => {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Retrieves the current selection for the group represented by this\n * `SelectionHandle`.\n *\n * - If no selection is active, then this value will be falsy.\n * - If a selection is active, but no data points are selected, then this\n * value will be an empty array.\n * - If a selection is active, and data points are selected, then the keys\n * of the selected data points will be present in the array.\n */\n get value() {\n return this._var ? this._var.get() : null;\n }\n\n /**\n * Combines the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n // Important incidental effect: shallow clone is returned\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see\n * {@link SelectionHandle#value}).\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `SelectionHandle` constructor).\n */\n set(selectedKeys, extraInfo) {\n if (this._var)\n this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any that were passed\n * into the `SelectionHandle` constructor).\n */\n clear(extraInfo) {\n if (this._var)\n this.set(void 0, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Subscribes to events on this `SelectionHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {SelectionHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancels event subscriptions created by {@link SelectionHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|SelectionHandle~listener} listener - Either the callback\n * function previously passed into {@link SelectionHandle#on}, or the\n * string that was returned from {@link SelectionHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n /**\n * Shuts down the `SelectionHandle` object.\n *\n * Removes all event listeners that were added through this handle.\n */\n close() {\n this._emitter.removeAllListeners();\n this.setGroup(null);\n }\n}\n\n/**\n * @callback SelectionHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the selection, or `undefined` if no selection is active),\n * `oldValue` (the previous value of the selection), and `sender` (the\n * `SelectionHandle` instance that made the change).\n */\n\n/**\n * @event SelectionHandle#change\n * @type {object}\n * @property {object} value - The new value of the selection, or `undefined`\n * if no selection is active.\n * @property {object} oldValue - The previous value of the selection.\n * @property {SelectionHandle} sender - The `SelectionHandle` instance that\n * changed the value.\n */\n","export function extend(target, ...sources) {\n for (let i = 0; i < sources.length; i++) {\n let src = sources[i];\n if (typeof(src) === \"undefined\" || src === null)\n continue;\n\n for (let key in src) {\n if (src.hasOwnProperty(key)) {\n target[key] = src[key];\n }\n }\n }\n return target;\n}\n\nexport function checkSorted(list) {\n for (let i = 1; i < list.length; i++) {\n if (list[i] <= list[i-1]) {\n throw new Error(\"List is not sorted or contains duplicate\");\n }\n }\n}\n\nexport function diffSortedLists(a, b) {\n let i_a = 0;\n let i_b = 0;\n\n if (!a) a = [];\n if (!b) b = [];\n\n let a_only = [];\n let b_only = [];\n\n checkSorted(a);\n checkSorted(b);\n\n while (i_a < a.length && i_b < b.length) {\n if (a[i_a] === b[i_b]) {\n i_a++;\n i_b++;\n } else if (a[i_a] < b[i_b]) {\n a_only.push(a[i_a++]);\n } else {\n b_only.push(b[i_b++]);\n }\n }\n\n if (i_a < a.length)\n a_only = a_only.concat(a.slice(i_a));\n if (i_b < b.length)\n b_only = b_only.concat(b.slice(i_b));\n return {\n removed: a_only,\n added: b_only\n };\n}\n\n// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... }\n// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ]\nexport function dataframeToD3(df) {\n let names = [];\n let length;\n for (let name in df) {\n if (df.hasOwnProperty(name))\n names.push(name);\n if (typeof(df[name]) !== \"object\" || typeof(df[name].length) === \"undefined\") {\n throw new Error(\"All fields must be arrays\");\n } else if (typeof(length) !== \"undefined\" && length !== df[name].length) {\n throw new Error(\"All fields must be arrays of the same length\");\n }\n length = df[name].length;\n }\n let results = [];\n let item;\n for (let row = 0; row < length; row++) {\n item = {};\n for (let col = 0; col < names.length; col++) {\n item[names[col]] = df[names[col]][row];\n }\n results.push(item);\n }\n return results;\n}\n\n/**\n * Keeps track of all event listener additions/removals and lets all active\n * listeners be removed with a single operation.\n *\n * @private\n */\nexport class SubscriptionTracker {\n constructor(emitter) {\n this._emitter = emitter;\n this._subs = {};\n }\n\n on(eventType, listener) {\n let sub = this._emitter.on(eventType, listener);\n this._subs[sub] = eventType;\n return sub;\n }\n\n off(eventType, listener) {\n let sub = this._emitter.off(eventType, listener);\n if (sub) {\n delete this._subs[sub];\n }\n return sub;\n }\n\n removeAllListeners() {\n let current_subs = this._subs;\n this._subs = {};\n Object.keys(current_subs).forEach((sub) => {\n this._emitter.off(current_subs[sub], sub);\n });\n }\n}\n","import Events from \"./events\";\n\nexport default class Var {\n constructor(group, name, /*optional*/ value) {\n this._group = group;\n this._name = name;\n this._value = value;\n this._events = new Events();\n }\n\n get() {\n return this._value;\n }\n\n set(value, /*optional*/ event) {\n if (this._value === value) {\n // Do nothing; the value hasn't changed\n return;\n }\n let oldValue = this._value;\n this._value = value;\n // Alert JavaScript listeners that the value has changed\n let evt = {};\n if (event && typeof(event) === \"object\") {\n for (let k in event) {\n if (event.hasOwnProperty(k))\n evt[k] = event[k];\n }\n }\n evt.oldValue = oldValue;\n evt.value = value;\n this._events.trigger(\"change\", evt, this);\n\n // TODO: Make this extensible, to let arbitrary back-ends know that\n // something has changed\n if (global.Shiny && global.Shiny.onInputChange) {\n global.Shiny.onInputChange(\n \".clientValue-\" +\n (this._group.name !== null ? this._group.name + \"-\" : \"\") +\n this._name,\n typeof(value) === \"undefined\" ? null : value\n );\n }\n }\n\n on(eventType, listener) {\n return this._events.on(eventType, listener);\n }\n\n off(eventType, listener) {\n return this._events.off(eventType, listener);\n }\n}\n"]} \ No newline at end of file diff --git a/docs/articles/variable_details_files/datatables-binding-0.19/datatables.js b/docs/articles/variable_details_files/datatables-binding-0.19/datatables.js new file mode 100644 index 00000000..fc04fd22 --- /dev/null +++ b/docs/articles/variable_details_files/datatables-binding-0.19/datatables.js @@ -0,0 +1,1421 @@ +(function() { + +// some helper functions: using a global object DTWidget so that it can be used +// in JS() code, e.g. datatable(options = list(foo = JS('code'))); unlike R's +// dynamic scoping, when 'code' is eval()'ed, JavaScript does not know objects +// from the "parent frame", e.g. JS('DTWidget') will not work unless it was made +// a global object +var DTWidget = {}; + +// 123456666.7890 -> 123,456,666.7890 +var markInterval = function(d, digits, interval, mark, decMark, precision) { + x = precision ? d.toPrecision(digits) : d.toFixed(digits); + if (!/^-?[\d.]+$/.test(x)) return x; + var xv = x.split('.'); + if (xv.length > 2) return x; // should have at most one decimal point + xv[0] = xv[0].replace(new RegExp('\\B(?=(\\d{' + interval + '})+(?!\\d))', 'g'), mark); + return xv.join(decMark); +}; + +DTWidget.formatCurrency = function(data, currency, digits, interval, mark, decMark, before) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + var res = markInterval(d, digits, interval, mark, decMark); + res = before ? (/^-/.test(res) ? '-' + currency + res.replace(/^-/, '') : currency + res) : + res + currency; + return res; +}; + +DTWidget.formatString = function(data, prefix, suffix) { + var d = data; + if (d === null) return ''; + return prefix + d + suffix; +}; + +DTWidget.formatPercentage = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d * 100, digits, interval, mark, decMark) + '%'; +}; + +DTWidget.formatRound = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d, digits, interval, mark, decMark); +}; + +DTWidget.formatSignif = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d, digits, interval, mark, decMark, true); +}; + +DTWidget.formatDate = function(data, method, params) { + var d = data; + if (d === null) return ''; + // (new Date('2015-10-28')).toDateString() may return 2015-10-27 because the + // actual time created could be like 'Tue Oct 27 2015 19:00:00 GMT-0500 (CDT)', + // i.e. the date-only string is treated as UTC time instead of local time + if ((method === 'toDateString' || method === 'toLocaleDateString') && /^\d{4,}\D\d{2}\D\d{2}$/.test(d)) { + d = d.split(/\D/); + d = new Date(d[0], d[1] - 1, d[2]); + } else { + d = new Date(d); + } + return d[method].apply(d, params); +}; + +window.DTWidget = DTWidget; + +var transposeArray2D = function(a) { + return a.length === 0 ? a : HTMLWidgets.transposeArray2D(a); +}; + +var crosstalkPluginsInstalled = false; + +function maybeInstallCrosstalkPlugins() { + if (crosstalkPluginsInstalled) + return; + crosstalkPluginsInstalled = true; + + $.fn.dataTable.ext.afnFiltering.push( + function(oSettings, aData, iDataIndex) { + var ctfilter = oSettings.nTable.ctfilter; + if (ctfilter && !ctfilter[iDataIndex]) + return false; + + var ctselect = oSettings.nTable.ctselect; + if (ctselect && !ctselect[iDataIndex]) + return false; + + return true; + } + ); +} + +HTMLWidgets.widget({ + name: "datatables", + type: "output", + renderOnNullValue: true, + initialize: function(el, width, height) { + $(el).html(' '); + return { + data: null, + ctfilterHandle: new crosstalk.FilterHandle(), + ctfilterSubscription: null, + ctselectHandle: new crosstalk.SelectionHandle(), + ctselectSubscription: null + }; + }, + renderValue: function(el, data, instance) { + if (el.offsetWidth === 0 || el.offsetHeight === 0) { + instance.data = data; + return; + } + instance.data = null; + var $el = $(el); + $el.empty(); + + if (data === null) { + $el.append(' '); + // clear previous Shiny inputs (if any) + for (var i in instance.clearInputs) instance.clearInputs[i](); + instance.clearInputs = {}; + return; + } + + var crosstalkOptions = data.crosstalkOptions; + if (!crosstalkOptions) crosstalkOptions = { + 'key': null, 'group': null + }; + if (crosstalkOptions.group) { + maybeInstallCrosstalkPlugins(); + instance.ctfilterHandle.setGroup(crosstalkOptions.group); + instance.ctselectHandle.setGroup(crosstalkOptions.group); + } + + // if we are in the viewer then we always want to fillContainer and + // and autoHideNavigation (unless the user has explicitly set these) + if (window.HTMLWidgets.viewerMode) { + if (!data.hasOwnProperty("fillContainer")) + data.fillContainer = true; + if (!data.hasOwnProperty("autoHideNavigation")) + data.autoHideNavigation = true; + } + + // propagate fillContainer to instance (so we have it in resize) + instance.fillContainer = data.fillContainer; + + var cells = data.data; + + if (cells instanceof Array) cells = transposeArray2D(cells); + + $el.append(data.container); + var $table = $el.find('table'); + if (data.class) $table.addClass(data.class); + if (data.caption) $table.prepend(data.caption); + + if (!data.selection) data.selection = { + mode: 'none', selected: null, target: 'row', selectable: null + }; + if (HTMLWidgets.shinyMode && data.selection.mode !== 'none' && + data.selection.target === 'row+column') { + if ($table.children('tfoot').length === 0) { + $table.append($('

",{valign:"top",colSpan:W(a),"class":a.oClasses.sRowEmpty}).html(c))[0];A(a,"aoHeaderCallback","header",[f(a.nTHead).children("tr")[0], +Oa(a),g,n,l]);A(a,"aoFooterCallback","footer",[f(a.nTFoot).children("tr")[0],Oa(a),g,n,l]);d=f(a.nTBody);d.children().detach();d.append(f(b));A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function V(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&rb(a);d?ia(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;S(a);a._drawHold=!1}function sb(a){var b=a.oClasses,c=f(a.nTable);c=f("
").insertBefore(c);var d=a.oFeatures,e= +f("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),g,k,l,n,m,p,u=0;u")[0];n=h[u+1];if("'"==n||'"'==n){m="";for(p=2;h[u+p]!=n;)m+=h[u+p],p++;"H"==m?m=b.sJUIHeader:"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),l.id=n[0].substr(1,n[0].length-1),l.className=n[1]):"#"==m.charAt(0)?l.id=m.substr(1, +m.length-1):l.className=m;u+=p}e.append(l);e=f(l)}else if(">"==k)e=e.parent();else if("l"==k&&d.bPaginate&&d.bLengthChange)g=tb(a);else if("f"==k&&d.bFilter)g=ub(a);else if("r"==k&&d.bProcessing)g=vb(a);else if("t"==k)g=wb(a);else if("i"==k&&d.bInfo)g=xb(a);else if("p"==k&&d.bPaginate)g=yb(a);else if(0!==q.ext.feature.length)for(l=q.ext.feature,p=0,n=l.length;p',k=d.sSearch;k=k.match(/_INPUT_/)?k.replace("_INPUT_",g):k+g;b=f("
",{id:h.f?null:c+"_filter","class":b.sFilter}).append(f("
").addClass(b.sLength);a.aanFeatures.l||(l[0].id=c+"_length");l.children().append(a.oLanguage.sLengthMenu.replace("_MENU_", +e[0].outerHTML));f("select",l).val(a._iDisplayLength).on("change.DT",function(b){Va(a,f(this).val());S(a)});f(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&f("select",l).val(d)});return l[0]}function yb(a){var b=a.sPaginationType,c=q.ext.pager[b],d="function"===typeof c,e=function(a){S(a)};b=f("
").addClass(a.oClasses.sPaging+b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,g=a._iDisplayLength, +f=a.fnRecordsDisplay(),m=-1===g;b=m?0:Math.ceil(b/g);g=m?1:Math.ceil(f/g);f=c(b,g);var p;m=0;for(p=h.p.length;mh&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function K(a,b){a.oFeatures.bProcessing&&f(a.aanFeatures.r).css("display",b?"block":"none");A(a,null,"processing",[a,b])}function wb(a){var b=f(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY, +h=a.oClasses,g=b.children("caption"),k=g.length?g[0]._captionSide:null,l=f(b[0].cloneNode(!1)),n=f(b[0].cloneNode(!1)),m=b.children("tfoot");m.length||(m=null);l=f("
",{"class":h.sScrollWrapper}).append(f("
",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?B(d):null:"100%"}).append(f("
",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===k?g:null).append(b.children("thead"))))).append(f("
", +{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?B(d):null}).append(b));m&&l.append(f("
",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?B(d):null:"100%"}).append(f("
",{"class":h.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append("bottom"===k?g:null).append(b.children("tfoot")))));b=l.children();var p=b[0];h=b[1];var u=m?b[2]:null;if(d)f(h).on("scroll.DT",function(a){a=this.scrollLeft;p.scrollLeft=a;m&&(u.scrollLeft=a)}); +f(h).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=u;a.aoDrawCallback.push({fn:na,sName:"scrolling"});return l[0]}function na(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=f(a.nScrollHead),g=h[0].style,k=h.children("div"),l=k[0].style,n=k.children("table");k=a.nScrollBody;var m=f(k),w=k.style,u=f(a.nScrollFoot).children("div"),q=u.children("table"),t=f(a.nTHead),r=f(a.nTable),v=r[0],za=v.style,T=a.nTFoot?f(a.nTFoot):null,A=a.oBrowser, +x=A.bScrollOversize,ac=J(a.aoColumns,"nTh"),Ya=[],y=[],z=[],C=[],G,H=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};var D=k.scrollHeight>k.clientHeight;if(a.scrollBarVis!==D&&a.scrollBarVis!==p)a.scrollBarVis=D,aa(a);else{a.scrollBarVis=D;r.children("thead, tfoot").remove();if(T){var E=T.clone().prependTo(r);var F=T.find("tr");E=E.find("tr")}var I=t.clone().prependTo(r);t=t.find("tr");D=I.find("tr");I.find("th, td").removeAttr("tabindex"); +c||(w.width="100%",h[0].style.width="100%");f.each(ua(a,I),function(b,c){G=ba(a,b);c.style.width=a.aoColumns[G].sWidth});T&&N(function(a){a.style.width=""},E);h=r.outerWidth();""===c?(za.width="100%",x&&(r.find("tbody").height()>k.offsetHeight||"scroll"==m.css("overflow-y"))&&(za.width=B(r.outerWidth()-b)),h=r.outerWidth()):""!==d&&(za.width=B(d),h=r.outerWidth());N(H,D);N(function(a){z.push(a.innerHTML);Ya.push(B(f(a).css("width")))},D);N(function(a,b){-1!==f.inArray(a,ac)&&(a.style.width=Ya[b])}, +t);f(D).height(0);T&&(N(H,E),N(function(a){C.push(a.innerHTML);y.push(B(f(a).css("width")))},E),N(function(a,b){a.style.width=y[b]},F),f(E).height(0));N(function(a,b){a.innerHTML='
'+z[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=Ya[b]},D);T&&N(function(a,b){a.innerHTML='
'+C[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},E);r.outerWidth()< +h?(F=k.scrollHeight>k.offsetHeight||"scroll"==m.css("overflow-y")?h+b:h,x&&(k.scrollHeight>k.offsetHeight||"scroll"==m.css("overflow-y"))&&(za.width=B(F-b)),""!==c&&""===d||O(a,1,"Possible column misalignment",6)):F="100%";w.width=B(F);g.width=B(F);T&&(a.nScrollFoot.style.width=B(F));!e&&x&&(w.height=B(v.offsetHeight+b));c=r.outerWidth();n[0].style.width=B(c);l.width=B(c);d=r.height()>k.clientHeight||"scroll"==m.css("overflow-y");e="padding"+(A.bScrollbarLeft?"Left":"Right");l[e]=d?b+"px":"0px";T&& +(q[0].style.width=B(c),u[0].style.width=B(c),u[0].style[e]=d?b+"px":"0px");r.children("colgroup").insertBefore(r.children("thead"));m.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(k.scrollTop=0)}}function N(a,b,c){for(var d=0,e=0,h=b.length,g,k;e").appendTo(k.find("tbody"));k.find("thead, tfoot").remove(); +k.append(f(a.nTHead).clone()).append(f(a.nTFoot).clone());k.find("tfoot th, tfoot td").css("width","");n=ua(a,k.find("thead")[0]);for(q=0;q").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(q=0;q").css(h|| +e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(k).appendTo(p);h&&g?k.width(g):h?(k.css("width","auto"),k.removeAttr("width"),k.width()").css("width",B(a)).appendTo(b||y.body);b=a[0].offsetWidth;a.remove();return b}function Kb(a,b){var c=Lb(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:f("
").html(I(a,c,b,"display"))[0]}function Lb(a,b){for(var c,d=-1,e=-1,h=0,g=a.aoData.length;hd&&(d=c.length,e=h);return e} +function B(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Y(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=f.isPlainObject(d);var h=[];var g=function(a){a.length&&!f.isArray(a[0])?h.push(a):f.merge(h,a)};f.isArray(d)&&g(d);e&&d.pre&&g(d.pre);g(a.aaSorting);e&&d.post&&g(d.post);for(a=0;an?1:0; +if(0!==m)return"asc"===l.dir?m:-m}m=c[a];n=c[b];return mn?1:0}):g.sort(function(a,b){var h,g=k.length,f=e[a]._aSortData,l=e[b]._aSortData;for(h=0;hp?1:0})}a.bSorted=!0}function Nb(a){var b=a.aoColumns,c=Y(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d/g,"");var f=h.nTh;f.removeAttribute("aria-sort"); +h.bSortable&&(0e?e+1:3))}e=0;for(h=d.length;ee?e+1:3))}a.aLastSort=d}function Mb(a,b){var c=a.aoColumns[b],d=q.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ca(a,b)));for(var h,g=q.ext.type.order[c.sType+"-pre"],k=0,f=a.aoData.length;k=h.length?[0,c[1]]:c)}));b.search!==p&&f.extend(a.oPreviousSearch, +Gb(b.search));if(b.columns)for(d=0,e=b.columns.length;d=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ra(a,b){a=a.renderer;var c=q.ext.renderer[b];return f.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function D(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ka(a,b){var c=Pb.numbers_length,d=Math.floor(c/2);b<=c?a=Z(0,b):a<=d?(a=Z(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=Z(b-(c-2),b):(a=Z(a-d+2,a+d-1),a.push("ellipsis"), +a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Ha(a){f.each({num:function(b){return Da(b,a)},"num-fmt":function(b){return Da(b,a,bb)},"html-num":function(b){return Da(b,a,Ea)},"html-num-fmt":function(b){return Da(b,a,Ea,bb)}},function(b,c){C.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(C.type.search[b+a]=C.type.search.html)})}function Qb(a){return function(){var b=[Ca(this[q.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return q.ext.internal[a].apply(this, +b)}}var q=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new v(Ca(this[C.iApiIndex])):new v(this)};this.fnAddData=function(a,b){var c=this.api(!0);a=f.isArray(a)&&(f.isArray(a[0])||f.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===p||b)&&c.draw();return a.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===p||a?b.draw(!1): +(""!==d.sX||""!==d.sY)&&na(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===p||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0);a=d.rows(a);var e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===p||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,f){e=this.api(!0);null===b||b===p? +e.search(a,c,d,f):e.column(b).search(a,c,d,f);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==p){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==p||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==p?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(), +[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){a=this.api(!0).page(a);(b===p||b)&&a.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===p||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return Ca(this[C.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener= +function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===p||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===p||e)&&h.columns.adjust();(d===p||d)&&h.draw();return 0};this.fnVersionCheck=C.fnVersionCheck;var b=this,c=a===p,d=this.length;c&&(a={});this.oApi=this.internal=C.internal;for(var e in q.ext.internal)e&&(this[e]=Qb(e));this.each(function(){var e={},g=1").appendTo(w));r.nTHead=b[0];b=w.children("tbody");0===b.length&&(b=f("
", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " - - - - + + + + + + - - - + + - +
- - - + + + + - -
+ +

@@ -176,30 +176,22 @@

-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.6.1.

diff --git a/docs/articles/variables_sheet_files/crosstalk-1.1.1/css/crosstalk.css b/docs/articles/variables_sheet_files/crosstalk-1.1.1/css/crosstalk.css new file mode 100644 index 00000000..46befd2e --- /dev/null +++ b/docs/articles/variables_sheet_files/crosstalk-1.1.1/css/crosstalk.css @@ -0,0 +1,27 @@ +/* Adjust margins outwards, so column contents line up with the edges of the + parent of container-fluid. */ +.container-fluid.crosstalk-bscols { + margin-left: -30px; + margin-right: -30px; + white-space: normal; +} + +/* But don't adjust the margins outwards if we're directly under the body, + i.e. we were the top-level of something at the console. */ +body > .container-fluid.crosstalk-bscols { + margin-left: auto; + margin-right: auto; +} + +.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { + display: inline-block; + padding-right: 12px; + vertical-align: top; +} + +@media only screen and (max-width:480px) { + .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { + display: block; + padding-right: inherit; + } +} diff --git a/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js new file mode 100644 index 00000000..fd9eb53d --- /dev/null +++ b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js @@ -0,0 +1,1474 @@ +(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o b) { + return 1; + } +} + +/** + * @private + */ + +var FilterSet = function () { + function FilterSet() { + _classCallCheck(this, FilterSet); + + this.reset(); + } + + _createClass(FilterSet, [{ + key: "reset", + value: function reset() { + // Key: handle ID, Value: array of selected keys, or null + this._handles = {}; + // Key: key string, Value: count of handles that include it + this._keys = {}; + this._value = null; + this._activeHandles = 0; + } + }, { + key: "update", + value: function update(handleId, keys) { + if (keys !== null) { + keys = keys.slice(0); // clone before sorting + keys.sort(naturalComparator); + } + + var _diffSortedLists = (0, _util.diffSortedLists)(this._handles[handleId], keys), + added = _diffSortedLists.added, + removed = _diffSortedLists.removed; + + this._handles[handleId] = keys; + + for (var i = 0; i < added.length; i++) { + this._keys[added[i]] = (this._keys[added[i]] || 0) + 1; + } + for (var _i = 0; _i < removed.length; _i++) { + this._keys[removed[_i]]--; + } + + this._updateValue(keys); + } + + /** + * @param {string[]} keys Sorted array of strings that indicate + * a superset of possible keys. + * @private + */ + + }, { + key: "_updateValue", + value: function _updateValue() { + var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._allKeys; + + var handleCount = Object.keys(this._handles).length; + if (handleCount === 0) { + this._value = null; + } else { + this._value = []; + for (var i = 0; i < keys.length; i++) { + var count = this._keys[keys[i]]; + if (count === handleCount) { + this._value.push(keys[i]); + } + } + } + } + }, { + key: "clear", + value: function clear(handleId) { + if (typeof this._handles[handleId] === "undefined") { + return; + } + + var keys = this._handles[handleId]; + if (!keys) { + keys = []; + } + + for (var i = 0; i < keys.length; i++) { + this._keys[keys[i]]--; + } + delete this._handles[handleId]; + + this._updateValue(); + } + }, { + key: "value", + get: function get() { + return this._value; + } + }, { + key: "_allKeys", + get: function get() { + var allKeys = Object.keys(this._keys); + allKeys.sort(naturalComparator); + return allKeys; + } + }]); + + return FilterSet; +}(); + +exports.default = FilterSet; + +},{"./util":11}],4:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.default = group; + +var _var2 = require("./var"); + +var _var3 = _interopRequireDefault(_var2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// Use a global so that multiple copies of crosstalk.js can be loaded and still +// have groups behave as singletons across all copies. +global.__crosstalk_groups = global.__crosstalk_groups || {}; +var groups = global.__crosstalk_groups; + +function group(groupName) { + if (groupName && typeof groupName === "string") { + if (!groups.hasOwnProperty(groupName)) { + groups[groupName] = new Group(groupName); + } + return groups[groupName]; + } else if ((typeof groupName === "undefined" ? "undefined" : _typeof(groupName)) === "object" && groupName._vars && groupName.var) { + // Appears to already be a group object + return groupName; + } else if (Array.isArray(groupName) && groupName.length == 1 && typeof groupName[0] === "string") { + return group(groupName[0]); + } else { + throw new Error("Invalid groupName argument"); + } +} + +var Group = function () { + function Group(name) { + _classCallCheck(this, Group); + + this.name = name; + this._vars = {}; + } + + _createClass(Group, [{ + key: "var", + value: function _var(name) { + if (!name || typeof name !== "string") { + throw new Error("Invalid var name"); + } + + if (!this._vars.hasOwnProperty(name)) this._vars[name] = new _var3.default(this, name); + return this._vars[name]; + } + }, { + key: "has", + value: function has(name) { + if (!name || typeof name !== "string") { + throw new Error("Invalid var name"); + } + + return this._vars.hasOwnProperty(name); + } + }]); + + return Group; +}(); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./var":12}],5:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _group = require("./group"); + +var _group2 = _interopRequireDefault(_group); + +var _selection = require("./selection"); + +var _filter = require("./filter"); + +var _input = require("./input"); + +require("./input_selectize"); + +require("./input_checkboxgroup"); + +require("./input_slider"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultGroup = (0, _group2.default)("default"); + +function var_(name) { + return defaultGroup.var(name); +} + +function has(name) { + return defaultGroup.has(name); +} + +if (global.Shiny) { + global.Shiny.addCustomMessageHandler("update-client-value", function (message) { + if (typeof message.group === "string") { + (0, _group2.default)(message.group).var(message.name).set(message.value); + } else { + var_(message.name).set(message.value); + } + }); +} + +var crosstalk = { + group: _group2.default, + var: var_, + has: has, + SelectionHandle: _selection.SelectionHandle, + FilterHandle: _filter.FilterHandle, + bind: _input.bind +}; + +/** + * @namespace crosstalk + */ +exports.default = crosstalk; + +global.crosstalk = crosstalk; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./group":4,"./input":6,"./input_checkboxgroup":7,"./input_selectize":8,"./input_slider":9,"./selection":10}],6:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.register = register; +exports.bind = bind; +var $ = global.jQuery; + +var bindings = {}; + +function register(reg) { + bindings[reg.className] = reg; + if (global.document && global.document.readyState !== "complete") { + $(function () { + bind(); + }); + } else if (global.document) { + setTimeout(bind, 100); + } +} + +function bind() { + Object.keys(bindings).forEach(function (className) { + var binding = bindings[className]; + $("." + binding.className).not(".crosstalk-input-bound").each(function (i, el) { + bindInstance(binding, el); + }); + }); +} + +// Escape jQuery identifier +function $escape(val) { + return val.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1"); +} + +function bindEl(el) { + var $el = $(el); + Object.keys(bindings).forEach(function (className) { + if ($el.hasClass(className) && !$el.hasClass("crosstalk-input-bound")) { + var binding = bindings[className]; + bindInstance(binding, el); + } + }); +} + +function bindInstance(binding, el) { + var jsonEl = $(el).find("script[type='application/json'][data-for='" + $escape(el.id) + "']"); + var data = JSON.parse(jsonEl[0].innerText); + + var instance = binding.factory(el, data); + $(el).data("crosstalk-instance", instance); + $(el).addClass("crosstalk-input-bound"); +} + +if (global.Shiny) { + var inputBinding = new global.Shiny.InputBinding(); + var _$ = global.jQuery; + _$.extend(inputBinding, { + find: function find(scope) { + return _$(scope).find(".crosstalk-input"); + }, + initialize: function initialize(el) { + if (!_$(el).hasClass("crosstalk-input-bound")) { + bindEl(el); + } + }, + getId: function getId(el) { + return el.id; + }, + getValue: function getValue(el) {}, + setValue: function setValue(el, value) {}, + receiveMessage: function receiveMessage(el, data) {}, + subscribe: function subscribe(el, callback) { + _$(el).data("crosstalk-instance").resume(); + }, + unsubscribe: function unsubscribe(el) { + _$(el).data("crosstalk-instance").suspend(); + } + }); + global.Shiny.inputBindings.register(inputBinding, "crosstalk.inputBinding"); +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],7:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; + +input.register({ + className: "crosstalk-input-checkboxgroup", + + factory: function factory(el, data) { + /* + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + var ctHandle = new _filter.FilterHandle(data.group); + + var lastKnownKeys = void 0; + var $el = $(el); + $el.on("change", "input[type='checkbox']", function () { + var checked = $el.find("input[type='checkbox']:checked"); + if (checked.length === 0) { + lastKnownKeys = null; + ctHandle.clear(); + } else { + var keys = {}; + checked.each(function () { + data.map[this.value].forEach(function (key) { + keys[key] = true; + }); + }); + var keyArray = Object.keys(keys); + keyArray.sort(); + lastKnownKeys = keyArray; + ctHandle.set(keyArray); + } + }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6}],8:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _util = require("./util"); + +var util = _interopRequireWildcard(_util); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; + +input.register({ + className: "crosstalk-input-select", + + factory: function factory(el, data) { + /* + * items: {value: [...], label: [...]} + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + + var first = [{ value: "", label: "(All)" }]; + var items = util.dataframeToD3(data.items); + var opts = { + options: first.concat(items), + valueField: "value", + labelField: "label", + searchField: "label" + }; + + var select = $(el).find("select")[0]; + + var selectize = $(select).selectize(opts)[0].selectize; + + var ctHandle = new _filter.FilterHandle(data.group); + + var lastKnownKeys = void 0; + selectize.on("change", function () { + if (selectize.items.length === 0) { + lastKnownKeys = null; + ctHandle.clear(); + } else { + var keys = {}; + selectize.items.forEach(function (group) { + data.map[group].forEach(function (key) { + keys[key] = true; + }); + }); + var keyArray = Object.keys(keys); + keyArray.sort(); + lastKnownKeys = keyArray; + ctHandle.set(keyArray); + } + }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6,"./util":11}],9:[function(require,module,exports){ +(function (global){ +"use strict"; + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var _input = require("./input"); + +var input = _interopRequireWildcard(_input); + +var _filter = require("./filter"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var $ = global.jQuery; +var strftime = global.strftime; + +input.register({ + className: "crosstalk-input-slider", + + factory: function factory(el, data) { + /* + * map: {"groupA": ["keyA", "keyB", ...], ...} + * group: "ct-groupname" + */ + var ctHandle = new _filter.FilterHandle(data.group); + + var opts = {}; + var $el = $(el).find("input"); + var dataType = $el.data("data-type"); + var timeFormat = $el.data("time-format"); + var round = $el.data("round"); + var timeFormatter = void 0; + + // Set up formatting functions + if (dataType === "date") { + timeFormatter = strftime.utc(); + opts.prettify = function (num) { + return timeFormatter(timeFormat, new Date(num)); + }; + } else if (dataType === "datetime") { + var timezone = $el.data("timezone"); + if (timezone) timeFormatter = strftime.timezone(timezone);else timeFormatter = strftime; + + opts.prettify = function (num) { + return timeFormatter(timeFormat, new Date(num)); + }; + } else if (dataType === "number") { + if (typeof round !== "undefined") opts.prettify = function (num) { + var factor = Math.pow(10, round); + return Math.round(num * factor) / factor; + }; + } + + $el.ionRangeSlider(opts); + + function getValue() { + var result = $el.data("ionRangeSlider").result; + + // Function for converting numeric value from slider to appropriate type. + var convert = void 0; + var dataType = $el.data("data-type"); + if (dataType === "date") { + convert = function convert(val) { + return formatDateUTC(new Date(+val)); + }; + } else if (dataType === "datetime") { + convert = function convert(val) { + // Convert ms to s + return +val / 1000; + }; + } else { + convert = function convert(val) { + return +val; + }; + } + + if ($el.data("ionRangeSlider").options.type === "double") { + return [convert(result.from), convert(result.to)]; + } else { + return convert(result.from); + } + } + + var lastKnownKeys = null; + + $el.on("change.crosstalkSliderInput", function (event) { + if (!$el.data("updating") && !$el.data("animating")) { + var _getValue = getValue(), + _getValue2 = _slicedToArray(_getValue, 2), + from = _getValue2[0], + to = _getValue2[1]; + + var keys = []; + for (var i = 0; i < data.values.length; i++) { + var val = data.values[i]; + if (val >= from && val <= to) { + keys.push(data.keys[i]); + } + } + keys.sort(); + ctHandle.set(keys); + lastKnownKeys = keys; + } + }); + + // let $el = $(el); + // $el.on("change", "input[type="checkbox"]", function() { + // let checked = $el.find("input[type="checkbox"]:checked"); + // if (checked.length === 0) { + // ctHandle.clear(); + // } else { + // let keys = {}; + // checked.each(function() { + // data.map[this.value].forEach(function(key) { + // keys[key] = true; + // }); + // }); + // let keyArray = Object.keys(keys); + // keyArray.sort(); + // ctHandle.set(keyArray); + // } + // }); + + return { + suspend: function suspend() { + ctHandle.clear(); + }, + resume: function resume() { + if (lastKnownKeys) ctHandle.set(lastKnownKeys); + } + }; + } +}); + +// Convert a number to a string with leading zeros +function padZeros(n, digits) { + var str = n.toString(); + while (str.length < digits) { + str = "0" + str; + }return str; +} + +// Given a Date object, return a string in yyyy-mm-dd format, using the +// UTC date. This may be a day off from the date in the local time zone. +function formatDateUTC(date) { + if (date instanceof Date) { + return date.getUTCFullYear() + "-" + padZeros(date.getUTCMonth() + 1, 2) + "-" + padZeros(date.getUTCDate(), 2); + } else { + return null; + } +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./filter":2,"./input":6}],10:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SelectionHandle = undefined; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _events = require("./events"); + +var _events2 = _interopRequireDefault(_events); + +var _group = require("./group"); + +var _group2 = _interopRequireDefault(_group); + +var _util = require("./util"); + +var util = _interopRequireWildcard(_util); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Use this class to read and write (and listen for changes to) the selection + * for a Crosstalk group. This is intended to be used for linked brushing. + * + * If two (or more) `SelectionHandle` instances in the same webpage share the + * same group name, they will share the same state. Setting the selection using + * one `SelectionHandle` instance will result in the `value` property instantly + * changing across the others, and `"change"` event listeners on all instances + * (including the one that initiated the sending) will fire. + * + * @param {string} [group] - The name of the Crosstalk group, or if none, + * null or undefined (or any other falsy value). This can be changed later + * via the [SelectionHandle#setGroup](#setGroup) method. + * @param {Object} [extraInfo] - An object whose properties will be copied to + * the event object whenever an event is emitted. + */ +var SelectionHandle = exports.SelectionHandle = function () { + function SelectionHandle() { + var group = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var extraInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + _classCallCheck(this, SelectionHandle); + + this._eventRelay = new _events2.default(); + this._emitter = new util.SubscriptionTracker(this._eventRelay); + + // Name of the group we're currently tracking, if any. Can change over time. + this._group = null; + // The Var we're currently tracking, if any. Can change over time. + this._var = null; + // The event handler subscription we currently have on var.on("change"). + this._varOnChangeSub = null; + + this._extraInfo = util.extend({ sender: this }, extraInfo); + + this.setGroup(group); + } + + /** + * Changes the Crosstalk group membership of this SelectionHandle. The group + * being switched away from (if any) will not have its selection value + * modified as a result of calling `setGroup`, even if this handle was the + * most recent handle to set the selection of the group. + * + * The group being switched to (if any) will also not have its selection value + * modified as a result of calling `setGroup`. If you want to set the + * selection value of the new group, call `set` explicitly. + * + * @param {string} group - The name of the Crosstalk group, or null (or + * undefined) to clear the group. + */ + + + _createClass(SelectionHandle, [{ + key: "setGroup", + value: function setGroup(group) { + var _this = this; + + // If group is unchanged, do nothing + if (this._group === group) return; + // Treat null, undefined, and other falsy values the same + if (!this._group && !group) return; + + if (this._var) { + this._var.off("change", this._varOnChangeSub); + this._var = null; + this._varOnChangeSub = null; + } + + this._group = group; + + if (group) { + this._var = (0, _group2.default)(group).var("selection"); + var sub = this._var.on("change", function (e) { + _this._eventRelay.trigger("change", e, _this); + }); + this._varOnChangeSub = sub; + } + } + + /** + * Retrieves the current selection for the group represented by this + * `SelectionHandle`. + * + * - If no selection is active, then this value will be falsy. + * - If a selection is active, but no data points are selected, then this + * value will be an empty array. + * - If a selection is active, and data points are selected, then the keys + * of the selected data points will be present in the array. + */ + + }, { + key: "_mergeExtraInfo", + + + /** + * Combines the given `extraInfo` (if any) with the handle's default + * `_extraInfo` (if any). + * @private + */ + value: function _mergeExtraInfo(extraInfo) { + // Important incidental effect: shallow clone is returned + return util.extend({}, this._extraInfo ? this._extraInfo : null, extraInfo ? extraInfo : null); + } + + /** + * Overwrites the current selection for the group, and raises the `"change"` + * event among all of the group's '`SelectionHandle` instances (including + * this one). + * + * @fires SelectionHandle#change + * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see + * {@link SelectionHandle#value}). + * @param {Object} [extraInfo] - Extra properties to be included on the event + * object that's passed to listeners (in addition to any options that were + * passed into the `SelectionHandle` constructor). + */ + + }, { + key: "set", + value: function set(selectedKeys, extraInfo) { + if (this._var) this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo)); + } + + /** + * Overwrites the current selection for the group, and raises the `"change"` + * event among all of the group's '`SelectionHandle` instances (including + * this one). + * + * @fires SelectionHandle#change + * @param {Object} [extraInfo] - Extra properties to be included on the event + * object that's passed to listeners (in addition to any that were passed + * into the `SelectionHandle` constructor). + */ + + }, { + key: "clear", + value: function clear(extraInfo) { + if (this._var) this.set(void 0, this._mergeExtraInfo(extraInfo)); + } + + /** + * Subscribes to events on this `SelectionHandle`. + * + * @param {string} eventType - Indicates the type of events to listen to. + * Currently, only `"change"` is supported. + * @param {SelectionHandle~listener} listener - The callback function that + * will be invoked when the event occurs. + * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel + * this subscription. + */ + + }, { + key: "on", + value: function on(eventType, listener) { + return this._emitter.on(eventType, listener); + } + + /** + * Cancels event subscriptions created by {@link SelectionHandle#on}. + * + * @param {string} eventType - The type of event to unsubscribe. + * @param {string|SelectionHandle~listener} listener - Either the callback + * function previously passed into {@link SelectionHandle#on}, or the + * string that was returned from {@link SelectionHandle#on}. + */ + + }, { + key: "off", + value: function off(eventType, listener) { + return this._emitter.off(eventType, listener); + } + + /** + * Shuts down the `SelectionHandle` object. + * + * Removes all event listeners that were added through this handle. + */ + + }, { + key: "close", + value: function close() { + this._emitter.removeAllListeners(); + this.setGroup(null); + } + }, { + key: "value", + get: function get() { + return this._var ? this._var.get() : null; + } + }]); + + return SelectionHandle; +}(); + +/** + * @callback SelectionHandle~listener + * @param {Object} event - An object containing details of the event. For + * `"change"` events, this includes the properties `value` (the new + * value of the selection, or `undefined` if no selection is active), + * `oldValue` (the previous value of the selection), and `sender` (the + * `SelectionHandle` instance that made the change). + */ + +/** + * @event SelectionHandle#change + * @type {object} + * @property {object} value - The new value of the selection, or `undefined` + * if no selection is active. + * @property {object} oldValue - The previous value of the selection. + * @property {SelectionHandle} sender - The `SelectionHandle` instance that + * changed the value. + */ + +},{"./events":1,"./group":4,"./util":11}],11:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.extend = extend; +exports.checkSorted = checkSorted; +exports.diffSortedLists = diffSortedLists; +exports.dataframeToD3 = dataframeToD3; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function extend(target) { + for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + sources[_key - 1] = arguments[_key]; + } + + for (var i = 0; i < sources.length; i++) { + var src = sources[i]; + if (typeof src === "undefined" || src === null) continue; + + for (var key in src) { + if (src.hasOwnProperty(key)) { + target[key] = src[key]; + } + } + } + return target; +} + +function checkSorted(list) { + for (var i = 1; i < list.length; i++) { + if (list[i] <= list[i - 1]) { + throw new Error("List is not sorted or contains duplicate"); + } + } +} + +function diffSortedLists(a, b) { + var i_a = 0; + var i_b = 0; + + if (!a) a = []; + if (!b) b = []; + + var a_only = []; + var b_only = []; + + checkSorted(a); + checkSorted(b); + + while (i_a < a.length && i_b < b.length) { + if (a[i_a] === b[i_b]) { + i_a++; + i_b++; + } else if (a[i_a] < b[i_b]) { + a_only.push(a[i_a++]); + } else { + b_only.push(b[i_b++]); + } + } + + if (i_a < a.length) a_only = a_only.concat(a.slice(i_a)); + if (i_b < b.length) b_only = b_only.concat(b.slice(i_b)); + return { + removed: a_only, + added: b_only + }; +} + +// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... } +// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ] +function dataframeToD3(df) { + var names = []; + var length = void 0; + for (var name in df) { + if (df.hasOwnProperty(name)) names.push(name); + if (_typeof(df[name]) !== "object" || typeof df[name].length === "undefined") { + throw new Error("All fields must be arrays"); + } else if (typeof length !== "undefined" && length !== df[name].length) { + throw new Error("All fields must be arrays of the same length"); + } + length = df[name].length; + } + var results = []; + var item = void 0; + for (var row = 0; row < length; row++) { + item = {}; + for (var col = 0; col < names.length; col++) { + item[names[col]] = df[names[col]][row]; + } + results.push(item); + } + return results; +} + +/** + * Keeps track of all event listener additions/removals and lets all active + * listeners be removed with a single operation. + * + * @private + */ + +var SubscriptionTracker = exports.SubscriptionTracker = function () { + function SubscriptionTracker(emitter) { + _classCallCheck(this, SubscriptionTracker); + + this._emitter = emitter; + this._subs = {}; + } + + _createClass(SubscriptionTracker, [{ + key: "on", + value: function on(eventType, listener) { + var sub = this._emitter.on(eventType, listener); + this._subs[sub] = eventType; + return sub; + } + }, { + key: "off", + value: function off(eventType, listener) { + var sub = this._emitter.off(eventType, listener); + if (sub) { + delete this._subs[sub]; + } + return sub; + } + }, { + key: "removeAllListeners", + value: function removeAllListeners() { + var _this = this; + + var current_subs = this._subs; + this._subs = {}; + Object.keys(current_subs).forEach(function (sub) { + _this._emitter.off(current_subs[sub], sub); + }); + } + }]); + + return SubscriptionTracker; +}(); + +},{}],12:[function(require,module,exports){ +(function (global){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _events = require("./events"); + +var _events2 = _interopRequireDefault(_events); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Var = function () { + function Var(group, name, /*optional*/value) { + _classCallCheck(this, Var); + + this._group = group; + this._name = name; + this._value = value; + this._events = new _events2.default(); + } + + _createClass(Var, [{ + key: "get", + value: function get() { + return this._value; + } + }, { + key: "set", + value: function set(value, /*optional*/event) { + if (this._value === value) { + // Do nothing; the value hasn't changed + return; + } + var oldValue = this._value; + this._value = value; + // Alert JavaScript listeners that the value has changed + var evt = {}; + if (event && (typeof event === "undefined" ? "undefined" : _typeof(event)) === "object") { + for (var k in event) { + if (event.hasOwnProperty(k)) evt[k] = event[k]; + } + } + evt.oldValue = oldValue; + evt.value = value; + this._events.trigger("change", evt, this); + + // TODO: Make this extensible, to let arbitrary back-ends know that + // something has changed + if (global.Shiny && global.Shiny.onInputChange) { + global.Shiny.onInputChange(".clientValue-" + (this._group.name !== null ? this._group.name + "-" : "") + this._name, typeof value === "undefined" ? null : value); + } + } + }, { + key: "on", + value: function on(eventType, listener) { + return this._events.on(eventType, listener); + } + }, { + key: "off", + value: function off(eventType, listener) { + return this._events.off(eventType, listener); + } + }]); + + return Var; +}(); + +exports.default = Var; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./events":1}]},{},[5]) +//# sourceMappingURL=crosstalk.js.map diff --git a/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js.map b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js.map new file mode 100644 index 00000000..cff94f08 --- /dev/null +++ b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.js.map @@ -0,0 +1,37 @@ +{ + "version": 3, + "sources": [ + "node_modules/browser-pack/_prelude.js", + "javascript/src/events.js", + "javascript/src/filter.js", + "javascript/src/filterset.js", + "javascript/src/group.js", + "javascript/src/index.js", + "javascript/src/input.js", + "javascript/src/input_checkboxgroup.js", + "javascript/src/input_selectize.js", + "javascript/src/input_slider.js", + "javascript/src/selection.js", + "javascript/src/util.js", + "javascript/src/var.js" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;ICAqB,M;AACnB,oBAAc;AAAA;;AACZ,SAAK,MAAL,GAAc,EAAd;AACA,SAAK,IAAL,GAAY,CAAZ;AACD;;;;uBAEE,S,EAAW,Q,EAAU;AACtB,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,UAAI,CAAC,IAAL,EAAW;AACT,eAAO,KAAK,MAAL,CAAY,SAAZ,IAAyB,EAAhC;AACD;AACD,UAAI,MAAM,QAAS,KAAK,IAAL,EAAnB;AACA,WAAK,GAAL,IAAY,QAAZ;AACA,aAAO,GAAP;AACD;;AAED;;;;wBACI,S,EAAW,Q,EAAU;AACvB,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,UAAI,OAAO,QAAP,KAAqB,UAAzB,EAAqC;AACnC,aAAK,IAAI,GAAT,IAAgB,IAAhB,EAAsB;AACpB,cAAI,KAAK,cAAL,CAAoB,GAApB,CAAJ,EAA8B;AAC5B,gBAAI,KAAK,GAAL,MAAc,QAAlB,EAA4B;AAC1B,qBAAO,KAAK,GAAL,CAAP;AACA,qBAAO,GAAP;AACD;AACF;AACF;AACD,eAAO,KAAP;AACD,OAVD,MAUO,IAAI,OAAO,QAAP,KAAqB,QAAzB,EAAmC;AACxC,YAAI,QAAQ,KAAK,QAAL,CAAZ,EAA4B;AAC1B,iBAAO,KAAK,QAAL,CAAP;AACA,iBAAO,QAAP;AACD;AACD,eAAO,KAAP;AACD,OANM,MAMA;AACL,cAAM,IAAI,KAAJ,CAAU,8BAAV,CAAN;AACD;AACF;;;4BAEO,S,EAAW,G,EAAK,O,EAAS;AAC/B,UAAI,OAAO,KAAK,MAAL,CAAY,SAAZ,CAAX;AACA,WAAK,IAAI,GAAT,IAAgB,IAAhB,EAAsB;AACpB,YAAI,KAAK,cAAL,CAAoB,GAApB,CAAJ,EAA8B;AAC5B,eAAK,GAAL,EAAU,IAAV,CAAe,OAAf,EAAwB,GAAxB;AACD;AACF;AACF;;;;;;kBA/CkB,M;;;;;;;;;;;;ACArB;;;;AACA;;;;AACA;;;;AACA;;IAAY,I;;;;;;;;AAEZ,SAAS,YAAT,CAAsB,KAAtB,EAA6B;AAC3B,MAAI,QAAQ,MAAM,GAAN,CAAU,WAAV,CAAZ;AACA,MAAI,SAAS,MAAM,GAAN,EAAb;AACA,MAAI,CAAC,MAAL,EAAa;AACX,aAAS,yBAAT;AACA,UAAM,GAAN,CAAU,MAAV;AACD;AACD,SAAO,MAAP;AACD;;AAED,IAAI,KAAK,CAAT;AACA,SAAS,MAAT,GAAkB;AAChB,SAAO,IAAP;AACD;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;IAwBa,Y,WAAA,Y;AACX,wBAAY,KAAZ,EAAmB,SAAnB,EAA8B;AAAA;;AAC5B,SAAK,WAAL,GAAmB,sBAAnB;AACA,SAAK,QAAL,GAAgB,IAAI,KAAK,mBAAT,CAA6B,KAAK,WAAlC,CAAhB;;AAEA;AACA,SAAK,MAAL,GAAc,IAAd;AACA;AACA,SAAK,UAAL,GAAkB,IAAlB;AACA;AACA,SAAK,UAAL,GAAkB,IAAlB;AACA;AACA,SAAK,eAAL,GAAuB,IAAvB;;AAEA,SAAK,UAAL,GAAkB,KAAK,MAAL,CAAY,EAAE,QAAQ,IAAV,EAAZ,EAA8B,SAA9B,CAAlB;;AAEA,SAAK,GAAL,GAAW,WAAW,QAAtB;;AAEA,SAAK,QAAL,CAAc,KAAd;AACD;;AAED;;;;;;;;;;;;;;6BAUS,K,EAAO;AAAA;;AACd;AACA,UAAI,KAAK,MAAL,KAAgB,KAApB,EACE;AACF;AACA,UAAI,CAAC,KAAK,MAAN,IAAgB,CAAC,KAArB,EACE;;AAEF,UAAI,KAAK,UAAT,EAAqB;AACnB,aAAK,UAAL,CAAgB,GAAhB,CAAoB,QAApB,EAA8B,KAAK,eAAnC;AACA,aAAK,KAAL;AACA,aAAK,eAAL,GAAuB,IAAvB;AACA,aAAK,UAAL,GAAkB,IAAlB;AACA,aAAK,UAAL,GAAkB,IAAlB;AACD;;AAED,WAAK,MAAL,GAAc,KAAd;;AAEA,UAAI,KAAJ,EAAW;AACT,gBAAQ,qBAAI,KAAJ,CAAR;AACA,aAAK,UAAL,GAAkB,aAAa,KAAb,CAAlB;AACA,aAAK,UAAL,GAAkB,qBAAI,KAAJ,EAAW,GAAX,CAAe,QAAf,CAAlB;AACA,YAAI,MAAM,KAAK,UAAL,CAAgB,EAAhB,CAAmB,QAAnB,EAA6B,UAAC,CAAD,EAAO;AAC5C,gBAAK,WAAL,CAAiB,OAAjB,CAAyB,QAAzB,EAAmC,CAAnC;AACD,SAFS,CAAV;AAGA,aAAK,eAAL,GAAuB,GAAvB;AACD;AACF;;AAED;;;;;;;;oCAKgB,S,EAAW;AACzB,aAAO,KAAK,MAAL,CAAY,EAAZ,EACL,KAAK,UAAL,GAAkB,KAAK,UAAvB,GAAoC,IAD/B,EAEL,YAAY,SAAZ,GAAwB,IAFnB,CAAP;AAGD;;AAED;;;;;;;4BAIQ;AACN,WAAK,QAAL,CAAc,kBAAd;AACA,WAAK,KAAL;AACA,WAAK,QAAL,CAAc,IAAd;AACD;;AAED;;;;;;;;;;;;0BASM,S,EAAW;AACf,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,KAAhB,CAAsB,KAAK,GAA3B;AACA,WAAK,SAAL,CAAe,SAAf;AACD;;AAED;;;;;;;;;;;;;;;;;;;;wBAiBI,I,EAAM,S,EAAW;AACnB,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,MAAhB,CAAuB,KAAK,GAA5B,EAAiC,IAAjC;AACA,WAAK,SAAL,CAAe,SAAf;AACD;;AAED;;;;;;;;;;AASA;;;;;;;;;;uBAUG,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;AAED;;;;;;;;;;;wBAQI,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAP;AACD;;;8BAES,S,EAAW;AACnB,UAAI,CAAC,KAAK,UAAV,EACE;AACF,WAAK,UAAL,CAAgB,GAAhB,CAAoB,KAAK,UAAL,CAAgB,KAApC,EAA2C,KAAK,eAAL,CAAqB,SAArB,CAA3C;AACD;;AAED;;;;;;;;;;;wBApCmB;AACjB,aAAO,KAAK,UAAL,GAAkB,KAAK,UAAL,CAAgB,KAAlC,GAA0C,IAAjD;AACD;;;;;;AA6CH;;;;;;;;;;;;;;;;;;;ACzNA;;;;AAEA,SAAS,iBAAT,CAA2B,CAA3B,EAA8B,CAA9B,EAAiC;AAC/B,MAAI,MAAM,CAAV,EAAa;AACX,WAAO,CAAP;AACD,GAFD,MAEO,IAAI,IAAI,CAAR,EAAW;AAChB,WAAO,CAAC,CAAR;AACD,GAFM,MAEA,IAAI,IAAI,CAAR,EAAW;AAChB,WAAO,CAAP;AACD;AACF;;AAED;;;;IAGqB,S;AACnB,uBAAc;AAAA;;AACZ,SAAK,KAAL;AACD;;;;4BAEO;AACN;AACA,WAAK,QAAL,GAAgB,EAAhB;AACA;AACA,WAAK,KAAL,GAAa,EAAb;AACA,WAAK,MAAL,GAAc,IAAd;AACA,WAAK,cAAL,GAAsB,CAAtB;AACD;;;2BAMM,Q,EAAU,I,EAAM;AACrB,UAAI,SAAS,IAAb,EAAmB;AACjB,eAAO,KAAK,KAAL,CAAW,CAAX,CAAP,CADiB,CACK;AACtB,aAAK,IAAL,CAAU,iBAAV;AACD;;AAJoB,6BAME,2BAAgB,KAAK,QAAL,CAAc,QAAd,CAAhB,EAAyC,IAAzC,CANF;AAAA,UAMhB,KANgB,oBAMhB,KANgB;AAAA,UAMT,OANS,oBAMT,OANS;;AAOrB,WAAK,QAAL,CAAc,QAAd,IAA0B,IAA1B;;AAEA,WAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,MAAM,MAA1B,EAAkC,GAAlC,EAAuC;AACrC,aAAK,KAAL,CAAW,MAAM,CAAN,CAAX,IAAuB,CAAC,KAAK,KAAL,CAAW,MAAM,CAAN,CAAX,KAAwB,CAAzB,IAA8B,CAArD;AACD;AACD,WAAK,IAAI,KAAI,CAAb,EAAgB,KAAI,QAAQ,MAA5B,EAAoC,IAApC,EAAyC;AACvC,aAAK,KAAL,CAAW,QAAQ,EAAR,CAAX;AACD;;AAED,WAAK,YAAL,CAAkB,IAAlB;AACD;;AAED;;;;;;;;mCAKmC;AAAA,UAAtB,IAAsB,uEAAf,KAAK,QAAU;;AACjC,UAAI,cAAc,OAAO,IAAP,CAAY,KAAK,QAAjB,EAA2B,MAA7C;AACA,UAAI,gBAAgB,CAApB,EAAuB;AACrB,aAAK,MAAL,GAAc,IAAd;AACD,OAFD,MAEO;AACL,aAAK,MAAL,GAAc,EAAd;AACA,aAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,cAAI,QAAQ,KAAK,KAAL,CAAW,KAAK,CAAL,CAAX,CAAZ;AACA,cAAI,UAAU,WAAd,EAA2B;AACzB,iBAAK,MAAL,CAAY,IAAZ,CAAiB,KAAK,CAAL,CAAjB;AACD;AACF;AACF;AACF;;;0BAEK,Q,EAAU;AACd,UAAI,OAAO,KAAK,QAAL,CAAc,QAAd,CAAP,KAAoC,WAAxC,EAAqD;AACnD;AACD;;AAED,UAAI,OAAO,KAAK,QAAL,CAAc,QAAd,CAAX;AACA,UAAI,CAAC,IAAL,EAAW;AACT,eAAO,EAAP;AACD;;AAED,WAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,aAAK,KAAL,CAAW,KAAK,CAAL,CAAX;AACD;AACD,aAAO,KAAK,QAAL,CAAc,QAAd,CAAP;;AAEA,WAAK,YAAL;AACD;;;wBA3DW;AACV,aAAO,KAAK,MAAZ;AACD;;;wBA2Dc;AACb,UAAI,UAAU,OAAO,IAAP,CAAY,KAAK,KAAjB,CAAd;AACA,cAAQ,IAAR,CAAa,iBAAb;AACA,aAAO,OAAP;AACD;;;;;;kBA/EkB,S;;;;;;;;;;;;;;kBCRG,K;;AAPxB;;;;;;;;AAEA;AACA;AACA,OAAO,kBAAP,GAA4B,OAAO,kBAAP,IAA6B,EAAzD;AACA,IAAI,SAAS,OAAO,kBAApB;;AAEe,SAAS,KAAT,CAAe,SAAf,EAA0B;AACvC,MAAI,aAAa,OAAO,SAAP,KAAsB,QAAvC,EAAiD;AAC/C,QAAI,CAAC,OAAO,cAAP,CAAsB,SAAtB,CAAL,EAAuC;AACrC,aAAO,SAAP,IAAoB,IAAI,KAAJ,CAAU,SAAV,CAApB;AACD;AACD,WAAO,OAAO,SAAP,CAAP;AACD,GALD,MAKO,IAAI,QAAO,SAAP,yCAAO,SAAP,OAAsB,QAAtB,IAAkC,UAAU,KAA5C,IAAqD,UAAU,GAAnE,EAAwE;AAC7E;AACA,WAAO,SAAP;AACD,GAHM,MAGA,IAAI,MAAM,OAAN,CAAc,SAAd,KACP,UAAU,MAAV,IAAoB,CADb,IAEP,OAAO,UAAU,CAAV,CAAP,KAAyB,QAFtB,EAEgC;AACrC,WAAO,MAAM,UAAU,CAAV,CAAN,CAAP;AACD,GAJM,MAIA;AACL,UAAM,IAAI,KAAJ,CAAU,4BAAV,CAAN;AACD;AACF;;IAEK,K;AACJ,iBAAY,IAAZ,EAAkB;AAAA;;AAChB,SAAK,IAAL,GAAY,IAAZ;AACA,SAAK,KAAL,GAAa,EAAb;AACD;;;;yBAEG,I,EAAM;AACR,UAAI,CAAC,IAAD,IAAS,OAAO,IAAP,KAAiB,QAA9B,EAAwC;AACtC,cAAM,IAAI,KAAJ,CAAU,kBAAV,CAAN;AACD;;AAED,UAAI,CAAC,KAAK,KAAL,CAAW,cAAX,CAA0B,IAA1B,CAAL,EACE,KAAK,KAAL,CAAW,IAAX,IAAmB,kBAAQ,IAAR,EAAc,IAAd,CAAnB;AACF,aAAO,KAAK,KAAL,CAAW,IAAX,CAAP;AACD;;;wBAEG,I,EAAM;AACR,UAAI,CAAC,IAAD,IAAS,OAAO,IAAP,KAAiB,QAA9B,EAAwC;AACtC,cAAM,IAAI,KAAJ,CAAU,kBAAV,CAAN;AACD;;AAED,aAAO,KAAK,KAAL,CAAW,cAAX,CAA0B,IAA1B,CAAP;AACD;;;;;;;;;;;;;;;;AC/CH;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAM,eAAe,qBAAM,SAAN,CAArB;;AAEA,SAAS,IAAT,CAAc,IAAd,EAAoB;AAClB,SAAO,aAAa,GAAb,CAAiB,IAAjB,CAAP;AACD;;AAED,SAAS,GAAT,CAAa,IAAb,EAAmB;AACjB,SAAO,aAAa,GAAb,CAAiB,IAAjB,CAAP;AACD;;AAED,IAAI,OAAO,KAAX,EAAkB;AAChB,SAAO,KAAP,CAAa,uBAAb,CAAqC,qBAArC,EAA4D,UAAS,OAAT,EAAkB;AAC5E,QAAI,OAAO,QAAQ,KAAf,KAA0B,QAA9B,EAAwC;AACtC,2BAAM,QAAQ,KAAd,EAAqB,GAArB,CAAyB,QAAQ,IAAjC,EAAuC,GAAvC,CAA2C,QAAQ,KAAnD;AACD,KAFD,MAEO;AACL,WAAK,QAAQ,IAAb,EAAmB,GAAnB,CAAuB,QAAQ,KAA/B;AACD;AACF,GAND;AAOD;;AAED,IAAM,YAAY;AAChB,wBADgB;AAEhB,OAAK,IAFW;AAGhB,OAAK,GAHW;AAIhB,6CAJgB;AAKhB,oCALgB;AAMhB;AANgB,CAAlB;;AASA;;;kBAGe,S;;AACf,OAAO,SAAP,GAAmB,SAAnB;;;;;;;;;;;QCrCgB,Q,GAAA,Q;QAWA,I,GAAA,I;AAfhB,IAAI,IAAI,OAAO,MAAf;;AAEA,IAAI,WAAW,EAAf;;AAEO,SAAS,QAAT,CAAkB,GAAlB,EAAuB;AAC5B,WAAS,IAAI,SAAb,IAA0B,GAA1B;AACA,MAAI,OAAO,QAAP,IAAmB,OAAO,QAAP,CAAgB,UAAhB,KAA+B,UAAtD,EAAkE;AAChE,MAAE,YAAM;AACN;AACD,KAFD;AAGD,GAJD,MAIO,IAAI,OAAO,QAAX,EAAqB;AAC1B,eAAW,IAAX,EAAiB,GAAjB;AACD;AACF;;AAEM,SAAS,IAAT,GAAgB;AACrB,SAAO,IAAP,CAAY,QAAZ,EAAsB,OAAtB,CAA8B,UAAS,SAAT,EAAoB;AAChD,QAAI,UAAU,SAAS,SAAT,CAAd;AACA,MAAE,MAAM,QAAQ,SAAhB,EAA2B,GAA3B,CAA+B,wBAA/B,EAAyD,IAAzD,CAA8D,UAAS,CAAT,EAAY,EAAZ,EAAgB;AAC5E,mBAAa,OAAb,EAAsB,EAAtB;AACD,KAFD;AAGD,GALD;AAMD;;AAED;AACA,SAAS,OAAT,CAAiB,GAAjB,EAAsB;AACpB,SAAO,IAAI,OAAJ,CAAY,uCAAZ,EAAqD,MAArD,CAAP;AACD;;AAED,SAAS,MAAT,CAAgB,EAAhB,EAAoB;AAClB,MAAI,MAAM,EAAE,EAAF,CAAV;AACA,SAAO,IAAP,CAAY,QAAZ,EAAsB,OAAtB,CAA8B,UAAS,SAAT,EAAoB;AAChD,QAAI,IAAI,QAAJ,CAAa,SAAb,KAA2B,CAAC,IAAI,QAAJ,CAAa,uBAAb,CAAhC,EAAuE;AACrE,UAAI,UAAU,SAAS,SAAT,CAAd;AACA,mBAAa,OAAb,EAAsB,EAAtB;AACD;AACF,GALD;AAMD;;AAED,SAAS,YAAT,CAAsB,OAAtB,EAA+B,EAA/B,EAAmC;AACjC,MAAI,SAAS,EAAE,EAAF,EAAM,IAAN,CAAW,+CAA+C,QAAQ,GAAG,EAAX,CAA/C,GAAgE,IAA3E,CAAb;AACA,MAAI,OAAO,KAAK,KAAL,CAAW,OAAO,CAAP,EAAU,SAArB,CAAX;;AAEA,MAAI,WAAW,QAAQ,OAAR,CAAgB,EAAhB,EAAoB,IAApB,CAAf;AACA,IAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,QAAjC;AACA,IAAE,EAAF,EAAM,QAAN,CAAe,uBAAf;AACD;;AAED,IAAI,OAAO,KAAX,EAAkB;AAChB,MAAI,eAAe,IAAI,OAAO,KAAP,CAAa,YAAjB,EAAnB;AACA,MAAI,KAAI,OAAO,MAAf;AACA,KAAE,MAAF,CAAS,YAAT,EAAuB;AACrB,UAAM,cAAS,KAAT,EAAgB;AACpB,aAAO,GAAE,KAAF,EAAS,IAAT,CAAc,kBAAd,CAAP;AACD,KAHoB;AAIrB,gBAAY,oBAAS,EAAT,EAAa;AACvB,UAAI,CAAC,GAAE,EAAF,EAAM,QAAN,CAAe,uBAAf,CAAL,EAA8C;AAC5C,eAAO,EAAP;AACD;AACF,KARoB;AASrB,WAAO,eAAS,EAAT,EAAa;AAClB,aAAO,GAAG,EAAV;AACD,KAXoB;AAYrB,cAAU,kBAAS,EAAT,EAAa,CAEtB,CAdoB;AAerB,cAAU,kBAAS,EAAT,EAAa,KAAb,EAAoB,CAE7B,CAjBoB;AAkBrB,oBAAgB,wBAAS,EAAT,EAAa,IAAb,EAAmB,CAElC,CApBoB;AAqBrB,eAAW,mBAAS,EAAT,EAAa,QAAb,EAAuB;AAChC,SAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,MAAjC;AACD,KAvBoB;AAwBrB,iBAAa,qBAAS,EAAT,EAAa;AACxB,SAAE,EAAF,EAAM,IAAN,CAAW,oBAAX,EAAiC,OAAjC;AACD;AA1BoB,GAAvB;AA4BA,SAAO,KAAP,CAAa,aAAb,CAA2B,QAA3B,CAAoC,YAApC,EAAkD,wBAAlD;AACD;;;;;;;;AChFD;;IAAY,K;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,+BADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;AAIA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,sBAAJ;AACA,QAAI,MAAM,EAAE,EAAF,CAAV;AACA,QAAI,EAAJ,CAAO,QAAP,EAAiB,wBAAjB,EAA2C,YAAW;AACpD,UAAI,UAAU,IAAI,IAAJ,CAAS,gCAAT,CAAd;AACA,UAAI,QAAQ,MAAR,KAAmB,CAAvB,EAA0B;AACxB,wBAAgB,IAAhB;AACA,iBAAS,KAAT;AACD,OAHD,MAGO;AACL,YAAI,OAAO,EAAX;AACA,gBAAQ,IAAR,CAAa,YAAW;AACtB,eAAK,GAAL,CAAS,KAAK,KAAd,EAAqB,OAArB,CAA6B,UAAS,GAAT,EAAc;AACzC,iBAAK,GAAL,IAAY,IAAZ;AACD,WAFD;AAGD,SAJD;AAKA,YAAI,WAAW,OAAO,IAAP,CAAY,IAAZ,CAAf;AACA,iBAAS,IAAT;AACA,wBAAgB,QAAhB;AACA,iBAAS,GAAT,CAAa,QAAb;AACD;AACF,KAjBD;;AAmBA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AAxCY,CAAf;;;;;;;;ACLA;;IAAY,K;;AACZ;;IAAY,I;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,wBADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;;;AAMA,QAAI,QAAQ,CAAC,EAAC,OAAO,EAAR,EAAY,OAAO,OAAnB,EAAD,CAAZ;AACA,QAAI,QAAQ,KAAK,aAAL,CAAmB,KAAK,KAAxB,CAAZ;AACA,QAAI,OAAO;AACT,eAAS,MAAM,MAAN,CAAa,KAAb,CADA;AAET,kBAAY,OAFH;AAGT,kBAAY,OAHH;AAIT,mBAAa;AAJJ,KAAX;;AAOA,QAAI,SAAS,EAAE,EAAF,EAAM,IAAN,CAAW,QAAX,EAAqB,CAArB,CAAb;;AAEA,QAAI,YAAY,EAAE,MAAF,EAAU,SAAV,CAAoB,IAApB,EAA0B,CAA1B,EAA6B,SAA7C;;AAEA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,sBAAJ;AACA,cAAU,EAAV,CAAa,QAAb,EAAuB,YAAW;AAChC,UAAI,UAAU,KAAV,CAAgB,MAAhB,KAA2B,CAA/B,EAAkC;AAChC,wBAAgB,IAAhB;AACA,iBAAS,KAAT;AACD,OAHD,MAGO;AACL,YAAI,OAAO,EAAX;AACA,kBAAU,KAAV,CAAgB,OAAhB,CAAwB,UAAS,KAAT,EAAgB;AACtC,eAAK,GAAL,CAAS,KAAT,EAAgB,OAAhB,CAAwB,UAAS,GAAT,EAAc;AACpC,iBAAK,GAAL,IAAY,IAAZ;AACD,WAFD;AAGD,SAJD;AAKA,YAAI,WAAW,OAAO,IAAP,CAAY,IAAZ,CAAf;AACA,iBAAS,IAAT;AACA,wBAAgB,QAAhB;AACA,iBAAS,GAAT,CAAa,QAAb;AACD;AACF,KAhBD;;AAkBA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AArDY,CAAf;;;;;;;;;;ACNA;;IAAY,K;;AACZ;;;;AAEA,IAAI,IAAI,OAAO,MAAf;AACA,IAAI,WAAW,OAAO,QAAtB;;AAEA,MAAM,QAAN,CAAe;AACb,aAAW,wBADE;;AAGb,WAAS,iBAAS,EAAT,EAAa,IAAb,EAAmB;AAC1B;;;;AAIA,QAAI,WAAW,yBAAiB,KAAK,KAAtB,CAAf;;AAEA,QAAI,OAAO,EAAX;AACA,QAAI,MAAM,EAAE,EAAF,EAAM,IAAN,CAAW,OAAX,CAAV;AACA,QAAI,WAAW,IAAI,IAAJ,CAAS,WAAT,CAAf;AACA,QAAI,aAAa,IAAI,IAAJ,CAAS,aAAT,CAAjB;AACA,QAAI,QAAQ,IAAI,IAAJ,CAAS,OAAT,CAAZ;AACA,QAAI,sBAAJ;;AAEA;AACA,QAAI,aAAa,MAAjB,EAAyB;AACvB,sBAAgB,SAAS,GAAT,EAAhB;AACA,WAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,eAAO,cAAc,UAAd,EAA0B,IAAI,IAAJ,CAAS,GAAT,CAA1B,CAAP;AACD,OAFD;AAID,KAND,MAMO,IAAI,aAAa,UAAjB,EAA6B;AAClC,UAAI,WAAW,IAAI,IAAJ,CAAS,UAAT,CAAf;AACA,UAAI,QAAJ,EACE,gBAAgB,SAAS,QAAT,CAAkB,QAAlB,CAAhB,CADF,KAGE,gBAAgB,QAAhB;;AAEF,WAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,eAAO,cAAc,UAAd,EAA0B,IAAI,IAAJ,CAAS,GAAT,CAA1B,CAAP;AACD,OAFD;AAGD,KAVM,MAUA,IAAI,aAAa,QAAjB,EAA2B;AAChC,UAAI,OAAO,KAAP,KAAiB,WAArB,EACE,KAAK,QAAL,GAAgB,UAAS,GAAT,EAAc;AAC5B,YAAI,SAAS,KAAK,GAAL,CAAS,EAAT,EAAa,KAAb,CAAb;AACA,eAAO,KAAK,KAAL,CAAW,MAAM,MAAjB,IAA2B,MAAlC;AACD,OAHD;AAIH;;AAED,QAAI,cAAJ,CAAmB,IAAnB;;AAEA,aAAS,QAAT,GAAoB;AAClB,UAAI,SAAS,IAAI,IAAJ,CAAS,gBAAT,EAA2B,MAAxC;;AAEA;AACA,UAAI,gBAAJ;AACA,UAAI,WAAW,IAAI,IAAJ,CAAS,WAAT,CAAf;AACA,UAAI,aAAa,MAAjB,EAAyB;AACvB,kBAAU,iBAAS,GAAT,EAAc;AACtB,iBAAO,cAAc,IAAI,IAAJ,CAAS,CAAC,GAAV,CAAd,CAAP;AACD,SAFD;AAGD,OAJD,MAIO,IAAI,aAAa,UAAjB,EAA6B;AAClC,kBAAU,iBAAS,GAAT,EAAc;AACtB;AACA,iBAAO,CAAC,GAAD,GAAO,IAAd;AACD,SAHD;AAID,OALM,MAKA;AACL,kBAAU,iBAAS,GAAT,EAAc;AAAE,iBAAO,CAAC,GAAR;AAAc,SAAxC;AACD;;AAED,UAAI,IAAI,IAAJ,CAAS,gBAAT,EAA2B,OAA3B,CAAmC,IAAnC,KAA4C,QAAhD,EAA0D;AACxD,eAAO,CAAC,QAAQ,OAAO,IAAf,CAAD,EAAuB,QAAQ,OAAO,EAAf,CAAvB,CAAP;AACD,OAFD,MAEO;AACL,eAAO,QAAQ,OAAO,IAAf,CAAP;AACD;AACF;;AAED,QAAI,gBAAgB,IAApB;;AAEA,QAAI,EAAJ,CAAO,6BAAP,EAAsC,UAAS,KAAT,EAAgB;AACpD,UAAI,CAAC,IAAI,IAAJ,CAAS,UAAT,CAAD,IAAyB,CAAC,IAAI,IAAJ,CAAS,WAAT,CAA9B,EAAqD;AAAA,wBAClC,UADkC;AAAA;AAAA,YAC9C,IAD8C;AAAA,YACxC,EADwC;;AAEnD,YAAI,OAAO,EAAX;AACA,aAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAL,CAAY,MAAhC,EAAwC,GAAxC,EAA6C;AAC3C,cAAI,MAAM,KAAK,MAAL,CAAY,CAAZ,CAAV;AACA,cAAI,OAAO,IAAP,IAAe,OAAO,EAA1B,EAA8B;AAC5B,iBAAK,IAAL,CAAU,KAAK,IAAL,CAAU,CAAV,CAAV;AACD;AACF;AACD,aAAK,IAAL;AACA,iBAAS,GAAT,CAAa,IAAb;AACA,wBAAgB,IAAhB;AACD;AACF,KAdD;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAO;AACL,eAAS,mBAAW;AAClB,iBAAS,KAAT;AACD,OAHI;AAIL,cAAQ,kBAAW;AACjB,YAAI,aAAJ,EACE,SAAS,GAAT,CAAa,aAAb;AACH;AAPI,KAAP;AASD;AApHY,CAAf;;AAwHA;AACA,SAAS,QAAT,CAAkB,CAAlB,EAAqB,MAArB,EAA6B;AAC3B,MAAI,MAAM,EAAE,QAAF,EAAV;AACA,SAAO,IAAI,MAAJ,GAAa,MAApB;AACE,UAAM,MAAM,GAAZ;AADF,GAEA,OAAO,GAAP;AACD;;AAED;AACA;AACA,SAAS,aAAT,CAAuB,IAAvB,EAA6B;AAC3B,MAAI,gBAAgB,IAApB,EAA0B;AACxB,WAAO,KAAK,cAAL,KAAwB,GAAxB,GACA,SAAS,KAAK,WAAL,KAAmB,CAA5B,EAA+B,CAA/B,CADA,GACoC,GADpC,GAEA,SAAS,KAAK,UAAL,EAAT,EAA4B,CAA5B,CAFP;AAID,GALD,MAKO;AACL,WAAO,IAAP;AACD;AACF;;;;;;;;;;;;;;ACjJD;;;;AACA;;;;AACA;;IAAY,I;;;;;;;;AAEZ;;;;;;;;;;;;;;;;IAgBa,e,WAAA,e;AAEX,6BAA4C;AAAA,QAAhC,KAAgC,uEAAxB,IAAwB;AAAA,QAAlB,SAAkB,uEAAN,IAAM;;AAAA;;AAC1C,SAAK,WAAL,GAAmB,sBAAnB;AACA,SAAK,QAAL,GAAgB,IAAI,KAAK,mBAAT,CAA6B,KAAK,WAAlC,CAAhB;;AAEA;AACA,SAAK,MAAL,GAAc,IAAd;AACA;AACA,SAAK,IAAL,GAAY,IAAZ;AACA;AACA,SAAK,eAAL,GAAuB,IAAvB;;AAEA,SAAK,UAAL,GAAkB,KAAK,MAAL,CAAY,EAAE,QAAQ,IAAV,EAAZ,EAA8B,SAA9B,CAAlB;;AAEA,SAAK,QAAL,CAAc,KAAd;AACD;;AAED;;;;;;;;;;;;;;;;;6BAaS,K,EAAO;AAAA;;AACd;AACA,UAAI,KAAK,MAAL,KAAgB,KAApB,EACE;AACF;AACA,UAAI,CAAC,KAAK,MAAN,IAAgB,CAAC,KAArB,EACE;;AAEF,UAAI,KAAK,IAAT,EAAe;AACb,aAAK,IAAL,CAAU,GAAV,CAAc,QAAd,EAAwB,KAAK,eAA7B;AACA,aAAK,IAAL,GAAY,IAAZ;AACA,aAAK,eAAL,GAAuB,IAAvB;AACD;;AAED,WAAK,MAAL,GAAc,KAAd;;AAEA,UAAI,KAAJ,EAAW;AACT,aAAK,IAAL,GAAY,qBAAI,KAAJ,EAAW,GAAX,CAAe,WAAf,CAAZ;AACA,YAAI,MAAM,KAAK,IAAL,CAAU,EAAV,CAAa,QAAb,EAAuB,UAAC,CAAD,EAAO;AACtC,gBAAK,WAAL,CAAiB,OAAjB,CAAyB,QAAzB,EAAmC,CAAnC;AACD,SAFS,CAAV;AAGA,aAAK,eAAL,GAAuB,GAAvB;AACD;AACF;;AAED;;;;;;;;;;;;;;;AAcA;;;;;oCAKgB,S,EAAW;AACzB;AACA,aAAO,KAAK,MAAL,CAAY,EAAZ,EACL,KAAK,UAAL,GAAkB,KAAK,UAAvB,GAAoC,IAD/B,EAEL,YAAY,SAAZ,GAAwB,IAFnB,CAAP;AAGD;;AAED;;;;;;;;;;;;;;;wBAYI,Y,EAAc,S,EAAW;AAC3B,UAAI,KAAK,IAAT,EACE,KAAK,IAAL,CAAU,GAAV,CAAc,YAAd,EAA4B,KAAK,eAAL,CAAqB,SAArB,CAA5B;AACH;;AAED;;;;;;;;;;;;;0BAUM,S,EAAW;AACf,UAAI,KAAK,IAAT,EACE,KAAK,GAAL,CAAS,KAAK,CAAd,EAAiB,KAAK,eAAL,CAAqB,SAArB,CAAjB;AACH;;AAED;;;;;;;;;;;;;uBAUG,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;AAED;;;;;;;;;;;wBAQI,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAP;AACD;;AAED;;;;;;;;4BAKQ;AACN,WAAK,QAAL,CAAc,kBAAd;AACA,WAAK,QAAL,CAAc,IAAd;AACD;;;wBAlFW;AACV,aAAO,KAAK,IAAL,GAAY,KAAK,IAAL,CAAU,GAAV,EAAZ,GAA8B,IAArC;AACD;;;;;;AAmFH;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;QCpLgB,M,GAAA,M;QAeA,W,GAAA,W;QAQA,e,GAAA,e;QAoCA,a,GAAA,a;;;;AA3DT,SAAS,MAAT,CAAgB,MAAhB,EAAoC;AAAA,oCAAT,OAAS;AAAT,WAAS;AAAA;;AACzC,OAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,QAAQ,MAA5B,EAAoC,GAApC,EAAyC;AACvC,QAAI,MAAM,QAAQ,CAAR,CAAV;AACA,QAAI,OAAO,GAAP,KAAgB,WAAhB,IAA+B,QAAQ,IAA3C,EACE;;AAEF,SAAK,IAAI,GAAT,IAAgB,GAAhB,EAAqB;AACnB,UAAI,IAAI,cAAJ,CAAmB,GAAnB,CAAJ,EAA6B;AAC3B,eAAO,GAAP,IAAc,IAAI,GAAJ,CAAd;AACD;AACF;AACF;AACD,SAAO,MAAP;AACD;;AAEM,SAAS,WAAT,CAAqB,IAArB,EAA2B;AAChC,OAAK,IAAI,IAAI,CAAb,EAAgB,IAAI,KAAK,MAAzB,EAAiC,GAAjC,EAAsC;AACpC,QAAI,KAAK,CAAL,KAAW,KAAK,IAAE,CAAP,CAAf,EAA0B;AACxB,YAAM,IAAI,KAAJ,CAAU,0CAAV,CAAN;AACD;AACF;AACF;;AAEM,SAAS,eAAT,CAAyB,CAAzB,EAA4B,CAA5B,EAA+B;AACpC,MAAI,MAAM,CAAV;AACA,MAAI,MAAM,CAAV;;AAEA,MAAI,CAAC,CAAL,EAAQ,IAAI,EAAJ;AACR,MAAI,CAAC,CAAL,EAAQ,IAAI,EAAJ;;AAER,MAAI,SAAS,EAAb;AACA,MAAI,SAAS,EAAb;;AAEA,cAAY,CAAZ;AACA,cAAY,CAAZ;;AAEA,SAAO,MAAM,EAAE,MAAR,IAAkB,MAAM,EAAE,MAAjC,EAAyC;AACvC,QAAI,EAAE,GAAF,MAAW,EAAE,GAAF,CAAf,EAAuB;AACrB;AACA;AACD,KAHD,MAGO,IAAI,EAAE,GAAF,IAAS,EAAE,GAAF,CAAb,EAAqB;AAC1B,aAAO,IAAP,CAAY,EAAE,KAAF,CAAZ;AACD,KAFM,MAEA;AACL,aAAO,IAAP,CAAY,EAAE,KAAF,CAAZ;AACD;AACF;;AAED,MAAI,MAAM,EAAE,MAAZ,EACE,SAAS,OAAO,MAAP,CAAc,EAAE,KAAF,CAAQ,GAAR,CAAd,CAAT;AACF,MAAI,MAAM,EAAE,MAAZ,EACE,SAAS,OAAO,MAAP,CAAc,EAAE,KAAF,CAAQ,GAAR,CAAd,CAAT;AACF,SAAO;AACL,aAAS,MADJ;AAEL,WAAO;AAFF,GAAP;AAID;;AAED;AACA;AACO,SAAS,aAAT,CAAuB,EAAvB,EAA2B;AAChC,MAAI,QAAQ,EAAZ;AACA,MAAI,eAAJ;AACA,OAAK,IAAI,IAAT,IAAiB,EAAjB,EAAqB;AACnB,QAAI,GAAG,cAAH,CAAkB,IAAlB,CAAJ,EACE,MAAM,IAAN,CAAW,IAAX;AACF,QAAI,QAAO,GAAG,IAAH,CAAP,MAAqB,QAArB,IAAiC,OAAO,GAAG,IAAH,EAAS,MAAhB,KAA4B,WAAjE,EAA8E;AAC5E,YAAM,IAAI,KAAJ,CAAU,2BAAV,CAAN;AACD,KAFD,MAEO,IAAI,OAAO,MAAP,KAAmB,WAAnB,IAAkC,WAAW,GAAG,IAAH,EAAS,MAA1D,EAAkE;AACvE,YAAM,IAAI,KAAJ,CAAU,8CAAV,CAAN;AACD;AACD,aAAS,GAAG,IAAH,EAAS,MAAlB;AACD;AACD,MAAI,UAAU,EAAd;AACA,MAAI,aAAJ;AACA,OAAK,IAAI,MAAM,CAAf,EAAkB,MAAM,MAAxB,EAAgC,KAAhC,EAAuC;AACrC,WAAO,EAAP;AACA,SAAK,IAAI,MAAM,CAAf,EAAkB,MAAM,MAAM,MAA9B,EAAsC,KAAtC,EAA6C;AAC3C,WAAK,MAAM,GAAN,CAAL,IAAmB,GAAG,MAAM,GAAN,CAAH,EAAe,GAAf,CAAnB;AACD;AACD,YAAQ,IAAR,CAAa,IAAb;AACD;AACD,SAAO,OAAP;AACD;;AAED;;;;;;;IAMa,mB,WAAA,mB;AACX,+BAAY,OAAZ,EAAqB;AAAA;;AACnB,SAAK,QAAL,GAAgB,OAAhB;AACA,SAAK,KAAL,GAAa,EAAb;AACD;;;;uBAEE,S,EAAW,Q,EAAU;AACtB,UAAI,MAAM,KAAK,QAAL,CAAc,EAAd,CAAiB,SAAjB,EAA4B,QAA5B,CAAV;AACA,WAAK,KAAL,CAAW,GAAX,IAAkB,SAAlB;AACA,aAAO,GAAP;AACD;;;wBAEG,S,EAAW,Q,EAAU;AACvB,UAAI,MAAM,KAAK,QAAL,CAAc,GAAd,CAAkB,SAAlB,EAA6B,QAA7B,CAAV;AACA,UAAI,GAAJ,EAAS;AACP,eAAO,KAAK,KAAL,CAAW,GAAX,CAAP;AACD;AACD,aAAO,GAAP;AACD;;;yCAEoB;AAAA;;AACnB,UAAI,eAAe,KAAK,KAAxB;AACA,WAAK,KAAL,GAAa,EAAb;AACA,aAAO,IAAP,CAAY,YAAZ,EAA0B,OAA1B,CAAkC,UAAC,GAAD,EAAS;AACzC,cAAK,QAAL,CAAc,GAAd,CAAkB,aAAa,GAAb,CAAlB,EAAqC,GAArC;AACD,OAFD;AAGD;;;;;;;;;;;;;;;;;;ACpHH;;;;;;;;IAEqB,G;AACnB,eAAY,KAAZ,EAAmB,IAAnB,EAAyB,YAAa,KAAtC,EAA6C;AAAA;;AAC3C,SAAK,MAAL,GAAc,KAAd;AACA,SAAK,KAAL,GAAa,IAAb;AACA,SAAK,MAAL,GAAc,KAAd;AACA,SAAK,OAAL,GAAe,sBAAf;AACD;;;;0BAEK;AACJ,aAAO,KAAK,MAAZ;AACD;;;wBAEG,K,EAAO,YAAa,K,EAAO;AAC7B,UAAI,KAAK,MAAL,KAAgB,KAApB,EAA2B;AACzB;AACA;AACD;AACD,UAAI,WAAW,KAAK,MAApB;AACA,WAAK,MAAL,GAAc,KAAd;AACA;AACA,UAAI,MAAM,EAAV;AACA,UAAI,SAAS,QAAO,KAAP,yCAAO,KAAP,OAAkB,QAA/B,EAAyC;AACvC,aAAK,IAAI,CAAT,IAAc,KAAd,EAAqB;AACnB,cAAI,MAAM,cAAN,CAAqB,CAArB,CAAJ,EACE,IAAI,CAAJ,IAAS,MAAM,CAAN,CAAT;AACH;AACF;AACD,UAAI,QAAJ,GAAe,QAAf;AACA,UAAI,KAAJ,GAAY,KAAZ;AACA,WAAK,OAAL,CAAa,OAAb,CAAqB,QAArB,EAA+B,GAA/B,EAAoC,IAApC;;AAEA;AACA;AACA,UAAI,OAAO,KAAP,IAAgB,OAAO,KAAP,CAAa,aAAjC,EAAgD;AAC9C,eAAO,KAAP,CAAa,aAAb,CACE,mBACG,KAAK,MAAL,CAAY,IAAZ,KAAqB,IAArB,GAA4B,KAAK,MAAL,CAAY,IAAZ,GAAmB,GAA/C,GAAqD,EADxD,IAEE,KAAK,KAHT,EAIE,OAAO,KAAP,KAAkB,WAAlB,GAAgC,IAAhC,GAAuC,KAJzC;AAMD;AACF;;;uBAEE,S,EAAW,Q,EAAU;AACtB,aAAO,KAAK,OAAL,CAAa,EAAb,CAAgB,SAAhB,EAA2B,QAA3B,CAAP;AACD;;;wBAEG,S,EAAW,Q,EAAU;AACvB,aAAO,KAAK,OAAL,CAAa,GAAb,CAAiB,SAAjB,EAA4B,QAA5B,CAAP;AACD;;;;;;kBAjDkB,G", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Combine the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Close the handle. This clears this handle's contribution to the filter set,\n * and unsubscribes all event listeners.\n */\n close() {\n this._emitter.removeAllListeners();\n this.clear();\n this.setGroup(null);\n }\n\n /**\n * Clear this handle's contribution to the filter set.\n *\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n clear(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.clear(this._id);\n this._onChange(extraInfo);\n }\n\n /**\n * Set this handle's contribution to the filter set. This array should consist\n * of the keys of the rows that _should_ be displayed; any keys that are not\n * present in the array will be considered _filtered out_. Note that multiple\n * `FilterHandle` instances in the group may each contribute an array of keys,\n * and only those keys that appear in _all_ of the arrays make it through the\n * filter.\n *\n * @param {string[]} keys - Empty array, or array of keys. To clear the\n * filter, don't pass an empty array; instead, use the\n * {@link FilterHandle#clear} method.\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n set(keys, extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.update(this._id, keys);\n this._onChange(extraInfo);\n }\n\n /**\n * @return {string[]|null} - Either: 1) an array of keys that made it through\n * all of the `FilterHandle` instances, or, 2) `null`, which means no filter\n * is being applied (all data should be displayed).\n */\n get filteredKeys() {\n return this._filterSet ? this._filterSet.value : null;\n }\n\n /**\n * Subscribe to events on this `FilterHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {FilterHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link FilterHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancel event subscriptions created by {@link FilterHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|FilterHandle~listener} listener - Either the callback\n * function previously passed into {@link FilterHandle#on}, or the\n * string that was returned from {@link FilterHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n _onChange(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterVar.set(this._filterSet.value, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * @callback FilterHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the filter set, or `null` if no filter set is active),\n * `oldValue` (the previous value of the filter set), and `sender` (the\n * `FilterHandle` instance that made the change).\n */\n\n}\n\n/**\n * @event FilterHandle#change\n * @type {object}\n * @property {object} value - The new value of the filter set, or `null`\n * if no filter set is active.\n * @property {object} oldValue - The previous value of the filter set.\n * @property {FilterHandle} sender - The `FilterHandle` instance that\n * changed the value.\n */\n", + "import { diffSortedLists } from \"./util\";\n\nfunction naturalComparator(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n }\n}\n\n/**\n * @private\n */\nexport default class FilterSet {\n constructor() {\n this.reset();\n }\n\n reset() {\n // Key: handle ID, Value: array of selected keys, or null\n this._handles = {};\n // Key: key string, Value: count of handles that include it\n this._keys = {};\n this._value = null;\n this._activeHandles = 0;\n }\n\n get value() {\n return this._value;\n }\n\n update(handleId, keys) {\n if (keys !== null) {\n keys = keys.slice(0); // clone before sorting\n keys.sort(naturalComparator);\n }\n\n let {added, removed} = diffSortedLists(this._handles[handleId], keys);\n this._handles[handleId] = keys;\n\n for (let i = 0; i < added.length; i++) {\n this._keys[added[i]] = (this._keys[added[i]] || 0) + 1;\n }\n for (let i = 0; i < removed.length; i++) {\n this._keys[removed[i]]--;\n }\n\n this._updateValue(keys);\n }\n\n /**\n * @param {string[]} keys Sorted array of strings that indicate\n * a superset of possible keys.\n * @private\n */\n _updateValue(keys = this._allKeys) {\n let handleCount = Object.keys(this._handles).length;\n if (handleCount === 0) {\n this._value = null;\n } else {\n this._value = [];\n for (let i = 0; i < keys.length; i++) {\n let count = this._keys[keys[i]];\n if (count === handleCount) {\n this._value.push(keys[i]);\n }\n }\n }\n }\n\n clear(handleId) {\n if (typeof(this._handles[handleId]) === \"undefined\") {\n return;\n }\n\n let keys = this._handles[handleId];\n if (!keys) {\n keys = [];\n }\n\n for (let i = 0; i < keys.length; i++) {\n this._keys[keys[i]]--;\n }\n delete this._handles[handleId];\n\n this._updateValue();\n }\n\n get _allKeys() {\n let allKeys = Object.keys(this._keys);\n allKeys.sort(naturalComparator);\n return allKeys;\n }\n}\n", + "import Var from \"./var\";\n\n// Use a global so that multiple copies of crosstalk.js can be loaded and still\n// have groups behave as singletons across all copies.\nglobal.__crosstalk_groups = global.__crosstalk_groups || {};\nlet groups = global.__crosstalk_groups;\n\nexport default function group(groupName) {\n if (groupName && typeof(groupName) === \"string\") {\n if (!groups.hasOwnProperty(groupName)) {\n groups[groupName] = new Group(groupName);\n }\n return groups[groupName];\n } else if (typeof(groupName) === \"object\" && groupName._vars && groupName.var) {\n // Appears to already be a group object\n return groupName;\n } else if (Array.isArray(groupName) &&\n groupName.length == 1 &&\n typeof(groupName[0]) === \"string\") {\n return group(groupName[0]);\n } else {\n throw new Error(\"Invalid groupName argument\");\n }\n}\n\nclass Group {\n constructor(name) {\n this.name = name;\n this._vars = {};\n }\n\n var(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n if (!this._vars.hasOwnProperty(name))\n this._vars[name] = new Var(this, name);\n return this._vars[name];\n }\n\n has(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n return this._vars.hasOwnProperty(name);\n }\n}\n", + "import group from \"./group\";\nimport { SelectionHandle } from \"./selection\";\nimport { FilterHandle } from \"./filter\";\nimport { bind } from \"./input\";\nimport \"./input_selectize\";\nimport \"./input_checkboxgroup\";\nimport \"./input_slider\";\n\nconst defaultGroup = group(\"default\");\n\nfunction var_(name) {\n return defaultGroup.var(name);\n}\n\nfunction has(name) {\n return defaultGroup.has(name);\n}\n\nif (global.Shiny) {\n global.Shiny.addCustomMessageHandler(\"update-client-value\", function(message) {\n if (typeof(message.group) === \"string\") {\n group(message.group).var(message.name).set(message.value);\n } else {\n var_(message.name).set(message.value);\n }\n });\n}\n\nconst crosstalk = {\n group: group,\n var: var_,\n has: has,\n SelectionHandle: SelectionHandle,\n FilterHandle: FilterHandle,\n bind: bind\n};\n\n/**\n * @namespace crosstalk\n */\nexport default crosstalk;\nglobal.crosstalk = crosstalk;\n", + "let $ = global.jQuery;\n\nlet bindings = {};\n\nexport function register(reg) {\n bindings[reg.className] = reg;\n if (global.document && global.document.readyState !== \"complete\") {\n $(() => {\n bind();\n });\n } else if (global.document) {\n setTimeout(bind, 100);\n }\n}\n\nexport function bind() {\n Object.keys(bindings).forEach(function(className) {\n let binding = bindings[className];\n $(\".\" + binding.className).not(\".crosstalk-input-bound\").each(function(i, el) {\n bindInstance(binding, el);\n });\n });\n}\n\n// Escape jQuery identifier\nfunction $escape(val) {\n return val.replace(/([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n}\n\nfunction bindEl(el) {\n let $el = $(el);\n Object.keys(bindings).forEach(function(className) {\n if ($el.hasClass(className) && !$el.hasClass(\"crosstalk-input-bound\")) {\n let binding = bindings[className];\n bindInstance(binding, el);\n }\n });\n}\n\nfunction bindInstance(binding, el) {\n let jsonEl = $(el).find(\"script[type='application/json'][data-for='\" + $escape(el.id) + \"']\");\n let data = JSON.parse(jsonEl[0].innerText);\n\n let instance = binding.factory(el, data);\n $(el).data(\"crosstalk-instance\", instance);\n $(el).addClass(\"crosstalk-input-bound\");\n}\n\nif (global.Shiny) {\n let inputBinding = new global.Shiny.InputBinding();\n let $ = global.jQuery;\n $.extend(inputBinding, {\n find: function(scope) {\n return $(scope).find(\".crosstalk-input\");\n },\n initialize: function(el) {\n if (!$(el).hasClass(\"crosstalk-input-bound\")) {\n bindEl(el);\n }\n },\n getId: function(el) {\n return el.id;\n },\n getValue: function(el) {\n\n },\n setValue: function(el, value) {\n\n },\n receiveMessage: function(el, data) {\n\n },\n subscribe: function(el, callback) {\n $(el).data(\"crosstalk-instance\").resume();\n },\n unsubscribe: function(el) {\n $(el).data(\"crosstalk-instance\").suspend();\n }\n });\n global.Shiny.inputBindings.register(inputBinding, \"crosstalk.inputBinding\");\n}\n", + "import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-checkboxgroup\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n let $el = $(el);\n $el.on(\"change\", \"input[type='checkbox']\", function() {\n let checked = $el.find(\"input[type='checkbox']:checked\");\n if (checked.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n checked.each(function() {\n data.map[this.value].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n", + "import * as input from \"./input\";\nimport * as util from \"./util\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-select\",\n\n factory: function(el, data) {\n /*\n * items: {value: [...], label: [...]}\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n\n let first = [{value: \"\", label: \"(All)\"}];\n let items = util.dataframeToD3(data.items);\n let opts = {\n options: first.concat(items),\n valueField: \"value\",\n labelField: \"label\",\n searchField: \"label\"\n };\n\n let select = $(el).find(\"select\")[0];\n\n let selectize = $(select).selectize(opts)[0].selectize;\n\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n selectize.on(\"change\", function() {\n if (selectize.items.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n selectize.items.forEach(function(group) {\n data.map[group].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n", + "import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\nlet strftime = global.strftime;\n\ninput.register({\n className: \"crosstalk-input-slider\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let opts = {};\n let $el = $(el).find(\"input\");\n let dataType = $el.data(\"data-type\");\n let timeFormat = $el.data(\"time-format\");\n let round = $el.data(\"round\");\n let timeFormatter;\n\n // Set up formatting functions\n if (dataType === \"date\") {\n timeFormatter = strftime.utc();\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n\n } else if (dataType === \"datetime\") {\n let timezone = $el.data(\"timezone\");\n if (timezone)\n timeFormatter = strftime.timezone(timezone);\n else\n timeFormatter = strftime;\n\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n } else if (dataType === \"number\") {\n if (typeof round !== \"undefined\")\n opts.prettify = function(num) {\n let factor = Math.pow(10, round);\n return Math.round(num * factor) / factor;\n };\n }\n\n $el.ionRangeSlider(opts);\n\n function getValue() {\n let result = $el.data(\"ionRangeSlider\").result;\n\n // Function for converting numeric value from slider to appropriate type.\n let convert;\n let dataType = $el.data(\"data-type\");\n if (dataType === \"date\") {\n convert = function(val) {\n return formatDateUTC(new Date(+val));\n };\n } else if (dataType === \"datetime\") {\n convert = function(val) {\n // Convert ms to s\n return +val / 1000;\n };\n } else {\n convert = function(val) { return +val; };\n }\n\n if ($el.data(\"ionRangeSlider\").options.type === \"double\") {\n return [convert(result.from), convert(result.to)];\n } else {\n return convert(result.from);\n }\n }\n\n let lastKnownKeys = null;\n\n $el.on(\"change.crosstalkSliderInput\", function(event) {\n if (!$el.data(\"updating\") && !$el.data(\"animating\")) {\n let [from, to] = getValue();\n let keys = [];\n for (let i = 0; i < data.values.length; i++) {\n let val = data.values[i];\n if (val >= from && val <= to) {\n keys.push(data.keys[i]);\n }\n }\n keys.sort();\n ctHandle.set(keys);\n lastKnownKeys = keys;\n }\n });\n\n\n // let $el = $(el);\n // $el.on(\"change\", \"input[type=\"checkbox\"]\", function() {\n // let checked = $el.find(\"input[type=\"checkbox\"]:checked\");\n // if (checked.length === 0) {\n // ctHandle.clear();\n // } else {\n // let keys = {};\n // checked.each(function() {\n // data.map[this.value].forEach(function(key) {\n // keys[key] = true;\n // });\n // });\n // let keyArray = Object.keys(keys);\n // keyArray.sort();\n // ctHandle.set(keyArray);\n // }\n // });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n\n\n// Convert a number to a string with leading zeros\nfunction padZeros(n, digits) {\n let str = n.toString();\n while (str.length < digits)\n str = \"0\" + str;\n return str;\n}\n\n// Given a Date object, return a string in yyyy-mm-dd format, using the\n// UTC date. This may be a day off from the date in the local time zone.\nfunction formatDateUTC(date) {\n if (date instanceof Date) {\n return date.getUTCFullYear() + \"-\" +\n padZeros(date.getUTCMonth()+1, 2) + \"-\" +\n padZeros(date.getUTCDate(), 2);\n\n } else {\n return null;\n }\n}\n", + "import Events from \"./events\";\nimport grp from \"./group\";\nimport * as util from \"./util\";\n\n/**\n * Use this class to read and write (and listen for changes to) the selection\n * for a Crosstalk group. This is intended to be used for linked brushing.\n *\n * If two (or more) `SelectionHandle` instances in the same webpage share the\n * same group name, they will share the same state. Setting the selection using\n * one `SelectionHandle` instance will result in the `value` property instantly\n * changing across the others, and `\"change\"` event listeners on all instances\n * (including the one that initiated the sending) will fire.\n *\n * @param {string} [group] - The name of the Crosstalk group, or if none,\n * null or undefined (or any other falsy value). This can be changed later\n * via the [SelectionHandle#setGroup](#setGroup) method.\n * @param {Object} [extraInfo] - An object whose properties will be copied to\n * the event object whenever an event is emitted.\n */\nexport class SelectionHandle {\n\n constructor(group = null, extraInfo = null) {\n this._eventRelay = new Events();\n this._emitter = new util.SubscriptionTracker(this._eventRelay);\n\n // Name of the group we're currently tracking, if any. Can change over time.\n this._group = null;\n // The Var we're currently tracking, if any. Can change over time.\n this._var = null;\n // The event handler subscription we currently have on var.on(\"change\").\n this._varOnChangeSub = null;\n\n this._extraInfo = util.extend({ sender: this }, extraInfo);\n\n this.setGroup(group);\n }\n\n /**\n * Changes the Crosstalk group membership of this SelectionHandle. The group\n * being switched away from (if any) will not have its selection value\n * modified as a result of calling `setGroup`, even if this handle was the\n * most recent handle to set the selection of the group.\n *\n * The group being switched to (if any) will also not have its selection value\n * modified as a result of calling `setGroup`. If you want to set the\n * selection value of the new group, call `set` explicitly.\n *\n * @param {string} group - The name of the Crosstalk group, or null (or\n * undefined) to clear the group.\n */\n setGroup(group) {\n // If group is unchanged, do nothing\n if (this._group === group)\n return;\n // Treat null, undefined, and other falsy values the same\n if (!this._group && !group)\n return;\n\n if (this._var) {\n this._var.off(\"change\", this._varOnChangeSub);\n this._var = null;\n this._varOnChangeSub = null;\n }\n\n this._group = group;\n\n if (group) {\n this._var = grp(group).var(\"selection\");\n let sub = this._var.on(\"change\", (e) => {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Retrieves the current selection for the group represented by this\n * `SelectionHandle`.\n *\n * - If no selection is active, then this value will be falsy.\n * - If a selection is active, but no data points are selected, then this\n * value will be an empty array.\n * - If a selection is active, and data points are selected, then the keys\n * of the selected data points will be present in the array.\n */\n get value() {\n return this._var ? this._var.get() : null;\n }\n\n /**\n * Combines the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n // Important incidental effect: shallow clone is returned\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see\n * {@link SelectionHandle#value}).\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `SelectionHandle` constructor).\n */\n set(selectedKeys, extraInfo) {\n if (this._var)\n this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any that were passed\n * into the `SelectionHandle` constructor).\n */\n clear(extraInfo) {\n if (this._var)\n this.set(void 0, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Subscribes to events on this `SelectionHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {SelectionHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancels event subscriptions created by {@link SelectionHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|SelectionHandle~listener} listener - Either the callback\n * function previously passed into {@link SelectionHandle#on}, or the\n * string that was returned from {@link SelectionHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n /**\n * Shuts down the `SelectionHandle` object.\n *\n * Removes all event listeners that were added through this handle.\n */\n close() {\n this._emitter.removeAllListeners();\n this.setGroup(null);\n }\n}\n\n/**\n * @callback SelectionHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the selection, or `undefined` if no selection is active),\n * `oldValue` (the previous value of the selection), and `sender` (the\n * `SelectionHandle` instance that made the change).\n */\n\n/**\n * @event SelectionHandle#change\n * @type {object}\n * @property {object} value - The new value of the selection, or `undefined`\n * if no selection is active.\n * @property {object} oldValue - The previous value of the selection.\n * @property {SelectionHandle} sender - The `SelectionHandle` instance that\n * changed the value.\n */\n", + "export function extend(target, ...sources) {\n for (let i = 0; i < sources.length; i++) {\n let src = sources[i];\n if (typeof(src) === \"undefined\" || src === null)\n continue;\n\n for (let key in src) {\n if (src.hasOwnProperty(key)) {\n target[key] = src[key];\n }\n }\n }\n return target;\n}\n\nexport function checkSorted(list) {\n for (let i = 1; i < list.length; i++) {\n if (list[i] <= list[i-1]) {\n throw new Error(\"List is not sorted or contains duplicate\");\n }\n }\n}\n\nexport function diffSortedLists(a, b) {\n let i_a = 0;\n let i_b = 0;\n\n if (!a) a = [];\n if (!b) b = [];\n\n let a_only = [];\n let b_only = [];\n\n checkSorted(a);\n checkSorted(b);\n\n while (i_a < a.length && i_b < b.length) {\n if (a[i_a] === b[i_b]) {\n i_a++;\n i_b++;\n } else if (a[i_a] < b[i_b]) {\n a_only.push(a[i_a++]);\n } else {\n b_only.push(b[i_b++]);\n }\n }\n\n if (i_a < a.length)\n a_only = a_only.concat(a.slice(i_a));\n if (i_b < b.length)\n b_only = b_only.concat(b.slice(i_b));\n return {\n removed: a_only,\n added: b_only\n };\n}\n\n// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... }\n// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ]\nexport function dataframeToD3(df) {\n let names = [];\n let length;\n for (let name in df) {\n if (df.hasOwnProperty(name))\n names.push(name);\n if (typeof(df[name]) !== \"object\" || typeof(df[name].length) === \"undefined\") {\n throw new Error(\"All fields must be arrays\");\n } else if (typeof(length) !== \"undefined\" && length !== df[name].length) {\n throw new Error(\"All fields must be arrays of the same length\");\n }\n length = df[name].length;\n }\n let results = [];\n let item;\n for (let row = 0; row < length; row++) {\n item = {};\n for (let col = 0; col < names.length; col++) {\n item[names[col]] = df[names[col]][row];\n }\n results.push(item);\n }\n return results;\n}\n\n/**\n * Keeps track of all event listener additions/removals and lets all active\n * listeners be removed with a single operation.\n *\n * @private\n */\nexport class SubscriptionTracker {\n constructor(emitter) {\n this._emitter = emitter;\n this._subs = {};\n }\n\n on(eventType, listener) {\n let sub = this._emitter.on(eventType, listener);\n this._subs[sub] = eventType;\n return sub;\n }\n\n off(eventType, listener) {\n let sub = this._emitter.off(eventType, listener);\n if (sub) {\n delete this._subs[sub];\n }\n return sub;\n }\n\n removeAllListeners() {\n let current_subs = this._subs;\n this._subs = {};\n Object.keys(current_subs).forEach((sub) => {\n this._emitter.off(current_subs[sub], sub);\n });\n }\n}\n", + "import Events from \"./events\";\n\nexport default class Var {\n constructor(group, name, /*optional*/ value) {\n this._group = group;\n this._name = name;\n this._value = value;\n this._events = new Events();\n }\n\n get() {\n return this._value;\n }\n\n set(value, /*optional*/ event) {\n if (this._value === value) {\n // Do nothing; the value hasn't changed\n return;\n }\n let oldValue = this._value;\n this._value = value;\n // Alert JavaScript listeners that the value has changed\n let evt = {};\n if (event && typeof(event) === \"object\") {\n for (let k in event) {\n if (event.hasOwnProperty(k))\n evt[k] = event[k];\n }\n }\n evt.oldValue = oldValue;\n evt.value = value;\n this._events.trigger(\"change\", evt, this);\n\n // TODO: Make this extensible, to let arbitrary back-ends know that\n // something has changed\n if (global.Shiny && global.Shiny.onInputChange) {\n global.Shiny.onInputChange(\n \".clientValue-\" +\n (this._group.name !== null ? this._group.name + \"-\" : \"\") +\n this._name,\n typeof(value) === \"undefined\" ? null : value\n );\n }\n }\n\n on(eventType, listener) {\n return this._events.on(eventType, listener);\n }\n\n off(eventType, listener) {\n return this._events.off(eventType, listener);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.min.js b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.min.js new file mode 100644 index 00000000..b7ec0ac9 --- /dev/null +++ b/docs/articles/variables_sheet_files/crosstalk-1.1.1/js/crosstalk.min.js @@ -0,0 +1,2 @@ +!function o(u,a,l){function s(n,e){if(!a[n]){if(!u[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(f)return f(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[n]={exports:{}};u[n][0].call(i.exports,function(e){var t=u[n][1][e];return s(t||e)},i,i.exports,o,u,a,l)}return a[n].exports}for(var f="function"==typeof require&&require,e=0;e?@[\\\]^`{|}~])/g,"\\$1")+"']"),r=JSON.parse(n[0].innerText),i=e.factory(t,r);o(t).data("crosstalk-instance",i),o(t).addClass("crosstalk-input-bound")}if(t.Shiny){var e=new t.Shiny.InputBinding,u=t.jQuery;u.extend(e,{find:function(e){return u(e).find(".crosstalk-input")},initialize:function(e){var t,n;u(e).hasClass("crosstalk-input-bound")||(n=o(t=e),Object.keys(r).forEach(function(e){n.hasClass(e)&&!n.hasClass("crosstalk-input-bound")&&i(r[e],t)}))},getId:function(e){return e.id},getValue:function(e){},setValue:function(e,t){},receiveMessage:function(e,t){},subscribe:function(e,t){u(e).data("crosstalk-instance").resume()},unsubscribe:function(e){u(e).data("crosstalk-instance").suspend()}}),t.Shiny.inputBindings.register(e,"crosstalk.inputBinding")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(r,e,t){(function(e){"use strict";var t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(r("./input")),n=r("./filter");var a=e.jQuery;t.register({className:"crosstalk-input-checkboxgroup",factory:function(e,r){var i=new n.FilterHandle(r.group),o=void 0,u=a(e);return u.on("change","input[type='checkbox']",function(){var e=u.find("input[type='checkbox']:checked");if(0===e.length)o=null,i.clear();else{var t={};e.each(function(){r.map[this.value].forEach(function(e){t[e]=!0})});var n=Object.keys(t);n.sort(),o=n,i.set(n)}}),{suspend:function(){i.clear()},resume:function(){o&&i.set(o)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6}],8:[function(r,e,t){(function(e){"use strict";var t=n(r("./input")),l=n(r("./util")),s=r("./filter");function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var f=e.jQuery;t.register({className:"crosstalk-input-select",factory:function(e,n){var t=l.dataframeToD3(n.items),r={options:[{value:"",label:"(All)"}].concat(t),valueField:"value",labelField:"label",searchField:"label"},i=f(e).find("select")[0],o=f(i).selectize(r)[0].selectize,u=new s.FilterHandle(n.group),a=void 0;return o.on("change",function(){if(0===o.items.length)a=null,u.clear();else{var t={};o.items.forEach(function(e){n.map[e].forEach(function(e){t[e]=!0})});var e=Object.keys(t);e.sort(),a=e,u.set(e)}}),{suspend:function(){u.clear()},resume:function(){a&&u.set(a)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6,"./util":11}],9:[function(n,e,t){(function(e){"use strict";var d=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n("./input")),a=n("./filter");var v=e.jQuery,p=e.strftime;function y(e,t){for(var n=e.toString();n.length {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Combine the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Close the handle. This clears this handle's contribution to the filter set,\n * and unsubscribes all event listeners.\n */\n close() {\n this._emitter.removeAllListeners();\n this.clear();\n this.setGroup(null);\n }\n\n /**\n * Clear this handle's contribution to the filter set.\n *\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n clear(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.clear(this._id);\n this._onChange(extraInfo);\n }\n\n /**\n * Set this handle's contribution to the filter set. This array should consist\n * of the keys of the rows that _should_ be displayed; any keys that are not\n * present in the array will be considered _filtered out_. Note that multiple\n * `FilterHandle` instances in the group may each contribute an array of keys,\n * and only those keys that appear in _all_ of the arrays make it through the\n * filter.\n *\n * @param {string[]} keys - Empty array, or array of keys. To clear the\n * filter, don't pass an empty array; instead, use the\n * {@link FilterHandle#clear} method.\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `FilterHandle` constructor).\n * \n * @fires FilterHandle#change\n */\n set(keys, extraInfo) {\n if (!this._filterSet)\n return;\n this._filterSet.update(this._id, keys);\n this._onChange(extraInfo);\n }\n\n /**\n * @return {string[]|null} - Either: 1) an array of keys that made it through\n * all of the `FilterHandle` instances, or, 2) `null`, which means no filter\n * is being applied (all data should be displayed).\n */\n get filteredKeys() {\n return this._filterSet ? this._filterSet.value : null;\n }\n\n /**\n * Subscribe to events on this `FilterHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {FilterHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link FilterHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancel event subscriptions created by {@link FilterHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|FilterHandle~listener} listener - Either the callback\n * function previously passed into {@link FilterHandle#on}, or the\n * string that was returned from {@link FilterHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n _onChange(extraInfo) {\n if (!this._filterSet)\n return;\n this._filterVar.set(this._filterSet.value, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * @callback FilterHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the filter set, or `null` if no filter set is active),\n * `oldValue` (the previous value of the filter set), and `sender` (the\n * `FilterHandle` instance that made the change).\n */\n\n}\n\n/**\n * @event FilterHandle#change\n * @type {object}\n * @property {object} value - The new value of the filter set, or `null`\n * if no filter set is active.\n * @property {object} oldValue - The previous value of the filter set.\n * @property {FilterHandle} sender - The `FilterHandle` instance that\n * changed the value.\n */\n","import { diffSortedLists } from \"./util\";\n\nfunction naturalComparator(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n }\n}\n\n/**\n * @private\n */\nexport default class FilterSet {\n constructor() {\n this.reset();\n }\n\n reset() {\n // Key: handle ID, Value: array of selected keys, or null\n this._handles = {};\n // Key: key string, Value: count of handles that include it\n this._keys = {};\n this._value = null;\n this._activeHandles = 0;\n }\n\n get value() {\n return this._value;\n }\n\n update(handleId, keys) {\n if (keys !== null) {\n keys = keys.slice(0); // clone before sorting\n keys.sort(naturalComparator);\n }\n\n let {added, removed} = diffSortedLists(this._handles[handleId], keys);\n this._handles[handleId] = keys;\n\n for (let i = 0; i < added.length; i++) {\n this._keys[added[i]] = (this._keys[added[i]] || 0) + 1;\n }\n for (let i = 0; i < removed.length; i++) {\n this._keys[removed[i]]--;\n }\n\n this._updateValue(keys);\n }\n\n /**\n * @param {string[]} keys Sorted array of strings that indicate\n * a superset of possible keys.\n * @private\n */\n _updateValue(keys = this._allKeys) {\n let handleCount = Object.keys(this._handles).length;\n if (handleCount === 0) {\n this._value = null;\n } else {\n this._value = [];\n for (let i = 0; i < keys.length; i++) {\n let count = this._keys[keys[i]];\n if (count === handleCount) {\n this._value.push(keys[i]);\n }\n }\n }\n }\n\n clear(handleId) {\n if (typeof(this._handles[handleId]) === \"undefined\") {\n return;\n }\n\n let keys = this._handles[handleId];\n if (!keys) {\n keys = [];\n }\n\n for (let i = 0; i < keys.length; i++) {\n this._keys[keys[i]]--;\n }\n delete this._handles[handleId];\n\n this._updateValue();\n }\n\n get _allKeys() {\n let allKeys = Object.keys(this._keys);\n allKeys.sort(naturalComparator);\n return allKeys;\n }\n}\n","import Var from \"./var\";\n\n// Use a global so that multiple copies of crosstalk.js can be loaded and still\n// have groups behave as singletons across all copies.\nglobal.__crosstalk_groups = global.__crosstalk_groups || {};\nlet groups = global.__crosstalk_groups;\n\nexport default function group(groupName) {\n if (groupName && typeof(groupName) === \"string\") {\n if (!groups.hasOwnProperty(groupName)) {\n groups[groupName] = new Group(groupName);\n }\n return groups[groupName];\n } else if (typeof(groupName) === \"object\" && groupName._vars && groupName.var) {\n // Appears to already be a group object\n return groupName;\n } else if (Array.isArray(groupName) &&\n groupName.length == 1 &&\n typeof(groupName[0]) === \"string\") {\n return group(groupName[0]);\n } else {\n throw new Error(\"Invalid groupName argument\");\n }\n}\n\nclass Group {\n constructor(name) {\n this.name = name;\n this._vars = {};\n }\n\n var(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n if (!this._vars.hasOwnProperty(name))\n this._vars[name] = new Var(this, name);\n return this._vars[name];\n }\n\n has(name) {\n if (!name || typeof(name) !== \"string\") {\n throw new Error(\"Invalid var name\");\n }\n\n return this._vars.hasOwnProperty(name);\n }\n}\n","import group from \"./group\";\nimport { SelectionHandle } from \"./selection\";\nimport { FilterHandle } from \"./filter\";\nimport { bind } from \"./input\";\nimport \"./input_selectize\";\nimport \"./input_checkboxgroup\";\nimport \"./input_slider\";\n\nconst defaultGroup = group(\"default\");\n\nfunction var_(name) {\n return defaultGroup.var(name);\n}\n\nfunction has(name) {\n return defaultGroup.has(name);\n}\n\nif (global.Shiny) {\n global.Shiny.addCustomMessageHandler(\"update-client-value\", function(message) {\n if (typeof(message.group) === \"string\") {\n group(message.group).var(message.name).set(message.value);\n } else {\n var_(message.name).set(message.value);\n }\n });\n}\n\nconst crosstalk = {\n group: group,\n var: var_,\n has: has,\n SelectionHandle: SelectionHandle,\n FilterHandle: FilterHandle,\n bind: bind\n};\n\n/**\n * @namespace crosstalk\n */\nexport default crosstalk;\nglobal.crosstalk = crosstalk;\n","let $ = global.jQuery;\n\nlet bindings = {};\n\nexport function register(reg) {\n bindings[reg.className] = reg;\n if (global.document && global.document.readyState !== \"complete\") {\n $(() => {\n bind();\n });\n } else if (global.document) {\n setTimeout(bind, 100);\n }\n}\n\nexport function bind() {\n Object.keys(bindings).forEach(function(className) {\n let binding = bindings[className];\n $(\".\" + binding.className).not(\".crosstalk-input-bound\").each(function(i, el) {\n bindInstance(binding, el);\n });\n });\n}\n\n// Escape jQuery identifier\nfunction $escape(val) {\n return val.replace(/([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n}\n\nfunction bindEl(el) {\n let $el = $(el);\n Object.keys(bindings).forEach(function(className) {\n if ($el.hasClass(className) && !$el.hasClass(\"crosstalk-input-bound\")) {\n let binding = bindings[className];\n bindInstance(binding, el);\n }\n });\n}\n\nfunction bindInstance(binding, el) {\n let jsonEl = $(el).find(\"script[type='application/json'][data-for='\" + $escape(el.id) + \"']\");\n let data = JSON.parse(jsonEl[0].innerText);\n\n let instance = binding.factory(el, data);\n $(el).data(\"crosstalk-instance\", instance);\n $(el).addClass(\"crosstalk-input-bound\");\n}\n\nif (global.Shiny) {\n let inputBinding = new global.Shiny.InputBinding();\n let $ = global.jQuery;\n $.extend(inputBinding, {\n find: function(scope) {\n return $(scope).find(\".crosstalk-input\");\n },\n initialize: function(el) {\n if (!$(el).hasClass(\"crosstalk-input-bound\")) {\n bindEl(el);\n }\n },\n getId: function(el) {\n return el.id;\n },\n getValue: function(el) {\n\n },\n setValue: function(el, value) {\n\n },\n receiveMessage: function(el, data) {\n\n },\n subscribe: function(el, callback) {\n $(el).data(\"crosstalk-instance\").resume();\n },\n unsubscribe: function(el) {\n $(el).data(\"crosstalk-instance\").suspend();\n }\n });\n global.Shiny.inputBindings.register(inputBinding, \"crosstalk.inputBinding\");\n}\n","import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-checkboxgroup\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n let $el = $(el);\n $el.on(\"change\", \"input[type='checkbox']\", function() {\n let checked = $el.find(\"input[type='checkbox']:checked\");\n if (checked.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n checked.each(function() {\n data.map[this.value].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n","import * as input from \"./input\";\nimport * as util from \"./util\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\n\ninput.register({\n className: \"crosstalk-input-select\",\n\n factory: function(el, data) {\n /*\n * items: {value: [...], label: [...]}\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n\n let first = [{value: \"\", label: \"(All)\"}];\n let items = util.dataframeToD3(data.items);\n let opts = {\n options: first.concat(items),\n valueField: \"value\",\n labelField: \"label\",\n searchField: \"label\"\n };\n\n let select = $(el).find(\"select\")[0];\n\n let selectize = $(select).selectize(opts)[0].selectize;\n\n let ctHandle = new FilterHandle(data.group);\n\n let lastKnownKeys;\n selectize.on(\"change\", function() {\n if (selectize.items.length === 0) {\n lastKnownKeys = null;\n ctHandle.clear();\n } else {\n let keys = {};\n selectize.items.forEach(function(group) {\n data.map[group].forEach(function(key) {\n keys[key] = true;\n });\n });\n let keyArray = Object.keys(keys);\n keyArray.sort();\n lastKnownKeys = keyArray;\n ctHandle.set(keyArray);\n }\n });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n","import * as input from \"./input\";\nimport { FilterHandle } from \"./filter\";\n\nlet $ = global.jQuery;\nlet strftime = global.strftime;\n\ninput.register({\n className: \"crosstalk-input-slider\",\n\n factory: function(el, data) {\n /*\n * map: {\"groupA\": [\"keyA\", \"keyB\", ...], ...}\n * group: \"ct-groupname\"\n */\n let ctHandle = new FilterHandle(data.group);\n\n let opts = {};\n let $el = $(el).find(\"input\");\n let dataType = $el.data(\"data-type\");\n let timeFormat = $el.data(\"time-format\");\n let round = $el.data(\"round\");\n let timeFormatter;\n\n // Set up formatting functions\n if (dataType === \"date\") {\n timeFormatter = strftime.utc();\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n\n } else if (dataType === \"datetime\") {\n let timezone = $el.data(\"timezone\");\n if (timezone)\n timeFormatter = strftime.timezone(timezone);\n else\n timeFormatter = strftime;\n\n opts.prettify = function(num) {\n return timeFormatter(timeFormat, new Date(num));\n };\n } else if (dataType === \"number\") {\n if (typeof round !== \"undefined\")\n opts.prettify = function(num) {\n let factor = Math.pow(10, round);\n return Math.round(num * factor) / factor;\n };\n }\n\n $el.ionRangeSlider(opts);\n\n function getValue() {\n let result = $el.data(\"ionRangeSlider\").result;\n\n // Function for converting numeric value from slider to appropriate type.\n let convert;\n let dataType = $el.data(\"data-type\");\n if (dataType === \"date\") {\n convert = function(val) {\n return formatDateUTC(new Date(+val));\n };\n } else if (dataType === \"datetime\") {\n convert = function(val) {\n // Convert ms to s\n return +val / 1000;\n };\n } else {\n convert = function(val) { return +val; };\n }\n\n if ($el.data(\"ionRangeSlider\").options.type === \"double\") {\n return [convert(result.from), convert(result.to)];\n } else {\n return convert(result.from);\n }\n }\n\n let lastKnownKeys = null;\n\n $el.on(\"change.crosstalkSliderInput\", function(event) {\n if (!$el.data(\"updating\") && !$el.data(\"animating\")) {\n let [from, to] = getValue();\n let keys = [];\n for (let i = 0; i < data.values.length; i++) {\n let val = data.values[i];\n if (val >= from && val <= to) {\n keys.push(data.keys[i]);\n }\n }\n keys.sort();\n ctHandle.set(keys);\n lastKnownKeys = keys;\n }\n });\n\n\n // let $el = $(el);\n // $el.on(\"change\", \"input[type=\"checkbox\"]\", function() {\n // let checked = $el.find(\"input[type=\"checkbox\"]:checked\");\n // if (checked.length === 0) {\n // ctHandle.clear();\n // } else {\n // let keys = {};\n // checked.each(function() {\n // data.map[this.value].forEach(function(key) {\n // keys[key] = true;\n // });\n // });\n // let keyArray = Object.keys(keys);\n // keyArray.sort();\n // ctHandle.set(keyArray);\n // }\n // });\n\n return {\n suspend: function() {\n ctHandle.clear();\n },\n resume: function() {\n if (lastKnownKeys)\n ctHandle.set(lastKnownKeys);\n }\n };\n }\n});\n\n\n// Convert a number to a string with leading zeros\nfunction padZeros(n, digits) {\n let str = n.toString();\n while (str.length < digits)\n str = \"0\" + str;\n return str;\n}\n\n// Given a Date object, return a string in yyyy-mm-dd format, using the\n// UTC date. This may be a day off from the date in the local time zone.\nfunction formatDateUTC(date) {\n if (date instanceof Date) {\n return date.getUTCFullYear() + \"-\" +\n padZeros(date.getUTCMonth()+1, 2) + \"-\" +\n padZeros(date.getUTCDate(), 2);\n\n } else {\n return null;\n }\n}\n","import Events from \"./events\";\nimport grp from \"./group\";\nimport * as util from \"./util\";\n\n/**\n * Use this class to read and write (and listen for changes to) the selection\n * for a Crosstalk group. This is intended to be used for linked brushing.\n *\n * If two (or more) `SelectionHandle` instances in the same webpage share the\n * same group name, they will share the same state. Setting the selection using\n * one `SelectionHandle` instance will result in the `value` property instantly\n * changing across the others, and `\"change\"` event listeners on all instances\n * (including the one that initiated the sending) will fire.\n *\n * @param {string} [group] - The name of the Crosstalk group, or if none,\n * null or undefined (or any other falsy value). This can be changed later\n * via the [SelectionHandle#setGroup](#setGroup) method.\n * @param {Object} [extraInfo] - An object whose properties will be copied to\n * the event object whenever an event is emitted.\n */\nexport class SelectionHandle {\n\n constructor(group = null, extraInfo = null) {\n this._eventRelay = new Events();\n this._emitter = new util.SubscriptionTracker(this._eventRelay);\n\n // Name of the group we're currently tracking, if any. Can change over time.\n this._group = null;\n // The Var we're currently tracking, if any. Can change over time.\n this._var = null;\n // The event handler subscription we currently have on var.on(\"change\").\n this._varOnChangeSub = null;\n\n this._extraInfo = util.extend({ sender: this }, extraInfo);\n\n this.setGroup(group);\n }\n\n /**\n * Changes the Crosstalk group membership of this SelectionHandle. The group\n * being switched away from (if any) will not have its selection value\n * modified as a result of calling `setGroup`, even if this handle was the\n * most recent handle to set the selection of the group.\n *\n * The group being switched to (if any) will also not have its selection value\n * modified as a result of calling `setGroup`. If you want to set the\n * selection value of the new group, call `set` explicitly.\n *\n * @param {string} group - The name of the Crosstalk group, or null (or\n * undefined) to clear the group.\n */\n setGroup(group) {\n // If group is unchanged, do nothing\n if (this._group === group)\n return;\n // Treat null, undefined, and other falsy values the same\n if (!this._group && !group)\n return;\n\n if (this._var) {\n this._var.off(\"change\", this._varOnChangeSub);\n this._var = null;\n this._varOnChangeSub = null;\n }\n\n this._group = group;\n\n if (group) {\n this._var = grp(group).var(\"selection\");\n let sub = this._var.on(\"change\", (e) => {\n this._eventRelay.trigger(\"change\", e, this);\n });\n this._varOnChangeSub = sub;\n }\n }\n\n /**\n * Retrieves the current selection for the group represented by this\n * `SelectionHandle`.\n *\n * - If no selection is active, then this value will be falsy.\n * - If a selection is active, but no data points are selected, then this\n * value will be an empty array.\n * - If a selection is active, and data points are selected, then the keys\n * of the selected data points will be present in the array.\n */\n get value() {\n return this._var ? this._var.get() : null;\n }\n\n /**\n * Combines the given `extraInfo` (if any) with the handle's default\n * `_extraInfo` (if any).\n * @private\n */\n _mergeExtraInfo(extraInfo) {\n // Important incidental effect: shallow clone is returned\n return util.extend({},\n this._extraInfo ? this._extraInfo : null,\n extraInfo ? extraInfo : null);\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {string[]} selectedKeys - Falsy, empty array, or array of keys (see\n * {@link SelectionHandle#value}).\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any options that were\n * passed into the `SelectionHandle` constructor).\n */\n set(selectedKeys, extraInfo) {\n if (this._var)\n this._var.set(selectedKeys, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Overwrites the current selection for the group, and raises the `\"change\"`\n * event among all of the group's '`SelectionHandle` instances (including\n * this one).\n *\n * @fires SelectionHandle#change\n * @param {Object} [extraInfo] - Extra properties to be included on the event\n * object that's passed to listeners (in addition to any that were passed\n * into the `SelectionHandle` constructor).\n */\n clear(extraInfo) {\n if (this._var)\n this.set(void 0, this._mergeExtraInfo(extraInfo));\n }\n\n /**\n * Subscribes to events on this `SelectionHandle`.\n *\n * @param {string} eventType - Indicates the type of events to listen to.\n * Currently, only `\"change\"` is supported.\n * @param {SelectionHandle~listener} listener - The callback function that\n * will be invoked when the event occurs.\n * @return {string} - A token to pass to {@link SelectionHandle#off} to cancel\n * this subscription.\n */\n on(eventType, listener) {\n return this._emitter.on(eventType, listener);\n }\n\n /**\n * Cancels event subscriptions created by {@link SelectionHandle#on}.\n *\n * @param {string} eventType - The type of event to unsubscribe.\n * @param {string|SelectionHandle~listener} listener - Either the callback\n * function previously passed into {@link SelectionHandle#on}, or the\n * string that was returned from {@link SelectionHandle#on}.\n */\n off(eventType, listener) {\n return this._emitter.off(eventType, listener);\n }\n\n /**\n * Shuts down the `SelectionHandle` object.\n *\n * Removes all event listeners that were added through this handle.\n */\n close() {\n this._emitter.removeAllListeners();\n this.setGroup(null);\n }\n}\n\n/**\n * @callback SelectionHandle~listener\n * @param {Object} event - An object containing details of the event. For\n * `\"change\"` events, this includes the properties `value` (the new\n * value of the selection, or `undefined` if no selection is active),\n * `oldValue` (the previous value of the selection), and `sender` (the\n * `SelectionHandle` instance that made the change).\n */\n\n/**\n * @event SelectionHandle#change\n * @type {object}\n * @property {object} value - The new value of the selection, or `undefined`\n * if no selection is active.\n * @property {object} oldValue - The previous value of the selection.\n * @property {SelectionHandle} sender - The `SelectionHandle` instance that\n * changed the value.\n */\n","export function extend(target, ...sources) {\n for (let i = 0; i < sources.length; i++) {\n let src = sources[i];\n if (typeof(src) === \"undefined\" || src === null)\n continue;\n\n for (let key in src) {\n if (src.hasOwnProperty(key)) {\n target[key] = src[key];\n }\n }\n }\n return target;\n}\n\nexport function checkSorted(list) {\n for (let i = 1; i < list.length; i++) {\n if (list[i] <= list[i-1]) {\n throw new Error(\"List is not sorted or contains duplicate\");\n }\n }\n}\n\nexport function diffSortedLists(a, b) {\n let i_a = 0;\n let i_b = 0;\n\n if (!a) a = [];\n if (!b) b = [];\n\n let a_only = [];\n let b_only = [];\n\n checkSorted(a);\n checkSorted(b);\n\n while (i_a < a.length && i_b < b.length) {\n if (a[i_a] === b[i_b]) {\n i_a++;\n i_b++;\n } else if (a[i_a] < b[i_b]) {\n a_only.push(a[i_a++]);\n } else {\n b_only.push(b[i_b++]);\n }\n }\n\n if (i_a < a.length)\n a_only = a_only.concat(a.slice(i_a));\n if (i_b < b.length)\n b_only = b_only.concat(b.slice(i_b));\n return {\n removed: a_only,\n added: b_only\n };\n}\n\n// Convert from wide: { colA: [1,2,3], colB: [4,5,6], ... }\n// to long: [ {colA: 1, colB: 4}, {colA: 2, colB: 5}, ... ]\nexport function dataframeToD3(df) {\n let names = [];\n let length;\n for (let name in df) {\n if (df.hasOwnProperty(name))\n names.push(name);\n if (typeof(df[name]) !== \"object\" || typeof(df[name].length) === \"undefined\") {\n throw new Error(\"All fields must be arrays\");\n } else if (typeof(length) !== \"undefined\" && length !== df[name].length) {\n throw new Error(\"All fields must be arrays of the same length\");\n }\n length = df[name].length;\n }\n let results = [];\n let item;\n for (let row = 0; row < length; row++) {\n item = {};\n for (let col = 0; col < names.length; col++) {\n item[names[col]] = df[names[col]][row];\n }\n results.push(item);\n }\n return results;\n}\n\n/**\n * Keeps track of all event listener additions/removals and lets all active\n * listeners be removed with a single operation.\n *\n * @private\n */\nexport class SubscriptionTracker {\n constructor(emitter) {\n this._emitter = emitter;\n this._subs = {};\n }\n\n on(eventType, listener) {\n let sub = this._emitter.on(eventType, listener);\n this._subs[sub] = eventType;\n return sub;\n }\n\n off(eventType, listener) {\n let sub = this._emitter.off(eventType, listener);\n if (sub) {\n delete this._subs[sub];\n }\n return sub;\n }\n\n removeAllListeners() {\n let current_subs = this._subs;\n this._subs = {};\n Object.keys(current_subs).forEach((sub) => {\n this._emitter.off(current_subs[sub], sub);\n });\n }\n}\n","import Events from \"./events\";\n\nexport default class Var {\n constructor(group, name, /*optional*/ value) {\n this._group = group;\n this._name = name;\n this._value = value;\n this._events = new Events();\n }\n\n get() {\n return this._value;\n }\n\n set(value, /*optional*/ event) {\n if (this._value === value) {\n // Do nothing; the value hasn't changed\n return;\n }\n let oldValue = this._value;\n this._value = value;\n // Alert JavaScript listeners that the value has changed\n let evt = {};\n if (event && typeof(event) === \"object\") {\n for (let k in event) {\n if (event.hasOwnProperty(k))\n evt[k] = event[k];\n }\n }\n evt.oldValue = oldValue;\n evt.value = value;\n this._events.trigger(\"change\", evt, this);\n\n // TODO: Make this extensible, to let arbitrary back-ends know that\n // something has changed\n if (global.Shiny && global.Shiny.onInputChange) {\n global.Shiny.onInputChange(\n \".clientValue-\" +\n (this._group.name !== null ? this._group.name + \"-\" : \"\") +\n this._name,\n typeof(value) === \"undefined\" ? null : value\n );\n }\n }\n\n on(eventType, listener) {\n return this._events.on(eventType, listener);\n }\n\n off(eventType, listener) {\n return this._events.off(eventType, listener);\n }\n}\n"]} \ No newline at end of file diff --git a/docs/articles/variables_sheet_files/datatables-binding-0.19/datatables.js b/docs/articles/variables_sheet_files/datatables-binding-0.19/datatables.js new file mode 100644 index 00000000..fc04fd22 --- /dev/null +++ b/docs/articles/variables_sheet_files/datatables-binding-0.19/datatables.js @@ -0,0 +1,1421 @@ +(function() { + +// some helper functions: using a global object DTWidget so that it can be used +// in JS() code, e.g. datatable(options = list(foo = JS('code'))); unlike R's +// dynamic scoping, when 'code' is eval()'ed, JavaScript does not know objects +// from the "parent frame", e.g. JS('DTWidget') will not work unless it was made +// a global object +var DTWidget = {}; + +// 123456666.7890 -> 123,456,666.7890 +var markInterval = function(d, digits, interval, mark, decMark, precision) { + x = precision ? d.toPrecision(digits) : d.toFixed(digits); + if (!/^-?[\d.]+$/.test(x)) return x; + var xv = x.split('.'); + if (xv.length > 2) return x; // should have at most one decimal point + xv[0] = xv[0].replace(new RegExp('\\B(?=(\\d{' + interval + '})+(?!\\d))', 'g'), mark); + return xv.join(decMark); +}; + +DTWidget.formatCurrency = function(data, currency, digits, interval, mark, decMark, before) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + var res = markInterval(d, digits, interval, mark, decMark); + res = before ? (/^-/.test(res) ? '-' + currency + res.replace(/^-/, '') : currency + res) : + res + currency; + return res; +}; + +DTWidget.formatString = function(data, prefix, suffix) { + var d = data; + if (d === null) return ''; + return prefix + d + suffix; +}; + +DTWidget.formatPercentage = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d * 100, digits, interval, mark, decMark) + '%'; +}; + +DTWidget.formatRound = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d, digits, interval, mark, decMark); +}; + +DTWidget.formatSignif = function(data, digits, interval, mark, decMark) { + var d = parseFloat(data); + if (isNaN(d)) return ''; + return markInterval(d, digits, interval, mark, decMark, true); +}; + +DTWidget.formatDate = function(data, method, params) { + var d = data; + if (d === null) return ''; + // (new Date('2015-10-28')).toDateString() may return 2015-10-27 because the + // actual time created could be like 'Tue Oct 27 2015 19:00:00 GMT-0500 (CDT)', + // i.e. the date-only string is treated as UTC time instead of local time + if ((method === 'toDateString' || method === 'toLocaleDateString') && /^\d{4,}\D\d{2}\D\d{2}$/.test(d)) { + d = d.split(/\D/); + d = new Date(d[0], d[1] - 1, d[2]); + } else { + d = new Date(d); + } + return d[method].apply(d, params); +}; + +window.DTWidget = DTWidget; + +var transposeArray2D = function(a) { + return a.length === 0 ? a : HTMLWidgets.transposeArray2D(a); +}; + +var crosstalkPluginsInstalled = false; + +function maybeInstallCrosstalkPlugins() { + if (crosstalkPluginsInstalled) + return; + crosstalkPluginsInstalled = true; + + $.fn.dataTable.ext.afnFiltering.push( + function(oSettings, aData, iDataIndex) { + var ctfilter = oSettings.nTable.ctfilter; + if (ctfilter && !ctfilter[iDataIndex]) + return false; + + var ctselect = oSettings.nTable.ctselect; + if (ctselect && !ctselect[iDataIndex]) + return false; + + return true; + } + ); +} + +HTMLWidgets.widget({ + name: "datatables", + type: "output", + renderOnNullValue: true, + initialize: function(el, width, height) { + $(el).html(' '); + return { + data: null, + ctfilterHandle: new crosstalk.FilterHandle(), + ctfilterSubscription: null, + ctselectHandle: new crosstalk.SelectionHandle(), + ctselectSubscription: null + }; + }, + renderValue: function(el, data, instance) { + if (el.offsetWidth === 0 || el.offsetHeight === 0) { + instance.data = data; + return; + } + instance.data = null; + var $el = $(el); + $el.empty(); + + if (data === null) { + $el.append(' '); + // clear previous Shiny inputs (if any) + for (var i in instance.clearInputs) instance.clearInputs[i](); + instance.clearInputs = {}; + return; + } + + var crosstalkOptions = data.crosstalkOptions; + if (!crosstalkOptions) crosstalkOptions = { + 'key': null, 'group': null + }; + if (crosstalkOptions.group) { + maybeInstallCrosstalkPlugins(); + instance.ctfilterHandle.setGroup(crosstalkOptions.group); + instance.ctselectHandle.setGroup(crosstalkOptions.group); + } + + // if we are in the viewer then we always want to fillContainer and + // and autoHideNavigation (unless the user has explicitly set these) + if (window.HTMLWidgets.viewerMode) { + if (!data.hasOwnProperty("fillContainer")) + data.fillContainer = true; + if (!data.hasOwnProperty("autoHideNavigation")) + data.autoHideNavigation = true; + } + + // propagate fillContainer to instance (so we have it in resize) + instance.fillContainer = data.fillContainer; + + var cells = data.data; + + if (cells instanceof Array) cells = transposeArray2D(cells); + + $el.append(data.container); + var $table = $el.find('table'); + if (data.class) $table.addClass(data.class); + if (data.caption) $table.prepend(data.caption); + + if (!data.selection) data.selection = { + mode: 'none', selected: null, target: 'row', selectable: null + }; + if (HTMLWidgets.shinyMode && data.selection.mode !== 'none' && + data.selection.target === 'row+column') { + if ($table.children('tfoot').length === 0) { + $table.append($('')); + $table.find('thead tr').clone().appendTo($table.find('tfoot')); + } + } + + // column filters + var filterRow; + switch (data.filter) { + case 'top': + $table.children('thead').append(data.filterHTML); + filterRow = $table.find('thead tr:last td'); + break; + case 'bottom': + if ($table.children('tfoot').length === 0) { + $table.append($('')); + } + $table.children('tfoot').prepend(data.filterHTML); + filterRow = $table.find('tfoot tr:first td'); + break; + } + + var options = { searchDelay: 1000 }; + if (cells !== null) $.extend(options, { + data: cells + }); + + // options for fillContainer + var bootstrapActive = typeof($.fn.popover) != 'undefined'; + if (instance.fillContainer) { + + // force scrollX/scrollY and turn off autoWidth + options.scrollX = true; + options.scrollY = "100px"; // can be any value, we'll adjust below + + // if we aren't paginating then move around the info/filter controls + // to save space at the bottom and rephrase the info callback + if (data.options.paging === false) { + + // we know how to do this cleanly for bootstrap, not so much + // for other themes/layouts + if (bootstrapActive) { + options.dom = "<'row'<'col-sm-4'i><'col-sm-8'f>>" + + "<'row'<'col-sm-12'tr>>"; + } + + options.fnInfoCallback = function(oSettings, iStart, iEnd, + iMax, iTotal, sPre) { + return Number(iTotal).toLocaleString() + " records"; + }; + } + } + + // auto hide navigation if requested + // Note, this only works on client-side processing mode as on server-side, + // cells (data.data) is null; In addition, we require the pageLength option + // being provided explicitly to enable this. Despite we may be able to deduce + // the default value of pageLength, it may complicate things so we'd rather + // put this responsiblity to users and warn them on the R side. + if (data.autoHideNavigation === true && data.options.paging !== false) { + // strip all nav if length >= cells + if ((cells instanceof Array) && data.options.pageLength >= cells.length) + options.dom = bootstrapActive ? "<'row'<'col-sm-12'tr>>" : "t"; + // alternatively lean things out for flexdashboard mobile portrait + else if (bootstrapActive && window.FlexDashboard && window.FlexDashboard.isMobilePhone()) + options.dom = "<'row'<'col-sm-12'f>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12'p>>"; + } + + $.extend(true, options, data.options || {}); + + var searchCols = options.searchCols; + if (searchCols) { + searchCols = searchCols.map(function(x) { + return x === null ? '' : x.search; + }); + // FIXME: this means I don't respect the escapeRegex setting + delete options.searchCols; + } + + // server-side processing? + var server = options.serverSide === true; + + // use the dataSrc function to pre-process JSON data returned from R + var DT_rows_all = [], DT_rows_current = []; + if (server && HTMLWidgets.shinyMode && typeof options.ajax === 'object' && + /^session\/[\da-z]+\/dataobj/.test(options.ajax.url) && !options.ajax.dataSrc) { + options.ajax.dataSrc = function(json) { + DT_rows_all = $.makeArray(json.DT_rows_all); + DT_rows_current = $.makeArray(json.DT_rows_current); + var data = json.data; + if (!colReorderEnabled()) return data; + var table = $table.DataTable(), order = table.colReorder.order(), flag = true, i, j, row; + for (i = 0; i < order.length; ++i) if (order[i] !== i) flag = false; + if (flag) return data; + for (i = 0; i < data.length; ++i) { + row = data[i].slice(); + for (j = 0; j < order.length; ++j) data[i][j] = row[order[j]]; + } + return data; + }; + } + + var thiz = this; + if (instance.fillContainer) $table.on('init.dt', function(e) { + thiz.fillAvailableHeight(el, $(el).innerHeight()); + }); + // If the page contains serveral datatables and one of which enables colReorder, + // the table.colReorder.order() function will exist but throws error when called. + // So it seems like the only way to know if colReorder is enabled or not is to + // check the options. + var colReorderEnabled = function() { return "colReorder" in options; }; + var table = $table.DataTable(options); + $el.data('datatable', table); + + // Unregister previous Crosstalk event subscriptions, if they exist + if (instance.ctfilterSubscription) { + instance.ctfilterHandle.off("change", instance.ctfilterSubscription); + instance.ctfilterSubscription = null; + } + if (instance.ctselectSubscription) { + instance.ctselectHandle.off("change", instance.ctselectSubscription); + instance.ctselectSubscription = null; + } + + if (!crosstalkOptions.group) { + $table[0].ctfilter = null; + $table[0].ctselect = null; + } else { + var key = crosstalkOptions.key; + function keysToMatches(keys) { + if (!keys) { + return null; + } else { + var selectedKeys = {}; + for (var i = 0; i < keys.length; i++) { + selectedKeys[keys[i]] = true; + } + var matches = {}; + for (var j = 0; j < key.length; j++) { + if (selectedKeys[key[j]]) + matches[j] = true; + } + return matches; + } + } + + function applyCrosstalkFilter(e) { + $table[0].ctfilter = keysToMatches(e.value); + table.draw(); + } + instance.ctfilterSubscription = instance.ctfilterHandle.on("change", applyCrosstalkFilter); + applyCrosstalkFilter({value: instance.ctfilterHandle.filteredKeys}); + + function applyCrosstalkSelection(e) { + if (e.sender !== instance.ctselectHandle) { + table + .rows('.' + selClass, {search: 'applied'}) + .nodes() + .to$() + .removeClass(selClass); + if (selectedRows) + changeInput('rows_selected', selectedRows(), void 0, true); + } + + if (e.sender !== instance.ctselectHandle && e.value && e.value.length) { + var matches = keysToMatches(e.value); + + // persistent selection with plotly (& leaflet) + var ctOpts = crosstalk.var("plotlyCrosstalkOpts").get() || {}; + if (ctOpts.persistent === true) { + var matches = $.extend(matches, $table[0].ctselect); + } + + $table[0].ctselect = matches; + table.draw(); + } else { + if ($table[0].ctselect) { + $table[0].ctselect = null; + table.draw(); + } + } + } + instance.ctselectSubscription = instance.ctselectHandle.on("change", applyCrosstalkSelection); + // TODO: This next line doesn't seem to work when renderDataTable is used + applyCrosstalkSelection({value: instance.ctselectHandle.value}); + } + + var inArray = function(val, array) { + return $.inArray(val, $.makeArray(array)) > -1; + }; + + // encode + to %2B when searching in the table on server side, because + // shiny::parseQueryString() treats + as spaces, and DataTables does not + // encode + to %2B (or % to %25) when sending the request + var encode_plus = function(x) { + return server ? x.replace(/%/g, '%25').replace(/\+/g, '%2B') : x; + }; + + // search the i-th column + var searchColumn = function(i, value) { + var regex = false, ci = true; + if (options.search) { + regex = options.search.regex, + ci = options.search.caseInsensitive !== false; + } + return table.column(i).search(encode_plus(value), regex, !regex, ci); + }; + + if (data.filter !== 'none') { + + filterRow.each(function(i, td) { + + var $td = $(td), type = $td.data('type'), filter; + var $input = $td.children('div').first().children('input'); + $input.prop('disabled', !table.settings()[0].aoColumns[i].bSearchable || type === 'disabled'); + $input.on('input blur', function() { + $input.next('span').toggle(Boolean($input.val())); + }); + // Bootstrap sets pointer-events to none and we won't be able to click + // the clear button + $input.next('span').css('pointer-events', 'auto').hide().click(function() { + $(this).hide().prev('input').val('').trigger('input').focus(); + }); + var searchCol; // search string for this column + if (searchCols && searchCols[i]) { + searchCol = searchCols[i]; + $input.val(searchCol).trigger('input'); + } + var $x = $td.children('div').last(); + + // remove the overflow: hidden attribute of the scrollHead + // (otherwise the scrolling table body obscures the filters) + // The workaround and the discussion from + // https://github.com/rstudio/DT/issues/554#issuecomment-518007347 + // Otherwise the filter selection will not be anchored to the values + // when the columns number is many and scrollX is enabled. + var scrollHead = $(el).find('.dataTables_scrollHead,.dataTables_scrollFoot'); + var cssOverflowHead = scrollHead.css('overflow'); + var scrollBody = $(el).find('.dataTables_scrollBody'); + var cssOverflowBody = scrollBody.css('overflow'); + var scrollTable = $(el).find('.dataTables_scroll'); + var cssOverflowTable = scrollTable.css('overflow'); + if (cssOverflowHead === 'hidden') { + $x.on('show hide', function(e) { + if (e.type === 'show') { + scrollHead.css('overflow', 'visible'); + scrollBody.css('overflow', 'visible'); + scrollTable.css('overflow-x', 'scroll'); + } else { + scrollHead.css('overflow', cssOverflowHead); + scrollBody.css('overflow', cssOverflowBody); + scrollTable.css('overflow-x', cssOverflowTable); + } + }); + $x.css('z-index', 25); + } + + if (inArray(type, ['factor', 'logical'])) { + $input.on({ + click: function() { + $input.parent().hide(); $x.show().trigger('show'); filter[0].selectize.focus(); + }, + input: function() { + if ($input.val() === '') filter[0].selectize.setValue([]); + } + }); + var $input2 = $x.children('select'); + filter = $input2.selectize({ + options: $input2.data('options').map(function(v, i) { + return ({text: v, value: v}); + }), + plugins: ['remove_button'], + hideSelected: true, + onChange: function(value) { + if (value === null) value = []; // compatibility with jQuery 3.0 + $input.val(value.length ? JSON.stringify(value) : ''); + if (value.length) $input.trigger('input'); + $input.attr('title', $input.val()); + if (server) { + table.column(i).search(value.length ? encode_plus(JSON.stringify(value)) : '').draw(); + return; + } + // turn off filter if nothing selected + $td.data('filter', value.length > 0); + table.draw(); // redraw table, and filters will be applied + } + }); + if (searchCol) filter[0].selectize.setValue(JSON.parse(searchCol)); + filter[0].selectize.on('blur', function() { + $x.hide().trigger('hide'); $input.parent().show(); $input.trigger('blur'); + }); + filter.next('div').css('margin-bottom', 'auto'); + } else if (type === 'character') { + var fun = function() { + searchColumn(i, $input.val()).draw(); + }; + if (server) { + fun = $.fn.dataTable.util.throttle(fun, options.searchDelay); + } + $input.on('input', fun); + } else if (inArray(type, ['number', 'integer', 'date', 'time'])) { + var $x0 = $x; + $x = $x0.children('div').first(); + $x0.css({ + 'background-color': '#fff', + 'border': '1px #ddd solid', + 'border-radius': '4px', + 'padding': data.vertical ? '35px 20px': '20px 20px 10px 20px' + }); + var $spans = $x0.children('span').css({ + 'margin-top': data.vertical ? '0' : '10px', + 'white-space': 'nowrap' + }); + var $span1 = $spans.first(), $span2 = $spans.last(); + var r1 = +$x.data('min'), r2 = +$x.data('max'); + // when the numbers are too small or have many decimal places, the + // slider may have numeric precision problems (#150) + var scale = Math.pow(10, Math.max(0, +$x.data('scale') || 0)); + r1 = Math.round(r1 * scale); r2 = Math.round(r2 * scale); + var scaleBack = function(x, scale) { + if (scale === 1) return x; + var d = Math.round(Math.log(scale) / Math.log(10)); + // to avoid problems like 3.423/100 -> 0.034230000000000003 + return (x / scale).toFixed(d); + }; + var slider_min = function() { + return filter.noUiSlider('options').range.min; + }; + var slider_max = function() { + return filter.noUiSlider('options').range.max; + }; + $input.on({ + focus: function() { + $x0.show().trigger('show'); + // first, make sure the slider div leaves at least 20px between + // the two (slider value) span's + $x0.width(Math.max(160, $span1.outerWidth() + $span2.outerWidth() + 20)); + // then, if the input is really wide or slider is vertical, + // make the slider the same width as the input + if ($x0.outerWidth() < $input.outerWidth() || data.vertical) { + $x0.outerWidth($input.outerWidth()); + } + // make sure the slider div does not reach beyond the right margin + if ($(window).width() < $x0.offset().left + $x0.width()) { + $x0.offset({ + 'left': $input.offset().left + $input.outerWidth() - $x0.outerWidth() + }); + } + }, + blur: function() { + $x0.hide().trigger('hide'); + }, + input: function() { + if ($input.val() === '') filter.val([slider_min(), slider_max()]); + }, + change: function() { + var v = $input.val().replace(/\s/g, ''); + if (v === '') return; + v = v.split('...'); + if (v.length !== 2) { + $input.parent().addClass('has-error'); + return; + } + if (v[0] === '') v[0] = slider_min(); + if (v[1] === '') v[1] = slider_max(); + $input.parent().removeClass('has-error'); + // treat date as UTC time at midnight + var strTime = function(x) { + var s = type === 'date' ? 'T00:00:00Z' : ''; + var t = new Date(x + s).getTime(); + // add 10 minutes to date since it does not hurt the date, and + // it helps avoid the tricky floating point arithmetic problems, + // e.g. sometimes the date may be a few milliseconds earlier + // than the midnight due to precision problems in noUiSlider + return type === 'date' ? t + 3600000 : t; + }; + if (inArray(type, ['date', 'time'])) { + v[0] = strTime(v[0]); + v[1] = strTime(v[1]); + } + if (v[0] != slider_min()) v[0] *= scale; + if (v[1] != slider_max()) v[1] *= scale; + filter.val(v); + } + }); + var formatDate = function(d, isoFmt) { + d = scaleBack(d, scale); + if (type === 'number') return d; + if (type === 'integer') return parseInt(d); + var x = new Date(+d); + var fmt = ('filterDateFmt' in data) ? data.filterDateFmt[i] : undefined; + if (fmt !== undefined && isoFmt === false) return x[fmt.method].apply(x, fmt.params); + if (type === 'date') { + var pad0 = function(x) { + return ('0' + x).substr(-2, 2); + }; + return x.getUTCFullYear() + '-' + pad0(1 + x.getUTCMonth()) + + '-' + pad0(x.getUTCDate()); + } else { + return x.toISOString(); + } + }; + var opts = type === 'date' ? { step: 60 * 60 * 1000 } : + type === 'integer' ? { step: 1 } : {}; + + opts.orientation = data.vertical ? 'vertical': 'horizontal'; + opts.direction = data.vertical ? 'rtl': 'ltr'; + + filter = $x.noUiSlider($.extend({ + start: [r1, r2], + range: {min: r1, max: r2}, + connect: true + }, opts)); + if (scale > 1) (function() { + var t1 = r1, t2 = r2; + var val = filter.val(); + while (val[0] > r1 || val[1] < r2) { + if (val[0] > r1) { + t1 -= val[0] - r1; + } + if (val[1] < r2) { + t2 += r2 - val[1]; + } + filter = $x.noUiSlider($.extend({ + start: [t1, t2], + range: {min: t1, max: t2}, + connect: true + }, opts), true); + val = filter.val(); + } + r1 = t1; r2 = t2; + })(); + var updateSliderText = function(v1, v2) { + $span1.text(formatDate(v1, false)); $span2.text(formatDate(v2, false)); + }; + updateSliderText(r1, r2); + var updateSlider = function(e) { + var val = filter.val(); + // turn off filter if in full range + $td.data('filter', val[0] > slider_min() || val[1] < slider_max()); + var v1 = formatDate(val[0]), v2 = formatDate(val[1]), ival; + if ($td.data('filter')) { + ival = v1 + ' ... ' + v2; + $input.attr('title', ival).val(ival).trigger('input'); + } else { + $input.attr('title', '').val(''); + } + updateSliderText(val[0], val[1]); + if (e.type === 'slide') return; // no searching when sliding only + if (server) { + table.column(i).search($td.data('filter') ? ival : '').draw(); + return; + } + table.draw(); + }; + filter.on({ + set: updateSlider, + slide: updateSlider + }); + } + + // server-side processing will be handled by R (or whatever server + // language you use); the following code is only needed for client-side + // processing + if (server) { + // if a search string has been pre-set, search now + if (searchCol) searchColumn(i, searchCol).draw(); + return; + } + + var customFilter = function(settings, data, dataIndex) { + // there is no way to attach a search function to a specific table, + // and we need to make sure a global search function is not applied to + // all tables (i.e. a range filter in a previous table should not be + // applied to the current table); we use the settings object to + // determine if we want to perform searching on the current table, + // since settings.sTableId will be different to different tables + if (table.settings()[0] !== settings) return true; + // no filter on this column or no need to filter this column + if (typeof filter === 'undefined' || !$td.data('filter')) return true; + + var r = filter.val(), v, r0, r1; + var i_data = function(i) { + if (!colReorderEnabled()) return i; + var order = table.colReorder.order(), k; + for (k = 0; k < order.length; ++k) if (order[k] === i) return k; + return i; // in theory it will never be here... + } + v = data[i_data(i)]; + if (type === 'number' || type === 'integer') { + v = parseFloat(v); + // how to handle NaN? currently exclude these rows + if (isNaN(v)) return(false); + r0 = parseFloat(scaleBack(r[0], scale)) + r1 = parseFloat(scaleBack(r[1], scale)); + if (v >= r0 && v <= r1) return true; + } else if (type === 'date' || type === 'time') { + v = new Date(v); + r0 = new Date(r[0] / scale); r1 = new Date(r[1] / scale); + if (v >= r0 && v <= r1) return true; + } else if (type === 'factor') { + if (r.length === 0 || inArray(v, r)) return true; + } else if (type === 'logical') { + if (r.length === 0) return true; + if (inArray(v === '' ? 'na' : v, r)) return true; + } + return false; + }; + + $.fn.dataTable.ext.search.push(customFilter); + + // search for the preset search strings if it is non-empty + if (searchCol) { + if (inArray(type, ['factor', 'logical'])) { + filter[0].selectize.setValue(JSON.parse(searchCol)); + } else if (type === 'character') { + $input.trigger('input'); + } else if (inArray(type, ['number', 'integer', 'date', 'time'])) { + $input.trigger('change'); + } + } + + }); + + } + + // highlight search keywords + var highlight = function() { + var body = $(table.table().body()); + // removing the old highlighting first + body.unhighlight(); + + // don't highlight the "not found" row, so we get the rows using the api + if (table.rows({ filter: 'applied' }).data().length === 0) return; + // highlight global search keywords + body.highlight($.trim(table.search()).split(/\s+/)); + // then highlight keywords from individual column filters + if (filterRow) filterRow.each(function(i, td) { + var $td = $(td), type = $td.data('type'); + if (type !== 'character') return; + var $input = $td.children('div').first().children('input'); + var column = table.column(i).nodes().to$(), + val = $.trim($input.val()); + if (type !== 'character' || val === '') return; + column.highlight(val.split(/\s+/)); + }); + }; + + if (options.searchHighlight) { + table + .on('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth', highlight) + .on('destroy', function() { + // remove event handler + table.off('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth'); + }); + + // Set the option for escaping regex characters in our search string. This will be used + // for all future matching. + jQuery.fn.highlight.options.escapeRegex = (!options.search || !options.search.regex); + + // initial highlight for state saved conditions and initial states + highlight(); + } + + // run the callback function on the table instance + if (typeof data.callback === 'function') data.callback(table); + + // double click to edit the cell, row, column, or all cells + if (data.editable) table.on('dblclick.dt', 'tbody td', function(e) { + // only bring up the editor when the cell itself is dbclicked, and ignore + // other dbclick events bubbled up (e.g. from the ) + if (e.target !== this) return; + var target = [], immediate = false; + switch (data.editable.target) { + case 'cell': + target = [this]; + immediate = true; // edit will take effect immediately + break; + case 'row': + target = table.cells(table.cell(this).index().row, '*').nodes(); + break; + case 'column': + target = table.cells('*', table.cell(this).index().column).nodes(); + break; + case 'all': + target = table.cells().nodes(); + break; + default: + throw 'The editable parameter must be "cell", "row", "column", or "all"'; + } + var disableCols = data.editable.disable ? data.editable.disable.columns : null; + var numericCols = data.editable.numeric; + var areaCols = data.editable.area; + for (var i = 0; i < target.length; i++) { + (function(cell, current) { + var $cell = $(cell), html = $cell.html(); + var _cell = table.cell(cell), value = _cell.data(), index = _cell.index().column; + var $input; + if (inArray(index, numericCols)) { + $input = $(''); + } else if (inArray(index, areaCols)) { + $input = $(''); + } else { + $input = $(''); + } + if (!immediate) { + $cell.data('input', $input).data('html', html); + $input.attr('title', 'Hit Ctrl+Enter to finish editing, or Esc to cancel'); + } + $input.val(value); + if (inArray(index, disableCols)) { + $input.attr('readonly', '').css('filter', 'invert(25%)'); + } + $cell.empty().append($input); + if (cell === current) $input.focus(); + $input.css('width', '100%'); + + if (immediate) $input.on('blur', function(e) { + var valueNew = $input.val(); + if (valueNew != value) { + _cell.data(valueNew); + if (HTMLWidgets.shinyMode) { + changeInput('cell_edit', [cellInfo(cell)], 'DT.cellInfo', null, {priority: 'event'}); + } + // for server-side processing, users have to call replaceData() to update the table + if (!server) table.draw(false); + } else { + $cell.html(html); + } + }).on('keyup', function(e) { + // hit Escape to cancel editing + if (e.keyCode === 27) $input.trigger('blur'); + }); + + // bulk edit (row, column, or all) + if (!immediate) $input.on('keyup', function(e) { + var removeInput = function($cell, restore) { + $cell.data('input').remove(); + if (restore) $cell.html($cell.data('html')); + } + if (e.keyCode === 27) { + for (var i = 0; i < target.length; i++) { + removeInput($(target[i]), true); + } + } else if (e.keyCode === 13 && e.ctrlKey) { + // Ctrl + Enter + var cell, $cell, _cell, cellData = []; + for (var i = 0; i < target.length; i++) { + cell = target[i]; $cell = $(cell); _cell = table.cell(cell); + _cell.data($cell.data('input').val()); + HTMLWidgets.shinyMode && cellData.push(cellInfo(cell)); + removeInput($cell, false); + } + if (HTMLWidgets.shinyMode) { + changeInput('cell_edit', cellData, 'DT.cellInfo', null, {priority: "event"}); + } + if (!server) table.draw(false); + } + }); + })(target[i], this); + } + }); + + // interaction with shiny + if (!HTMLWidgets.shinyMode && !crosstalkOptions.group) return; + + var methods = {}; + var shinyData = {}; + + methods.updateCaption = function(caption) { + if (!caption) return; + $table.children('caption').replaceWith(caption); + } + + // register clear functions to remove input values when the table is removed + instance.clearInputs = {}; + + var changeInput = function(id, value, type, noCrosstalk, opts) { + var event = id; + id = el.id + '_' + id; + if (type) id = id + ':' + type; + // do not update if the new value is the same as old value + if (event !== 'cell_edit' && !/_clicked$/.test(event) && shinyData.hasOwnProperty(id) && shinyData[id] === JSON.stringify(value)) + return; + shinyData[id] = JSON.stringify(value); + if (HTMLWidgets.shinyMode && Shiny.setInputValue) { + Shiny.setInputValue(id, value, opts); + if (!instance.clearInputs[id]) instance.clearInputs[id] = function() { + Shiny.setInputValue(id, null); + } + } + + // HACK + if (event === "rows_selected" && !noCrosstalk) { + if (crosstalkOptions.group) { + var keys = crosstalkOptions.key; + var selectedKeys = null; + if (value) { + selectedKeys = []; + for (var i = 0; i < value.length; i++) { + // The value array's contents use 1-based row numbers, so we must + // convert to 0-based before indexing into the keys array. + selectedKeys.push(keys[value[i] - 1]); + } + } + instance.ctselectHandle.set(selectedKeys); + } + } + }; + + var addOne = function(x) { + return x.map(function(i) { return 1 + i; }); + }; + + var unique = function(x) { + var ux = []; + $.each(x, function(i, el){ + if ($.inArray(el, ux) === -1) ux.push(el); + }); + return ux; + } + + // change the row index of a cell + var tweakCellIndex = function(cell) { + var info = cell.index(); + // some cell may not be valid. e.g, #759 + // when using the RowGroup extension, datatables will + // generate the row label and the cells are not part of + // the data thus contain no row/col info + if (info === undefined) + return {row: null, col: null}; + if (server) { + info.row = DT_rows_current[info.row]; + } else { + info.row += 1; + } + return {row: info.row, col: info.column}; + } + + var cleanSelectedValues = function() { + changeInput('rows_selected', []); + changeInput('columns_selected', []); + changeInput('cells_selected', transposeArray2D([]), 'shiny.matrix'); + } + // #828 we should clean the selection on the server-side when the table reloads + cleanSelectedValues(); + + // a flag to indicates if select extension is initialized or not + var flagSelectExt = table.settings()[0]._select !== undefined; + // the Select extension should only be used in the client mode and + // when the selection.mode is set to none + if (data.selection.mode === 'none' && !server && flagSelectExt) { + var updateRowsSelected = function() { + var rows = table.rows({selected: true}); + var selected = []; + $.each(rows.indexes().toArray(), function(i, v) { + selected.push(v + 1); + }); + changeInput('rows_selected', selected); + } + var updateColsSelected = function() { + var columns = table.columns({selected: true}); + changeInput('columns_selected', columns.indexes().toArray()); + } + var updateCellsSelected = function() { + var cells = table.cells({selected: true}); + var selected = []; + cells.every(function() { + var row = this.index().row; + var col = this.index().column; + selected = selected.concat([[row + 1, col]]); + }); + changeInput('cells_selected', transposeArray2D(selected), 'shiny.matrix'); + } + table.on('select deselect', function(e, dt, type, indexes) { + updateRowsSelected(); + updateColsSelected(); + updateCellsSelected(); + }) + } + + var selMode = data.selection.mode, selTarget = data.selection.target; + var selDisable = data.selection.selectable === false; + if (inArray(selMode, ['single', 'multiple'])) { + var selClass = inArray(data.style, ['bootstrap', 'bootstrap4']) ? 'active' : 'selected'; + // selected1: row indices; selected2: column indices + var initSel = function(x) { + if (x === null || typeof x === 'boolean' || selTarget === 'cell') { + return {rows: [], cols: []}; + } else if (selTarget === 'row') { + return {rows: $.makeArray(x), cols: []}; + } else if (selTarget === 'column') { + return {rows: [], cols: $.makeArray(x)}; + } else if (selTarget === 'row+column') { + return {rows: $.makeArray(x.rows), cols: $.makeArray(x.cols)}; + } + } + var selected = data.selection.selected; + var selected1 = initSel(selected).rows, selected2 = initSel(selected).cols; + // selectable should contain either all positive or all non-positive values, not both + // positive values indicate "selectable" while non-positive values means "nonselectable" + // the assertion is performed on R side. (only column indicides could be zero which indicates + // the row name) + var selectable = data.selection.selectable; + var selectable1 = initSel(selectable).rows, selectable2 = initSel(selectable).cols; + + // After users reorder the rows or filter the table, we cannot use the table index + // directly. Instead, we need this function to find out the rows between the two clicks. + // If user filter the table again between the start click and the end click, the behavior + // would be undefined, but it should not be a problem. + var shiftSelRowsIndex = function(start, end) { + var indexes = server ? DT_rows_all : table.rows({ search: 'applied' }).indexes().toArray(); + start = indexes.indexOf(start); end = indexes.indexOf(end); + // if start is larger than end, we need to swap + if (start > end) { + var tmp = end; end = start; start = tmp; + } + return indexes.slice(start, end + 1); + } + + var serverRowIndex = function(clientRowIndex) { + return server ? DT_rows_current[clientRowIndex] : clientRowIndex + 1; + } + + // row, column, or cell selection + var lastClickedRow; + if (inArray(selTarget, ['row', 'row+column'])) { + // Get the current selected rows. It will also + // update the selected1's value based on the current row selection state + // Note we can't put this function inside selectRows() directly, + // the reason is method.selectRows() will override selected1's value but this + // function will add rows to selected1 (keep the existing selection), which is + // inconsistent with column and cell selection. + var selectedRows = function() { + var rows = table.rows('.' + selClass); + var idx = rows.indexes().toArray(); + if (!server) { + selected1 = addOne(idx); + return selected1; + } + idx = idx.map(function(i) { + return DT_rows_current[i]; + }); + selected1 = selMode === 'multiple' ? unique(selected1.concat(idx)) : idx; + return selected1; + } + // Change selected1's value based on selectable1, then refresh the row state + var onlyKeepSelectableRows = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected1 = []; + return; + } + if (selectable1.length === 0) return; + var nonselectable = selectable1[0] <= 0; + if (nonselectable) { + // should make selectable1 positive + selected1 = $(selected1).not(selectable1.map(function(i) { return -i; })).get(); + } else { + selected1 = $(selected1).filter(selectable1).get(); + } + } + // Change selected1's value based on selectable1, then + // refresh the row selection state according to values in selected1 + var selectRows = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableRows(); + table.$('tr.' + selClass).removeClass(selClass); + if (selected1.length === 0) return; + if (server) { + table.rows({page: 'current'}).every(function() { + if (inArray(DT_rows_current[this.index()], selected1)) { + $(this.node()).addClass(selClass); + } + }); + } else { + var selected0 = selected1.map(function(i) { return i - 1; }); + $(table.rows(selected0).nodes()).addClass(selClass); + } + } + table.on('mousedown.dt', 'tbody tr', function(e) { + var $this = $(this), thisRow = table.row(this); + if (selMode === 'multiple') { + if (e.shiftKey && lastClickedRow !== undefined) { + // select or de-select depends on the last clicked row's status + var flagSel = !$this.hasClass(selClass); + var crtClickedRow = serverRowIndex(thisRow.index()); + if (server) { + var rowsIndex = shiftSelRowsIndex(lastClickedRow, crtClickedRow); + // update current page's selClass + rowsIndex.map(function(i) { + var rowIndex = DT_rows_current.indexOf(i); + if (rowIndex >= 0) { + var row = table.row(rowIndex).nodes().to$(); + var flagRowSel = !row.hasClass(selClass); + if (flagSel === flagRowSel) row.toggleClass(selClass); + } + }); + // update selected1 + if (flagSel) { + selected1 = unique(selected1.concat(rowsIndex)); + } else { + selected1 = selected1.filter(function(index) { + return !inArray(index, rowsIndex); + }); + } + } else { + // js starts from 0 + shiftSelRowsIndex(lastClickedRow - 1, crtClickedRow - 1).map(function(value) { + var row = table.row(value).nodes().to$(); + var flagRowSel = !row.hasClass(selClass); + if (flagSel === flagRowSel) row.toggleClass(selClass); + }); + } + e.preventDefault(); + } else { + $this.toggleClass(selClass); + } + } else { + if ($this.hasClass(selClass)) { + $this.removeClass(selClass); + } else { + table.$('tr.' + selClass).removeClass(selClass); + $this.addClass(selClass); + } + } + if (server && !$this.hasClass(selClass)) { + var id = DT_rows_current[thisRow.index()]; + // remove id from selected1 since its class .selected has been removed + if (inArray(id, selected1)) selected1.splice($.inArray(id, selected1), 1); + } + selectedRows(); // update selected1's value based on selClass + selectRows(false); // only keep the selectable rows + changeInput('rows_selected', selected1); + changeInput('row_last_clicked', serverRowIndex(thisRow.index()), null, null, {priority: 'event'}); + lastClickedRow = serverRowIndex(thisRow.index()); + }); + selectRows(false); // in case users have specified pre-selected rows + // restore selected rows after the table is redrawn (e.g. sort/search/page); + // client-side tables will preserve the selections automatically; for + // server-side tables, we have to *real* row indices are in `selected1` + changeInput('rows_selected', selected1); + if (server) table.on('draw.dt', function(e) { selectRows(false); }); + methods.selectRows = function(selected, ignoreSelectable) { + selected1 = $.makeArray(selected); + selectRows(ignoreSelectable); + changeInput('rows_selected', selected1); + } + } + + if (inArray(selTarget, ['column', 'row+column'])) { + if (selTarget === 'row+column') { + $(table.columns().footer()).css('cursor', 'pointer'); + } + // update selected2's value based on selectable2 + var onlyKeepSelectableCols = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected2 = []; + return; + } + if (selectable2.length === 0) return; + var nonselectable = selectable2[0] <= 0; + if (nonselectable) { + // need to make selectable2 positive + selected2 = $(selected2).not(selectable2.map(function(i) { return -i; })).get(); + } else { + selected2 = $(selected2).filter(selectable2).get(); + } + } + // update selected2 and then + // refresh the col selection state according to values in selected2 + var selectCols = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableCols(); + // if selected2 is not a valide index (e.g., larger than the column number) + // table.columns(selected2) will fail and result in a blank table + // this is different from the table.rows(), where the out-of-range indexes + // doesn't affect at all + selected2 = $(selected2).filter(table.columns().indexes()).get(); + table.columns().nodes().flatten().to$().removeClass(selClass); + if (selected2.length > 0) + table.columns(selected2).nodes().flatten().to$().addClass(selClass); + } + var callback = function() { + var colIdx = selTarget === 'column' ? table.cell(this).index().column : + $.inArray(this, table.columns().footer()), + thisCol = $(table.column(colIdx).nodes()); + if (colIdx === -1) return; + if (thisCol.hasClass(selClass)) { + thisCol.removeClass(selClass); + selected2.splice($.inArray(colIdx, selected2), 1); + } else { + if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass); + thisCol.addClass(selClass); + selected2 = selMode === 'single' ? [colIdx] : unique(selected2.concat([colIdx])); + } + selectCols(false); // update selected2 based on selectable + changeInput('columns_selected', selected2); + } + if (selTarget === 'column') { + $(table.table().body()).on('click.dt', 'td', callback); + } else { + $(table.table().footer()).on('click.dt', 'tr th', callback); + } + selectCols(false); // in case users have specified pre-selected columns + changeInput('columns_selected', selected2); + if (server) table.on('draw.dt', function(e) { selectCols(false); }); + methods.selectColumns = function(selected, ignoreSelectable) { + selected2 = $.makeArray(selected); + selectCols(ignoreSelectable); + changeInput('columns_selected', selected2); + } + } + + if (selTarget === 'cell') { + var selected3 = [], selectable3 = []; + if (selected !== null) selected3 = selected; + if (selectable !== null && typeof selectable !== 'boolean') selectable3 = selectable; + var findIndex = function(ij, sel) { + for (var i = 0; i < sel.length; i++) { + if (ij[0] === sel[i][0] && ij[1] === sel[i][1]) return i; + } + return -1; + } + // Change selected3's value based on selectable3, then refresh the cell state + var onlyKeepSelectableCells = function() { + if (selDisable) { // users can't select; useful when only want backend select + selected3 = []; + return; + } + if (selectable3.length === 0) return; + var nonselectable = selectable3[0][0] <= 0; + var out = []; + if (nonselectable) { + selected3.map(function(ij) { + // should make selectable3 positive + if (findIndex([-ij[0], -ij[1]], selectable3) === -1) { out.push(ij); } + }); + } else { + selected3.map(function(ij) { + if (findIndex(ij, selectable3) > -1) { out.push(ij); } + }); + } + selected3 = out; + } + // Change selected3's value based on selectable3, then + // refresh the cell selection state according to values in selected3 + var selectCells = function(ignoreSelectable) { + if (!ignoreSelectable) onlyKeepSelectableCells(); + table.$('td.' + selClass).removeClass(selClass); + if (selected3.length === 0) return; + if (server) { + table.cells({page: 'current'}).every(function() { + var info = tweakCellIndex(this); + if (findIndex([info.row, info.col], selected3) > -1) + $(this.node()).addClass(selClass); + }); + } else { + selected3.map(function(ij) { + $(table.cell(ij[0] - 1, ij[1]).node()).addClass(selClass); + }); + } + }; + table.on('click.dt', 'tbody td', function() { + var $this = $(this), info = tweakCellIndex(table.cell(this)); + if ($this.hasClass(selClass)) { + $this.removeClass(selClass); + selected3.splice(findIndex([info.row, info.col], selected3), 1); + } else { + if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass); + $this.addClass(selClass); + selected3 = selMode === 'single' ? [[info.row, info.col]] : + unique(selected3.concat([[info.row, info.col]])); + } + selectCells(false); // must call this to update selected3 based on selectable3 + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + }); + selectCells(false); // in case users have specified pre-selected columns + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + + if (server) table.on('draw.dt', function(e) { selectCells(false); }); + methods.selectCells = function(selected, ignoreSelectable) { + selected3 = selected ? selected : []; + selectCells(ignoreSelectable); + changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix'); + } + } + } + + // expose some table info to Shiny + var updateTableInfo = function(e, settings) { + // TODO: is anyone interested in the page info? + // changeInput('page_info', table.page.info()); + var updateRowInfo = function(id, modifier) { + var idx; + if (server) { + idx = modifier.page === 'current' ? DT_rows_current : DT_rows_all; + } else { + var rows = table.rows($.extend({ + search: 'applied', + page: 'all' + }, modifier)); + idx = addOne(rows.indexes().toArray()); + } + changeInput('rows' + '_' + id, idx); + }; + updateRowInfo('current', {page: 'current'}); + updateRowInfo('all', {}); + } + table.on('draw.dt', updateTableInfo); + updateTableInfo(); + + // state info + table.on('draw.dt column-visibility.dt', function() { + changeInput('state', table.state()); + }); + changeInput('state', table.state()); + + // search info + var updateSearchInfo = function() { + changeInput('search', table.search()); + if (filterRow) changeInput('search_columns', filterRow.toArray().map(function(td) { + return $(td).find('input').first().val(); + })); + } + table.on('draw.dt', updateSearchInfo); + updateSearchInfo(); + + var cellInfo = function(thiz) { + var info = tweakCellIndex(table.cell(thiz)); + info.value = table.cell(thiz).data(); + return info; + } + // the current cell clicked on + table.on('click.dt', 'tbody td', function() { + changeInput('cell_clicked', cellInfo(this), null, null, {priority: 'event'}); + }) + changeInput('cell_clicked', {}); + + // do not trigger table selection when clicking on links unless they have classes + table.on('click.dt', 'tbody td a', function(e) { + if (this.className === '') e.stopPropagation(); + }); + + methods.addRow = function(data, rowname, resetPaging) { + var n = table.columns().indexes().length, d = n - data.length; + if (d === 1) { + data = rowname.concat(data) + } else if (d !== 0) { + console.log(data); + console.log(table.columns().indexes()); + throw 'New data must be of the same length as current data (' + n + ')'; + }; + table.row.add(data).draw(resetPaging); + } + + methods.updateSearch = function(keywords) { + if (keywords.global !== null) + $(table.table().container()).find('input[type=search]').first() + .val(keywords.global).trigger('input'); + var columns = keywords.columns; + if (!filterRow || columns === null) return; + filterRow.toArray().map(function(td, i) { + var v = typeof columns === 'string' ? columns : columns[i]; + if (typeof v === 'undefined') { + console.log('The search keyword for column ' + i + ' is undefined') + return; + } + $(td).find('input').first().val(v); + searchColumn(i, v); + }); + table.draw(); + } + + methods.hideCols = function(hide, reset) { + if (reset) table.columns().visible(true, false); + table.columns(hide).visible(false); + } + + methods.showCols = function(show, reset) { + if (reset) table.columns().visible(false, false); + table.columns(show).visible(true); + } + + methods.colReorder = function(order, origOrder) { + table.colReorder.order(order, origOrder); + } + + methods.selectPage = function(page) { + if (table.page.info().pages < page || page < 1) { + throw 'Selected page is out of range'; + }; + table.page(page - 1).draw(false); + } + + methods.reloadData = function(resetPaging, clearSelection) { + // empty selections first if necessary + if (methods.selectRows && inArray('row', clearSelection)) methods.selectRows([]); + if (methods.selectColumns && inArray('column', clearSelection)) methods.selectColumns([]); + if (methods.selectCells && inArray('cell', clearSelection)) methods.selectCells([]); + table.ajax.reload(null, resetPaging); + } + + table.shinyMethods = methods; + }, + resize: function(el, width, height, instance) { + if (instance.data) this.renderValue(el, instance.data, instance); + + // dynamically adjust height if fillContainer = TRUE + if (instance.fillContainer) + this.fillAvailableHeight(el, height); + + this.adjustWidth(el); + }, + + // dynamically set the scroll body to fill available height + // (used with fillContainer = TRUE) + fillAvailableHeight: function(el, availableHeight) { + + // see how much of the table is occupied by header/footer elements + // and use that to compute a target scroll body height + var dtWrapper = $(el).find('div.dataTables_wrapper'); + var dtScrollBody = $(el).find($('div.dataTables_scrollBody')); + var framingHeight = dtWrapper.innerHeight() - dtScrollBody.innerHeight(); + var scrollBodyHeight = availableHeight - framingHeight; + + // set the height + dtScrollBody.height(scrollBodyHeight + 'px'); + }, + + // adjust the width of columns; remove the hard-coded widths on table and the + // scroll header when scrollX/Y are enabled + adjustWidth: function(el) { + var $el = $(el), table = $el.data('datatable'); + if (table) table.columns.adjust(); + $el.find('.dataTables_scrollHeadInner').css('width', '') + .children('table').css('margin-left', ''); + } +}); + + if (!HTMLWidgets.shinyMode) return; + + Shiny.addCustomMessageHandler('datatable-calls', function(data) { + var id = data.id; + var el = document.getElementById(id); + var table = el ? $(el).data('datatable') : null; + if (!table) { + console.log("Couldn't find table with id " + id); + return; + } + + var methods = table.shinyMethods, call = data.call; + if (methods[call.method]) { + methods[call.method].apply(table, call.args); + } else { + console.log("Unknown method " + call.method); + } + }); + +})(); diff --git a/docs/articles/variables_sheet_files/datatables-css-0.0.0/datatables-crosstalk.css b/docs/articles/variables_sheet_files/datatables-css-0.0.0/datatables-crosstalk.css index 43422d25..fb5bae84 100644 --- a/docs/articles/variables_sheet_files/datatables-css-0.0.0/datatables-crosstalk.css +++ b/docs/articles/variables_sheet_files/datatables-css-0.0.0/datatables-crosstalk.css @@ -5,3 +5,19 @@ html body div.DTS div.dataTables_scrollBody { background: none; } + + +/* +Fix https://github.com/rstudio/DT/issues/563 +If the `table.display` is set to "block" (e.g., pkgdown), the browser will display +datatable objects strangely. The search panel and the page buttons will still be +in full-width but the table body will be "compact" and shorter. +In therory, having this attributes will affect `dom="t"` +with `display: block` users. But in reality, there should be no one. +We may remove the below lines in the future if the upstream agree to have this there. +See https://github.com/DataTables/DataTablesSrc/issues/160 +*/ + +table.dataTable { + display: table; +} diff --git a/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.extra.css b/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.extra.css new file mode 100644 index 00000000..b2dd141f --- /dev/null +++ b/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.extra.css @@ -0,0 +1,28 @@ +/* Selected rows/cells */ +table.dataTable tr.selected td, table.dataTable td.selected { + background-color: #b0bed9 !important; +} +/* In case of scrollX/Y or FixedHeader */ +.dataTables_scrollBody .dataTables_sizing { + visibility: hidden; +} + +/* The datatables' theme CSS file doesn't define +the color but with white background. It leads to an issue that +when the HTML's body color is set to 'white', the user can't +see the text since the background is white. One case happens in the +RStudio's IDE when inline viewing the DT table inside an Rmd file, +if the IDE theme is set to "Cobalt". + +See https://github.com/rstudio/DT/issues/447 for more info + +This fixes should have little side-effects because all the other elements +of the default theme use the #333 font color. + +TODO: The upstream may use relative colors for both the table background +and the color. It means the table can display well without this patch +then. At that time, we need to remove the below CSS attributes. +*/ +div.datatables { + color: #333; +} diff --git a/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.min.css b/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.min.css new file mode 100644 index 00000000..71ae98a4 --- /dev/null +++ b/docs/articles/variables_sheet_files/dt-core-1.10.20/css/jquery.dataTables.min.css @@ -0,0 +1 @@ +table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}} diff --git a/docs/articles/variables_sheet_files/dt-core-1.10.20/js/jquery.dataTables.min.js b/docs/articles/variables_sheet_files/dt-core-1.10.20/js/jquery.dataTables.min.js new file mode 100644 index 00000000..d297f256 --- /dev/null +++ b/docs/articles/variables_sheet_files/dt-core-1.10.20/js/jquery.dataTables.min.js @@ -0,0 +1,180 @@ +/*! + Copyright 2008-2019 SpryMedia Ltd. + + This source file is free software, available under the following license: + MIT license - http://datatables.net/license + + This source file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + + For details please refer to: http://www.datatables.net + DataTables 1.10.20 + ©2008-2019 SpryMedia Ltd - datatables.net/license +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,z,y){f instanceof String&&(f=String(f));for(var p=f.length,H=0;H").css({position:"fixed",top:0,left:-1*f(z).scrollLeft(),height:1,width:1, +overflow:"hidden"}).append(f("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(f("
").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}f.extend(a.oBrowser,q.__browser);a.oScroll.iBarWidth=q.__browser.barWidth} +function mb(a,b,c,d,e,h){var g=!1;if(c!==p){var k=c;g=!0}for(;d!==e;)a.hasOwnProperty(d)&&(k=g?b(k,a[d],d,a):a[d],g=!0,d+=h);return k}function Ia(a,b){var c=q.defaults.column,d=a.aoColumns.length;c=f.extend({},q.models.oColumn,c,{nTh:b?b:y.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=f.extend({},q.models.oSearch,c[d]);ma(a,d,f(b).data())}function ma(a,b,c){b=a.aoColumns[b]; +var d=a.oClasses,e=f(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==p&&null!==c&&(kb(c),L(q.defaults.column,c,!0),c.mDataProp===p||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),f.extend(b,c),M(b,c,"sWidth","sWidthOrig"),c.iDataSort!==p&&(b.aDataSort=[c.iDataSort]),M(b,c,"aDataSort"));var g=b.mData,k=U(g), +l=b.mRender?U(b.mRender):null;c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=f.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=k(a,b,p,c);return l&&b?l(d,b,a,c):d};b.fnSetData=function(a,b,c){return Q(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==f.inArray("asc",b.asSorting);c=-1!==f.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass= +d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function aa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ja(a);for(var c=0,d=b.length;cn[m])d(k.length+ +n[m],l);else if("string"===typeof n[m]){var w=0;for(g=k.length;wb&&a[e]--; -1!=d&&c===p&&a.splice(d,1)}function ea(a,b,c,d){var e=a.aoData[b],h,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=I(a,b,d,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var k=e.anCells;if(k)if(d!==p)g(k[d],d);else for(c=0,h=k.length;c").appendTo(d));var l=0;for(b=k.length;ltr").attr("role","row");f(d).find(">tr>th, >tr>td").addClass(g.sHeaderTH);f(e).find(">tr>th, >tr>td").addClass(g.sFooterTH);if(null!==e)for(a=a.aoFooter[0],l=0,b=a.length;l=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);g=a._iDisplayStart;var n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,K(a,!1);else if(!k)a.iDraw++;else if(!a.bDestroying&&!qb(a))return;if(0!==l.length)for(h=k?a.aoData.length:n,k=k?0:g;k",{"class":e?d[0]:""}).append(f("",{valign:"top",colSpan:W(a),"class":a.oClasses.sRowEmpty}).html(c))[0];A(a,"aoHeaderCallback","header",[f(a.nTHead).children("tr")[0], +Oa(a),g,n,l]);A(a,"aoFooterCallback","footer",[f(a.nTFoot).children("tr")[0],Oa(a),g,n,l]);d=f(a.nTBody);d.children().detach();d.append(f(b));A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function V(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&rb(a);d?ia(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;S(a);a._drawHold=!1}function sb(a){var b=a.oClasses,c=f(a.nTable);c=f("
").insertBefore(c);var d=a.oFeatures,e= +f("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),g,k,l,n,m,p,u=0;u")[0];n=h[u+1];if("'"==n||'"'==n){m="";for(p=2;h[u+p]!=n;)m+=h[u+p],p++;"H"==m?m=b.sJUIHeader:"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),l.id=n[0].substr(1,n[0].length-1),l.className=n[1]):"#"==m.charAt(0)?l.id=m.substr(1, +m.length-1):l.className=m;u+=p}e.append(l);e=f(l)}else if(">"==k)e=e.parent();else if("l"==k&&d.bPaginate&&d.bLengthChange)g=tb(a);else if("f"==k&&d.bFilter)g=ub(a);else if("r"==k&&d.bProcessing)g=vb(a);else if("t"==k)g=wb(a);else if("i"==k&&d.bInfo)g=xb(a);else if("p"==k&&d.bPaginate)g=yb(a);else if(0!==q.ext.feature.length)for(l=q.ext.feature,p=0,n=l.length;p',k=d.sSearch;k=k.match(/_INPUT_/)?k.replace("_INPUT_",g):k+g;b=f("
",{id:h.f?null:c+"_filter","class":b.sFilter}).append(f("
").addClass(b.sLength);a.aanFeatures.l||(l[0].id=c+"_length");l.children().append(a.oLanguage.sLengthMenu.replace("_MENU_", +e[0].outerHTML));f("select",l).val(a._iDisplayLength).on("change.DT",function(b){Va(a,f(this).val());S(a)});f(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&f("select",l).val(d)});return l[0]}function yb(a){var b=a.sPaginationType,c=q.ext.pager[b],d="function"===typeof c,e=function(a){S(a)};b=f("
").addClass(a.oClasses.sPaging+b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,g=a._iDisplayLength, +f=a.fnRecordsDisplay(),m=-1===g;b=m?0:Math.ceil(b/g);g=m?1:Math.ceil(f/g);f=c(b,g);var p;m=0;for(p=h.p.length;mh&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function K(a,b){a.oFeatures.bProcessing&&f(a.aanFeatures.r).css("display",b?"block":"none");A(a,null,"processing",[a,b])}function wb(a){var b=f(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY, +h=a.oClasses,g=b.children("caption"),k=g.length?g[0]._captionSide:null,l=f(b[0].cloneNode(!1)),n=f(b[0].cloneNode(!1)),m=b.children("tfoot");m.length||(m=null);l=f("
",{"class":h.sScrollWrapper}).append(f("
",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?B(d):null:"100%"}).append(f("
",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===k?g:null).append(b.children("thead"))))).append(f("
", +{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?B(d):null}).append(b));m&&l.append(f("
",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?B(d):null:"100%"}).append(f("
",{"class":h.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append("bottom"===k?g:null).append(b.children("tfoot")))));b=l.children();var p=b[0];h=b[1];var u=m?b[2]:null;if(d)f(h).on("scroll.DT",function(a){a=this.scrollLeft;p.scrollLeft=a;m&&(u.scrollLeft=a)}); +f(h).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=u;a.aoDrawCallback.push({fn:na,sName:"scrolling"});return l[0]}function na(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=f(a.nScrollHead),g=h[0].style,k=h.children("div"),l=k[0].style,n=k.children("table");k=a.nScrollBody;var m=f(k),w=k.style,u=f(a.nScrollFoot).children("div"),q=u.children("table"),t=f(a.nTHead),r=f(a.nTable),v=r[0],za=v.style,T=a.nTFoot?f(a.nTFoot):null,A=a.oBrowser, +x=A.bScrollOversize,ac=J(a.aoColumns,"nTh"),Ya=[],y=[],z=[],C=[],G,H=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};var D=k.scrollHeight>k.clientHeight;if(a.scrollBarVis!==D&&a.scrollBarVis!==p)a.scrollBarVis=D,aa(a);else{a.scrollBarVis=D;r.children("thead, tfoot").remove();if(T){var E=T.clone().prependTo(r);var F=T.find("tr");E=E.find("tr")}var I=t.clone().prependTo(r);t=t.find("tr");D=I.find("tr");I.find("th, td").removeAttr("tabindex"); +c||(w.width="100%",h[0].style.width="100%");f.each(ua(a,I),function(b,c){G=ba(a,b);c.style.width=a.aoColumns[G].sWidth});T&&N(function(a){a.style.width=""},E);h=r.outerWidth();""===c?(za.width="100%",x&&(r.find("tbody").height()>k.offsetHeight||"scroll"==m.css("overflow-y"))&&(za.width=B(r.outerWidth()-b)),h=r.outerWidth()):""!==d&&(za.width=B(d),h=r.outerWidth());N(H,D);N(function(a){z.push(a.innerHTML);Ya.push(B(f(a).css("width")))},D);N(function(a,b){-1!==f.inArray(a,ac)&&(a.style.width=Ya[b])}, +t);f(D).height(0);T&&(N(H,E),N(function(a){C.push(a.innerHTML);y.push(B(f(a).css("width")))},E),N(function(a,b){a.style.width=y[b]},F),f(E).height(0));N(function(a,b){a.innerHTML='
'+z[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=Ya[b]},D);T&&N(function(a,b){a.innerHTML='
'+C[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},E);r.outerWidth()< +h?(F=k.scrollHeight>k.offsetHeight||"scroll"==m.css("overflow-y")?h+b:h,x&&(k.scrollHeight>k.offsetHeight||"scroll"==m.css("overflow-y"))&&(za.width=B(F-b)),""!==c&&""===d||O(a,1,"Possible column misalignment",6)):F="100%";w.width=B(F);g.width=B(F);T&&(a.nScrollFoot.style.width=B(F));!e&&x&&(w.height=B(v.offsetHeight+b));c=r.outerWidth();n[0].style.width=B(c);l.width=B(c);d=r.height()>k.clientHeight||"scroll"==m.css("overflow-y");e="padding"+(A.bScrollbarLeft?"Left":"Right");l[e]=d?b+"px":"0px";T&& +(q[0].style.width=B(c),u[0].style.width=B(c),u[0].style[e]=d?b+"px":"0px");r.children("colgroup").insertBefore(r.children("thead"));m.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(k.scrollTop=0)}}function N(a,b,c){for(var d=0,e=0,h=b.length,g,k;e").appendTo(k.find("tbody"));k.find("thead, tfoot").remove(); +k.append(f(a.nTHead).clone()).append(f(a.nTFoot).clone());k.find("tfoot th, tfoot td").css("width","");n=ua(a,k.find("thead")[0]);for(q=0;q").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(q=0;q").css(h|| +e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(k).appendTo(p);h&&g?k.width(g):h?(k.css("width","auto"),k.removeAttr("width"),k.width()").css("width",B(a)).appendTo(b||y.body);b=a[0].offsetWidth;a.remove();return b}function Kb(a,b){var c=Lb(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:f("").html(I(a,c,b,"display"))[0]}function Lb(a,b){for(var c,d=-1,e=-1,h=0,g=a.aoData.length;hd&&(d=c.length,e=h);return e} +function B(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Y(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=f.isPlainObject(d);var h=[];var g=function(a){a.length&&!f.isArray(a[0])?h.push(a):f.merge(h,a)};f.isArray(d)&&g(d);e&&d.pre&&g(d.pre);g(a.aaSorting);e&&d.post&&g(d.post);for(a=0;an?1:0; +if(0!==m)return"asc"===l.dir?m:-m}m=c[a];n=c[b];return mn?1:0}):g.sort(function(a,b){var h,g=k.length,f=e[a]._aSortData,l=e[b]._aSortData;for(h=0;hp?1:0})}a.bSorted=!0}function Nb(a){var b=a.aoColumns,c=Y(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d/g,"");var f=h.nTh;f.removeAttribute("aria-sort"); +h.bSortable&&(0e?e+1:3))}e=0;for(h=d.length;ee?e+1:3))}a.aLastSort=d}function Mb(a,b){var c=a.aoColumns[b],d=q.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ca(a,b)));for(var h,g=q.ext.type.order[c.sType+"-pre"],k=0,f=a.aoData.length;k=h.length?[0,c[1]]:c)}));b.search!==p&&f.extend(a.oPreviousSearch, +Gb(b.search));if(b.columns)for(d=0,e=b.columns.length;d=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ra(a,b){a=a.renderer;var c=q.ext.renderer[b];return f.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function D(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ka(a,b){var c=Pb.numbers_length,d=Math.floor(c/2);b<=c?a=Z(0,b):a<=d?(a=Z(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=Z(b-(c-2),b):(a=Z(a-d+2,a+d-1),a.push("ellipsis"), +a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Ha(a){f.each({num:function(b){return Da(b,a)},"num-fmt":function(b){return Da(b,a,bb)},"html-num":function(b){return Da(b,a,Ea)},"html-num-fmt":function(b){return Da(b,a,Ea,bb)}},function(b,c){C.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(C.type.search[b+a]=C.type.search.html)})}function Qb(a){return function(){var b=[Ca(this[q.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return q.ext.internal[a].apply(this, +b)}}var q=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new v(Ca(this[C.iApiIndex])):new v(this)};this.fnAddData=function(a,b){var c=this.api(!0);a=f.isArray(a)&&(f.isArray(a[0])||f.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===p||b)&&c.draw();return a.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===p||a?b.draw(!1): +(""!==d.sX||""!==d.sY)&&na(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===p||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0);a=d.rows(a);var e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===p||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,f){e=this.api(!0);null===b||b===p? +e.search(a,c,d,f):e.column(b).search(a,c,d,f);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==p){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==p||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==p?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(), +[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){a=this.api(!0).page(a);(b===p||b)&&a.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===p||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return Ca(this[C.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener= +function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===p||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===p||e)&&h.columns.adjust();(d===p||d)&&h.draw();return 0};this.fnVersionCheck=C.fnVersionCheck;var b=this,c=a===p,d=this.length;c&&(a={});this.oApi=this.internal=C.internal;for(var e in q.ext.internal)e&&(this[e]=Qb(e));this.each(function(){var e={},g=1").appendTo(w));r.nTHead=b[0];b=w.children("tbody");0===b.length&&(b=f("").appendTo(w));r.nTBody=b[0];b=w.children("tfoot");0===b.length&&0").appendTo(w));0===b.length||0===b.children().length?w.addClass(x.sNoFooter):0/g,cc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,dc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,bb=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,P=function(a){return a&&!0!==a&&"-"!==a?!1: +!0},Sb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Tb=function(a,b){cb[b]||(cb[b]=new RegExp(Ua(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(cb[b],"."):a},db=function(a,b,c){var d="string"===typeof a;if(P(a))return!0;b&&d&&(a=Tb(a,b));c&&d&&(a=a.replace(bb,""));return!isNaN(parseFloat(a))&&isFinite(a)},Ub=function(a,b,c){return P(a)?!0:P(a)||"string"===typeof a?db(a.replace(Ea,""),b,c)?!0:null:null},J=function(a,b,c){var d=[],e=0,h=a.length;if(c!== +p)for(;ea.length)){var b=a.slice().sort();for(var c=b[0],d=1, +e=b.length;d")[0],$b=ya.textContent!==p,bc=/<.*?>/g,Sa=q.util.throttle,Wb=[],G=Array.prototype,ec=function(a){var b,c=q.settings,d=f.map(c,function(a,b){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=f.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=f(a):a instanceof f&&(b=a)}else return[];if(b)return b.map(function(a){e=f.inArray(this, +d);return-1!==e?c[e]:null}).toArray()};var v=function(a,b){if(!(this instanceof v))return new v(a,b);var c=[],d=function(a){(a=ec(a))&&c.push.apply(c,a)};if(f.isArray(a))for(var e=0,h=a.length;ea?new v(b[a],this[a]):null},filter:function(a){var b=[];if(G.filter)b=G.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(c),f("td",d).addClass(c).html(b)[0].colSpan=W(a),e.push(d[0]))};h(c,d);b._details&&b._details.detach();b._details=f(e);b._detailsShow&&b._details.insertAfter(b.nTr)},hb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==p?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=p,a._details=p)},Yb=function(a,b){var c=a.context;c.length&&a.length&&(a=c[0].aoData[a[0]],a._details&&((a._detailsShow=b)?a._details.insertAfter(a.nTr): +a._details.detach(),ic(c[0])))},ic=function(a){var b=new v(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0g){var m=f.map(d,function(a,b){return a.bVisible?b:null});return[m[m.length+g]]}return[ba(a,g)];case "name":return f.map(e,function(a,b){return a===n[1]?b:null});default:return[]}if(b.nodeName&&b._DT_CellIndex)return[b._DT_CellIndex.column];g=f(h).filter(b).map(function(){return f.inArray(this, +h)}).toArray();if(g.length||!b.nodeName)return g;g=f(b).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};t("columns()",function(a,b){a===p?a="":f.isPlainObject(a)&&(b=a,a="");b=fb(b);var c=this.iterator("table",function(c){return kc(c,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});x("columns().header()","column().header()",function(a,b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});x("columns().footer()","column().footer()",function(a, +b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});x("columns().data()","column().data()",function(){return this.iterator("column-rows",Zb,1)});x("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});x("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return la(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});x("columns().nodes()", +"column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return la(a.aoData,e,"anCells",b)},1)});x("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(b,c){if(a===p)return b.aoColumns[c].bVisible;var d=b.aoColumns,e=d[c],h=b.aoData,n;if(a!==p&&e.bVisible!==a){if(a){var m=f.inArray(!0,J(d,"bVisible"),c+1);d=0;for(n=h.length;dd;return!0};q.isDataTable=q.fnIsDataTable=function(a){var b=f(a).get(0),c=!1;if(a instanceof +q.Api)return!0;f.each(q.settings,function(a,e){a=e.nScrollHead?f("table",e.nScrollHead)[0]:null;var d=e.nScrollFoot?f("table",e.nScrollFoot)[0]:null;if(e.nTable===b||a===b||d===b)c=!0});return c};q.tables=q.fnTables=function(a){var b=!1;f.isPlainObject(a)&&(b=a.api,a=a.visible);var c=f.map(q.settings,function(b){if(!a||a&&f(b.nTable).is(":visible"))return b.nTable});return b?new v(c):c};q.camelToHungarian=L;t("$()",function(a,b){b=this.rows(b).nodes();b=f(b);return f([].concat(b.filter(a).toArray(), +b.find(a).toArray()))});f.each(["on","one","off"],function(a,b){t(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=f.map(a[0].split(/\s/),function(a){return a.match(/\.dt\b/)?a:a+".dt"}).join(" ");var d=f(this.tables().nodes());d[b].apply(d,a);return this})});t("clear()",function(){return this.iterator("table",function(a){qa(a)})});t("settings()",function(){return new v(this.context,this.context)});t("init()",function(){var a=this.context;return a.length?a[0].oInit:null});t("data()", +function(){return this.iterator("table",function(a){return J(a.aoData,"_aData")}).flatten()});t("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,h=b.nTBody,g=b.nTHead,k=b.nTFoot,l=f(e);h=f(h);var n=f(b.nTableWrapper),m=f.map(b.aoData,function(a){return a.nTr}),p;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);a||(new v(b)).columns().visible(!0);n.off(".DT").find(":not(tbody *)").off(".DT");f(z).off(".DT-"+b.sInstance); +e!=g.parentNode&&(l.children("thead").detach(),l.append(g));k&&e!=k.parentNode&&(l.children("tfoot").detach(),l.append(k));b.aaSorting=[];b.aaSortingFixed=[];Aa(b);f(m).removeClass(b.asStripeClasses.join(" "));f("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);h.children().detach();h.append(m);g=a?"remove":"detach";l[g]();n[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),l.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&& +h.children().each(function(a){f(this).addClass(b.asDestroyStripes[a%p])}));c=f.inArray(b,q.settings);-1!==c&&q.settings.splice(c,1)})});f.each(["column","row","cell"],function(a,b){t(b+"s().every()",function(a){var c=this.selector.opts,e=this;return this.iterator(b,function(d,f,k,l,n){a.call(e[b](f,"cell"===b?k:c,"cell"===b?c:p),f,k,l,n)})})});t("i18n()",function(a,b,c){var d=this.context[0];a=U(a)(d.oLanguage);a===p&&(a=b);c!==p&&f.isPlainObject(a)&&(a=a[c]!==p?a[c]:a._);return a.replace("%d",c)}); +q.version="1.10.20";q.settings=[];q.models={};q.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};q.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};q.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null, +sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};q.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1, +bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}}, +fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last", +sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:f.extend({},q.models.oSearch),sAjaxDataProp:"data", +sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};H(q.defaults);q.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};H(q.defaults.column);q.models.oSettings= +{oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{}, +aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0, +aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:p,oAjaxData:p,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==D(this)?1*this._iRecordsTotal: +this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==D(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};q.ext=C={buttons:{}, +classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:q.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:q.version};f.extend(C,{afnFiltering:C.search,aTypes:C.type.detect,ofnSearch:C.type.search,oSort:C.type.order,afnSortData:C.order,aoFeatures:C.feature,oApi:C.internal,oStdClasses:C.classes,oPagination:C.pager}); +f.extend(q.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled", +sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"", +sJUIHeader:"",sJUIFooter:""});var Pb=q.ext.pager;f.extend(Pb,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[ka(a,b)]},simple_numbers:function(a,b){return["previous",ka(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ka(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ka(a,b),"last"]},_numbers:ka,numbers_length:7});f.extend(!0,q.ext.renderer,{pageButton:{_:function(a,b, +c,d,e,h){var g=a.oClasses,k=a.oLanguage.oPaginate,l=a.oLanguage.oAria.paginate||{},n,m,q=0,t=function(b,d){var p,r=g.sPageButtonDisabled,u=function(b){Xa(a,b.data.action,!0)};var w=0;for(p=d.length;w").appendTo(b);t(x,v)}else{n=null;m=v;x=a.iTabIndex;switch(v){case "ellipsis":b.append('');break;case "first":n=k.sFirst;0===e&&(x=-1,m+=" "+r);break;case "previous":n=k.sPrevious;0===e&&(x=-1,m+= +" "+r);break;case "next":n=k.sNext;e===h-1&&(x=-1,m+=" "+r);break;case "last":n=k.sLast;e===h-1&&(x=-1,m+=" "+r);break;default:n=v+1,m=e===v?g.sPageButtonActive:""}null!==n&&(x=f("",{"class":g.sPageButton+" "+m,"aria-controls":a.sTableId,"aria-label":l[v],"data-dt-idx":q,tabindex:x,id:0===c&&"string"===typeof v?a.sTableId+"_"+v:null}).html(n).appendTo(b),$a(x,{action:v},u),q++)}}};try{var v=f(b).find(y.activeElement).data("dt-idx")}catch(mc){}t(f(b).empty(),d);v!==p&&f(b).find("[data-dt-idx="+ +v+"]").focus()}}});f.extend(q.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return db(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!cc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||P(a)?"date":null},function(a,b){b=b.oLanguage.sDecimal;return db(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Ub(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Ub(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return P(a)||"string"=== +typeof a&&-1!==a.indexOf("<")?"html":null}]);f.extend(q.ext.type.search,{html:function(a){return P(a)?a:"string"===typeof a?a.replace(Rb," ").replace(Ea,""):""},string:function(a){return P(a)?a:"string"===typeof a?a.replace(Rb," "):a}});var Da=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Tb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};f.extend(C.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return P(a)? +"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return P(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});Ha("");f.extend(!0,q.ext.renderer,{header:{_:function(a,b,c,d){f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc: +c.sSortingClass))})},jqueryui:function(a,b,c,d){f("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(f("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"== +k[e]?d.sSortJUIAsc:"desc"==k[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var ib=function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g,"""):a};q.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return ib(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g, +a)+f+(e||"")}}},text:function(){return{display:ib,filter:ib}}};f.extend(q.ext.internal,{_fnExternApiFunc:Qb,_fnBuildAjax:va,_fnAjaxUpdate:qb,_fnAjaxParameters:zb,_fnAjaxUpdateDraw:Ab,_fnAjaxDataSrc:wa,_fnAddColumn:Ia,_fnColumnOptions:ma,_fnAdjustColumnSizing:aa,_fnVisibleToColumnIndex:ba,_fnColumnIndexToVisible:ca,_fnVisbleColumns:W,_fnGetColumns:oa,_fnColumnTypes:Ka,_fnApplyColumnDefs:nb,_fnHungarianMap:H,_fnCamelToHungarian:L,_fnLanguageCompat:Ga,_fnBrowserDetect:lb,_fnAddData:R,_fnAddTr:pa,_fnNodeToDataIndex:function(a, +b){return b._DT_RowIndex!==p?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return f.inArray(c,a.aoData[b].anCells)},_fnGetCellData:I,_fnSetCellData:ob,_fnSplitObjNotation:Na,_fnGetObjectDataFn:U,_fnSetObjectDataFn:Q,_fnGetDataMaster:Oa,_fnClearTable:qa,_fnDeleteIndex:ra,_fnInvalidate:ea,_fnGetRowElements:Ma,_fnCreateTr:La,_fnBuildHead:pb,_fnDrawHead:ha,_fnDraw:S,_fnReDraw:V,_fnAddOptionsHtml:sb,_fnDetectHeader:fa,_fnGetUniqueThs:ua,_fnFeatureHtmlFilter:ub,_fnFilterComplete:ia,_fnFilterCustom:Db, +_fnFilterColumn:Cb,_fnFilter:Bb,_fnFilterCreateSearch:Ta,_fnEscapeRegex:Ua,_fnFilterData:Eb,_fnFeatureHtmlInfo:xb,_fnUpdateInfo:Hb,_fnInfoMacros:Ib,_fnInitialise:ja,_fnInitComplete:xa,_fnLengthChange:Va,_fnFeatureHtmlLength:tb,_fnFeatureHtmlPaginate:yb,_fnPageChange:Xa,_fnFeatureHtmlProcessing:vb,_fnProcessingDisplay:K,_fnFeatureHtmlTable:wb,_fnScrollDraw:na,_fnApplyToChildren:N,_fnCalculateColumnWidths:Ja,_fnThrottle:Sa,_fnConvertToWidth:Jb,_fnGetWidestNode:Kb,_fnGetMaxLenString:Lb,_fnStringToCss:B, +_fnSortFlatten:Y,_fnSort:rb,_fnSortAria:Nb,_fnSortListener:Za,_fnSortAttachListener:Qa,_fnSortingClasses:Aa,_fnSortData:Mb,_fnSaveState:Ba,_fnLoadState:Ob,_fnSettingsFromNode:Ca,_fnLog:O,_fnMap:M,_fnBindAction:$a,_fnCallbackReg:E,_fnCallbackFire:A,_fnLengthOverflow:Wa,_fnRenderer:Ra,_fnDataSource:D,_fnRowAttributes:Pa,_fnExtend:ab,_fnCalculateEnd:function(){}});f.fn.dataTable=q;q.$=f;f.fn.dataTableSettings=q.settings;f.fn.dataTableExt=q.ext;f.fn.DataTable=function(a){return f(this).dataTable(a).api()}; +f.each(q,function(a,b){f.fn.DataTable[a]=b});return f.fn.dataTable}); diff --git a/docs/articles/variables_sheet_files/header-attrs-2.11/header-attrs.js b/docs/articles/variables_sheet_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/variables_sheet_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/variables_sheet_files/htmlwidgets-1.5.4/htmlwidgets.js b/docs/articles/variables_sheet_files/htmlwidgets-1.5.4/htmlwidgets.js new file mode 100644 index 00000000..da8b2367 --- /dev/null +++ b/docs/articles/variables_sheet_files/htmlwidgets-1.5.4/htmlwidgets.js @@ -0,0 +1,903 @@ +(function() { + // If window.HTMLWidgets is already defined, then use it; otherwise create a + // new object. This allows preceding code to set options that affect the + // initialization process (though none currently exist). + window.HTMLWidgets = window.HTMLWidgets || {}; + + // See if we're running in a viewer pane. If not, we're in a web browser. + var viewerMode = window.HTMLWidgets.viewerMode = + /\bviewer_pane=1\b/.test(window.location); + + // See if we're running in Shiny mode. If not, it's a static document. + // Note that static widgets can appear in both Shiny and static modes, but + // obviously, Shiny widgets can only appear in Shiny apps/documents. + var shinyMode = window.HTMLWidgets.shinyMode = + typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings; + + // We can't count on jQuery being available, so we implement our own + // version if necessary. + function querySelectorAll(scope, selector) { + if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) { + return scope.find(selector); + } + if (scope.querySelectorAll) { + return scope.querySelectorAll(selector); + } + } + + function asArray(value) { + if (value === null) + return []; + if ($.isArray(value)) + return value; + return [value]; + } + + // Implement jQuery's extend + function extend(target /*, ... */) { + if (arguments.length == 1) { + return target; + } + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var prop in source) { + if (source.hasOwnProperty(prop)) { + target[prop] = source[prop]; + } + } + } + return target; + } + + // IE8 doesn't support Array.forEach. + function forEach(values, callback, thisArg) { + if (values.forEach) { + values.forEach(callback, thisArg); + } else { + for (var i = 0; i < values.length; i++) { + callback.call(thisArg, values[i], i, values); + } + } + } + + // Replaces the specified method with the return value of funcSource. + // + // Note that funcSource should not BE the new method, it should be a function + // that RETURNS the new method. funcSource receives a single argument that is + // the overridden method, it can be called from the new method. The overridden + // method can be called like a regular function, it has the target permanently + // bound to it so "this" will work correctly. + function overrideMethod(target, methodName, funcSource) { + var superFunc = target[methodName] || function() {}; + var superFuncBound = function() { + return superFunc.apply(target, arguments); + }; + target[methodName] = funcSource(superFuncBound); + } + + // Add a method to delegator that, when invoked, calls + // delegatee.methodName. If there is no such method on + // the delegatee, but there was one on delegator before + // delegateMethod was called, then the original version + // is invoked instead. + // For example: + // + // var a = { + // method1: function() { console.log('a1'); } + // method2: function() { console.log('a2'); } + // }; + // var b = { + // method1: function() { console.log('b1'); } + // }; + // delegateMethod(a, b, "method1"); + // delegateMethod(a, b, "method2"); + // a.method1(); + // a.method2(); + // + // The output would be "b1", "a2". + function delegateMethod(delegator, delegatee, methodName) { + var inherited = delegator[methodName]; + delegator[methodName] = function() { + var target = delegatee; + var method = delegatee[methodName]; + + // The method doesn't exist on the delegatee. Instead, + // call the method on the delegator, if it exists. + if (!method) { + target = delegator; + method = inherited; + } + + if (method) { + return method.apply(target, arguments); + } + }; + } + + // Implement a vague facsimilie of jQuery's data method + function elementData(el, name, value) { + if (arguments.length == 2) { + return el["htmlwidget_data_" + name]; + } else if (arguments.length == 3) { + el["htmlwidget_data_" + name] = value; + return el; + } else { + throw new Error("Wrong number of arguments for elementData: " + + arguments.length); + } + } + + // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex + function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + } + + function hasClass(el, className) { + var re = new RegExp("\\b" + escapeRegExp(className) + "\\b"); + return re.test(el.className); + } + + // elements - array (or array-like object) of HTML elements + // className - class name to test for + // include - if true, only return elements with given className; + // if false, only return elements *without* given className + function filterByClass(elements, className, include) { + var results = []; + for (var i = 0; i < elements.length; i++) { + if (hasClass(elements[i], className) == include) + results.push(elements[i]); + } + return results; + } + + function on(obj, eventName, func) { + if (obj.addEventListener) { + obj.addEventListener(eventName, func, false); + } else if (obj.attachEvent) { + obj.attachEvent(eventName, func); + } + } + + function off(obj, eventName, func) { + if (obj.removeEventListener) + obj.removeEventListener(eventName, func, false); + else if (obj.detachEvent) { + obj.detachEvent(eventName, func); + } + } + + // Translate array of values to top/right/bottom/left, as usual with + // the "padding" CSS property + // https://developer.mozilla.org/en-US/docs/Web/CSS/padding + function unpackPadding(value) { + if (typeof(value) === "number") + value = [value]; + if (value.length === 1) { + return {top: value[0], right: value[0], bottom: value[0], left: value[0]}; + } + if (value.length === 2) { + return {top: value[0], right: value[1], bottom: value[0], left: value[1]}; + } + if (value.length === 3) { + return {top: value[0], right: value[1], bottom: value[2], left: value[1]}; + } + if (value.length === 4) { + return {top: value[0], right: value[1], bottom: value[2], left: value[3]}; + } + } + + // Convert an unpacked padding object to a CSS value + function paddingToCss(paddingObj) { + return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px"; + } + + // Makes a number suitable for CSS + function px(x) { + if (typeof(x) === "number") + return x + "px"; + else + return x; + } + + // Retrieves runtime widget sizing information for an element. + // The return value is either null, or an object with fill, padding, + // defaultWidth, defaultHeight fields. + function sizingPolicy(el) { + var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']"); + if (!sizingEl) + return null; + var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}"); + if (viewerMode) { + return sp.viewer; + } else { + return sp.browser; + } + } + + // @param tasks Array of strings (or falsy value, in which case no-op). + // Each element must be a valid JavaScript expression that yields a + // function. Or, can be an array of objects with "code" and "data" + // properties; in this case, the "code" property should be a string + // of JS that's an expr that yields a function, and "data" should be + // an object that will be added as an additional argument when that + // function is called. + // @param target The object that will be "this" for each function + // execution. + // @param args Array of arguments to be passed to the functions. (The + // same arguments will be passed to all functions.) + function evalAndRun(tasks, target, args) { + if (tasks) { + forEach(tasks, function(task) { + var theseArgs = args; + if (typeof(task) === "object") { + theseArgs = theseArgs.concat([task.data]); + task = task.code; + } + var taskFunc = tryEval(task); + if (typeof(taskFunc) !== "function") { + throw new Error("Task must be a function! Source:\n" + task); + } + taskFunc.apply(target, theseArgs); + }); + } + } + + // Attempt eval() both with and without enclosing in parentheses. + // Note that enclosing coerces a function declaration into + // an expression that eval() can parse + // (otherwise, a SyntaxError is thrown) + function tryEval(code) { + var result = null; + try { + result = eval("(" + code + ")"); + } catch(error) { + if (!(error instanceof SyntaxError)) { + throw error; + } + try { + result = eval(code); + } catch(e) { + if (e instanceof SyntaxError) { + throw error; + } else { + throw e; + } + } + } + return result; + } + + function initSizing(el) { + var sizing = sizingPolicy(el); + if (!sizing) + return; + + var cel = document.getElementById("htmlwidget_container"); + if (!cel) + return; + + if (typeof(sizing.padding) !== "undefined") { + document.body.style.margin = "0"; + document.body.style.padding = paddingToCss(unpackPadding(sizing.padding)); + } + + if (sizing.fill) { + document.body.style.overflow = "hidden"; + document.body.style.width = "100%"; + document.body.style.height = "100%"; + document.documentElement.style.width = "100%"; + document.documentElement.style.height = "100%"; + if (cel) { + cel.style.position = "absolute"; + var pad = unpackPadding(sizing.padding); + cel.style.top = pad.top + "px"; + cel.style.right = pad.right + "px"; + cel.style.bottom = pad.bottom + "px"; + cel.style.left = pad.left + "px"; + el.style.width = "100%"; + el.style.height = "100%"; + } + + return { + getWidth: function() { return cel.offsetWidth; }, + getHeight: function() { return cel.offsetHeight; } + }; + + } else { + el.style.width = px(sizing.width); + el.style.height = px(sizing.height); + + return { + getWidth: function() { return el.offsetWidth; }, + getHeight: function() { return el.offsetHeight; } + }; + } + } + + // Default implementations for methods + var defaults = { + find: function(scope) { + return querySelectorAll(scope, "." + this.name); + }, + renderError: function(el, err) { + var $el = $(el); + + this.clearError(el); + + // Add all these error classes, as Shiny does + var errClass = "shiny-output-error"; + if (err.type !== null) { + // use the classes of the error condition as CSS class names + errClass = errClass + " " + $.map(asArray(err.type), function(type) { + return errClass + "-" + type; + }).join(" "); + } + errClass = errClass + " htmlwidgets-error"; + + // Is el inline or block? If inline or inline-block, just display:none it + // and add an inline error. + var display = $el.css("display"); + $el.data("restore-display-mode", display); + + if (display === "inline" || display === "inline-block") { + $el.hide(); + if (err.message !== "") { + var errorSpan = $("").addClass(errClass); + errorSpan.text(err.message); + $el.after(errorSpan); + } + } else if (display === "block") { + // If block, add an error just after the el, set visibility:none on the + // el, and position the error to be on top of the el. + // Mark it with a unique ID and CSS class so we can remove it later. + $el.css("visibility", "hidden"); + if (err.message !== "") { + var errorDiv = $("
").addClass(errClass).css("position", "absolute") + .css("top", el.offsetTop) + .css("left", el.offsetLeft) + // setting width can push out the page size, forcing otherwise + // unnecessary scrollbars to appear and making it impossible for + // the element to shrink; so use max-width instead + .css("maxWidth", el.offsetWidth) + .css("height", el.offsetHeight); + errorDiv.text(err.message); + $el.after(errorDiv); + + // Really dumb way to keep the size/position of the error in sync with + // the parent element as the window is resized or whatever. + var intId = setInterval(function() { + if (!errorDiv[0].parentElement) { + clearInterval(intId); + return; + } + errorDiv + .css("top", el.offsetTop) + .css("left", el.offsetLeft) + .css("maxWidth", el.offsetWidth) + .css("height", el.offsetHeight); + }, 500); + } + } + }, + clearError: function(el) { + var $el = $(el); + var display = $el.data("restore-display-mode"); + $el.data("restore-display-mode", null); + + if (display === "inline" || display === "inline-block") { + if (display) + $el.css("display", display); + $(el.nextSibling).filter(".htmlwidgets-error").remove(); + } else if (display === "block"){ + $el.css("visibility", "inherit"); + $(el.nextSibling).filter(".htmlwidgets-error").remove(); + } + }, + sizing: {} + }; + + // Called by widget bindings to register a new type of widget. The definition + // object can contain the following properties: + // - name (required) - A string indicating the binding name, which will be + // used by default as the CSS classname to look for. + // - initialize (optional) - A function(el) that will be called once per + // widget element; if a value is returned, it will be passed as the third + // value to renderValue. + // - renderValue (required) - A function(el, data, initValue) that will be + // called with data. Static contexts will cause this to be called once per + // element; Shiny apps will cause this to be called multiple times per + // element, as the data changes. + window.HTMLWidgets.widget = function(definition) { + if (!definition.name) { + throw new Error("Widget must have a name"); + } + if (!definition.type) { + throw new Error("Widget must have a type"); + } + // Currently we only support output widgets + if (definition.type !== "output") { + throw new Error("Unrecognized widget type '" + definition.type + "'"); + } + // TODO: Verify that .name is a valid CSS classname + + // Support new-style instance-bound definitions. Old-style class-bound + // definitions have one widget "object" per widget per type/class of + // widget; the renderValue and resize methods on such widget objects + // take el and instance arguments, because the widget object can't + // store them. New-style instance-bound definitions have one widget + // object per widget instance; the definition that's passed in doesn't + // provide renderValue or resize methods at all, just the single method + // factory(el, width, height) + // which returns an object that has renderValue(x) and resize(w, h). + // This enables a far more natural programming style for the widget + // author, who can store per-instance state using either OO-style + // instance fields or functional-style closure variables (I guess this + // is in contrast to what can only be called C-style pseudo-OO which is + // what we required before). + if (definition.factory) { + definition = createLegacyDefinitionAdapter(definition); + } + + if (!definition.renderValue) { + throw new Error("Widget must have a renderValue function"); + } + + // For static rendering (non-Shiny), use a simple widget registration + // scheme. We also use this scheme for Shiny apps/documents that also + // contain static widgets. + window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || []; + // Merge defaults into the definition; don't mutate the original definition. + var staticBinding = extend({}, defaults, definition); + overrideMethod(staticBinding, "find", function(superfunc) { + return function(scope) { + var results = superfunc(scope); + // Filter out Shiny outputs, we only want the static kind + return filterByClass(results, "html-widget-output", false); + }; + }); + window.HTMLWidgets.widgets.push(staticBinding); + + if (shinyMode) { + // Shiny is running. Register the definition with an output binding. + // The definition itself will not be the output binding, instead + // we will make an output binding object that delegates to the + // definition. This is because we foolishly used the same method + // name (renderValue) for htmlwidgets definition and Shiny bindings + // but they actually have quite different semantics (the Shiny + // bindings receive data that includes lots of metadata that it + // strips off before calling htmlwidgets renderValue). We can't + // just ignore the difference because in some widgets it's helpful + // to call this.renderValue() from inside of resize(), and if + // we're not delegating, then that call will go to the Shiny + // version instead of the htmlwidgets version. + + // Merge defaults with definition, without mutating either. + var bindingDef = extend({}, defaults, definition); + + // This object will be our actual Shiny binding. + var shinyBinding = new Shiny.OutputBinding(); + + // With a few exceptions, we'll want to simply use the bindingDef's + // version of methods if they are available, otherwise fall back to + // Shiny's defaults. NOTE: If Shiny's output bindings gain additional + // methods in the future, and we want them to be overrideable by + // HTMLWidget binding definitions, then we'll need to add them to this + // list. + delegateMethod(shinyBinding, bindingDef, "getId"); + delegateMethod(shinyBinding, bindingDef, "onValueChange"); + delegateMethod(shinyBinding, bindingDef, "onValueError"); + delegateMethod(shinyBinding, bindingDef, "renderError"); + delegateMethod(shinyBinding, bindingDef, "clearError"); + delegateMethod(shinyBinding, bindingDef, "showProgress"); + + // The find, renderValue, and resize are handled differently, because we + // want to actually decorate the behavior of the bindingDef methods. + + shinyBinding.find = function(scope) { + var results = bindingDef.find(scope); + + // Only return elements that are Shiny outputs, not static ones + var dynamicResults = results.filter(".html-widget-output"); + + // It's possible that whatever caused Shiny to think there might be + // new dynamic outputs, also caused there to be new static outputs. + // Since there might be lots of different htmlwidgets bindings, we + // schedule execution for later--no need to staticRender multiple + // times. + if (results.length !== dynamicResults.length) + scheduleStaticRender(); + + return dynamicResults; + }; + + // Wrap renderValue to handle initialization, which unfortunately isn't + // supported natively by Shiny at the time of this writing. + + shinyBinding.renderValue = function(el, data) { + Shiny.renderDependencies(data.deps); + // Resolve strings marked as javascript literals to objects + if (!(data.evals instanceof Array)) data.evals = [data.evals]; + for (var i = 0; data.evals && i < data.evals.length; i++) { + window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]); + } + if (!bindingDef.renderOnNullValue) { + if (data.x === null) { + el.style.visibility = "hidden"; + return; + } else { + el.style.visibility = "inherit"; + } + } + if (!elementData(el, "initialized")) { + initSizing(el); + + elementData(el, "initialized", true); + if (bindingDef.initialize) { + var result = bindingDef.initialize(el, el.offsetWidth, + el.offsetHeight); + elementData(el, "init_result", result); + } + } + bindingDef.renderValue(el, data.x, elementData(el, "init_result")); + evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]); + }; + + // Only override resize if bindingDef implements it + if (bindingDef.resize) { + shinyBinding.resize = function(el, width, height) { + // Shiny can call resize before initialize/renderValue have been + // called, which doesn't make sense for widgets. + if (elementData(el, "initialized")) { + bindingDef.resize(el, width, height, elementData(el, "init_result")); + } + }; + } + + Shiny.outputBindings.register(shinyBinding, bindingDef.name); + } + }; + + var scheduleStaticRenderTimerId = null; + function scheduleStaticRender() { + if (!scheduleStaticRenderTimerId) { + scheduleStaticRenderTimerId = setTimeout(function() { + scheduleStaticRenderTimerId = null; + window.HTMLWidgets.staticRender(); + }, 1); + } + } + + // Render static widgets after the document finishes loading + // Statically render all elements that are of this widget's class + window.HTMLWidgets.staticRender = function() { + var bindings = window.HTMLWidgets.widgets || []; + forEach(bindings, function(binding) { + var matches = binding.find(document.documentElement); + forEach(matches, function(el) { + var sizeObj = initSizing(el, binding); + + if (hasClass(el, "html-widget-static-bound")) + return; + el.className = el.className + " html-widget-static-bound"; + + var initResult; + if (binding.initialize) { + initResult = binding.initialize(el, + sizeObj ? sizeObj.getWidth() : el.offsetWidth, + sizeObj ? sizeObj.getHeight() : el.offsetHeight + ); + elementData(el, "init_result", initResult); + } + + if (binding.resize) { + var lastSize = { + w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, + h: sizeObj ? sizeObj.getHeight() : el.offsetHeight + }; + var resizeHandler = function(e) { + var size = { + w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, + h: sizeObj ? sizeObj.getHeight() : el.offsetHeight + }; + if (size.w === 0 && size.h === 0) + return; + if (size.w === lastSize.w && size.h === lastSize.h) + return; + lastSize = size; + binding.resize(el, size.w, size.h, initResult); + }; + + on(window, "resize", resizeHandler); + + // This is needed for cases where we're running in a Shiny + // app, but the widget itself is not a Shiny output, but + // rather a simple static widget. One example of this is + // an rmarkdown document that has runtime:shiny and widget + // that isn't in a render function. Shiny only knows to + // call resize handlers for Shiny outputs, not for static + // widgets, so we do it ourselves. + if (window.jQuery) { + window.jQuery(document).on( + "shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets", + resizeHandler + ); + window.jQuery(document).on( + "hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets", + resizeHandler + ); + } + + // This is needed for the specific case of ioslides, which + // flips slides between display:none and display:block. + // Ideally we would not have to have ioslide-specific code + // here, but rather have ioslides raise a generic event, + // but the rmarkdown package just went to CRAN so the + // window to getting that fixed may be long. + if (window.addEventListener) { + // It's OK to limit this to window.addEventListener + // browsers because ioslides itself only supports + // such browsers. + on(document, "slideenter", resizeHandler); + on(document, "slideleave", resizeHandler); + } + } + + var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']"); + if (scriptData) { + var data = JSON.parse(scriptData.textContent || scriptData.text); + // Resolve strings marked as javascript literals to objects + if (!(data.evals instanceof Array)) data.evals = [data.evals]; + for (var k = 0; data.evals && k < data.evals.length; k++) { + window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]); + } + binding.renderValue(el, data.x, initResult); + evalAndRun(data.jsHooks.render, initResult, [el, data.x]); + } + }); + }); + + invokePostRenderHandlers(); + } + + + function has_jQuery3() { + if (!window.jQuery) { + return false; + } + var $version = window.jQuery.fn.jquery; + var $major_version = parseInt($version.split(".")[0]); + return $major_version >= 3; + } + + /* + / Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's + / on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now + / really means $(setTimeout(fn)). + / https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous + / + / Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny + / one tick later than it did before, which means staticRender() is + / called renderValue() earlier than (advanced) widget authors might be expecting. + / https://github.com/rstudio/shiny/issues/2630 + / + / For a concrete example, leaflet has some methods (e.g., updateBounds) + / which reference Shiny methods registered in initShiny (e.g., setInputValue). + / Since leaflet is privy to this life-cycle, it knows to use setTimeout() to + / delay execution of those methods (until Shiny methods are ready) + / https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268 + / + / Ideally widget authors wouldn't need to use this setTimeout() hack that + / leaflet uses to call Shiny methods on a staticRender(). In the long run, + / the logic initShiny should be broken up so that method registration happens + / right away, but binding happens later. + */ + function maybeStaticRenderLater() { + if (shinyMode && has_jQuery3()) { + window.jQuery(window.HTMLWidgets.staticRender); + } else { + window.HTMLWidgets.staticRender(); + } + } + + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function() { + document.removeEventListener("DOMContentLoaded", arguments.callee, false); + maybeStaticRenderLater(); + }, false); + } else if (document.attachEvent) { + document.attachEvent("onreadystatechange", function() { + if (document.readyState === "complete") { + document.detachEvent("onreadystatechange", arguments.callee); + maybeStaticRenderLater(); + } + }); + } + + + window.HTMLWidgets.getAttachmentUrl = function(depname, key) { + // If no key, default to the first item + if (typeof(key) === "undefined") + key = 1; + + var link = document.getElementById(depname + "-" + key + "-attachment"); + if (!link) { + throw new Error("Attachment " + depname + "/" + key + " not found in document"); + } + return link.getAttribute("href"); + }; + + window.HTMLWidgets.dataframeToD3 = function(df) { + var names = []; + var length; + for (var name in df) { + if (df.hasOwnProperty(name)) + names.push(name); + if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") { + throw new Error("All fields must be arrays"); + } else if (typeof(length) !== "undefined" && length !== df[name].length) { + throw new Error("All fields must be arrays of the same length"); + } + length = df[name].length; + } + var results = []; + var item; + for (var row = 0; row < length; row++) { + item = {}; + for (var col = 0; col < names.length; col++) { + item[names[col]] = df[names[col]][row]; + } + results.push(item); + } + return results; + }; + + window.HTMLWidgets.transposeArray2D = function(array) { + if (array.length === 0) return array; + var newArray = array[0].map(function(col, i) { + return array.map(function(row) { + return row[i] + }) + }); + return newArray; + }; + // Split value at splitChar, but allow splitChar to be escaped + // using escapeChar. Any other characters escaped by escapeChar + // will be included as usual (including escapeChar itself). + function splitWithEscape(value, splitChar, escapeChar) { + var results = []; + var escapeMode = false; + var currentResult = ""; + for (var pos = 0; pos < value.length; pos++) { + if (!escapeMode) { + if (value[pos] === splitChar) { + results.push(currentResult); + currentResult = ""; + } else if (value[pos] === escapeChar) { + escapeMode = true; + } else { + currentResult += value[pos]; + } + } else { + currentResult += value[pos]; + escapeMode = false; + } + } + if (currentResult !== "") { + results.push(currentResult); + } + return results; + } + // Function authored by Yihui/JJ Allaire + window.HTMLWidgets.evaluateStringMember = function(o, member) { + var parts = splitWithEscape(member, '.', '\\'); + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i]; + // part may be a character or 'numeric' member name + if (o !== null && typeof o === "object" && part in o) { + if (i == (l - 1)) { // if we are at the end of the line then evalulate + if (typeof o[part] === "string") + o[part] = tryEval(o[part]); + } else { // otherwise continue to next embedded object + o = o[part]; + } + } + } + }; + + // Retrieve the HTMLWidget instance (i.e. the return value of an + // HTMLWidget binding's initialize() or factory() function) + // associated with an element, or null if none. + window.HTMLWidgets.getInstance = function(el) { + return elementData(el, "init_result"); + }; + + // Finds the first element in the scope that matches the selector, + // and returns the HTMLWidget instance (i.e. the return value of + // an HTMLWidget binding's initialize() or factory() function) + // associated with that element, if any. If no element matches the + // selector, or the first matching element has no HTMLWidget + // instance associated with it, then null is returned. + // + // The scope argument is optional, and defaults to window.document. + window.HTMLWidgets.find = function(scope, selector) { + if (arguments.length == 1) { + selector = scope; + scope = document; + } + + var el = scope.querySelector(selector); + if (el === null) { + return null; + } else { + return window.HTMLWidgets.getInstance(el); + } + }; + + // Finds all elements in the scope that match the selector, and + // returns the HTMLWidget instances (i.e. the return values of + // an HTMLWidget binding's initialize() or factory() function) + // associated with the elements, in an array. If elements that + // match the selector don't have an associated HTMLWidget + // instance, the returned array will contain nulls. + // + // The scope argument is optional, and defaults to window.document. + window.HTMLWidgets.findAll = function(scope, selector) { + if (arguments.length == 1) { + selector = scope; + scope = document; + } + + var nodes = scope.querySelectorAll(selector); + var results = []; + for (var i = 0; i < nodes.length; i++) { + results.push(window.HTMLWidgets.getInstance(nodes[i])); + } + return results; + }; + + var postRenderHandlers = []; + function invokePostRenderHandlers() { + while (postRenderHandlers.length) { + var handler = postRenderHandlers.shift(); + if (handler) { + handler(); + } + } + } + + // Register the given callback function to be invoked after the + // next time static widgets are rendered. + window.HTMLWidgets.addPostRenderHandler = function(callback) { + postRenderHandlers.push(callback); + }; + + // Takes a new-style instance-bound definition, and returns an + // old-style class-bound definition. This saves us from having + // to rewrite all the logic in this file to accomodate both + // types of definitions. + function createLegacyDefinitionAdapter(defn) { + var result = { + name: defn.name, + type: defn.type, + initialize: function(el, width, height) { + return defn.factory(el, width, height); + }, + renderValue: function(el, x, instance) { + return instance.renderValue(x); + }, + resize: function(el, width, height, instance) { + return instance.resize(width, height); + } + }; + + if (defn.find) + result.find = defn.find; + if (defn.renderError) + result.renderError = defn.renderError; + if (defn.clearError) + result.clearError = defn.clearError; + + return result; + } +})(); + diff --git a/docs/articles/variables_sheet_files/jquery-3.6.0/jquery-3.6.0.js b/docs/articles/variables_sheet_files/jquery-3.6.0/jquery-3.6.0.js new file mode 100644 index 00000000..fc6c299b --- /dev/null +++ b/docs/articles/variables_sheet_files/jquery-3.6.0/jquery-3.6.0.js @@ -0,0 +1,10881 @@ +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.6.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.6 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2021-02-16 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
@@ -90,7 +93,7 @@
-

Lifecycle: development License: MIT

-

cchsflow supports the use of the Canadian Community Health Survey (CCHS) by transforming variables from each cycle into harmonized, consistent versions that span survey cycles (currently, 2001 to 2014).

+ +

cchsflow supports the use of the Canadian Community Health Survey (CCHS) by transforming variables from each cycle into harmonized, consistent versions that span survey cycles (currently, 2001 to 2018).

The CCHS is a population-based cross-sectional survey of Canadians that has been administered every two years since 2001. There are approximately 130,000 respondents per cycle. Studies use multiple CCHS cycles to examine trends over time and increase sample size to examine sub-groups that are too small to examine in a single cycle.

The CCHS is one of the largest and most robust ongoing population health surveys worldwide. The CCHS, administered by Statistics Canada, is Canada’s main general population health survey. Information about the survey is found here. The CCHS has a Statistic Canada Open Licence.

Concept

Each cycle of the CCHS contains over 1000 variables that cover the four main topics: sociodemographic measures, health behaviours, health status and health care use. The seemingly consistent questions across CCHS cycles entice you to combine them together to increase sample size; however, you soon realize a challenge…

-

Imagine you want to use BMI (body mass index) for a study that spans CCHS 2001 to 2014. BMI seems like a straightforward measure that is routinely-collected worldwide. Indeed, BMI is included in all CCHS cycles. You examine the documentation and find the variable HWTAGBMI in the CCHS 2001 corresponds to body mass index, but that in other cycles, the variable name changes to HWTCGBMI, HWTDGBMI, HWTEGBMI, etc. On reading the documentation, you notice that some cycles round the value to one decimal, whereas other cycles round to two digits. Furthermore, some cycles don’t calculate BMI for respondents < age 20 or > 64 years. Also, some cycles calculate BMI only if height and weight are within specific ranges. These types of changes occur for almost all CCHS variables. Sometimes the changes are subtle and difficult to find in the documentation, even for seemingly straightforward variables such as BMI. cchsflow harmonizes the BMI variable across different cycles.

+

Imagine you want to use BMI (body mass index) for a study that spans CCHS 2001 to 2018. BMI seems like a straightforward measure that is routinely-collected worldwide. Indeed, BMI is included in all CCHS cycles. You examine the documentation and find the variable HWTAGBMI in the CCHS 2001 corresponds to body mass index, but that in other cycles, the variable name changes to HWTCGBMI, HWTDGBMI, HWTEGBMI, etc. On reading the documentation, you notice that some cycles round the value to one decimal, whereas other cycles round to two digits. Furthermore, some cycles don’t calculate BMI for respondents < age 20 or > 64 years. Also, some cycles calculate BMI only if height and weight are within specific ranges. These types of changes occur for almost all CCHS variables. Sometimes the changes are subtle and difficult to find in the documentation, even for seemingly straightforward variables such as BMI. cchsflow harmonizes the BMI variable across different cycles.

@@ -165,11 +165,11 @@

Installation

-
    # Install release version from CRAN
+
    # Install release version from CRAN
     install.packages("cchsflow")
 
     # Install the most recent version from GitHub
-    devtools::install_github("Big-Life-Lab/cchsflow")
+ devtools::install_github("Big-Life-Lab/cchsflow")

New variables not yet added to the CRAN version

@@ -187,11 +187,11 @@

  • variable_details.csv - information that describes how the variables are recoded.
  • Vignettes - that describe how to use R to transform or generate new derived variables that are listed in variables.csv. Transformations are performed using rec_with_table(). variables.csv and variable_details.csv can be used with other statistics programs (see issue).
  • -
  • Demonstration CCHS data - cchsflow includes a random sample of 200 respondents from each CCHS PUMF file from 2001 to 2014. These data are used for the vignettes. The CCHS test data is stored in /data as .RData files. They can be read as a package database.
  • +
  • Demonstration CCHS data - cchsflow includes a random sample of 200 respondents from each CCHS PUMF file from 2001 to 2018. These data are used for the vignettes. The CCHS test data is stored in /data as .RData files. They can be read as a package database.
  • -
    # read the CCHS 2014 PUMF test data
    +
    # read the CCHS 2017-2018 PUMF test data
     
    -test_data <- cchs2014_p
    +test_data <- cchs2017_2018_p

    This repository does not include the full CCHS data. Information on how to access the CCHS data can is here. The Canadian university community can also access the CCHS through ODESI (see health/Canada/Canadian Community Health Survey).

    @@ -216,13 +216,13 @@

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/news/index.html b/docs/news/index.html index 5e7b8b8b..9ecc54c0 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
    @@ -90,7 +93,7 @@

    -

    +

    cchsflow 1.8.2 2021-06-23

    2021-06-23

    -
    +

    -Bug Fixes

    +Bug Fixes
    -

    +

    cchsflow 1.8.1 Unreleased

    2021-01-25

    -
    +

    -Bug Fixes

    +Bug Fixes
    • Correct breaking specification errors for diet_score.
    -

    +

    cchsflow 1.8.0 2021-01-24

    2021-01-22

    -
    +

    -Features

    +Features
    • New function merge_rec_data() that merges and labels transformed CCHS datasets.
    @@ -257,7 +362,7 @@

    -

    +

    cchsflow 1.7.1 Unreleased

    2020-09-16

    @@ -279,7 +384,7 @@

    -

    +

    cchsflow 1.7.0 Unreleased

    2020-09-11

    @@ -290,9 +395,9 @@

  • Notation in recFrom column of variable_details.csv is now changed to interval notation (e.g. 7:9 is now denoted as [7,9]).
  • -
    +

    -Features

    +Features
    • New description column added to variables.csv to allow a description of variables.
    • New role column added to variables.csv to allow users to set roles for variable manipulation.
    • @@ -337,7 +442,7 @@

    -

    +

    cchsflow 1.6.0 2020-03-30

    2020-03-30

    @@ -350,16 +455,16 @@

    -
    +

    -Bug Fixes

    +Bug Fixes
    • Bug fix to resp_condition_fun1() that was not correctly handling respondents under 35 with respiratory conditions
    -
    +

    -Variables

    +Variables
    • New SDC_5A_1 - Knowledge of official languages. Used in CCHS cycles 2011-2014
    • @@ -373,13 +478,13 @@

    -

    +

    cchsflow 1.5.2 Unreleased

    2020-03-24

    -
    +

    -Bug Fixes

    +Bug Fixes
    • Fixes to typos in variables.csv & variable_details.csv
    • @@ -387,7 +492,7 @@

    -

    +

    cchsflow 1.5.1 2020-03-20

    2020-03-20

    @@ -400,7 +505,7 @@

    -

    +

    cchsflow 1.5.0 Unreleased

    2020-03-20

    @@ -412,9 +517,9 @@

  • Added attach_data_name: new argument for adding data_name to rec_with_table() return
  • -
    +

    -Variables

    +Variables
    • New ADL_der - derived “needs help with task” variable.
    • @@ -443,22 +548,22 @@

    -

    +

    cchsflow 1.4.4 Unreleased

    2020-03-03

    -
    +

    -Features

    +Features
    • Docsearch added to website
    • New article on getting started with cchsflow
    -
    +

    -Bug fixes

    +Bug fixes
    • Refactor to pct_time_fun function to output value from 0-100% as opposed to 0-1
    • Refactor to respiratory functions to better capture respondents under 35 with respiratory conditions
    • @@ -476,7 +581,7 @@

    -

    +

    cchsflow 1.4.3 Unreleased

    2020-02-21

    @@ -489,7 +594,7 @@

    -

    +

    cchsflow 1.4.2 Unreleased

    2020-02-19

    @@ -504,7 +609,7 @@

    -

    +

    cchsflow 1.4.1 Unreleased

    2020-02-11

    @@ -521,7 +626,7 @@

    -

    +

    cchsflow 1.4.0 Unreleased

    2020-02-10

    @@ -532,16 +637,16 @@

  • Added to _p suffix to the names of datasets & databaseStarts to denote CCHS PUMF data
  • -
    +

    -Features

    +Features
    • Badges added to README.md with usethis.
    -
    +

    -Variables

    +Variables
    -

    +

    cchsflow 1.3.2 2020-02-16

    2020-02-04

    -
    +

    -Variables

    +Variables
    -

    +

    cchsflow 1.3.1 Unreleased

    2020-01-28

    -
    +

    -Variables

    +Variables
    • New CCC_31A. Ever diagnosed with cancer
    • @@ -603,7 +708,7 @@

    -

    +

    cchsflow 1.3.0 Unreleased

    2020-01-23

    @@ -614,9 +719,9 @@

  • Changed print_note() parameter in rec_with_table() to notes.
  • -
    +

    -Variables

    +Variables
    • New food_insecurity_der. Derived food insecurity variable.
    • @@ -640,7 +745,7 @@

    -

    +

    cchsflow 1.2.0 Unreleased

    2020-01-13

    @@ -666,7 +771,7 @@

    -

    +

    cchsflow 1.1.0 Unreleased

    2020-01-08

    @@ -701,13 +806,13 @@

    -

    +

    cchsflow 1.0.1 Unreleased

    2019-12-19

    -
    +

    -Features

    +Features
    • Updated LICENSE
    • @@ -716,7 +821,7 @@

    -

    +

    cchsflow 1.0.0 Unreleased

    2019-12-18

    @@ -727,9 +832,9 @@

  • Submitted package to CRAN
  • -
    +

    -Features

    +Features
    • Switched formatting to snake_case
    • Corrections to “using cchsflow” article
    • @@ -750,21 +855,21 @@

    -

    +

    cchsflow 0.2.3 Unreleased

    2019-11-29

    -
    +

    -Features

    +Features
    • Updated example in the introduction to reflect data that is now included in the cchsflow package.
    • Updates to vignettes to reflect latest version of package
    • Updates to variables.csv & variableDetails.csv
    -
    +

    -Variables

    +Variables
    • New DHHGAGE_C - categorical age variable that groups various age categories across all CCHS cycles. Based on the continuous age variable (DHHGAGE_cont) that is also harmonious across all CCHS cycles.
    • @@ -779,13 +884,13 @@

    -

    +

    cchsflow 0.2.2 Unreleased

    2019-11-26

    -
    +

    -Features

    +Features
    • Updated ref branch of bllflow to match latest version of RecWTable()
    • @@ -795,13 +900,13 @@

    -

    +

    cchsflow 0.2.1 Unreleased

    2019-11-19

    -
    +

    -Features

    +Features
    • Documentation for derived variable functions now available
    • Documentation for derived alcohol variables now available
    • @@ -809,12 +914,12 @@

    -

    +

    cchsflow 0.2.0 Unreleased

    -
    +

    -Features

    +Features
    • Added Support for derived variables alongside vignettes explaining how to add new variables
    • Added R file with custom functions for derived variables
    • @@ -824,12 +929,12 @@

    -

    +

    cchsflow 0.1.0 (First Version) Unreleased

    -
    +

    -Features

    +Features
    • Added variables.csv that contains list of CCHS variables in cchsflow.
    • Added variableDetails.csv that maps variables across CCHS cycles from 2001-2014
    • @@ -839,39 +944,10 @@

    - @@ -879,11 +955,11 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 91459581..1273238d 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -17,6 +17,10 @@ html, body { height: 100%; } +body { + position: relative; +} + body > .container { display: flex; height: 100%; @@ -67,6 +71,10 @@ summary { margin-top: calc(-60px + 1em); } +dd { + margin-left: 3em; +} + /* Section anchors ---------------------------------*/ a.anchor { @@ -100,29 +108,132 @@ a.anchor { margin-top: -40px; } +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + /* Sidebar --------------------------*/ -#sidebar { +#pkgdown-sidebar { margin-top: 30px; position: -webkit-sticky; position: sticky; top: 70px; } -#sidebar h2 { + +#pkgdown-sidebar h2 { font-size: 1.5em; margin-top: 1em; } -#sidebar h2:first-child { +#pkgdown-sidebar h2:first-child { margin-top: 0; } -#sidebar .list-unstyled li { +#pkgdown-sidebar .list-unstyled li { margin-bottom: 0.5em; } +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + .orcid { - height: 16px; + font-size: 16px; + color: #A6CE39; /* margins are required by official ORCID trademark and display guidelines */ margin-left:4px; margin-right:4px; @@ -133,14 +244,14 @@ a.anchor { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 087a7622..7e7048fa 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -9,11 +9,6 @@ $('body').css('padding-top', $('.navbar').height() + 10); }); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 - }); - $('[data-toggle="tooltip"]').tooltip(); var cur_path = paths(location.pathname); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 267b8417..37383aff 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ -pandoc: 2.9.1.1 -pkgdown: 1.4.1 +pandoc: 2.14.0.3 +pkgdown: 1.6.1 pkgdown_sha: ~ articles: derived_variables: derived_variables.html @@ -9,4 +9,5 @@ articles: tagged_na_usage: tagged_na_usage.html variable_details: variable_details.html variables_sheet: variables_sheet.html +last_built: 2021-10-25T15:23Z diff --git a/docs/reference/ALCDTTM.html b/docs/reference/ALCDTTM.html index 5e5538ec..74ed71a3 100644 --- a/docs/reference/ALCDTTM.html +++ b/docs/reference/ALCDTTM.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -59,8 +63,7 @@ No drink in the last 12 months. " /> - - + @@ -78,7 +81,7 @@ - +
    @@ -100,7 +103,7 @@
    -
    ALCDTTM(ALCDTTM)
    +
    ALCDTTM(ALCDTTM)

    Arguments

    @@ -204,28 +207,27 @@

    Details distinguish between former and never drinkers.

    Examples

    -
    library(cchsflow) - ?ALCDTTM
    +
    library(cchsflow)
    + ?ALCDTTM
    +#>  Rendering development documentation for "ALCDTTM"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/ALCDTYP.html b/docs/reference/ALCDTYP.html index 4d87259f..81d58da5 100644 --- a/docs/reference/ALCDTYP.html +++ b/docs/reference/ALCDTYP.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -60,8 +64,7 @@ Never Drinker " /> - - + @@ -79,7 +82,7 @@ - +
    @@ -101,7 +104,7 @@
    -
    ALCDTYP(ALCDTYP)
    +
    ALCDTYP(ALCDTYP)

    Arguments

    @@ -209,28 +212,27 @@

    Details earlier cycles of the CCHS.

    Examples

    -
    library(cchsflow) - ?ALCDTYP
    +
    library(cchsflow)
    + ?ALCDTYP
    +#>  Rendering development documentation for "ALCDTYP"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/ALWDDLY.html b/docs/reference/ALWDDLY.html index 34dd8a59..3af85f3f 100644 --- a/docs/reference/ALWDDLY.html +++ b/docs/reference/ALWDDLY.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ This is a continuous variable derived by Statistics Canada that quantifies the mean daily consumption of alcohol. This takes the value of ALWDWKY and divides it by 7." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    ALWDDLY(ALWDDLY)
    +
    ALWDDLY(ALWDDLY)

    Arguments

    @@ -190,28 +193,27 @@

    Details how it was derived remains consistent.

    Examples

    -
    library(cchsflow) - ?ALWDDLY
    +
    library(cchsflow)
    + ?ALWDDLY
    +#>  Rendering development documentation for "ALWDDLY"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/ALWDWKY.html b/docs/reference/ALWDWKY.html index febaa4f2..ab8188a6 100644 --- a/docs/reference/ALWDWKY.html +++ b/docs/reference/ALWDWKY.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -57,8 +61,7 @@ consumed each day in the past week (ie. how much alcohol did you consume on Sunday, how much did you consume on Monday etc.). Each day is considered an individual variable and ALWDWKY takes the sum of all daily variables." /> - - + @@ -76,7 +79,7 @@ - +
    @@ -98,7 +101,7 @@
    -
    ALWDWKY(ALWDWKY)
    +
    ALWDWKY(ALWDWKY)

    Arguments

    @@ -199,28 +202,27 @@

    Details how it was derived remains consistent.

    Examples

    -
    library(cchsflow) - ?ALWDWKY
    +
    library(cchsflow)
    + ?ALWDWKY
    +#>  Rendering development documentation for "ALWDWKY"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/COPD_Emph_der_fun1.html b/docs/reference/COPD_Emph_der_fun1.html index faa7818d..7925541a 100644 --- a/docs/reference/COPD_Emph_der_fun1.html +++ b/docs/reference/COPD_Emph_der_fun1.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -55,8 +59,7 @@ that different respiratory variables are used across CCHS cycles. This function is for CCHS cycles (2005-2008) that use COPD and Emphysema as a combined variable." /> - - + @@ -74,7 +77,7 @@ - +
    @@ -96,7 +99,7 @@
    -
    COPD_Emph_der_fun1(DHHGAGE_cont, CCC_91E, CCC_91F)
    +
    COPD_Emph_der_fun1(DHHGAGE_cont, CCC_91E, CCC_91F)

    Arguments

    @@ -210,81 +213,90 @@

    See a

    Examples

    -
    # COPD_Emph_der_fun1() to create values across CCHS cycles -# (2005-2008) COPD_Emph_der_fun1() is specified in -# variable_details.csv along with the CCHS variables and cycles included. - -# To transform COPD_Emph_der, use rec_with_table() for each CCHS cycle -# and specify COPD_Emph_der, along with the various respiratory -# variables. Then by using merge_rec_data() you can combine COPD_Emph_der -# across cycles. - -library(cchsflow) - -COPD2005 <- suppressWarnings(rec_with_table( - cchs2005_p, c( - "DHHGAGE_cont", "CCC_91E", "CCC_91F", - "COPD_Emph_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(COPD2005)
    #> CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der -#> 1 NA(a) NA(a) 27 NA(a) -#> 2 2 2 77 3 -#> 3 2 2 32 3 -#> 4 2 2 77 3 -#> 5 2 2 85 3 -#> 6 NA(a) NA(a) 13 NA(a)
    -COPD2007_2008 <- suppressWarnings(rec_with_table( - cchs2007_2008_p, c( - "DHHGAGE_cont", "CCC_91E", "CCC_91F", - "COPD_Emph_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(COPD2007_2008)
    #> CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der -#> 195 2 2 62 3 -#> 196 2 2 37 3 -#> 197 2 2 77 3 -#> 198 2 2 42 3 -#> 199 2 2 32 3 -#> 200 2 2 72 3
    -combined_COPD <- suppressWarnings(merge_rec_data(COPD2005, COPD2007_2008)) - -head(combined_COPD)
    #> CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der -#> 1 NA(a) NA(a) 27 NA(a) -#> 2 2 2 77 3 -#> 3 2 2 32 3 -#> 4 2 2 77 3 -#> 5 2 2 85 3 -#> 6 NA(a) NA(a) 13 NA(a)
    tail(combined_COPD)
    #> CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der -#> 395 2 2 62 3 -#> 396 2 2 37 3 -#> 397 2 2 77 3 -#> 398 2 2 42 3 -#> 399 2 2 32 3 -#> 400 2 2 72 3
    +
    # COPD_Emph_der_fun1() to create values across CCHS cycles
    +# (2005-2008) COPD_Emph_der_fun1() is specified in
    +# variable_details.csv along with the CCHS variables and cycles included.
    +
    +# To transform COPD_Emph_der, use rec_with_table() for each CCHS cycle
    +# and specify COPD_Emph_der, along with the various respiratory
    +# variables. Then by using merge_rec_data() you can combine COPD_Emph_der
    +# across cycles.
    +
    +library(cchsflow)
    +
    +COPD2005 <- suppressWarnings(rec_with_table(
    +  cchs2005_p,  c(
    +    "DHHGAGE_cont", "CCC_91E", "CCC_91F",
    +    "COPD_Emph_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +head(COPD2005)
    +#>   CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der
    +#> 1   NA(a)   NA(a)           27         NA(a)
    +#> 2       2       2           77             3
    +#> 3       2       2           32             3
    +#> 4       2       2           77             3
    +#> 5       2       2           85             3
    +#> 6   NA(a)   NA(a)           13         NA(a)
    +
    +COPD2007_2008 <- suppressWarnings(rec_with_table(
    +  cchs2007_2008_p, c(
    +    "DHHGAGE_cont", "CCC_91E", "CCC_91F", 
    +    "COPD_Emph_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(COPD2007_2008)
    +#>     CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der
    +#> 195       2       2           62             3
    +#> 196       2       2           37             3
    +#> 197       2       2           77             3
    +#> 198       2       2           42             3
    +#> 199       2       2           32             3
    +#> 200       2       2           72             3
    +
    +combined_COPD <- suppressWarnings(merge_rec_data(COPD2005, COPD2007_2008))
    +
    +head(combined_COPD)
    +#>   CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der
    +#> 1   NA(a)   NA(a)           27         NA(a)
    +#> 2       2       2           77             3
    +#> 3       2       2           32             3
    +#> 4       2       2           77             3
    +#> 5       2       2           85             3
    +#> 6   NA(a)   NA(a)           13         NA(a)
    +tail(combined_COPD)
    +#>     CCC_91E CCC_91F DHHGAGE_cont COPD_Emph_der
    +#> 395       2       2           62             3
    +#> 396       2       2           37             3
    +#> 397       2       2           77             3
    +#> 398       2       2           42             3
    +#> 399       2       2           32             3
    +#> 400       2       2           72             3
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/COPD_Emph_der_fun2.html b/docs/reference/COPD_Emph_der_fun2.html index d26da2b3..291b05b1 100644 --- a/docs/reference/COPD_Emph_der_fun2.html +++ b/docs/reference/COPD_Emph_der_fun2.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -55,8 +59,7 @@ that different respiratory variables are used across CCHS cycles. This function is for CCHS cycles (2001-2003, 2009-2014) that use COPD and Emphysema as a combined variable." /> - - + @@ -74,7 +77,7 @@ - +
    @@ -96,7 +99,7 @@
    -
    COPD_Emph_der_fun2(DHHGAGE_cont, CCC_091)
    +
    COPD_Emph_der_fun2(DHHGAGE_cont, CCC_091)

    Arguments

    @@ -206,81 +209,91 @@

    See a

    COPD_Emph_der_fun2

    Examples

    -
    # COPD_Emph_der_fun2() to create values across CCHS cycles -# (2001-2003, 2009-2014) COPD_Emph_der_fun2() is specified in -# variable_details.csv along with the CCHS variables and cycles included. - -# To transform COPD_Emph_der, use rec_with_table() for each CCHS cycle -# and specify COPD_Emph_der, along with the various respiratory -# variables. Then by using merge_rec_data() you can combine COPD_Emph_der -# across cycles. - -library(cchsflow) - -COPD2001 <- suppressWarnings(rec_with_table( - cchs2001_p, c( - "DHHGAGE_cont", "CCC_091", - "COPD_Emph_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    -head(COPD2001)
    #> CCC_091 DHHGAGE_cont COPD_Emph_der -#> 1 2 85 3 -#> 2 2 85 3 -#> 3 2 32 3 -#> 4 2 77 3 -#> 5 NA(a) 22 NA(a) -#> 6 2 77 3
    -COPD2014 <- suppressWarnings(rec_with_table( - cchs2007_2008_p, c( - "DHHGAGE_cont", "CCC_091", - "COPD_Emph_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(COPD2014)
    #> DHHGAGE_cont -#> 195 62 -#> 196 37 -#> 197 77 -#> 198 42 -#> 199 32 -#> 200 72
    -combined_COPD <- suppressWarnings(merge_rec_data(COPD2001, COPD2014)) - -head(combined_COPD)
    #> CCC_091 DHHGAGE_cont COPD_Emph_der -#> 1 2 85 3 -#> 2 2 85 3 -#> 3 2 32 3 -#> 4 2 77 3 -#> 5 NA(a) 22 NA(a) -#> 6 2 77 3
    tail(combined_COPD)
    #> CCC_091 DHHGAGE_cont COPD_Emph_der -#> 395 NA(c) 62 NA(c) -#> 396 NA(c) 37 NA(c) -#> 397 NA(c) 77 NA(c) -#> 398 NA(c) 42 NA(c) -#> 399 NA(c) 32 NA(c) -#> 400 NA(c) 72 NA(c)
    +
    # COPD_Emph_der_fun2() to create values across CCHS cycles
    +# (2001-2003, 2009-2014) COPD_Emph_der_fun2() is specified in
    +# variable_details.csv along with the CCHS variables and cycles included.
    +
    +# To transform COPD_Emph_der, use rec_with_table() for each CCHS cycle
    +# and specify COPD_Emph_der, along with the various respiratory
    +# variables. Then by using merge_rec_data() you can combine COPD_Emph_der
    +# across cycles.
    +
    +library(cchsflow)
    +
    +COPD2001 <- suppressWarnings(rec_with_table(
    +  cchs2001_p,  c(
    +    "DHHGAGE_cont", "CCC_091",
    +    "COPD_Emph_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    +
    +head(COPD2001)
    +#>   CCC_091 DHHGAGE_cont COPD_Emph_der
    +#> 1       2           85             3
    +#> 2       2           85             3
    +#> 3       2           32             3
    +#> 4       2           77             3
    +#> 5   NA(a)           22         NA(a)
    +#> 6       2           77             3
    +
    +COPD2014 <- suppressWarnings(rec_with_table(
    +  cchs2007_2008_p, c(
    +    "DHHGAGE_cont", "CCC_091", 
    +    "COPD_Emph_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(COPD2014)
    +#>     DHHGAGE_cont
    +#> 195           62
    +#> 196           37
    +#> 197           77
    +#> 198           42
    +#> 199           32
    +#> 200           72
    +
    +combined_COPD <- suppressWarnings(merge_rec_data(COPD2001, COPD2014))
    +
    +head(combined_COPD)
    +#>   CCC_091 DHHGAGE_cont COPD_Emph_der
    +#> 1       2           85             3
    +#> 2       2           85             3
    +#> 3       2           32             3
    +#> 4       2           77             3
    +#> 5   NA(a)           22         NA(a)
    +#> 6       2           77             3
    +tail(combined_COPD)
    +#>     CCC_091 DHHGAGE_cont COPD_Emph_der
    +#> 395   NA(c)           62         NA(c)
    +#> 396   NA(c)           37         NA(c)
    +#> 397   NA(c)           77         NA(c)
    +#> 398   NA(c)           42         NA(c)
    +#> 399   NA(c)           32         NA(c)
    +#> 400   NA(c)           72         NA(c)
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/DPSDPP.html b/docs/reference/DPSDPP.html index 0c6bbb3e..538700b2 100644 --- a/docs/reference/DPSDPP.html +++ b/docs/reference/DPSDPP.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -56,8 +60,7 @@ is derived from DPSDSF in which probabilities are assigned to respondents based on their depression scale score. For more details on how the variable was derived click here." /> - - + @@ -75,7 +78,7 @@ - +
    @@ -97,7 +100,7 @@
    -
    DPSDPP(DPSDPP)
    +
    DPSDPP(DPSDPP)

    Arguments

    @@ -207,29 +210,27 @@

    See a

    Examples

    -
    library(cchsflow) - ?DPSDPP
    +
    library(cchsflow)
    + ?DPSDPP
    +#>  Rendering development documentation for "DPSDPP"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/DPSDSF.html b/docs/reference/DPSDSF.html index 61580d4b..01cb804f 100644 --- a/docs/reference/DPSDSF.html +++ b/docs/reference/DPSDSF.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -55,8 +59,7 @@ depressed or loss of interest within the last two weeks. This variable is scaled from 0 to 8, with 0 indicating a respondent has not felt depressed or loss of interest, and 8 representing the highest level of depression." /> - - + @@ -74,7 +77,7 @@ - +
    @@ -96,7 +99,7 @@
    -
    DPSDSF(DPSDSF)
    +
    DPSDSF(DPSDSF)

    Arguments

    @@ -200,29 +203,27 @@

    See a

    Examples

    -
    library(cchsflow) - ?DPSDSF
    +
    library(cchsflow)
    + ?DPSDSF
    +#>  Rendering development documentation for "DPSDSF"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/GEN_02A2.html b/docs/reference/GEN_02A2.html index 0bbfcf0b..78dc0be1 100644 --- a/docs/reference/GEN_02A2.html +++ b/docs/reference/GEN_02A2.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -62,8 +66,7 @@ The GEN_02A2 is a continuous variable from 0 to 10, where 0 represents very dissatisfied and 10 represents very satisfied." /> - - + @@ -81,7 +84,7 @@ - +
    @@ -103,7 +106,7 @@
    -
    GEN_02A2(GEN_02A, GEN_02A2)
    +
    GEN_02A2(GEN_02A, GEN_02A2)

    Arguments

    @@ -223,29 +226,28 @@

    Details GEN_02A2 is recommended.

    Examples

    -
    -library(cchsflow) -?GEN_02A2
    +
    
    +library(cchsflow)
    +?GEN_02A2
    +#>  Rendering development documentation for "GEN_02A2"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/LBFA_31A.html b/docs/reference/LBFA_31A.html index a6eda8c9..c74188c8 100644 --- a/docs/reference/LBFA_31A.html +++ b/docs/reference/LBFA_31A.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ This is a 9 category variable (LBFA_31A) that is in the CCHS that asks which occupation group best describes a respondent. Occupation group is asked in the 2001 CCHS cycle and in CCHS cycles from 2007-2014." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    LBFA_31A(LBFA_31A)
    +
    LBFA_31A(LBFA_31A)

    Arguments

    @@ -206,29 +209,27 @@

    See a

    Examples

    -
    library(cchsflow) - ?LBFA_31A
    +
    library(cchsflow)
    + ?LBFA_31A
    +#>  Rendering development documentation for "LBFA_31A"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/LBFA_31A_a.html b/docs/reference/LBFA_31A_a.html index 21f9edc4..c29ed4fb 100644 --- a/docs/reference/LBFA_31A_a.html +++ b/docs/reference/LBFA_31A_a.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ This is a 5 category variable (LBFA_31A_a) that is in the CCHS that asks which occupation group best describes a respondent. Occupation group is asked in the 2001 CCHS cycle and in CCHS cycles from 2007-2014." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    LBFA_31A_a(LBFA_31A_a)
    +
    LBFA_31A_a(LBFA_31A_a)

    Arguments

    @@ -213,29 +216,27 @@

    See a

    Examples

    -
    library(cchsflow) -?LBFA_31A_a
    +
    library(cchsflow)
    +?LBFA_31A_a  
    +#>  Rendering development documentation for "LBFA_31A_a"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/LBFA_31A_b.html b/docs/reference/LBFA_31A_b.html index 207d54f0..e11b0d70 100644 --- a/docs/reference/LBFA_31A_b.html +++ b/docs/reference/LBFA_31A_b.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ This is a 6 category variable (LBFA_31A_b) that is in the CCHS that asks which occupation group best describes a respondent. Occupation group is asked in the 2001 CCHS cycle and in CCHS cycles from 2007-2014." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    LBFA_31A_b(LBFA_31A_b)
    +
    LBFA_31A_b(LBFA_31A_b)

    Arguments

    @@ -210,29 +213,27 @@

    See a

    Examples

    -
    library(cchsflow) -?LBFA_31A_b
    +
    library(cchsflow)
    +?LBFA_31A_b  
    +#>  Rendering development documentation for "LBFA_31A_b"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/RACDPAL_fun.html b/docs/reference/RACDPAL_fun.html index 6a9d79a6..edd48f5c 100644 --- a/docs/reference/RACDPAL_fun.html +++ b/docs/reference/RACDPAL_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    RACDPAL_fun(RAC_1, RAC_2A, RAC_2B, RAC_2C)
    +
    RACDPAL_fun(RAC_1, RAC_2A, RAC_2B, RAC_2C)

    Arguments

    @@ -211,64 +214,67 @@

    Details cycles.

    Examples

    -
    # Using RACDPAL_fun() to transform RACDPAL in 2001. -# RACDPAL_fun() is specified in variable_details.csv along with the -# CCHS variables and cycles included. - -# To transform RACDPAL, use rec_with_table() for each the 2001 cycle -# and specify RACDPAL, along with the various ADL variables. - -library(cchsflow) - -RACDPAL_2001 <- rec_with_table( - cchs2001_p, c( - "RAC_1", "RAC_2A", "RAC_2B", "RAC_2C", "RACDPAL" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for RAC_2B: In CCHS 2001, work and school reduction were combined into one variable. From CCHS 2003 onwards they were split into 2 variables (RAC_2B1 & RAC_2B2)
    -head(RACDPAL_2001)
    #> RAC_1 RAC_2A RAC_2B RAC_2C RACDPAL -#> 1 3 3 NA(a) 3 NA(b) -#> 2 2 2 NA(a) 2 NA(b) -#> 3 3 3 3 3 3 -#> 4 1 3 NA(a) 3 NA(b) -#> 5 3 3 3 3 3 -#> 6 3 3 NA(a) 3 NA(b)
    -# Note: In other CCHS cycles you only need to specify RACDPAL as the variable -# was included in those survey cycles. - -# Using RACDPAL_fun() with user inputted data. - -# Let's say you're an individual that sometimes has difficulties with -# activities due to disability, sometimes has a reduction in activities at -# home, often has a reduction at school or work, and never has a reduction -# in other activities. Your participation and activity limitation can be -# determined as follows: - -library(cchsflow) -RACDPAL <- RACDPAL_fun(1, 1, 2, 3) -print(RACDPAL)
    #> [1] 2
    -
    +
    # Using RACDPAL_fun() to transform RACDPAL in 2001. 
    +# RACDPAL_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    + 
    +# To transform RACDPAL, use rec_with_table() for each the 2001 cycle
    +# and specify RACDPAL, along with the various ADL variables.
    +
    +library(cchsflow)
    +
    +RACDPAL_2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "RAC_1", "RAC_2A", "RAC_2B", "RAC_2C", "RACDPAL"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for RAC_2B: In CCHS 2001, work and school reduction were combined into one variable. From CCHS 2003 onwards they were split into 2 variables (RAC_2B1 & RAC_2B2)
    +
    +head(RACDPAL_2001)
    +#>   RAC_1 RAC_2A RAC_2B RAC_2C RACDPAL
    +#> 1     3      3  NA(a)      3   NA(b)
    +#> 2     2      2  NA(a)      2   NA(b)
    +#> 3     3      3      3      3       3
    +#> 4     1      3  NA(a)      3   NA(b)
    +#> 5     3      3      3      3       3
    +#> 6     3      3  NA(a)      3   NA(b)
    +
    +# Note: In other CCHS cycles you only need to specify RACDPAL as the variable
    +# was included in those survey cycles.
    +
    +# Using RACDPAL_fun() with user inputted data.
    +
    +# Let's say you're an individual that sometimes has difficulties with
    +# activities due to disability, sometimes has a reduction in activities at
    +# home, often has a reduction at school or work, and never has a reduction
    +# in other activities. Your participation and activity limitation can be
    +# determined as follows:
    +
    +library(cchsflow)
    +RACDPAL <- RACDPAL_fun(1, 1, 2, 3)
    +print(RACDPAL)
    +#> [1] 2
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 00000000..17a35806 Binary files /dev/null and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/SMKG040_fun.html b/docs/reference/SMKG040_fun.html new file mode 100644 index 00000000..8be17896 --- /dev/null +++ b/docs/reference/SMKG040_fun.html @@ -0,0 +1,333 @@ + + + + + + + + +Age started smoking daily - daily/former daily smokers — SMKG040_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a continuous derived variable +(SMKG040_fun) that calculates the approximate age that a daily or former +daily smoker began smoking daily.

    +
    + +
    SMKG040_fun(SMKG203_cont, SMKG207_cont)
    + +

    Arguments

    +
    + + + + + + + + + +
    SMKG203_cont

    age started smoking daily. Variable asked to daily +smokers.

    SMKG207_cont

    age started smoking daily. Variable asked to former +daily smokers.

    + +

    Value

    + +

    value for age started smoking daily for daily/former daily smokers in +the SMKG040_cont

    +

    Details

    + +

    SMKG203 (daily smoker) and SMKG207 (former daily) are present in +CCHS 2001-2014, and are separate variables. For CCHS 2015 and onward, SMKG040 +(daily/former daily) combines the two previous variables. SMKG040_fun takes +the continuous functions (SMKG203_cont and SMKG207_cont) to create SMKG040 +for 2001-2014.

    +

    Note

    + +

    In previous cycles, both SMKG203 and SMKG207 included respondents who +did not state their smoking status. From CCHS 2015 and onward, SMKG040 only +included respondents who specified daily smoker or former daily smoker. As +a result, SMKG040 has a large number of missing respondents for CCHS 2015 +survey cycles and onward.

    + +

    Examples

    +
     
    +# Using SMKG040_fun() to create age values across CCHS cycles
    +# SMKG040_fun() is specified in variable_details.csv under SMKG040_cont.
    +
    +# To create a continuous harmonized variable for SMKG040, use rec_with_table() 
    +# for each CCHS cycle and specify SMKG040_cont.
    +
    +library(cchsflow)
    +
    +age_smoke_dfd_2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SMKG203_cont", "SMKG207_cont","SMKG040_cont"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +head(age_smoke_dfd_2009_2010)
    +#>   SMKG203_cont SMKG207_cont SMKG040_cont
    +#> 1           NA           NA           NA
    +#> 2           NA           NA           NA
    +#> 3           NA           NA           NA
    +#> 4           NA         18.5         18.5
    +#> 5           NA         16.0         16.0
    +#> 6           NA          8.0          8.0
    +
    +age_smoke_dfd_2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "SMKG203_cont", "SMKG207_cont","SMKG040_cont"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +tail(age_smoke_dfd_2011_2012)
    +#>     SMKG203_cont SMKG207_cont SMKG040_cont
    +#> 195           NA           16           16
    +#> 196           NA           NA           NA
    +#> 197           NA           NA           NA
    +#> 198           NA           16           16
    +#> 199           NA           NA           NA
    +#> 200           16           NA           16
    +
    +combined_age_smoke_dfd <- suppressWarnings(merge_rec_data
    +(age_smoke_dfd_2009_2010,age_smoke_dfd_2011_2012))
    +
    +head(combined_age_smoke_dfd)
    +#>   SMKG203_cont SMKG207_cont SMKG040_cont
    +#> 1           NA           NA           NA
    +#> 2           NA           NA           NA
    +#> 3           NA           NA           NA
    +#> 4           NA         18.5         18.5
    +#> 5           NA         16.0         16.0
    +#> 6           NA          8.0          8.0
    +tail(combined_age_smoke_dfd)
    +#>     SMKG203_cont SMKG207_cont SMKG040_cont
    +#> 395           NA           16           16
    +#> 396           NA           NA           NA
    +#> 397           NA           NA           NA
    +#> 398           NA           16           16
    +#> 399           NA           NA           NA
    +#> 400           16           NA           16
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/adjusted_bmi_fun.html b/docs/reference/adjusted_bmi_fun.html new file mode 100644 index 00000000..0096e5f8 --- /dev/null +++ b/docs/reference/adjusted_bmi_fun.html @@ -0,0 +1,368 @@ + + + + + + + + +Adjusted Body Mass Index (BMI) derived variable — adjusted_bmi_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a harmonized adjusted BMI variable. +A systematic review of the literature concluded that the use of +self-reported data among adults underestimates weight and overestimates +height, resulting in lower estimates of obesity than those obtained from +measured data. Using data from the 2005 Canadian Community Health Survey +(CCHS) subsample, where both measured and self-reported values were +collected, correction equations have been developed +(Connor Gorber et al. 2008). Differences between corrected estimates of +obesity from the CCHS and measured estimates from the Canadian Health +Measures Survey is monitored over time to determine if the bias in +self-reported values is changing and if new correction equations need to be +developed. Adjusted BMI variable is first introduced in the CCHS 2015 cycle.

    +

    adjusted_bmi_fun() creates a derived variable (HWTGCOR_der) that is + harmonized across all CCHS cycles. This function takes the BMI by dividing + weight by the square of height, and adds a correction value based on sex.

    +
    + +
    adjusted_bmi_fun(DHH_SEX, HWTGHTM, HWTGWTK)
    + +

    Arguments

    + + + + + + + + + + + + + + +
    DHH_SEX

    CCHS variable for sex; 1 = male, 2 = female

    HWTGHTM

    CCHS variable for height (in meters)

    HWTGWTK

    CCHS variable for weight (in kilograms)

    + +

    Value

    + +

    numeric value for adjusted BMI in the HWTGCOR_der variable

    +

    Details

    + +

    For HWTGCOR_der, there are no restrictions to age, height, weight, + or pregnancy status. While pregnancy was consistent across all CCHS cycles, + its variable (MAM_037) was not available in the PUMF CCHS datasets so it + could not be harmonized and included into the function.

    +

    HWTGCOR_der uses the CCHS variables for sex, height and weight that have been + transformed by cchsflow. In order to generate a value for adjusted BMI + across CCHS cycles, sex, height and weight must be transformed and + harmonized.

    +

    Note

    + +

    In earlier CCHS cycles (2001 and 2003), height was collected in inches; + while in later CCHS cycles (2005+) it was collected in meters. To harmonize + values across cycles, height was converted to meters (to 3 decimal points). + Weight was collected in kilograms across all CCHS cycles, so no + transformations were required in the harmonization process.

    + +

    Examples

    +
    # Using adjusted_bmi_fun() to create adjusted BMI values between cycles
    +# adjusted_bmi_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform the derived BMI variable, use rec_with_table() for each cycle
    +# and specify HWTGCOR_der, along with sex (DHH_SEX), height (HWTGHTM) and 
    +# weight (HWTGWTK).Then by using merge_rec_data(), you can combined 
    +# HWTGBMI_der across cycles.
    +
    +library(cchsflow)
    +adjustedbmi2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", 
    +    "DHH_SEX",
    +    "HWTGCOR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    +#> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    +
    +head(adjustedbmi2001)
    +#>   DHH_SEX HWTGHTM HWTGWTK HWTGCOR_der
    +#> 1       2   1.422   56.25    29.12087
    +#> 2       2   1.549   51.75    22.55036
    +#> 3       1   1.803   78.75    24.98813
    +#> 4       2   1.575   60.75    25.62214
    +#> 5       2   1.727   63.00    22.08267
    +#> 6       1   1.829   91.80    28.44961
    +
    +adjustedbmi2011_2012 <- rec_with_table(
    +  cchs2011_2012_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", 
    +    "DHH_SEX",
    +    "HWTGCOR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    +
    +tail(adjustedbmi2011_2012)
    +#>     DHH_SEX HWTGHTM HWTGWTK HWTGCOR_der
    +#> 195       1   1.600   64.35    25.96935
    +#> 196       1   1.880   80.10    23.30779
    +#> 197       1   1.753   78.75    26.49615
    +#> 198       2   1.651   83.70    32.15777
    +#> 199       1   1.930   74.25    20.37102
    +#> 200       2   1.575   76.50    32.29699
    +
    +combined_bmi <- merge_rec_data(adjustedbmi2001, adjustedbmi2011_2012)
    +head(combined_bmi)
    +#>   DHH_SEX HWTGHTM HWTGWTK HWTGCOR_der
    +#> 1       2   1.422   56.25    29.12087
    +#> 2       2   1.549   51.75    22.55036
    +#> 3       1   1.803   78.75    24.98813
    +#> 4       2   1.575   60.75    25.62214
    +#> 5       2   1.727   63.00    22.08267
    +#> 6       1   1.829   91.80    28.44961
    +tail(combined_bmi)
    +#>     DHH_SEX HWTGHTM HWTGWTK HWTGCOR_der
    +#> 395       1   1.600   64.35    25.96935
    +#> 396       1   1.880   80.10    23.30779
    +#> 397       1   1.753   78.75    26.49615
    +#> 398       2   1.651   83.70    32.15777
    +#> 399       1   1.930   74.25    20.37102
    +#> 400       2   1.575   76.50    32.29699
    +
    +# adjusted_bmi_fun() can also generate a value for BMI if you input your sex, 
    +# and a value for height and weight. Let's say your sex is male, height is 
    +# 170cm (1.7m) and your weight is 50kg, your BMI can be calculated as follows:
    +
    +library(cchsflow)
    +adjusted_BMI <- adjusted_bmi_fun(DHH_SEX = 1, HWTGHTM = 1.7, HWTGWTK = 50)
    +print(adjusted_BMI)
    +#> [1] 17.53878
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/adl_fun.html b/docs/reference/adl_fun.html index 3a386c17..95521bb8 100644 --- a/docs/reference/adl_fun.html +++ b/docs/reference/adl_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    adl_fun(ADL_01, ADL_02, ADL_03, ADL_04, ADL_05)
    +
    adl_fun(ADL_01, ADL_02, ADL_03, ADL_04, ADL_05)

    Arguments

    @@ -247,89 +250,102 @@

    Details survey cycles.

    Examples

    -
    # Using adl_fun() to create ADL_der values across CCHS cycles -# adl_fun() is specified in variable_details.csv along with the -# CCHS variables and cycles included. - -# To transform ADL_der, use rec_with_table() for each CCHS cycle -# and specify ADL_der, along with the various ADL variables. -# Then by using merge_rec_data() you can combine ADL_der across cycles. - -library(cchsflow) -adl2001 <- rec_with_table( - cchs2001_p, c( - "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping forgroceries or other necessities?"
    -head(adl2001)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der -#> 1 2 2 2 2 2 2 -#> 2 2 1 1 2 2 1 -#> 3 2 2 2 2 2 2 -#> 4 2 2 2 2 2 2 -#> 5 2 2 2 2 2 2 -#> 6 2 1 1 2 2 1
    -adl2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping forgroceries or other necessities?"
    -tail(adl2009_2010)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der -#> 195 2 2 2 2 2 2 -#> 196 2 2 2 2 2 2 -#> 197 2 2 2 2 2 2 -#> 198 2 2 2 2 2 2 -#> 199 2 2 2 2 2 2 -#> 200 2 2 2 2 2 2
    -combined_adl <- merge_rec_data(adl2001, adl2009_2010) - -head(combined_adl)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der -#> 1 2 2 2 2 2 2 -#> 2 2 1 1 2 2 1 -#> 3 2 2 2 2 2 2 -#> 4 2 2 2 2 2 2 -#> 5 2 2 2 2 2 2 -#> 6 2 1 1 2 2 1
    -tail(combined_adl)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der -#> 395 2 2 2 2 2 2 -#> 396 2 2 2 2 2 2 -#> 397 2 2 2 2 2 2 -#> 398 2 2 2 2 2 2 -#> 399 2 2 2 2 2 2 -#> 400 2 2 2 2 2 2
    -# Using adl_fun() to generate to ADL_der based on user inputted values. -# -# Let's say you do not need help preparing meals, you need help getting to -# appointments or errands, you need help doing housework, do not need help -# doing personal care, and do not need help moving inside the house. Using -# adl_fun() we can check if you need help doing tasks - -ADL_der <- adl_fun(2, 1, 1, 2, 2) - -print(ADL_der)
    #> [1] 1
    -
    +
    # Using adl_fun() to create ADL_der values across CCHS cycles
    +# adl_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform ADL_der, use rec_with_table() for each CCHS cycle
    +# and specify ADL_der, along with the various ADL variables.
    +# Then by using merge_rec_data() you can combine ADL_der across cycles.
    +
    +library(cchsflow)
    +adl2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
    +
    +head(adl2001)
    +#>   ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
    +#> 1      2      2      2      2      2       2
    +#> 2      2      1      1      2      2       1
    +#> 3      2      2      2      2      2       2
    +#> 4      2      2      2      2      2       2
    +#> 5      2      2      2      2      2       2
    +#> 6      2      1      1      2      2       1
    +
    +adl2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
    +
    +tail(adl2009_2010)
    +#>     ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
    +#> 195      2      2      2      2      2       2
    +#> 196      2      2      2      2      2       2
    +#> 197      2      2      2      2      2       2
    +#> 198      2      2      2      2      2       2
    +#> 199      2      2      2      2      2       2
    +#> 200      2      2      2      2      2       2
    +
    +combined_adl <- merge_rec_data(adl2001, adl2009_2010)
    +
    +head(combined_adl)
    +#>   ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
    +#> 1      2      2      2      2      2       2
    +#> 2      2      1      1      2      2       1
    +#> 3      2      2      2      2      2       2
    +#> 4      2      2      2      2      2       2
    +#> 5      2      2      2      2      2       2
    +#> 6      2      1      1      2      2       1
    +
    +tail(combined_adl)
    +#>     ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
    +#> 395      2      2      2      2      2       2
    +#> 396      2      2      2      2      2       2
    +#> 397      2      2      2      2      2       2
    +#> 398      2      2      2      2      2       2
    +#> 399      2      2      2      2      2       2
    +#> 400      2      2      2      2      2       2
    +
    +# Using adl_fun() to generate to ADL_der based on user inputted values.
    +# 
    +# Let's say you do not need help preparing meals, you need help getting to
    +# appointments or errands, you need help doing housework, do not need help
    +# doing personal care, and do not need help moving inside the house. Using
    +# adl_fun() we can check if you need help doing tasks
    +
    +ADL_der <- adl_fun(2, 1, 1, 2, 2)
    +
    +print(ADL_der)
    +#> [1] 1
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/adl_score_5_fun.html b/docs/reference/adl_score_5_fun.html index 76c50c1b..d115a1f4 100644 --- a/docs/reference/adl_score_5_fun.html +++ b/docs/reference/adl_score_5_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -54,8 +58,7 @@ the number of daily living tasks that a respondent requires help with based on various ADL variables that a respondent answered yes or no to. The ADL variables used are common across all CCHS cycles from 2001 to 2014." /> - - + @@ -73,7 +76,7 @@ - +
    @@ -95,7 +98,7 @@
    -
    adl_score_5_fun(ADL_01, ADL_02, ADL_03, ADL_04, ADL_05)
    +
    adl_score_5_fun(ADL_01, ADL_02, ADL_03, ADL_04, ADL_05)

    Arguments

    @@ -215,88 +218,102 @@

    Value

    Examples

    -
    # Use adl_score_5_fun() to create the variable ADL_score_5 across CCHS -# cycles adl_score_5_fun() is specified in variable_details.csv along with -# the CCHS variables and cycles included. - -# To transform ADL_score_5, use rec_with_table() for each CCHS cycle -# and specify ADL_score_5, along with the various ADL variables. -# Then by using merge_rec_data() you can combine ADL_der across cycles. - -library(cchsflow) -adl2001 <- rec_with_table( - cchs2001_p, c( - "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_score_5" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping forgroceries or other necessities?"
    -head(adl2001)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5 -#> 1 2 2 2 2 2 5 -#> 2 2 1 1 2 2 3 -#> 3 2 2 2 2 2 5 -#> 4 2 2 2 2 2 5 -#> 5 2 2 2 2 2 5 -#> 6 2 1 1 2 2 3
    -adl2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_score_5" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping forgroceries or other necessities?"
    -tail(adl2009_2010)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5 -#> 195 2 2 2 2 2 5 -#> 196 2 2 2 2 2 5 -#> 197 2 2 2 2 2 5 -#> 198 2 2 2 2 2 5 -#> 199 2 2 2 2 2 5 -#> 200 2 2 2 2 2 5
    -combined_adl <- merge_rec_data(adl2001, adl2009_2010) - -head(combined_adl)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5 -#> 1 2 2 2 2 2 5 -#> 2 2 1 1 2 2 3 -#> 3 2 2 2 2 2 5 -#> 4 2 2 2 2 2 5 -#> 5 2 2 2 2 2 5 -#> 6 2 1 1 2 2 3
    -tail(combined_adl)
    #> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5 -#> 395 2 2 2 2 2 5 -#> 396 2 2 2 2 2 5 -#> 397 2 2 2 2 2 5 -#> 398 2 2 2 2 2 5 -#> 399 2 2 2 2 2 5 -#> 400 2 2 2 2 2 5
    -# Using adl_score_5_fun() to generate to ADL_score_5 based on user inputted -# values. -# Let's say you do not need help preparing meals, you need help getting to -# appointments or errands, you need help doing housework, do not need help -# doing personal care, and do not need help moving inside the house. Using -# adl_score_5_fun() we can check the number of tasks you need help with - -ADL_score_5 <- adl_score_5_fun(2, 1, 1, 2, 2) - -print(ADL_score_5)
    #> [1] 3
    -
    +
    # Use adl_score_5_fun() to create the variable ADL_score_5 across CCHS 
    +# cycles adl_score_5_fun() is specified in variable_details.csv along with 
    +# the CCHS variables and cycles included.
    +
    +# To transform ADL_score_5, use rec_with_table() for each CCHS cycle
    +# and specify ADL_score_5, along with the various ADL variables.
    +# Then by using merge_rec_data() you can combine ADL_der across cycles.
    +
    +library(cchsflow)
    +adl2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_score_5"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
    +
    +head(adl2001)
    +#>   ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5
    +#> 1      2      2      2      2      2           5
    +#> 2      2      1      1      2      2           3
    +#> 3      2      2      2      2      2           5
    +#> 4      2      2      2      2      2           5
    +#> 5      2      2      2      2      2           5
    +#> 6      2      1      1      2      2           3
    +
    +adl2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_score_5"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
    +
    +tail(adl2009_2010)
    +#>     ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5
    +#> 195      2      2      2      2      2           5
    +#> 196      2      2      2      2      2           5
    +#> 197      2      2      2      2      2           5
    +#> 198      2      2      2      2      2           5
    +#> 199      2      2      2      2      2           5
    +#> 200      2      2      2      2      2           5
    +
    +combined_adl <- merge_rec_data(adl2001, adl2009_2010)
    +
    +head(combined_adl)
    +#>   ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5
    +#> 1      2      2      2      2      2           5
    +#> 2      2      1      1      2      2           3
    +#> 3      2      2      2      2      2           5
    +#> 4      2      2      2      2      2           5
    +#> 5      2      2      2      2      2           5
    +#> 6      2      1      1      2      2           3
    +
    +tail(combined_adl)
    +#>     ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_score_5
    +#> 395      2      2      2      2      2           5
    +#> 396      2      2      2      2      2           5
    +#> 397      2      2      2      2      2           5
    +#> 398      2      2      2      2      2           5
    +#> 399      2      2      2      2      2           5
    +#> 400      2      2      2      2      2           5
    +
    +# Using adl_score_5_fun() to generate to ADL_score_5 based on user inputted
    +# values.
    +# Let's say you do not need help preparing meals, you need help getting to
    +# appointments or errands, you need help doing housework, do not need help
    +# doing personal care, and do not need help moving inside the house. Using
    +# adl_score_5_fun() we can check the number of tasks you need help with
    +
    +ADL_score_5 <- adl_score_5_fun(2, 1, 1, 2, 2)
    +
    +print(ADL_score_5)
    +#> [1] 3
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/age_cat_fun.html b/docs/reference/age_cat_fun.html index 9d5a6d14..bd54c03b 100644 --- a/docs/reference/age_cat_fun.html +++ b/docs/reference/age_cat_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -73,8 +77,7 @@ 80 years or more " /> - - + @@ -92,7 +95,7 @@ - +
    @@ -114,7 +117,7 @@
    -
    age_cat_fun(DHHGAGE_cont)
    +
    age_cat_fun(DHHGAGE_cont)

    Arguments

    @@ -236,43 +239,41 @@

    Details categories used in CCHS cycles from 2007 to 2014.

    Examples

    -
    # Using age_cat_fun() to create categorical age values from DHHGAGE_cont -# age_cat_fun() is specified in variable_details.csv along with the CCHS -# variables and cycles included. - -# To generate DHHGAGE_C in a cycle, use rec_with_table() and specify -# DHHGAGE_C along with DHHGAGE_cont. - -library(cchsflow) - -cat_age2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "DHHGAGE_cont", "DHHGAGE_C" - ) - )
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -
    +
    # Using age_cat_fun() to create categorical age values from DHHGAGE_cont
    +# age_cat_fun() is specified in variable_details.csv along with the CCHS
    +# variables and cycles included.
    +
    +# To generate DHHGAGE_C in a cycle, use rec_with_table() and specify
    +# DHHGAGE_C along with DHHGAGE_cont.
    +
    +library(cchsflow)
    +
    +cat_age2009_2010 <- rec_with_table(
    +   cchs2009_2010_p,  c(
    +     "DHHGAGE_cont", "DHHGAGE_C"
    +     )
    +   )
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/binge_drinker_fun.html b/docs/reference/binge_drinker_fun.html index a8a61238..5976169c 100644 --- a/docs/reference/binge_drinker_fun.html +++ b/docs/reference/binge_drinker_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    binge_drinker_fun(
    -  DHH_SEX,
    -  ALW_1,
    -  ALW_2A1,
    -  ALW_2A2,
    -  ALW_2A3,
    -  ALW_2A4,
    -  ALW_2A5,
    -  ALW_2A6,
    -  ALW_2A7
    -)
    +
    binge_drinker_fun(
    +  DHH_SEX,
    +  ALW_1,
    +  ALW_2A1,
    +  ALW_2A2,
    +  ALW_2A3,
    +  ALW_2A4,
    +  ALW_2A5,
    +  ALW_2A6,
    +  ALW_2A7
    +)

    Arguments

    @@ -241,124 +244,135 @@

    Details day of the last week.

    Examples

    -
    -# Using binge_drinker_fun() to create binge_drinker values across CCHS cycles -# binge_drinker_fun() is specified in variable_details.csv along with the -# CCHS variables and cycles included. - -# To transform binge_drinker, use rec_with_table() for each CCHS cycle -# and specify binge_drinker, along with the various alcohol and sex -# variables. Then by using bind_rows() you can combine binge_drinker -# across cycles. - -library(cchsflow) -binge2001 <- rec_with_table( - cchs2001_p, c( - "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", - "ALW_2A5", "ALW_2A6", "ALW_2A7", "binge_drinker" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(binge2001)
    #> ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX -#> 1 1 NA NA 1 NA 1 NA NA 2 -#> 2 NA(a) NA NA NA NA NA NA NA 2 -#> 3 1 NA NA NA 1 6 NA 1 1 -#> 4 2 NA NA NA NA NA NA NA 2 -#> 5 1 NA NA NA NA NA 8 NA 2 -#> 6 2 NA NA NA NA NA NA NA 1 -#> binge_drinker -#> 1 NA(b) -#> 2 NA(a) -#> 3 1 -#> 4 NA(a) -#> 5 1 -#> 6 NA(a)
    -binge2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", - "ALW_2A5", "ALW_2A6", "ALW_2A7", "binge_drinker" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(binge2009_2010)
    #> ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX -#> 195 NA(a) NA NA NA NA NA NA NA 2 -#> 196 2 NA NA NA NA NA NA NA 2 -#> 197 NA(a) NA NA NA NA NA NA NA 2 -#> 198 NA(a) NA NA NA NA NA NA NA 1 -#> 199 NA(a) NA NA NA NA NA NA NA 2 -#> 200 2 NA NA NA NA NA NA NA 2 -#> binge_drinker -#> 195 NA(a) -#> 196 NA(a) -#> 197 NA(a) -#> 198 NA(a) -#> 199 NA(a) -#> 200 NA(a)
    -combined_binge <- bind_rows(binge2001, binge2009_2010) - -head(combined_binge)
    #> ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX -#> 1 1 NA NA 1 NA 1 NA NA 2 -#> 2 NA(a) NA NA NA NA NA NA NA 2 -#> 3 1 NA NA NA 1 6 NA 1 1 -#> 4 2 NA NA NA NA NA NA NA 2 -#> 5 1 NA NA NA NA NA 8 NA 2 -#> 6 2 NA NA NA NA NA NA NA 1 -#> binge_drinker -#> 1 NA(b) -#> 2 NA(a) -#> 3 1 -#> 4 NA(a) -#> 5 1 -#> 6 NA(a)
    -tail(combined_binge)
    #> ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX -#> 395 NA(a) NA NA NA NA NA NA NA 2 -#> 396 2 NA NA NA NA NA NA NA 2 -#> 397 NA(a) NA NA NA NA NA NA NA 2 -#> 398 NA(a) NA NA NA NA NA NA NA 1 -#> 399 NA(a) NA NA NA NA NA NA NA 2 -#> 400 2 NA NA NA NA NA NA NA 2 -#> binge_drinker -#> 395 NA(a) -#> 396 NA(a) -#> 397 NA(a) -#> 398 NA(a) -#> 399 NA(a) -#> 400 NA(a)
    -# Using binge_drinker_fun() to generate binge_drinker with user-inputted -# values. -# -# Let's say you are a male, and you had drinks in the last week. Let's say -# you had 3 drinks on Sunday, 1 drink on -# Monday, 6 drinks on Tuesday, 0 drinks on Wednesday, 3 drinks on Thurday, -# 8 drinks on Friday, and 2 drinks on Saturday. Using binge_drinker_fun(), -# we can check if you would be classified as a drinker. - -binge <- binge_drinker_fun(DHH_SEX = 1, ALW_1 = 1, ALW_2A1 = 3, ALW_2A2 = 1, - ALW_2A3 = 6, ALW_2A4 = 0, ALW_2A5 = 3, - ALW_2A6 = 8, ALW_2A7 = 2) - -print(binge)
    #> [1] 1
    +
     
    +# Using binge_drinker_fun() to create binge_drinker values across CCHS cycles
    +# binge_drinker_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform binge_drinker, use rec_with_table() for each CCHS cycle
    +# and specify binge_drinker, along with the various alcohol and sex
    +# variables. Then by using bind_rows() you can combine binge_drinker
    +# across cycles.
    +
    +library(cchsflow)
    +binge2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "binge_drinker"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +head(binge2001)
    +#>   ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX
    +#> 1     1       0       0       1       0       1       0       0       2
    +#> 2 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 3     1       0       0       0       1       6       0       1       1
    +#> 4     2      NA      NA      NA      NA      NA      NA      NA       2
    +#> 5     1       0       0       0       0       0       8       0       2
    +#> 6     2      NA      NA      NA      NA      NA      NA      NA       1
    +#>   binge_drinker
    +#> 1             2
    +#> 2         NA(a)
    +#> 3             1
    +#> 4         NA(a)
    +#> 5             1
    +#> 6         NA(a)
    +
    +binge2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "binge_drinker"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(binge2009_2010)
    +#>     ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX
    +#> 195 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 196     2      NA      NA      NA      NA      NA      NA      NA       2
    +#> 197 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 198 NA(a)      NA      NA      NA      NA      NA      NA      NA       1
    +#> 199 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 200     2      NA      NA      NA      NA      NA      NA      NA       2
    +#>     binge_drinker
    +#> 195         NA(a)
    +#> 196         NA(a)
    +#> 197         NA(a)
    +#> 198         NA(a)
    +#> 199         NA(a)
    +#> 200         NA(a)
    +
    +combined_binge <- bind_rows(binge2001, binge2009_2010)
    +
    +head(combined_binge)
    +#>   ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX
    +#> 1     1       0       0       1       0       1       0       0       2
    +#> 2 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 3     1       0       0       0       1       6       0       1       1
    +#> 4     2      NA      NA      NA      NA      NA      NA      NA       2
    +#> 5     1       0       0       0       0       0       8       0       2
    +#> 6     2      NA      NA      NA      NA      NA      NA      NA       1
    +#>   binge_drinker
    +#> 1             2
    +#> 2         NA(a)
    +#> 3             1
    +#> 4         NA(a)
    +#> 5             1
    +#> 6         NA(a)
    +
    +tail(combined_binge)
    +#>     ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 DHH_SEX
    +#> 395 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 396     2      NA      NA      NA      NA      NA      NA      NA       2
    +#> 397 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 398 NA(a)      NA      NA      NA      NA      NA      NA      NA       1
    +#> 399 NA(a)      NA      NA      NA      NA      NA      NA      NA       2
    +#> 400     2      NA      NA      NA      NA      NA      NA      NA       2
    +#>     binge_drinker
    +#> 395         NA(a)
    +#> 396         NA(a)
    +#> 397         NA(a)
    +#> 398         NA(a)
    +#> 399         NA(a)
    +#> 400         NA(a)
    +
    +# Using binge_drinker_fun() to generate binge_drinker with user-inputted
    +# values.
    +#
    +# Let's say you are a male, and you had drinks in the last week. Let's say
    +# you had 3 drinks on Sunday, 1 drink on
    +# Monday, 6 drinks on Tuesday, 0 drinks on Wednesday, 3 drinks on Thurday,
    +# 8 drinks on Friday, and 2 drinks on Saturday. Using binge_drinker_fun(),
    +# we can check if you would be classified as a drinker.
    +
    +binge <- binge_drinker_fun(DHH_SEX = 1, ALW_1 = 1, ALW_2A1 = 3, ALW_2A2 = 1,
    +                          ALW_2A3 = 6, ALW_2A4 = 0, ALW_2A5 = 3,
    +                          ALW_2A6 = 8, ALW_2A7 = 2)
    +
    +print(binge)
    +#> [1] 1
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/bmi_fun.html b/docs/reference/bmi_fun.html index 0e6a23d2..41a46b21 100644 --- a/docs/reference/bmi_fun.html +++ b/docs/reference/bmi_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -62,8 +66,7 @@ 0-260kg for weight) were excluded from HWTGBMI. bmi_fun() creates a derived variable (HWTGBMI_der) that is harmonized across all CCHS cycles. This function divides weight by the square of height." /> - - + @@ -81,7 +84,7 @@ - +
    @@ -103,7 +106,7 @@
    -
    bmi_fun(HWTGHTM, HWTGWTK)
    +
    bmi_fun(HWTGHTM, HWTGWTK)

    Arguments

    @@ -230,88 +233,101 @@

    Note

    transformations were required in the harmonization process.

    Examples

    -
    # Using bmi_fun() to create BMI values between cycles -# bmi_fun() is specified in variable_details.csv along with the -# CCHS variables and cycles included. - -# To transform the derived BMI variable, use rec_with_table() for each cycle -# and specify HWTGBMI_der, along with height (HWTGHTM) and weight (HWTGWTK). -# Then by using merge_rec_data(), you can combined HWTGBMI_der across -# cycles. - -library(cchsflow) -bmi2001 <- rec_with_table( - cchs2001_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    #> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    -head(bmi2001)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 1 1.422 56.25 27.81784 -#> 2 1.549 51.75 21.56788 -#> 3 1.803 78.75 24.22474 -#> 4 1.575 60.75 24.48980 -#> 5 1.727 63.00 21.12301 -#> 6 1.829 91.80 27.44197
    -bmi2011_2012 <- rec_with_table( - cchs2011_2012_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    -tail(bmi2011_2012)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 195 1.600 64.35 25.13672 -#> 196 1.880 80.10 22.66297 -#> 197 1.753 78.75 25.62635 -#> 198 1.651 83.70 30.70657 -#> 199 1.930 74.25 19.93342 -#> 200 1.575 76.50 30.83900
    -combined_bmi <- merge_rec_data(bmi2001, bmi2011_2012) -head(combined_bmi)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 1 1.422 56.25 27.81784 -#> 2 1.549 51.75 21.56788 -#> 3 1.803 78.75 24.22474 -#> 4 1.575 60.75 24.48980 -#> 5 1.727 63.00 21.12301 -#> 6 1.829 91.80 27.44197
    tail(combined_bmi)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 395 1.600 64.35 25.13672 -#> 396 1.880 80.10 22.66297 -#> 397 1.753 78.75 25.62635 -#> 398 1.651 83.70 30.70657 -#> 399 1.930 74.25 19.93342 -#> 400 1.575 76.50 30.83900
    -# Using bmi_fun() to generate a BMI value with user inputted height and -# weight values. bmi_fun() can also generate a value for BMI if you input a -# value for height and weight. Let's say your height is 170cm (1.7m) and -# your weight is 50kg, your BMI can be calculated as follows: - -library(cchsflow) -BMI <- bmi_fun(HWTGHTM = 1.7, HWTGWTK = 50) -print(BMI)
    #> [1] 17.30104
    +
    # Using bmi_fun() to create BMI values between cycles
    +# bmi_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform the derived BMI variable, use rec_with_table() for each cycle
    +# and specify HWTGBMI_der, along with height (HWTGHTM) and weight (HWTGWTK).
    +# Then by using merge_rec_data(), you can combined HWTGBMI_der across
    +# cycles.
    +
    +library(cchsflow)
    +bmi2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    +#> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    +
    +head(bmi2001)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der
    +#> 1   1.422   56.25    27.81784
    +#> 2   1.549   51.75    21.56788
    +#> 3   1.803   78.75    24.22474
    +#> 4   1.575   60.75    24.48980
    +#> 5   1.727   63.00    21.12301
    +#> 6   1.829   91.80    27.44197
    +
    +bmi2011_2012 <- rec_with_table(
    +  cchs2011_2012_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    +
    +tail(bmi2011_2012)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der
    +#> 195   1.600   64.35    25.13672
    +#> 196   1.880   80.10    22.66297
    +#> 197   1.753   78.75    25.62635
    +#> 198   1.651   83.70    30.70657
    +#> 199   1.930   74.25    19.93342
    +#> 200   1.575   76.50    30.83900
    +
    +combined_bmi <- merge_rec_data(bmi2001, bmi2011_2012)
    +head(combined_bmi)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der
    +#> 1   1.422   56.25    27.81784
    +#> 2   1.549   51.75    21.56788
    +#> 3   1.803   78.75    24.22474
    +#> 4   1.575   60.75    24.48980
    +#> 5   1.727   63.00    21.12301
    +#> 6   1.829   91.80    27.44197
    +tail(combined_bmi)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der
    +#> 395   1.600   64.35    25.13672
    +#> 396   1.880   80.10    22.66297
    +#> 397   1.753   78.75    25.62635
    +#> 398   1.651   83.70    30.70657
    +#> 399   1.930   74.25    19.93342
    +#> 400   1.575   76.50    30.83900
    +
    +# Using bmi_fun() to generate a BMI value with user inputted height and
    +# weight values. bmi_fun() can also generate a value for BMI if you input a
    +# value for height and weight. Let's say your height is 170cm (1.7m) and
    +# your weight is 50kg, your BMI can be calculated as follows:
    +
    +library(cchsflow)
    +BMI <- bmi_fun(HWTGHTM = 1.7, HWTGWTK = 50)
    +print(BMI)
    +#> [1] 17.30104
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/bmi_fun_cat.html b/docs/reference/bmi_fun_cat.html new file mode 100644 index 00000000..97155455 --- /dev/null +++ b/docs/reference/bmi_fun_cat.html @@ -0,0 +1,323 @@ + + + + + + + + +Categorical BMI (international standard) — bmi_fun_cat • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical derived variable +(HWTGBMI_der_cat4) that categorizes derived BMI (HWTGBMI_der).

    +
    + +
    bmi_fun_cat(HWTGBMI_der)
    + +

    Arguments

    +
    + + + + + +
    HWTGBMI_der

    derived variable that calculates numeric value for BMI. +See bmi_fun for documentation on how variable +was derived.

    + +

    Value

    + +

    value for BMI categories in the HWTGBMI_der_cat4 variable.

    +

    Details

    + +

    The categories were based on international standards and are divided +into four categories: underweight for BMI < 18.5 (1), normal weight for BMI +between 18.5 to 25 (2), overweight for BMI between 25 to 30 (3), and obese +for BMI over 30 (4).

    +

    HWTGBMI_der_cat4 uses the derived variable HWTGBMI_der. HWTGBMI_der uses +height and weight that have been transformed by cchsflow. In order to +categorize BMI across CCHS cycles, height and weight variables must be +transformed and harmonized.

    + +

    Examples

    +
     
    +# Using bmi_fun_cat() to categorize BMI across CCHS cycles
    +# bmi_fun_cat() is specified in variable_details.csv along with the 
    +# CCHS variables and cycles included.
    +
    +# To transform HWTGBMI_der_cat4 across all cycles, use rec_with_table() for 
    +# each CCHS cycle.
    +# Since HWTGBMI_der is also a derived variable, you will have to specify 
    +# the variables that are derived from it.
    +
    +library(cchsflow)
    +
    +bmi_cat_2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK",
    +    "HWTGBMI_der",
    +    "HWTGBMI_der_cat4"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    +
    +head(bmi_cat_2009_2010)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der HWTGBMI_der_cat4
    +#> 1   1.778   54.45    17.22401                1
    +#> 2   1.702   56.00    19.33165                2
    +#> 3   1.626   90.00    34.04093                4
    +#> 4      NA      NA          NA            NA(b)
    +#> 5   1.880   99.00    28.01041                3
    +#> 6   1.575   72.00    29.02494                3
    +
    +bmi_cat_2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "HWTGHTM",
    +    "HWTGWTK",
    +    "HWTGBMI_der",
    +    "HWTGBMI_der_cat4"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    +
    +tail(bmi_cat_2011_2012)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der HWTGBMI_der_cat4
    +#> 195   1.600   64.35    25.13672                3
    +#> 196   1.880   80.10    22.66297                2
    +#> 197   1.753   78.75    25.62635                3
    +#> 198   1.651   83.70    30.70657                4
    +#> 199   1.930   74.25    19.93342                2
    +#> 200   1.575   76.50    30.83900                4
    +
    +combined_bmi_cat <- suppressWarnings(merge_rec_data
    +(bmi_cat_2009_2010,bmi_cat_2011_2012))
    +
    +head(combined_bmi_cat)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der HWTGBMI_der_cat4
    +#> 1   1.778   54.45    17.22401                1
    +#> 2   1.702   56.00    19.33165                2
    +#> 3   1.626   90.00    34.04093                4
    +#> 4      NA      NA          NA            NA(b)
    +#> 5   1.880   99.00    28.01041                3
    +#> 6   1.575   72.00    29.02494                3
    +tail(combined_bmi_cat)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der HWTGBMI_der_cat4
    +#> 395   1.600   64.35    25.13672                3
    +#> 396   1.880   80.10    22.66297                2
    +#> 397   1.753   78.75    25.62635                3
    +#> 398   1.651   83.70    30.70657                4
    +#> 399   1.930   74.25    19.93342                2
    +#> 400   1.575   76.50    30.83900                4
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/cchs2001_p.html b/docs/reference/cchs2001_p.html index c3982317..cbd9e87f 100644 --- a/docs/reference/cchs2001_p.html +++ b/docs/reference/cchs2001_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2003_p.html b/docs/reference/cchs2003_p.html index 3651283e..b058c067 100644 --- a/docs/reference/cchs2003_p.html +++ b/docs/reference/cchs2003_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2005_p.html b/docs/reference/cchs2005_p.html index 61006394..bf51d6e2 100644 --- a/docs/reference/cchs2005_p.html +++ b/docs/reference/cchs2005_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2007_2008_p.html b/docs/reference/cchs2007_2008_p.html index 95a6572e..f5a0b12c 100644 --- a/docs/reference/cchs2007_2008_p.html +++ b/docs/reference/cchs2007_2008_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2009_2010_p.html b/docs/reference/cchs2009_2010_p.html index 962eaa7f..2d05b323 100644 --- a/docs/reference/cchs2009_2010_p.html +++ b/docs/reference/cchs2009_2010_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2010_p.html b/docs/reference/cchs2010_p.html index c5f1e02b..647fa978 100644 --- a/docs/reference/cchs2010_p.html +++ b/docs/reference/cchs2010_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2011_2012_p.html b/docs/reference/cchs2011_2012_p.html index 68789a6a..ed2cc860 100644 --- a/docs/reference/cchs2011_2012_p.html +++ b/docs/reference/cchs2011_2012_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2012_p.html b/docs/reference/cchs2012_p.html index 2fbcfc31..85466c7b 100644 --- a/docs/reference/cchs2012_p.html +++ b/docs/reference/cchs2012_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2013_2014_p.html b/docs/reference/cchs2013_2014_p.html index f0289e00..b400c4ca 100644 --- a/docs/reference/cchs2013_2014_p.html +++ b/docs/reference/cchs2013_2014_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2014_p.html b/docs/reference/cchs2014_p.html index 0d63a4ad..f82fc16b 100644 --- a/docs/reference/cchs2014_p.html +++ b/docs/reference/cchs2014_p.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/cchs2015_2016_p.html b/docs/reference/cchs2015_2016_p.html new file mode 100644 index 00000000..b7db6ac2 --- /dev/null +++ b/docs/reference/cchs2015_2016_p.html @@ -0,0 +1,350 @@ + + + + + + + + +2015-2016 CCHS PUMF subset data (200 respondents) — cchs2015_2016_p • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This is a subset of 200 observations from the 2015-2016 cycle of the Canadian +Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +The CCHS survey is conducted by Statistics Canada.

    +
    + + + +

    Source

    + +

    https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=238854

    +

    Value

    + + + +
    cchs2015_2016_p

    a data frame

    + +

    Details

    + +

    NOTE: this subset of respondents may also be in the 2015-2016 PUMF +subset. Please see the "CCHS datasets that overlap each other" article to see +how the two datasets contain overlap.

    +

    See here for the open +license. Source from Statistics Canada, Canadian Community Health Survey +PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +the permission of Statistics Canada.

    +

    Long name: cchs-82M0013-E-2015-2016-Annual-component

    +

    DDI: https://osf.io/m948q/

    +

    Additional documentation (PDFs): https://osf.io/hkuy3/

    + +

    Examples

    +
    data(cchs2015_2016_p)
    +str(cchs2015_2016_p)
    +#> 'data.frame':	200 obs. of  1283 variables:
    +#>  $ ADM_RNO : int  30 37 42 49 59 86 114 128 147 155 ...
    +#>  $ VERDATE : int  20170424 20170424 20170424 20170424 20170424 20170424 20170424 20170424 20170424 20170424 ...
    +#>  $ GEO_PRV : int  24 59 35 35 35 10 46 24 24 59 ...
    +#>  $ GEODVBHA: int  9996 5930 9996 9996 9996 9996 9996 9996 9996 5940 ...
    +#>  $ GEODGHR4: int  24901 59932 35937 35937 35960 10912 46901 24912 24914 59942 ...
    +#>  $ ALECLASS: int  2 4 2 3 2 1 3 2 1 2 ...
    +#>  $ DHH_SEX : int  1 2 2 2 2 2 2 2 2 1 ...
    +#>  $ DHHGMS  : int  4 1 4 1 4 3 4 4 4 3 ...
    +#>  $ DHHDG611: int  0 0 0 0 0 0 0 1 0 0 ...
    +#>  $ DHHDGL12: int  0 1 0 0 0 0 0 1 0 0 ...
    +#>  $ DHHDGLE5: int  0 1 0 0 0 0 0 0 0 0 ...
    +#>  $ DHHDGHSZ: int  1 4 3 4 1 1 1 3 3 1 ...
    +#>  $ ADM_PRX : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ DHHDGLVG: int  1 4 6 8 1 1 1 5 7 1 ...
    +#>  $ DHHGAGE : int  12 8 2 11 9 12 7 8 4 14 ...
    +#>  $ DOMAC   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ MAC_005 : int  9 1 99 11 3 12 1 1 1 7 ...
    +#>  $ MAC_010 : int  2 1 1 2 1 1 1 1 1 2 ...
    +#>  $ MAC_015 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ MACG020 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ EHG2DVR3: int  2 3 1 3 3 2 3 3 3 2 ...
    +#>  $ EHG2DVH3: int  2 3 3 3 3 2 3 3 3 2 ...
    +#>  $ DOGEN   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ GEN_005 : int  3 2 2 4 1 3 3 2 2 2 ...
    +#>  $ GEN_010 : int  10 7 9 5 8 8 8 8 8 8 ...
    +#>  $ GEN_015 : int  3 3 1 1 1 1 1 2 3 1 ...
    +#>  $ GEN_020 : int  3 4 3 5 2 3 3 3 3 1 ...
    +#>  $ GEN_025 : int  9 4 9 9 5 3 3 2 2 9 ...
    +#>  $ GEN_030 : int  1 3 1 2 2 4 2 2 1 2 ...
    +#>  $ GENDVHDI: int  2 3 3 1 4 2 2 3 3 3 ...
    +#>  $ GENDVMHI: int  2 2 4 4 4 4 4 3 2 4 ...
    +#>  $ GENDVSWL: int  1 2 1 3 2 2 2 2 2 2 ...
    +#>  $ DOHWT   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ HWT_050 : int  3 3 3 1 1 9 1 3 3 1 ...
    +#>  $ HWTDGHTM: num  1.91 1.63 1.73 1.65 1.65 ...
    +#>  $ HWTDGWTK: num  69.8 60.8 65.2 81 85.5 ...
    +#>  $ HWTDGBMI: num  19.2 23 21.9 29.7 31.4 ...
    +#>  $ HWTDVCOL: int  6 6 2 6 6 6 6 6 6 6 ...
    +#>  $ HWTDGISW: int  2 2 6 3 4 9 3 2 2 3 ...
    +#>  $ HWTDVWHO: int  6 6 2 6 6 6 6 6 6 6 ...
    +#>  $ HWTDGCOR: num  19.6 24 1000 31.1 32.9 ...
    +#>  $ HWTDGBCC: int  2 2 6 4 4 9 3 2 2 3 ...
    +#>  $ DOCCC   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ CCC_005 : int  1 1 2 1 2 2 2 2 1 1 ...
    +#>  $ CCC_010 : int  1 2 6 1 6 6 6 6 2 7 ...
    +#>  $ CCC_015 : int  2 2 2 2 1 2 2 2 2 2 ...
    +#>  $ CCC_020 : int  6 6 6 6 1 6 6 6 6 6 ...
    +#>  $ CCC_025 : int  6 6 6 6 1 6 6 6 6 6 ...
    +#>  $ CCC_030 : int  2 2 6 2 2 2 2 2 6 2 ...
    +#>  $ CCC_035 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_040 : int  1 1 2 2 2 2 2 2 1 2 ...
    +#>  $ CCC_045 : int  2 2 2 1 2 2 2 2 2 2 ...
    +#>  $ CCC_050 : int  1 1 2 1 2 2 2 2 2 2 ...
    +#>  $ CCC_055 : int  1 2 2 2 2 1 2 2 2 2 ...
    +#>  $ CCC_060 : int  1 1 6 2 2 2 6 2 6 2 ...
    +#>  $ CCC_065 : int  1 2 2 2 2 1 2 2 2 1 ...
    +#>  $ CCC_070 : int  2 2 2 2 2 1 2 2 2 1 ...
    +#>  $ CCC_075 : int  1 2 6 2 2 1 2 2 2 7 ...
    +#>  $ CCC_080 : int  1 2 6 2 2 1 2 2 2 1 ...
    +#>  $ CCC_085 : int  2 2 2 2 2 1 2 2 2 1 ...
    +#>  $ CCC_090 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_095 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCCG100 : int  96 96 96 96 96 96 96 96 96 96 ...
    +#>  $ CCC_105 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_110 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_115 : int  96 96 96 96 96 96 96 96 96 96 ...
    +#>  $ CCC_120 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_125 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_130 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_135 : int  1 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_140 : int  2 2 1 2 2 2 2 2 1 2 ...
    +#>  $ CCC_190 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_195 : int  2 2 2 2 2 2 2 2 1 2 ...
    +#>  $ CCC_200 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCCDVDIA: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ DOHUI   : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ HUIDGVIS: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDGHER: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDGSPE: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDGMOB: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDGDEX: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDVEMO: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDVCOG: int  96 96 96 96 96 96 96 96 96 96 ...
    +#>  $ HUIDVPAD: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HUIDVHSI: num  100 100 100 100 100 ...
    +#>  $ DOADL   : int  2 2 2 2 2 1 2 2 2 2 ...
    +#>  $ ADL_005 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADL_010 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADL_015 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADL_020 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADL_025 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADL_030 : int  6 6 6 6 6 1 6 6 6 6 ...
    +#>  $ ADLDVIHS: int  96 96 96 96 96 0 96 96 96 96 ...
    +#>  $ ADLDVIPC: int  96 96 96 96 96 0 96 96 96 96 ...
    +#>  $ DOINJ   : int  2 1 2 2 2 2 2 2 2 1 ...
    +#>  $ INJ_005 : int  6 2 6 6 6 6 6 6 6 1 ...
    +#>  $ INJ_010 : int  6 6 6 6 6 6 6 6 6 1 ...
    +#>  $ INJG015 : int  96 96 96 96 96 96 96 96 96 5 ...
    +#>  $ INJ_020A: int  6 6 6 6 6 6 6 6 6 2 ...
    +#>   [list output truncated]
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/cchs2017_2018_p.html b/docs/reference/cchs2017_2018_p.html new file mode 100644 index 00000000..18061454 --- /dev/null +++ b/docs/reference/cchs2017_2018_p.html @@ -0,0 +1,350 @@ + + + + + + + + +2017-2018 CCHS PUMF subset data (200 respondents) — cchs2017_2018_p • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This is a subset of 200 observations from the 2017-2018 cycle of the Canadian +Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +The CCHS survey is conducted by Statistics Canada.

    +
    + + + +

    Source

    + +

    https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=329241

    +

    Value

    + + + +
    cchs2017_2018_p

    a data frame

    + +

    Details

    + +

    NOTE: this subset of respondents may also be in the 2017-2018 PUMF +subset. Please see the "CCHS datasets that overlap each other" article to see +how the two datasets contain overlap.

    +

    See here for the open +license. Source from Statistics Canada, Canadian Community Health Survey +PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +the permission of Statistics Canada.

    +

    Long name: cchs-82M0013-E-2017-2018-Annual-component

    +

    DDI: https://osf.io/q8g7y/

    +

    Additional documentation (PDFs): https://osf.io/hkuy3/

    + +

    Examples

    +
    data(cchs2017_2018_p)
    +str(cchs2017_2018_p)
    +#> 'data.frame':	200 obs. of  1051 variables:
    +#>  $ ADM_RNO : int  21 29 39 54 63 71 72 125 127 133 ...
    +#>  $ VERDATE : int  20190913 20190913 20190913 20190913 20190913 20190913 20190913 20190913 20190913 20190913 ...
    +#>  $ GEO_PRV : int  46 48 13 59 35 24 46 24 35 35 ...
    +#>  $ GEODGHR4: int  46903 48931 13904 59931 35944 24916 46902 24903 35947 35953 ...
    +#>  $ GEODVBHA: int  9996 9996 9996 5930 9996 9996 9996 9996 9996 9996 ...
    +#>  $ DHH_SEX : int  2 1 2 2 2 2 1 2 2 2 ...
    +#>  $ DHHGMS  : int  3 3 1 3 1 2 2 2 2 1 ...
    +#>  $ DHHDGHSZ: int  1 1 4 1 5 3 4 4 4 3 ...
    +#>  $ DHHDGLVG: int  1 1 8 1 4 4 8 4 4 4 ...
    +#>  $ DHHDG611: int  0 0 0 0 0 0 0 0 0 0 ...
    +#>  $ DHHDGL12: int  0 0 0 0 0 1 0 0 1 0 ...
    +#>  $ DHHDGLE5: int  0 0 0 0 0 1 0 0 1 0 ...
    +#>  $ ADM_PRX : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ DHHGAGE : int  16 14 9 10 9 6 14 9 6 10 ...
    +#>  $ DOMAC   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ MACG005 : int  4 4 1 1 1 6 1 1 6 1 ...
    +#>  $ MAC_010 : int  6 2 1 1 1 2 1 1 1 1 ...
    +#>  $ MAC_015 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ MACG020 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ EHG2DVR3: int  3 1 3 3 3 3 3 3 3 3 ...
    +#>  $ EHG2DVH3: int  3 1 3 3 3 3 3 3 3 3 ...
    +#>  $ DOGEN   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ GEN_005 : int  2 5 2 2 1 1 4 2 2 2 ...
    +#>  $ GEN_010 : int  10 10 8 10 10 9 8 8 8 6 ...
    +#>  $ GEN_015 : int  2 3 3 2 1 1 3 2 2 3 ...
    +#>  $ GEN_020 : int  3 1 4 1 3 1 3 2 3 3 ...
    +#>  $ GEN_025 : int  6 6 5 2 3 6 3 3 4 3 ...
    +#>  $ GEN_030 : int  2 4 1 3 2 2 2 3 2 3 ...
    +#>  $ GENDVHDI: int  3 0 3 3 4 4 1 3 3 3 ...
    +#>  $ GENDVMHI: int  3 2 2 3 4 4 2 3 3 2 ...
    +#>  $ GENDVSWL: int  1 1 2 1 1 1 2 2 2 2 ...
    +#>  $ DOHWT   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ HWT_050 : int  1 1 3 1 3 3 3 3 3 1 ...
    +#>  $ HWTDGHTM: num  1.65 1.73 1.6 1.68 1.75 ...
    +#>  $ HWTDGWTK: num  74.2 108 60.8 81 63 ...
    +#>  $ HWTDGBMI: num  27.2 36.2 23.7 28.8 20.5 ...
    +#>  $ HWTDVCOL: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HWTDGISW: int  3 4 2 3 2 2 3 2 2 2 ...
    +#>  $ HWTDVWHO: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ HWTDGCOR: num  28.5 37.9 24.8 30.2 21.4 ...
    +#>  $ HWTDGBCC: int  3 4 2 4 2 2 3 2 2 2 ...
    +#>  $ DOCCC   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ CCC_005 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_010 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_015 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_020 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_025 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_030 : int  2 1 2 2 2 6 2 2 6 2 ...
    +#>  $ CCC_035 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_040 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_045 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_050 : int  2 2 1 1 2 2 2 2 2 2 ...
    +#>  $ CCC_055 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_060 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_065 : int  1 1 2 1 2 2 1 2 2 2 ...
    +#>  $ CCC_070 : int  1 1 2 1 2 2 1 2 2 2 ...
    +#>  $ CCC_075 : int  2 2 2 1 2 2 1 2 2 2 ...
    +#>  $ CCC_080 : int  2 7 2 1 2 2 1 2 2 2 ...
    +#>  $ CCC_085 : int  2 1 2 2 2 2 1 2 2 2 ...
    +#>  $ CCC_090 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_095 : int  2 1 2 2 2 2 2 2 2 2 ...
    +#>  $ CCCG100 : int  96 13 96 96 96 96 96 96 96 96 ...
    +#>  $ CCC_105 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_110 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_115 : int  96 6 96 96 96 96 96 96 96 96 ...
    +#>  $ CCC_120 : int  6 2 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_125 : int  6 1 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_130 : int  2 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_135 : int  2 1 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_140 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_170 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175A: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175B: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175C: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175D: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175E: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175F: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175G: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_175H: int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_180 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_185 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_190 : int  6 6 6 6 6 6 6 6 6 6 ...
    +#>  $ CCC_195 : int  1 2 2 2 2 2 2 2 2 2 ...
    +#>  $ CCC_200 : int  2 2 1 2 2 2 2 2 2 2 ...
    +#>  $ CCCDVDIA: int  6 2 6 6 6 6 6 6 6 6 ...
    +#>  $ DOWDM   : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ WDM_005 : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ WDM_010 : int  2 1 1 1 1 1 2 1 1 1 ...
    +#>  $ WDM_015 : int  2 2 1 1 1 1 1 1 1 1 ...
    +#>  $ WDM_020 : int  1 2 1 1 1 1 2 1 1 1 ...
    +#>  $ WDM_025 : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ WDM_030 : int  1 1 1 1 1 1 1 1 1 1 ...
    +#>  $ DOADL   : int  2 2 1 2 2 1 2 1 2 2 ...
    +#>  $ ADL_005 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>  $ ADL_010 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>  $ ADL_015 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>  $ ADL_020 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>  $ ADL_025 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>  $ ADL_030 : int  6 6 1 6 6 1 6 1 6 6 ...
    +#>   [list output truncated]
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/compare_value_based_on_interval.html b/docs/reference/compare_value_based_on_interval.html index 835a032e..ebbbb3b7 100644 --- a/docs/reference/compare_value_based_on_interval.html +++ b/docs/reference/compare_value_based_on_interval.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -50,8 +54,7 @@ - - + @@ -69,7 +72,7 @@ - +
    @@ -91,7 +94,7 @@
    -
    compare_value_based_on_interval(
    -  left_boundary,
    -  right_boundary,
    -  data,
    -  compare_columns,
    -  interval
    -)
    +
    compare_value_based_on_interval(
    +  left_boundary,
    +  right_boundary,
    +  data,
    +  compare_columns,
    +  interval
    +)

    Arguments

    @@ -206,24 +209,21 @@

    Value

    comparison is true

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/diet_score_fun.html b/docs/reference/diet_score_fun.html index 18122642..c1e42b4a 100644 --- a/docs/reference/diet_score_fun.html +++ b/docs/reference/diet_score_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -64,8 +68,7 @@ once/day (maximum -10 points) " /> - - + @@ -83,7 +86,7 @@ - +
    @@ -105,7 +108,7 @@
    -
    diet_score_fun(FVCDFRU, FVCDSAL, FVCDPOT, FVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX)
    +
    diet_score_fun(FVCDFRU, FVCDSAL, FVCDPOT, FVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX)

    Arguments

    @@ -241,81 +244,107 @@

    Details cycle.

    Examples

    -
    # Using the 'diet_score_fun' function to create the derived diet variable -# across CCHS cycles. -# diet_score_fun() is specified in the variable_details.csv - -# To create a harmonized diet_score variable across CCHS cycles, use -# rec_with_table() for each CCHS cycle and specify diet_score_fun and the -# required base variables. -# Using merge_rec_data(), you can combine smoke_simple across cycles - -library(cchsflow) - -diet_score2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", - "DHH_SEX", "diet_score_fun" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> Warning: diet_score_fun is missing from variable details therefore cannot be recoded
    #> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    -head(diet_score2009_2010)
    #> DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG -#> 1 2 0.1 4.0 4.0 0.1 0.3 4 -#> 2 2 0.1 1.0 0.1 0.1 0.4 2 -#> 3 2 0.1 0.1 1.0 0.0 0.3 1 -#> 4 1 NA NA NA NA NA NA -#> 5 1 0.4 0.6 1.0 0.4 0.1 6 -#> 6 2 0.3 1.0 0.0 0.3 0.3 1
    -diet_score2011_2012 <- rec_with_table( - cchs2011_2012_p,c( - "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", - "DHH_SEX", "diet_score_fun" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> Warning: diet_score_fun is missing from variable details therefore cannot be recoded
    #> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    #> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    -tail(diet_score2011_2012)
    #> DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG -#> 195 1 0.1 1.0 0.1 0.1 1.0 1.0 -#> 196 1 0.0 0.4 0.7 0.3 0.0 0.4 -#> 197 1 0.1 0.1 1.0 0.6 0.3 0.7 -#> 198 2 0.1 1.0 0.3 0.1 0.4 0.4 -#> 199 1 1.0 1.0 0.1 1.0 0.3 1.0 -#> 200 2 0.3 2.0 0.0 0.6 0.4 4.0
    -combined_diet_score <- suppressWarnings(merge_rec_data(diet_score2009_2010, - diet_score2011_2012)) - -head(combined_diet_score)
    #> DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG -#> 1 2 0.1 4.0 4.0 0.1 0.3 4 -#> 2 2 0.1 1.0 0.1 0.1 0.4 2 -#> 3 2 0.1 0.1 1.0 0.0 0.3 1 -#> 4 1 NA NA NA NA NA NA -#> 5 1 0.4 0.6 1.0 0.4 0.1 6 -#> 6 2 0.3 1.0 0.0 0.3 0.3 1
    tail(combined_diet_score)
    #> DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG -#> 395 1 0.1 1.0 0.1 0.1 1.0 1.0 -#> 396 1 0.0 0.4 0.7 0.3 0.0 0.4 -#> 397 1 0.1 0.1 1.0 0.6 0.3 0.7 -#> 398 2 0.1 1.0 0.3 0.1 0.4 0.4 -#> 399 1 1.0 1.0 0.1 1.0 0.3 1.0 -#> 400 2 0.3 2.0 0.0 0.6 0.4 4.0
    +
    # Using the diet_score_fun function to create the derived diet variable  
    +# across CCHS cycles.
    +# diet_score_fun() is specified in the variable_details.csv.
    +
    +# To create a harmonized diet_score variable across CCHS cycles, use 
    +# rec_with_table() for each CCHS cycle and specify diet_score_fun and the
    +# required base variables.
    +# Using merge_rec_data(), you can combine diet_score across cycles.
    +
    +library(cchsflow)
    +
    +diet_score2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", 
    +    "DHH_SEX", "diet_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for FVCDCAR: 2015 onward changed question to look at all orange-coloured vegetables
    +#> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDSAL: 2015 onwards changed question to look at dark green vegetables
    +#> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +
    +head(diet_score2009_2010)
    +#>   DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 1       2     0.1     4.0     4.0     0.1     0.3       4        4.0
    +#> 2       2     0.1     1.0     0.1     0.1     0.4       2        5.6
    +#> 3       2     0.1     0.1     1.0     0.0     0.3       1        3.5
    +#> 4       1      NA      NA      NA      NA      NA      NA         NA
    +#> 5       1     0.4     0.6     1.0     0.4     0.1       6        9.5
    +#> 6       2     0.3     1.0     0.0     0.3     0.3       1        4.9
    +
    +diet_score2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", 
    +    "DHH_SEX", "diet_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for FVCDCAR: 2015 onward changed question to look at all orange-coloured vegetables
    +#> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDSAL: 2015 onwards changed question to look at dark green vegetables
    +#> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +
    +tail(diet_score2011_2012)
    +#>     DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 195       1     0.1     1.0     0.1     0.1     1.0     1.0        5.2
    +#> 196       1     0.0     0.4     0.7     0.3     0.0     0.4        1.1
    +#> 197       1     0.1     0.1     1.0     0.6     0.3     0.7        3.8
    +#> 198       2     0.1     1.0     0.3     0.1     0.4     0.4        4.0
    +#> 199       1     1.0     1.0     0.1     1.0     0.3     1.0        4.3
    +#> 200       2     0.3     2.0     0.0     0.6     0.4     4.0        9.3
    +
    +combined_diet_score <- suppressWarnings(merge_rec_data(diet_score2009_2010,
    + diet_score2011_2012))
    +
    +head(combined_diet_score)
    +#>   DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 1       2     0.1     4.0     4.0     0.1     0.3       4        4.0
    +#> 2       2     0.1     1.0     0.1     0.1     0.4       2        5.6
    +#> 3       2     0.1     0.1     1.0     0.0     0.3       1        3.5
    +#> 4       1      NA      NA      NA      NA      NA      NA         NA
    +#> 5       1     0.4     0.6     1.0     0.4     0.1       6        9.5
    +#> 6       2     0.3     1.0     0.0     0.3     0.3       1        4.9
    +tail(combined_diet_score)
    +#>     DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 395       1     0.1     1.0     0.1     0.1     1.0     1.0        5.2
    +#> 396       1     0.0     0.4     0.7     0.3     0.0     0.4        1.1
    +#> 397       1     0.1     0.1     1.0     0.6     0.3     0.7        3.8
    +#> 398       2     0.1     1.0     0.3     0.1     0.4     0.4        4.0
    +#> 399       1     1.0     1.0     0.1     1.0     0.3     1.0        4.3
    +#> 400       2     0.3     2.0     0.0     0.6     0.4     4.0        9.3
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/diet_score_fun_cat.html b/docs/reference/diet_score_fun_cat.html new file mode 100644 index 00000000..212b9a7f --- /dev/null +++ b/docs/reference/diet_score_fun_cat.html @@ -0,0 +1,363 @@ + + + + + + + + +Categorized diet score — diet_score_fun_cat • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical derived diet variable +(diet_score_cat3) that categorizes derived diet score (diet_score).

    +
    + +
    diet_score_fun_cat(diet_score)
    + +

    Arguments

    +
    + + + + + +
    diet_score

    derived variable that calculates diet score. +See diet_score_fun for documentation on how variable +was derived.

    + +

    Value

    + +

    value for diet score categories using diet_score_cat3 variable.

    +

    Details

    + +

    The diet score is based on consumption of fruit, salad, potatoes, +carrots, other vegetables and juice. 2 baseline points plus summation of +total points for diet attributes. Negative overall scores are recoded to 0, +resulting in a range from 0 to 10.The categories were based on the +Mortality Population Risk Tool (Douglas Manuel et al. 2016).

    +

    diet_score_cat3 uses the derived variable diet_score. diet_score uses +sex, and fruit and vegetable variables that have been transformed by +cchsflow (see documentation on diet_score). In order to categorize diet +across CCHS cycles, sex, and fruit and vegetable variables must be +transformed and harmonized.

    + +

    Examples

    +
    # Using the diet_score_fun_cat function to categorize the derived diet 
    +# variable across CCHS cycles.
    +# diet_score_fun_cat() is specified in the variable_details.csv.
    +
    +# To create a harmonized diet_score_cat3 variable across CCHS cycles, use 
    +# rec_with_table() for each CCHS cycle.
    +# Since diet_score is also a derived variable, you will have to specify 
    +# the variables that are derived from it.
    +# Using merge_rec_data(), you can combine diet_score_cat3 across cycles.
    +
    +library(cchsflow)
    +
    +diet_score_cat2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", 
    +    "DHH_SEX", "diet_score", "diet_score_cat3"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for FVCDCAR: 2015 onward changed question to look at all orange-coloured vegetables
    +#> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDSAL: 2015 onwards changed question to look at dark green vegetables
    +#> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +
    +head(diet_score_cat2009_2010)
    +#>   DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 1       2     0.1     4.0     4.0     0.1     0.3       4        4.0
    +#> 2       2     0.1     1.0     0.1     0.1     0.4       2        5.6
    +#> 3       2     0.1     0.1     1.0     0.0     0.3       1        3.5
    +#> 4       1      NA      NA      NA      NA      NA      NA         NA
    +#> 5       1     0.4     0.6     1.0     0.4     0.1       6        9.5
    +#> 6       2     0.3     1.0     0.0     0.3     0.3       1        4.9
    +#>   diet_score_cat3
    +#> 1               2
    +#> 2               2
    +#> 3               2
    +#> 4           NA(b)
    +#> 5               3
    +#> 6               2
    +
    +diet_score_cat2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", 
    +    "DHH_SEX", "diet_score", "diet_score_cat3"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for FVCDCAR: 2015 onward changed question to look at all orange-coloured vegetables
    +#> NOTE for FVCDCAR: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDFRU: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDJUI: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDPOT: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +#> NOTE for FVCDSAL: 2015 onwards changed question to look at dark green vegetables
    +#> NOTE for FVCDSAL: Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS
    +#> NOTE for FVCDVEG: Don't know (999.7) and refusal (999.8) not included in 2001 CCHS
    +
    +tail(diet_score_cat2011_2012)
    +#>     DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 195       1     0.1     1.0     0.1     0.1     1.0     1.0        5.2
    +#> 196       1     0.0     0.4     0.7     0.3     0.0     0.4        1.1
    +#> 197       1     0.1     0.1     1.0     0.6     0.3     0.7        3.8
    +#> 198       2     0.1     1.0     0.3     0.1     0.4     0.4        4.0
    +#> 199       1     1.0     1.0     0.1     1.0     0.3     1.0        4.3
    +#> 200       2     0.3     2.0     0.0     0.6     0.4     4.0        9.3
    +#>     diet_score_cat3
    +#> 195               2
    +#> 196               1
    +#> 197               2
    +#> 198               2
    +#> 199               2
    +#> 200               3
    +
    +combined_diet_score_cat <- suppressWarnings(merge_rec_data(
    +diet_score_cat2009_2010, diet_score_cat2011_2012))
    +
    +head(combined_diet_score_cat)
    +#>   DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 1       2     0.1     4.0     4.0     0.1     0.3       4        4.0
    +#> 2       2     0.1     1.0     0.1     0.1     0.4       2        5.6
    +#> 3       2     0.1     0.1     1.0     0.0     0.3       1        3.5
    +#> 4       1      NA      NA      NA      NA      NA      NA         NA
    +#> 5       1     0.4     0.6     1.0     0.4     0.1       6        9.5
    +#> 6       2     0.3     1.0     0.0     0.3     0.3       1        4.9
    +#>   diet_score_cat3
    +#> 1               2
    +#> 2               2
    +#> 3               2
    +#> 4           NA(b)
    +#> 5               3
    +#> 6               2
    +tail(combined_diet_score_cat)
    +#>     DHH_SEX FVCDCAR FVCDFRU FVCDJUI FVCDPOT FVCDSAL FVCDVEG diet_score
    +#> 395       1     0.1     1.0     0.1     0.1     1.0     1.0        5.2
    +#> 396       1     0.0     0.4     0.7     0.3     0.0     0.4        1.1
    +#> 397       1     0.1     0.1     1.0     0.6     0.3     0.7        3.8
    +#> 398       2     0.1     1.0     0.3     0.1     0.4     0.4        4.0
    +#> 399       1     1.0     1.0     0.1     1.0     0.3     1.0        4.3
    +#> 400       2     0.3     2.0     0.0     0.6     0.4     4.0        9.3
    +#>     diet_score_cat3
    +#> 395               2
    +#> 396               1
    +#> 397               2
    +#> 398               2
    +#> 399               2
    +#> 400               3
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/energy_exp_fun.html b/docs/reference/energy_exp_fun.html new file mode 100644 index 00000000..bbe83ddb --- /dev/null +++ b/docs/reference/energy_exp_fun.html @@ -0,0 +1,436 @@ + + + + + + + + +Daily energy expenditure in leisure activity — energy_exp_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a derived variable for +A MET is a conceptual value that represents energy expended during physical activity. +The volume of activity is calculated by multiplying the amount of minutes of +activity (by level of intensity) by the MET value associated with that +intensity. A MET (metabolic equivalent) is the energy cost of activity +expressed as kilocalories expended per kilogram of body +weight per hour of activity.

    +

    In CCHS 2001-2014, PACDEE is the variable used to determine the daily +expenditure of leisure activity for all ages. In CCHS 2015-2018, ages 12-17 +and 18+ years old have separate activity variables, where 12-17 year olds +use PAY_XXX and 18+ year olds use PAA_XXX. Leisure activity is not directly +measured. We used the derived variable, PAADVVOL, and removed active +transportation in the new function. With this function, we combined leisure +activity for ages 12+. We calculate the daily energy expenditure which uses +the frequency and duration per session of the physical activity as well as +the MET value (3 METS for leisure and 6 METS for vigorous activity).

    +

    EE (Daily Energy Expenditure) = ((N X D X METvalue) / 60)/7 +Where: +N = the number of times a respondent engaged in an activity over a 7 day period +D = the average duration in minutes of the activity +MET value = the energy cost of the activity expressed as kilocalories +expended per kilogram of body +weight per hour of activity (kcal/kg per hour)

    +
    + +
    energy_exp_fun(
    +  DHHGAGE_cont,
    +  PAA_045,
    +  PAA_050,
    +  PAA_075,
    +  PAA_080,
    +  PAADVDYS,
    +  PAADVVIG,
    +  PAYDVTOA,
    +  PAYDVADL,
    +  PAYDVVIG,
    +  PAYDVDYS
    +)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DHHGAGE_cont

    continuous age variable.

    PAA_045

    number of hours of sports, fitness, or recreational activity +that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old.

    PAA_050

    number of minutes of sports, fitness, or recreational activity +that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old.

    PAA_075

    number of hours of other physical activity while at work, +home or volunteering for CCHS 2015-2018 for 18+ years old.

    PAA_080

    number of minutes of other physical activity while at work, +home or volunteering for CCHS 2015-2018 for 18+ years old.

    PAADVDYS

    number of active days - 7 day for CCHS 2015-2018 for 18+ +years old.

    PAADVVIG

    number of minutes of vigorous activity over 7 days or CCHS +2015-2018 for 18+ years old.

    PAYDVTOA

    total minutes of other activities - 7 day for CCHS 2015-2018 +for 12-17 years old.

    PAYDVADL

    total minutes of physical activity - leisure - 7 day for +CCHS 2015-2018 for 12-17 years old.

    PAYDVVIG

    total minutes - vigorous physical activity - 7 d for CCHS +2015-2018 for 12-17 years old.

    PAYDVDYS

    total days physically active - 7 day for CCHS 2015-2018 for +12-17 years old.

    + +

    Value

    + +

    Continuous variable for energy expenditure (energy_exp)

    + +

    Examples

    +
    # Using energy_exp_fun() to create energy expenditure values across CCHS 
    +# cycles
    +# energy_exp_fun() is specified in variable_details.csv along with the CCHS
    +# variables and cycles included.
    +
    +# To transform energy_exp across cycles, use rec_with_table() for each
    +# CCHS cycle and specify energy_exp, along with each activity variable.
    +# Then by using merge_rec_data(), you can combine energy_exp across
    +# cycles
    +
    +library(cchsflow)
    +energy_exp2015_2016 <- rec_with_table(
    +  cchs2015_2016_p, c(
    +    "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", 
    +    "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +head(energy_exp2015_2016)
    +#>   DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVVIG PAADVDYS PAYDVTOA
    +#> 1           62       0       0       0       0        0        0       NA
    +#> 2           42       1      20       1       0       70        4       NA
    +#> 3           16      NA      NA      NA      NA       NA       NA        0
    +#> 4           57      22      45       8       0        0        7       NA
    +#> 5           47       3       0       0       0        0        2       NA
    +#> 6           62       3      30       2       0        0        7       NA
    +#>   PAYDVADL PAYDVVIG PAYDVDYS
    +#> 1       NA       NA       NA
    +#> 2       NA       NA       NA
    +#> 3      570       NA       NA
    +#> 4       NA       NA       NA
    +#> 5       NA       NA       NA
    +#> 6       NA       NA       NA
    +
    +energy_exp2017_2018 <- rec_with_table(
    +  cchs2017_2018_p, c(
    +    "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", 
    +    "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(energy_exp2015_2016)
    +#>     DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVVIG PAADVDYS PAYDVTOA
    +#> 195           62       0       0       0       0        0        0       NA
    +#> 196           67       0       0       4       0        0        3       NA
    +#> 197           85       0       0       0       0        0        7       NA
    +#> 198           47       6       0      10       0        0        7       NA
    +#> 199           52       3       0       0       0        0        3       NA
    +#> 200           47       0       0       0       0        0        0       NA
    +#>     PAYDVADL PAYDVVIG PAYDVDYS
    +#> 195       NA       NA       NA
    +#> 196       NA       NA       NA
    +#> 197       NA       NA       NA
    +#> 198       NA       NA       NA
    +#> 199       NA       NA       NA
    +#> 200       NA       NA       NA
    +
    +combined_energy_exp <- suppressWarnings(merge_rec_data(energy_exp2015_2016,
    + energy_exp2017_2018))
    +
    +head(combined_energy_exp)
    +#>   DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVVIG PAADVDYS PAYDVTOA
    +#> 1           62       0       0       0       0        0        0       NA
    +#> 2           42       1      20       1       0       70        4       NA
    +#> 3           16      NA      NA      NA      NA       NA       NA        0
    +#> 4           57      22      45       8       0        0        7       NA
    +#> 5           47       3       0       0       0        0        2       NA
    +#> 6           62       3      30       2       0        0        7       NA
    +#>   PAYDVADL PAYDVVIG PAYDVDYS
    +#> 1       NA       NA       NA
    +#> 2       NA       NA       NA
    +#> 3      570       NA       NA
    +#> 4       NA       NA       NA
    +#> 5       NA       NA       NA
    +#> 6       NA       NA       NA
    +tail(combined_energy_exp)
    +#>     DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVVIG PAADVDYS PAYDVTOA
    +#> 395           32       0       0       3      30       60        7       NA
    +#> 396           47       7      30       1       0       55        6       NA
    +#> 397           13      NA      NA      NA      NA       NA       NA        0
    +#> 398           32       0       0       4       0        0        7       NA
    +#> 399           42       0       0       5       0        0        5       NA
    +#> 400           57       0       0      54       0      150        7       NA
    +#>     PAYDVADL PAYDVVIG PAYDVDYS
    +#> 395       NA       NA       NA
    +#> 396       NA       NA       NA
    +#> 397        0        0        7
    +#> 398       NA       NA       NA
    +#> 399       NA       NA       NA
    +#> 400       NA       NA       NA
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/food_insecurity_der.html b/docs/reference/food_insecurity_der.html index 10e9fc97..b1001af6 100644 --- a/docs/reference/food_insecurity_der.html +++ b/docs/reference/food_insecurity_der.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -59,8 +63,7 @@ food insecurity in the last 12 months " /> - - + @@ -78,7 +81,7 @@ - +
    @@ -100,7 +103,7 @@
    -
    food_insecurity_der(FINF1, FSCDHFS, FSCDHFS2)
    +
    food_insecurity_der(FINF1, FSCDHFS, FSCDHFS2)

    Arguments

    @@ -224,29 +227,28 @@

    Details cchsflow for years 2001 to 2007), food_insecurity_der is recommended.

    Examples

    -
    -library(cchsflow) -?food_insecurity_der
    +
    
    +library(cchsflow)
    +?food_insecurity_der
    +#>  Rendering development documentation for "food_insecurity_der"
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/get_data_variable_name.html b/docs/reference/get_data_variable_name.html index 126a88d9..7349b805 100644 --- a/docs/reference/get_data_variable_name.html +++ b/docs/reference/get_data_variable_name.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -51,8 +55,7 @@ - - + @@ -70,7 +73,7 @@ - +
    @@ -92,7 +95,7 @@
    -
    get_data_variable_name(
    -  data_name,
    -  data,
    -  row_being_checked,
    -  variable_being_checked
    -)
    +
    get_data_variable_name(
    +  data_name,
    +  data,
    +  row_being_checked,
    +  variable_being_checked
    +)

    Arguments

    @@ -203,24 +206,21 @@

    Value

    the data equivalent of variable_being_checked

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/if_else2.html b/docs/reference/if_else2.html index 21d0892e..3c80a58a 100644 --- a/docs/reference/if_else2.html +++ b/docs/reference/if_else2.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    if_else2(x, a, b)
    +
    if_else2(x, a, b)

    Arguments

    @@ -202,33 +205,32 @@

    Details function like if_else2() is needed in order for other functions to not break

    Examples

    -
    age <- 12 -status <- if_else2((age < 18), "child", "invalid age") -print(status)
    #> [1] "child"
    -age <- NA -status <- if_else2((age < 18), "child", "invalid age") -print(status)
    #> [1] "invalid age"
    +
    age <- 12
    +status <- if_else2((age < 18), "child", "invalid age")
    +print(status)
    +#> [1] "child"
    +
    +age <- NA
    +status <- if_else2((age < 18), "child", "invalid age")
    +print(status)
    +#> [1] "invalid age"
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/immigration_fun.html b/docs/reference/immigration_fun.html new file mode 100644 index 00000000..a142f7f4 --- /dev/null +++ b/docs/reference/immigration_fun.html @@ -0,0 +1,336 @@ + + + + + + + + +Immigration by ethnicity and settlement — immigration_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical variable based on +immigrant status (SDCFIMM), country of birth (SDCGCBG), ethnicity (SDCGCGT), +and time in Canada (SDCGRES).

    +
    + +
    immigration_fun(SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES)
    + +

    Arguments

    +
    + + + + + + + + + + + + + + + + + +
    SDCFIMM

    Immigrant status (1-immigrant, 2-non-immigrant)

    SDCGCBG

    Country of birth (1-Canada, 2-Outside of Canada)

    SDCGCGT

    Cultural or racial origin (1-white, 2-visible minority)

    SDCGRES

    Length/time in Canada since immigration (1- 0-9 years, 2- 10+ +years)

    + +

    Value

    + +

    Categorical variable (immigration_der) with six categories:

    +

      +
    • 1 - White Canada-born

    • +
    • 2 - Non-white Canadian born

    • +
    • 3 - White immigrant born outside of Canada (0-9 years in Canada)

    • +
    • 4 - Non-white immigrant born outside of Canada (0-9 years in Canada)

    • +
    • 5 - White immigrant born outside of Canada (10+ years in Canada)

    • +
    • 6 - Non-white immigrant born outside of Canada (10+ years in Canada)

    • +
    + +

    Details

    + +

    immigration_der uses the CCHS variables that have been transformed by +cchsflow. In order to generate a value for BMI across CCHS cycles, +the following SDC variables must be transformed and harmonized.

    + +

    Examples

    +
    # Using immigration_fun() to create immigration_der values across CCHS cycles
    +# immigration_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform immigration_der, use rec_with_table() for each CCHS cycle
    +# and specify immigration_der, along with the various SDC variables.
    +# Then by using merge_rec_data() you can combine immigration_der across cycles.
    +
    +library(cchsflow)
    +immigration2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGCGT: CCHS 2001 missing don't know (7), refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +
    +head(immigration2001)
    +#>   SDCFIMM SDCGCBG SDCGCGT SDCGRES immigration_der
    +#> 1       2       1       1   NA(a)               1
    +#> 2       2       1       1   NA(a)               1
    +#> 3       1       2       1       1               3
    +#> 4       2       1       1   NA(a)               1
    +#> 5       2       1       1   NA(a)               1
    +#> 6       2       1       1   NA(a)               1
    +
    +immigration2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGCGT: CCHS 2001 missing don't know (7), refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +
    +tail(immigration2009_2010)
    +#>     SDCFIMM SDCGCBG SDCGCGT SDCGRES immigration_der
    +#> 195       2       1       1   NA(a)               1
    +#> 196       2       1       1   NA(a)               1
    +#> 197       2       1       1   NA(a)               1
    +#> 198       2       1       2   NA(a)               2
    +#> 199       2       1       1   NA(a)               1
    +#> 200       1       2       1       2               5
    +
    +combined_immigration <- merge_rec_data(immigration2001, immigration2009_2010)
    +
    +head(combined_immigration)
    +#>   SDCFIMM SDCGCBG SDCGCGT SDCGRES immigration_der
    +#> 1       2       1       1   NA(a)               1
    +#> 2       2       1       1   NA(a)               1
    +#> 3       1       2       1       1               3
    +#> 4       2       1       1   NA(a)               1
    +#> 5       2       1       1   NA(a)               1
    +#> 6       2       1       1   NA(a)               1
    +
    +tail(combined_immigration)
    +#>     SDCFIMM SDCGCBG SDCGCGT SDCGRES immigration_der
    +#> 395       2       1       1   NA(a)               1
    +#> 396       2       1       1   NA(a)               1
    +#> 397       2       1       1   NA(a)               1
    +#> 398       2       1       2   NA(a)               2
    +#> 399       2       1       1   NA(a)               1
    +#> 400       1       2       1       2               5
    +
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    + + + + + + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 8bbb4212..835bb7c3 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,15 +46,14 @@ - + - - + @@ -68,7 +71,7 @@ - +
    @@ -90,7 +93,7 @@
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/is_equal.html b/docs/reference/is_equal.html index 2e3ea87e..54d37ac3 100644 --- a/docs/reference/is_equal.html +++ b/docs/reference/is_equal.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    is_equal(v1, v2)
    +
    is_equal(v1, v2)

    Arguments

    @@ -191,39 +194,47 @@

    Value

    boolean value of whether or not v1 and v2 are equal

    Examples

    -
    library(cchsflow) -is_equal(1,2)
    #> [1] FALSE
    # FALSE - -is_equal(1,1)
    #> [1] TRUE
    # TRUE - -1==NA
    #> [1] NA
    # NA - -is_equal(1,NA)
    #> [1] FALSE
    # FALSE - -NA==NA
    #> [1] NA
    # NA - -is_equal(NA,NA)
    #> [1] TRUE
    # TRUE -
    +
    library(cchsflow)
    +is_equal(1,2)
    +#> [1] FALSE
    +# FALSE
    +
    +is_equal(1,1)
    +#> [1] TRUE
    +# TRUE
    +
    +1==NA
    +#> [1] NA
    +# NA
    +
    +is_equal(1,NA)
    +#> [1] FALSE
    +# FALSE
    +
    +NA==NA
    +#> [1] NA
    +# NA
    +
    +is_equal(NA,NA)
    +#> [1] TRUE
    +# TRUE
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/label_data.html b/docs/reference/label_data.html index ad5393a2..3190715d 100644 --- a/docs/reference/label_data.html +++ b/docs/reference/label_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -50,8 +54,7 @@ - - + @@ -69,7 +72,7 @@ - +
    @@ -91,7 +94,7 @@
    -
    label_data(label_list, data_to_label)
    +
    label_data(label_list, data_to_label)

    Arguments

    @@ -188,24 +191,21 @@

    Value

    Returns labeled data

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/low_drink_long_fun.html b/docs/reference/low_drink_long_fun.html new file mode 100644 index 00000000..4e623e5a --- /dev/null +++ b/docs/reference/low_drink_long_fun.html @@ -0,0 +1,425 @@ + + + + + + + + +Long term risks due to drinking — low_drink_long_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical variable that + flags for increased long term health risks due to their drinking habits, + according to Canada's Low-Risk Alcohol Drinking Guideline.

    +
    + +
    low_drink_long_fun(
    +  DHH_SEX,
    +  ALWDWKY,
    +  ALC_1,
    +  ALW_1,
    +  ALW_2A1,
    +  ALW_2A2,
    +  ALW_2A3,
    +  ALW_2A4,
    +  ALW_2A5,
    +  ALW_2A6,
    +  ALW_2A7
    +)
    + +

    Arguments

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DHH_SEX

    Sex of respondent (1 - male, 2 - female)

    ALWDWKY

    Number of drinks consumed in the past week

    ALC_1

    Drinks in the past year (1 - yes, 2 - no)

    ALW_1

    Drinks in the last week (1 - yes, 2 - no)

    ALW_2A1

    Number of drinks on Sunday

    ALW_2A2

    Number of drinks on Monday

    ALW_2A3

    Number of drinks on Tuesday

    ALW_2A4

    Number of drinks on Wednesday

    ALW_2A5

    Number of drinks on Thursday

    ALW_2A6

    Number of drinks on Friday

    ALW_2A7

    Number of drinks on Saturday

    + +

    Value

    + +

    Categorical variable (ALWDVLTR_der) with two categories:

    +

      +
    • 1 - Increased long term health risk

    • +
    • 2 - No increased long term health risk

    • +
    + +

    Details

    + +

    The classification of drinkers according to their long term health +risks comes from guidelines in Alcohol and Health in Canada: A Summary of +Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +consumption reported over the past week. Short-term or acute risks include +injury and overdose.

    +

    Categories are based on CCHS 2015-2016's variable (ALWDVLTR) where long +term health risk are increased when drinking more than 10 drinks a week for +women, with no more than 2 drinks a day most days, and more than 15 drinks a +week for men, with no more than 3 drinks a day most days.

    +

    See https://osf.io/ykau5/ for more details on the guideline. +See https://osf.io/ycxaq/ for more details on the derivation of the +function on page 8.

    + +

    Examples

    +
     
    +# Using low_drink_long_fun() to create ALWDVLTR_der values across CCHS cycles
    +# low_drink_long_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform ALWDVLTR_der, use rec_with_table() for each CCHS cycle
    +# and specify ALWDVLTR_der, along with the various alcohol and sex
    +# variables. 
    +# Using merge_rec_data(), you can combine ALWDVLTR_der across cycles.
    +
    +library(cchsflow)
    +long_low_drink2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +head(long_low_drink2001)
    +#>   ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 1     1     1       0       0       1       0       1       0       0       2
    +#> 2     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 3     1     1       0       0       0       1       6       0       1       8
    +#> 4     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 5     1     1       0       0       0       0       0       8       0       8
    +#> 6     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>   DHH_SEX ALWDVLTR_der
    +#> 1       2            2
    +#> 2       2        NA(b)
    +#> 3       1            1
    +#> 4       2        NA(b)
    +#> 5       2            1
    +#> 6       1        NA(b)
    +
    +long_low_drink2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +tail(long_low_drink2009_2010)
    +#>     ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 195     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 196     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 197     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 198     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 199     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 200     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>     DHH_SEX ALWDVLTR_der
    +#> 195       2        NA(b)
    +#> 196       2        NA(b)
    +#> 197       2        NA(b)
    +#> 198       1        NA(b)
    +#> 199       2        NA(b)
    +#> 200       2        NA(b)
    +
    +combined_long_low_drink <- bind_rows(long_low_drink2001, 
    +long_low_drink2009_2010)
    +
    +head(combined_long_low_drink)
    +#>   ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 1     1     1       0       0       1       0       1       0       0       2
    +#> 2     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 3     1     1       0       0       0       1       6       0       1       8
    +#> 4     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 5     1     1       0       0       0       0       0       8       0       8
    +#> 6     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>   DHH_SEX ALWDVLTR_der
    +#> 1       2            2
    +#> 2       2        NA(b)
    +#> 3       1            1
    +#> 4       2        NA(b)
    +#> 5       2            1
    +#> 6       1        NA(b)
    +
    +tail(combined_long_low_drink)
    +#>     ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 395     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 396     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 397     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 398     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 399     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 400     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>     DHH_SEX ALWDVLTR_der
    +#> 395       2        NA(b)
    +#> 396       2        NA(b)
    +#> 397       2        NA(b)
    +#> 398       1        NA(b)
    +#> 399       2        NA(b)
    +#> 400       2        NA(b)
    +
    +# Using low_drink_long_fun() to generate ALWDVLTR_der with user-inputted
    +# values.
    +#
    +# Let's say you are a male, you had drinks in the last week and in the last 
    +# year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on 
    +# Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, 
    +# and 2 drinks on Saturday with a total of 30 drinks in a week. 
    +# Using low_drink_long_fun(), we can check if you would be classified as
    +# having an increased long term health risk due to drinking.
    +
    +long_term_drink <- low_drink_long_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1,
    + ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, 
    + ALW_2A6 = 8, ALW_2A7 = 2)
    +
    +print(long_term_drink)
    +#> [1] 1
    +
    + + + + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    + + + + + + + + + + + + diff --git a/docs/reference/low_drink_score_fun.html b/docs/reference/low_drink_score_fun.html new file mode 100644 index 00000000..e100b5db --- /dev/null +++ b/docs/reference/low_drink_score_fun.html @@ -0,0 +1,334 @@ + + + + + + + + +Low drinking score (all cycles) — low_drink_score_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a derived variable based on their drinking +habits and flags for health and social problems from their pattern of +alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline.

    +
    + +
    low_drink_score_fun(DHH_SEX, ALWDWKY)
    + +

    Arguments

    + + + + + + + + + + +
    DHH_SEX

    Sex of respondent (1 - male, 2 - female)

    ALWDWKY

    Number of drinks consumed in the past week

    + +

    Value

    + +

    Low risk drinking score (low_drink_score) with four categories:

      +
    • 1 - Low risk (0 points)

    • +
    • 2 - Marginal risk (1-2 points)

    • +
    • 3 - Medium risk (3-4 points)

    • +
    • 4 - High risk (5-9 points)

    • +
    + +

    Details

    + +

    The low risk drinking score is based on the scoring system in +Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +steps. Step 1 allocates points based on sex and the number of drinks +that you usually have each week. In step 2, one point will be awarded for +each item that is true related to drinking habits. The total score is +obtained from adding the points in step 1 and step 2.

    +

    Note

    + +

    Step 2 is not included in this function because the questions in +step 2 are not asked in any of the CCHS cycles. The score is only based on +step 1.

    +

    See https://osf.io/eprg7/ for more details on the guideline and score.

    + +

    Examples

    +
     
    +# Using low_drink_score_fun() to create low_drink_score values across 
    +# CCHS cycles low_drink_score_fun() is specified in variable_details.csv 
    +# along with the CCHS variables and cycles included.
    +
    +# To transform low_drink_score, use rec_with_table() for each CCHS cycle
    +# and specify low_drink_score, along with the various alcohol and sex
    +# variables. 
    +# Using merge_rec_data(), you can combine low_drink_score across cycles.
    +
    +library(cchsflow)
    +low_drink2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "DHH_SEX", "ALWDWKY", "low_risk_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: low_risk_score is missing from variable details therefore cannot be recoded
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +head(low_drink2001)
    +#>   ALWDWKY DHH_SEX
    +#> 1       2       2
    +#> 2      NA       2
    +#> 3       8       1
    +#> 4       0       2
    +#> 5       8       2
    +#> 6       0       1
    +
    +low_drink2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "DHH_SEX", "ALWDWKY", "low_risk_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: low_risk_score is missing from variable details therefore cannot be recoded
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +tail(low_drink2009_2010)
    +#>     ALWDWKY DHH_SEX
    +#> 195      NA       2
    +#> 196       0       2
    +#> 197      NA       2
    +#> 198      NA       1
    +#> 199      NA       2
    +#> 200       0       2
    +
    +combined_low_drink <- bind_rows(low_drink2001, 
    +low_drink2009_2010)
    +
    +head(combined_low_drink)
    +#>   ALWDWKY DHH_SEX
    +#> 1       2       2
    +#> 2      NA       2
    +#> 3       8       1
    +#> 4       0       2
    +#> 5       8       2
    +#> 6       0       1
    +
    +tail(combined_low_drink)
    +#>     ALWDWKY DHH_SEX
    +#> 395      NA       2
    +#> 396       0       2
    +#> 397      NA       2
    +#> 398      NA       1
    +#> 399      NA       2
    +#> 400       0       2
    +
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/low_drink_score_fun1.html b/docs/reference/low_drink_score_fun1.html new file mode 100644 index 00000000..34dc51e2 --- /dev/null +++ b/docs/reference/low_drink_score_fun1.html @@ -0,0 +1,347 @@ + + + + + + + + +Low drinking score (select cycles) — low_drink_score_fun1 • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a derived variable based on their drinking +habits and flags for health and social problems from their pattern of +alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline.

    +
    + +
    low_drink_score_fun1(DHH_SEX, ALWDWKY, ALC_005, ALC_1)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + +
    DHH_SEX

    Sex of respondent (1 - male, 2 - female)

    ALWDWKY

    Number of drinks consumed in the past week

    ALC_005

    In lifetime, ever had a drink? (1 - yes, 2 - no)

    ALC_1

    Past year, have you drank alcohol? (1 - yes, 2 - no)

    + +

    Value

    + +

    Low risk drinking score (low_drink_score1) with four categories:

      +
    • 1 - Low risk - never drank (0 points)

    • +
    • 2 - Low risk - former drinker (0 points)

    • +
    • 3 - Marginal risk (1-2 points)

    • +
    • 4 - Medium risk (3-4 points)

    • +
    • 5 - High risk (5-9 points)

    • +
    + +

    Details

    + +

    The low risk drinking score is based on the scoring system in +Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +steps. Step 1 allocates points based on sex and the number of drinks +that you usually have each week. In step 2, one point will be awarded for +each item that is true related to drinking habits. The total score is +obtained from adding the points in step 1 and step 2.

    +

    This score has two 0 point categories: low risk (never drank) and low risk +(former drinker). The two drinking groups are derived from 'ever had a drink +in lifetime'. 'Ever had a drink in lifetime' is only available in CCHS +2001-2008 and 2015-2018.

    +

    Note

    + +

    Step 2 is not included in this function because the questions in +step 2 are not asked in any of the CCHS cycles. The score is only based on +step 1.

    +

    See https://osf.io/eprg7/ for more details on the guideline and score.

    + +

    Examples

    +
     
    +# Using low_drink_score_fun1() to create low_drink_score values across 
    +# CCHS cycles low_drink_score_fun1() is specified in variable_details.csv 
    +# along with the CCHS variables and cycles included.
    +
    +# To transform low_drink_score1, use rec_with_table() for each CCHS cycle
    +# and specify low_drink_score1, along with the various alcohol and sex
    +# variables. 
    +# Using merge_rec_data(), you can combine low_drink_score1 across cycles.
    +
    +library(cchsflow)
    +low_drink2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: low_risk_score is missing from variable details therefore cannot be recoded
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +head(low_drink2001)
    +#>   ALC_1 ALC_005 ALWDWKY DHH_SEX
    +#> 1     1   NA(a)       2       2
    +#> 2     2       2      NA       2
    +#> 3     1   NA(a)       8       1
    +#> 4     1   NA(a)       0       2
    +#> 5     1   NA(a)       8       2
    +#> 6     1   NA(a)       0       1
    +
    +low_drink2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: low_risk_score is missing from variable details therefore cannot be recoded
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +tail(low_drink2009_2010)
    +#>     ALC_1 ALWDWKY DHH_SEX
    +#> 195     2      NA       2
    +#> 196     1       0       2
    +#> 197     2      NA       2
    +#> 198     2      NA       1
    +#> 199     2      NA       2
    +#> 200     1       0       2
    +
    +combined_low_drink1 <- bind_rows(low_drink2001, 
    +low_drink2009_2010)
    +
    +head(combined_low_drink1)
    +#>   ALC_1 ALC_005 ALWDWKY DHH_SEX
    +#> 1     1   NA(a)       2       2
    +#> 2     2       2      NA       2
    +#> 3     1   NA(a)       8       1
    +#> 4     1   NA(a)       0       2
    +#> 5     1   NA(a)       8       2
    +#> 6     1   NA(a)       0       1
    +
    +tail(combined_low_drink1)
    +#>     ALC_1 ALC_005 ALWDWKY DHH_SEX
    +#> 395     2    <NA>      NA       2
    +#> 396     1    <NA>       0       2
    +#> 397     2    <NA>      NA       2
    +#> 398     2    <NA>      NA       1
    +#> 399     2    <NA>      NA       2
    +#> 400     1    <NA>       0       2
    +
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/low_drink_short_fun.html b/docs/reference/low_drink_short_fun.html new file mode 100644 index 00000000..14fefc13 --- /dev/null +++ b/docs/reference/low_drink_short_fun.html @@ -0,0 +1,424 @@ + + + + + + + + +Short term risks due to drinking — low_drink_short_fun • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical variable that + flags for increased short term health risks due to their drinking habits, + according to Canada's Low-Risk Alcohol Drinking Guideline.

    +
    + +
    low_drink_short_fun(
    +  DHH_SEX,
    +  ALWDWKY,
    +  ALC_1,
    +  ALW_1,
    +  ALW_2A1,
    +  ALW_2A2,
    +  ALW_2A3,
    +  ALW_2A4,
    +  ALW_2A5,
    +  ALW_2A6,
    +  ALW_2A7
    +)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DHH_SEX

    Sex of respondent (1 - male, 2 - female)

    ALWDWKY

    Number of drinks consumed in the past week

    ALC_1

    Drinks in the past year (1 - yes, 2 - no)

    ALW_1

    Drinks in the last week (1 - yes, 2 - no)

    ALW_2A1

    Number of drinks on Sunday

    ALW_2A2

    Number of drinks on Monday

    ALW_2A3

    Number of drinks on Tuesday

    ALW_2A4

    Number of drinks on Wednesday

    ALW_2A5

    Number of drinks on Thursday

    ALW_2A6

    Number of drinks on Friday

    ALW_2A7

    Number of drinks on Saturday

    + +

    Value

    + +

    Categorical variable (ALWDVSTR_der) with two categories:

    +

      +
    • 1 - Increased short term health risk

    • +
    • 2 - No increased short term health risk

    • +
    + +

    Details

    + +

    The classification of drinkers according to their short term health +risks comes from guidelines in Alcohol and Health in Canada: A Summary of +Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +consumption reported over the past week. Short-term or acute risks include +injury and overdose.

    +

    Categories are based on CCHS 2015-2016's variable (ALWDVSTR) where short +term health risk are increased when drinking more than 3 drinks (for women) +or 4 drinks (for men) on any single occasion.

    +

    See https://osf.io/ykau5/ for more details on the guideline. +See https://osf.io/ycxaq/ for more details on derivation of the +function on page 9.

    + +

    Examples

    +
     
    +# Using low_drink_short_fun() to create ALWDVSTR_der values across CCHS cycles
    +# low_drink_short_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform ALWDVSTR_der, use rec_with_table() for each CCHS cycle
    +# and specify ALWDVSTR_der, along with the various alcohol and sex
    +# variables. 
    +# Using merge_rec_data(), you can combine ALWDVSTR_der across cycles.
    +
    +library(cchsflow)
    +short_low_drink2001 <- rec_with_table(
    +  cchs2001_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +head(short_low_drink2001)
    +#>   ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 1     1     1       0       0       1       0       1       0       0       2
    +#> 2     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 3     1     1       0       0       0       1       6       0       1       8
    +#> 4     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 5     1     1       0       0       0       0       0       8       0       8
    +#> 6     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>   DHH_SEX ALWDVSTR_der
    +#> 1       2            2
    +#> 2       2        NA(b)
    +#> 3       1            1
    +#> 4       2        NA(b)
    +#> 5       2            1
    +#> 6       1        NA(b)
    +
    +short_low_drink2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
    +    "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
    +
    +tail(short_low_drink2009_2010)
    +#>     ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 195     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 196     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 197     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 198     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 199     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 200     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>     DHH_SEX ALWDVSTR_der
    +#> 195       2        NA(b)
    +#> 196       2        NA(b)
    +#> 197       2        NA(b)
    +#> 198       1        NA(b)
    +#> 199       2        NA(b)
    +#> 200       2        NA(b)
    +
    +combined_short_low_drink <- bind_rows(short_low_drink2001, 
    +short_low_drink2009_2010)
    +
    +head(combined_short_low_drink)
    +#>   ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 1     1     1       0       0       1       0       1       0       0       2
    +#> 2     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 3     1     1       0       0       0       1       6       0       1       8
    +#> 4     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 5     1     1       0       0       0       0       0       8       0       8
    +#> 6     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>   DHH_SEX ALWDVSTR_der
    +#> 1       2            2
    +#> 2       2        NA(b)
    +#> 3       1            1
    +#> 4       2        NA(b)
    +#> 5       2            1
    +#> 6       1        NA(b)
    +
    +tail(combined_short_low_drink)
    +#>     ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
    +#> 395     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 396     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#> 397     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 398     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 399     2 NA(a)      NA      NA      NA      NA      NA      NA      NA      NA
    +#> 400     1     2      NA      NA      NA      NA      NA      NA      NA       0
    +#>     DHH_SEX ALWDVSTR_der
    +#> 395       2        NA(b)
    +#> 396       2        NA(b)
    +#> 397       2        NA(b)
    +#> 398       1        NA(b)
    +#> 399       2        NA(b)
    +#> 400       2        NA(b)
    +
    +# Using low_drink_short_fun() to generate ALWDVSTR_der with user-inputted
    +# values.
    +#
    +# Let's say you are a male, you had drinks in the last week and in the last 
    +# year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on 
    +# Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, 
    +# and 2 drinks on Saturday with a total of 30 drinks in a week. 
    +# Using low_drink_short_fun(), we can check if you would be classified as
    +# having an increased short term health risk due to drinking.
    +
    +short_term_drink <- low_drink_short_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1,
    + ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, 
    + ALW_2A6 = 8, ALW_2A7 = 2)
    +
    +print(short_term_drink)
    +#> [1] 1
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    +
    + + + + + + + + + + + diff --git a/docs/reference/merge_rec_data.html b/docs/reference/merge_rec_data.html index a725eb87..1f1f9caa 100644 --- a/docs/reference/merge_rec_data.html +++ b/docs/reference/merge_rec_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    merge_rec_data(...)
    +
    merge_rec_data(...)

    Arguments

    @@ -197,53 +200,59 @@

    Details for more details on how NA's are treated in cchsflow.

    Examples

    -
    # Merging two CCHS cycles with variables missing in each cycle. - -# INCGHH_A is a cchsflow variable available for the 2001 CCHS cycle, while -# INCGHH_B is a cchsflow variable available for the 2003 CCHS cycle. -# Using merge_rec_data(), datasets containing INCGHH_A & INCGHH_B can be -# merged and tagged. - -library(cchsflow) -income2001 <- rec_with_table(cchs2001_p, "INCGHH_A")
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for INCGHH_A: CCHS 2001 classifies no income and less than $15,000 as separate categories
    income2003 <- rec_with_table(cchs2001_p, "INCGHH_B")
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -income_merged <- merge_rec_data(income2001, income2003) -head(income_merged)
    #> INCGHH_A -#> 1 3 -#> 2 3 -#> 3 6 -#> 4 3 -#> 5 4 -#> 6 4
    tail(income_merged)
    #> INCGHH_A -#> 395 NA(c) -#> 396 NA(c) -#> 397 NA(c) -#> 398 NA(c) -#> 399 NA(c) -#> 400 NA(c)
    -
    +
    # Merging two CCHS cycles with variables missing in each cycle.
    +
    +# INCGHH_A is a cchsflow variable available for the 2001 CCHS cycle, while
    +# INCGHH_B is a cchsflow variable available for the 2003 CCHS cycle. 
    +# Using merge_rec_data(), datasets containing INCGHH_A & INCGHH_B can be
    +# merged and tagged.
    +
    +library(cchsflow)
    +income2001 <- rec_with_table(cchs2001_p, "INCGHH_A")
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for INCGHH_A: CCHS 2001 classifies no income and less than $15,000 as separate categories
    +income2003 <- rec_with_table(cchs2001_p, "INCGHH_B")
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +income_merged <- merge_rec_data(income2001, income2003)
    +head(income_merged)
    +#>   INCGHH_A
    +#> 1        3
    +#> 2        3
    +#> 3        6
    +#> 4        3
    +#> 5        4
    +#> 6        4
    +tail(income_merged)
    +#>     INCGHH_A
    +#> 395    NA(c)
    +#> 396    NA(c)
    +#> 397    NA(c)
    +#> 398    NA(c)
    +#> 399    NA(c)
    +#> 400    NA(c)
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/multiple_conditions_fun1.html b/docs/reference/multiple_conditions_fun1.html index 417923f5..9bf42690 100644 --- a/docs/reference/multiple_conditions_fun1.html +++ b/docs/reference/multiple_conditions_fun1.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -54,8 +58,7 @@ takes 5 CCHS-defined conditions (heart disease, cancer, stroke, bowel disorder, and arthritis), and well one derived variable (respiratory condition) to count the number of conditions a respondent has." /> - - + @@ -73,7 +76,7 @@ - +
    @@ -95,7 +98,7 @@
    -
    multiple_conditions_fun1(
    -  CCC_121,
    -  CCC_131,
    -  CCC_151,
    -  CCC_171,
    -  resp_condition_der,
    -  CCC_051
    -)
    +
    multiple_conditions_fun1(
    +  CCC_121,
    +  CCC_131,
    +  CCC_151,
    +  CCC_171,
    +  resp_condition_der,
    +  CCC_051
    +)

    Arguments

    @@ -243,72 +246,74 @@

    See a

    Examples

    -
    # Using rec_with_table() to generate multiple_conditions in a CCHS - # cycle. - - # multiple_conditions_fun1() is specified in variable_details.csv along with - # the CCHS variables and cycles included. - - # To generate multiple_conditions, use rec_with_table() and specify the - # multiple_conditions, along with the variables that are derived from it. - # Since resp_condition_der is also a derived variable, you will have to - # specify the variables that are derived from it. In this example, data - # from the 2001 CCHS will be used, so DHHGAGE_cont, CCC_091, and CCC_91A, - # and CCC_031 will be specified along with resp_condition_der. - -library(cchsflow) - conditions_2001 <- suppressWarnings(rec_with_table(cchs2001_p, - c("DHHGAGE_cont", "CCC_091", - "CCC_91A", "CCC_031", "CCC_121","CCC_131","CCC_151", "CCC_171","CCC_280", - "resp_condition_der","CCC_051", "number_conditions")))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    - head(conditions_2001)
    #> CCC_031 CCC_051 CCC_091 CCC_121 CCC_131 CCC_151 CCC_171 CCC_91A DHHGAGE_cont -#> 1 2 2 2 1 2 2 2 2 85 -#> 2 2 2 2 2 2 2 2 2 85 -#> 3 2 2 2 2 2 2 2 2 32 -#> 4 2 2 2 2 2 2 2 2 77 -#> 5 2 2 NA(a) 2 2 2 2 2 22 -#> 6 2 2 2 2 2 2 2 2 77 -#> resp_condition_der number_conditions -#> 1 3 1 -#> 2 3 0 -#> 3 3 0 -#> 4 3 0 -#> 5 3 0 -#> 6 3 0
    - # Generating multiple_conditions with user inputted values - # Let's say you are an individual that has heart disease, bowel disorder, - # and arthritis. multiple_conditions_fun1() can be used to count the number - # of chronic conditions you have - -library(cchsflow) - num_conditions <- multiple_conditions_fun1(CCC_121 = 1, CCC_131 = 2, - CCC_151 = 2, CCC_171 = 1, resp_condition_der = 3, CCC_051 = 1) - -print(num_conditions)
    #> [1] 3
    -
    +
     # Using rec_with_table() to generate multiple_conditions in a CCHS
    + # cycle.
    + 
    + # multiple_conditions_fun1() is specified in variable_details.csv along with
    + # the CCHS variables and cycles included.
    + 
    + # To generate multiple_conditions, use rec_with_table() and specify the
    + # multiple_conditions, along with the variables that are derived from it.
    + # Since resp_condition_der is also a derived variable, you will have to
    + # specify the variables that are derived from it. In this example, data
    + # from the 2001 CCHS will be used, so DHHGAGE_cont, CCC_091, and CCC_91A,
    + # and CCC_031 will be specified along with resp_condition_der.
    + 
    +library(cchsflow)
    + conditions_2001 <- suppressWarnings(rec_with_table(cchs2001_p,
    + c("DHHGAGE_cont", "CCC_091",
    + "CCC_91A", "CCC_031", "CCC_121","CCC_131","CCC_151", "CCC_171","CCC_280",
    + "resp_condition_der","CCC_051", "number_conditions")))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    + 
    + head(conditions_2001)
    +#>   CCC_031 CCC_051 CCC_091 CCC_121 CCC_131 CCC_151 CCC_171 CCC_91A DHHGAGE_cont
    +#> 1       2       2       2       1       2       2       2       2           85
    +#> 2       2       2       2       2       2       2       2       2           85
    +#> 3       2       2       2       2       2       2       2       2           32
    +#> 4       2       2       2       2       2       2       2       2           77
    +#> 5       2       2   NA(a)       2       2       2       2       2           22
    +#> 6       2       2       2       2       2       2       2       2           77
    +#>   resp_condition_der number_conditions
    +#> 1                  3                 1
    +#> 2                  3                 0
    +#> 3                  3                 0
    +#> 4                  3                 0
    +#> 5                  3                 0
    +#> 6                  3                 0
    + 
    + # Generating multiple_conditions with user inputted values
    + # Let's say you are an individual that has heart disease, bowel disorder,
    + # and arthritis. multiple_conditions_fun1() can be used to count the number
    + # of chronic conditions you have
    + 
    +library(cchsflow)
    + num_conditions <- multiple_conditions_fun1(CCC_121 = 1, CCC_131 = 2, 
    + CCC_151 = 2, CCC_171 = 1, resp_condition_der = 3, CCC_051 = 1) 
    + 
    +print(num_conditions)
    +#> [1] 3
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/multiple_conditions_fun2.html b/docs/reference/multiple_conditions_fun2.html index da3ee071..bc4e1f93 100644 --- a/docs/reference/multiple_conditions_fun2.html +++ b/docs/reference/multiple_conditions_fun2.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -54,8 +58,7 @@ takes 6 CCHS-defined conditions (heart disease, cancer, stroke, bowel disorder, mood disorder and arthritis), and well one derived variable (respiratory condition) to count the number of conditions a respondent has." /> - - + @@ -73,7 +76,7 @@ - +
    @@ -95,7 +98,7 @@
    -
    multiple_conditions_fun2(
    -  CCC_121,
    -  CCC_131,
    -  CCC_151,
    -  CCC_171,
    -  CCC_280,
    -  resp_condition_der,
    -  CCC_051
    -)
    +
    multiple_conditions_fun2(
    +  CCC_121,
    +  CCC_131,
    +  CCC_151,
    +  CCC_171,
    +  CCC_280,
    +  resp_condition_der,
    +  CCC_051
    +)

    Arguments

    @@ -251,72 +254,73 @@

    See a

    Examples

    -
    # Using rec_with_table() to generate multiple_conditions in a CCHS - # cycle. - - # multiple_conditions_fun2() is specified in variable_details.csv along with - # the CCHS variables and cycles included. - - # To generate multiple_conditions, use rec_with_table() and specify the - # multiple_conditions, along with the variables that are derived from it. - # Since resp_condition_der is also a derived variable, you will have to - # specify the variables that are derived from it. In this example, data - # from the 2010 CCHS will be used, so DHHGAGE_cont, CCC_091, and CCC_031 - # will be specified along with resp_condition_der. - -library(cchsflow) - conditions_2009_2010 <- suppressWarnings(rec_with_table(cchs2009_2010_p, - c("DHHGAGE_cont", "CCC_091", - "CCC_031", "CCC_121","CCC_131","CCC_151", "CCC_171","CCC_280", - "resp_condition_der","CCC_051", "number_conditions")))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    - head(conditions_2009_2010)
    #> CCC_031 CCC_051 CCC_091 CCC_121 CCC_131 CCC_151 CCC_171 CCC_280 DHHGAGE_cont -#> 1 2 NA(a) NA(a) 2 2 2 2 2 13 -#> 2 2 2 NA(a) 2 2 2 2 2 27 -#> 3 2 1 2 2 2 2 2 1 62 -#> 4 2 2 2 2 2 2 2 2 52 -#> 5 2 2 2 2 2 2 2 2 67 -#> 6 2 1 2 2 2 2 2 2 62 -#> resp_condition_der number_conditions -#> 1 3 1 -#> 2 3 1 -#> 3 3 3 -#> 4 3 1 -#> 5 3 1 -#> 6 3 2
    - # Generating multiple_conditions with user inputted values - # Let's say you are an individual that has heart disease, bowel disorder, - # and arthritis. multiple_conditions_fun2() can be used to count the number - # of chronic conditions you have - -library(cchsflow) - num_conditions <- multiple_conditions_fun2(CCC_121 = 1, CCC_131 = 2, - CCC_151 = 2, CCC_171 = 1, CCC_280 = 2, resp_condition_der = 3, CCC_051 = 1) - -print(num_conditions)
    #> [1] 3
    -
    +
     # Using rec_with_table() to generate multiple_conditions in a CCHS
    + # cycle.
    + 
    + # multiple_conditions_fun2() is specified in variable_details.csv along with
    + # the CCHS variables and cycles included.
    + 
    + # To generate multiple_conditions, use rec_with_table() and specify the
    + # multiple_conditions, along with the variables that are derived from it.
    + # Since resp_condition_der is also a derived variable, you will have to
    + # specify the variables that are derived from it. In this example, data
    + # from the 2010 CCHS will be used, so DHHGAGE_cont, CCC_091, and CCC_031
    + # will be specified along with resp_condition_der.
    + 
    +library(cchsflow)
    + conditions_2009_2010 <- suppressWarnings(rec_with_table(cchs2009_2010_p,
    + c("DHHGAGE_cont", "CCC_091",
    + "CCC_031", "CCC_121","CCC_131","CCC_151", "CCC_171","CCC_280",
    + "resp_condition_der","CCC_051", "number_conditions")))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    + 
    + head(conditions_2009_2010)
    +#>   CCC_031 CCC_051 CCC_091 CCC_121 CCC_131 CCC_151 CCC_171 CCC_280 DHHGAGE_cont
    +#> 1       2   NA(a)   NA(a)       2       2       2       2       2           13
    +#> 2       2       2   NA(a)       2       2       2       2       2           27
    +#> 3       2       1       2       2       2       2       2       1           62
    +#> 4       2       2       2       2       2       2       2       2           52
    +#> 5       2       2       2       2       2       2       2       2           67
    +#> 6       2       1       2       2       2       2       2       2           62
    +#>   resp_condition_der number_conditions
    +#> 1                  3                 1
    +#> 2                  3                 1
    +#> 3                  3                 3
    +#> 4                  3                 1
    +#> 5                  3                 1
    +#> 6                  3                 2
    + 
    + # Generating multiple_conditions with user inputted values
    + # Let's say you are an individual that has heart disease, bowel disorder,
    + # and arthritis. multiple_conditions_fun2() can be used to count the number
    + # of chronic conditions you have
    + 
    +library(cchsflow)
    + num_conditions <- multiple_conditions_fun2(CCC_121 = 1, CCC_131 = 2, 
    + CCC_151 = 2, CCC_171 = 1, CCC_280 = 2, resp_condition_der = 3, CCC_051 = 1) 
    +
    +print(num_conditions)
    +#> [1] 3
    +
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/pack_years_fun.html b/docs/reference/pack_years_fun.html index 3d76db80..997abdf2 100644 --- a/docs/reference/pack_years_fun.html +++ b/docs/reference/pack_years_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ measures an individual's smoking pack-years based on various CCHS smoking variables. This is a popular variable used by researchers to quantify lifetime exposure to cigarette use." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    pack_years_fun(
    -  SMKDSTY,
    -  DHHGAGE_cont,
    -  time_quit_smoking,
    -  SMKG203_cont,
    -  SMKG207_cont,
    -  SMK_204,
    -  SMK_05B,
    -  SMK_208,
    -  SMK_05C,
    -  SMKG01C_cont,
    -  SMK_01A
    -)
    +
    pack_years_fun(
    +  SMKDSTY_A,
    +  DHHGAGE_cont,
    +  time_quit_smoking,
    +  SMKG203_cont,
    +  SMKG207_cont,
    +  SMK_204,
    +  SMK_05B,
    +  SMK_208,
    +  SMK_05C,
    +  SMKG01C_cont,
    +  SMK_01A
    +)

    Arguments

    - - + + @@ -259,142 +262,163 @@

    Details 10 pack-years.

    Examples

    -
    # Using pack_years_fun() to create pack-years values across CCHS cycles -# pack_years_fun() is specified in variable_details.csv along with the CCHS -# variables and cycles included. - -# To transform pack_years_der across cycles, use rec_with_table() for each -# CCHS cycle and specify pack_years_der, along with each smoking variable. -# Since time_quit_smoking_der is also a derived -# variable, you will have to specify the variables that are derived from it. -# Then by using merge_rec_data(), you can combine pack_years_der across -# cycles - -library(cchsflow) - -pack_years2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", - "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", - "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(pack_years2009_2010)
    #> DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY -#> 1 13 2 NA NA NA(a) NA NA 6 -#> 2 27 2 NA NA NA(a) NA NA 6 -#> 3 62 2 NA NA NA(a) NA NA 5 -#> 4 52 1 NA NA 4 NA 20 4 -#> 5 67 1 NA NA 4 NA 35 4 -#> 6 62 1 NA NA 4 NA 25 4 -#> SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking -#> 1 NA NA(a) NA NA NA -#> 2 NA NA(a) NA NA NA -#> 3 16 NA(a) NA NA NA -#> 4 16 2 NA 18.5 8 -#> 5 16 3 NA 16.0 12 -#> 6 8 3 NA 8.0 12 -#> pack_years_der -#> 1 0.000 -#> 2 0.000 -#> 3 0.007 -#> 4 25.500 -#> 5 68.250 -#> 6 52.500
    -pack_years2011_2012 <- rec_with_table( - cchs2011_2012_p,c( - "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", - "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", - "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(pack_years2011_2012)
    #> DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY -#> 195 72.0 1 NA NA 4 NA 3 4 -#> 196 22.0 2 NA NA NA(a) NA NA 5 -#> 197 18.5 2 NA NA NA(a) NA NA 6 -#> 198 42.0 1 NA NA 4 NA 10 4 -#> 199 62.0 1 NA NA NA(a) 20 NA 1 -#> 200 52.0 1 NA NA NA(a) 13 NA 1 -#> SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking -#> 195 16 3 NA 16 12 -#> 196 13 NA(a) NA NA NA -#> 197 NA NA(a) NA NA NA -#> 198 16 2 NA 16 8 -#> 199 16 NA(a) NA NA NA -#> 200 13 NA(a) 16 NA NA -#> pack_years_der -#> 195 6.600 -#> 196 0.007 -#> 197 0.000 -#> 198 9.000 -#> 199 NA -#> 200 23.400
    -combined_pack_years <- suppressWarnings(merge_rec_data(pack_years2009_2010, - pack_years2011_2012)) - -head(combined_pack_years)
    #> DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY -#> 1 13 2 NA NA NA(a) NA NA 6 -#> 2 27 2 NA NA NA(a) NA NA 6 -#> 3 62 2 NA NA NA(a) NA NA 5 -#> 4 52 1 NA NA 4 NA 20 4 -#> 5 67 1 NA NA 4 NA 35 4 -#> 6 62 1 NA NA 4 NA 25 4 -#> SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking -#> 1 NA NA(a) NA NA NA -#> 2 NA NA(a) NA NA NA -#> 3 16 NA(a) NA NA NA -#> 4 16 2 NA 18.5 8 -#> 5 16 3 NA 16.0 12 -#> 6 8 3 NA 8.0 12 -#> pack_years_der -#> 1 0.000 -#> 2 0.000 -#> 3 0.007 -#> 4 25.500 -#> 5 68.250 -#> 6 52.500
    tail(combined_pack_years)
    #> DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY -#> 395 72.0 1 NA NA 4 NA 3 4 -#> 396 22.0 2 NA NA NA(a) NA NA 5 -#> 397 18.5 2 NA NA NA(a) NA NA 6 -#> 398 42.0 1 NA NA 4 NA 10 4 -#> 399 62.0 1 NA NA NA(a) 20 NA 1 -#> 400 52.0 1 NA NA NA(a) 13 NA 1 -#> SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking -#> 395 16 3 NA 16 12 -#> 396 13 NA(a) NA NA NA -#> 397 NA NA(a) NA NA NA -#> 398 16 2 NA 16 8 -#> 399 16 NA(a) NA NA NA -#> 400 13 NA(a) 16 NA NA -#> pack_years_der -#> 395 6.600 -#> 396 0.007 -#> 397 0.000 -#> 398 9.000 -#> 399 NA -#> 400 23.400
    +
    # Using pack_years_fun() to create pack-years values across CCHS cycles
    +# pack_years_fun() is specified in variable_details.csv along with the CCHS
    +# variables and cycles included.
    +
    +# To transform pack_years_der across cycles, use rec_with_table() for each
    +# CCHS cycle and specify pack_years_der, along with each smoking variable.
    +# Since time_quit_smoking_der is also a derived 
    +# variable, you will have to specify the variables that are derived from it.
    +# Then by using merge_rec_data(), you can combine pack_years_der across
    +# cycles
    +
    +library(cchsflow)
    +
    +pack_years2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +    "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208",
    +    "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +head(pack_years2009_2010)
    +#>   DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 1           13       2      NA      NA     NA(a)      NA      NA         6
    +#> 2           27       2      NA      NA     NA(a)      NA      NA         6
    +#> 3           62       2      NA      NA     NA(a)      NA      NA         5
    +#> 4           52       1      NA      NA         4      NA      20         4
    +#> 5           67       1      NA      NA         4      NA      35         4
    +#> 6           62       1      NA      NA         4      NA      25         4
    +#>   SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 1           NA   NA(a)           NA           NA                NA
    +#> 2           NA   NA(a)           NA           NA                NA
    +#> 3           16   NA(a)           NA           NA                NA
    +#> 4           16       2           NA         18.5                 8
    +#> 5           16       3           NA         16.0                12
    +#> 6            8       3           NA          8.0                12
    +#>   pack_years_der
    +#> 1          0.000
    +#> 2          0.000
    +#> 3          0.007
    +#> 4         25.500
    +#> 5         68.250
    +#> 6         52.500
    +
    +pack_years2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +    "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208",
    +    "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +tail(pack_years2011_2012)
    +#>     DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 195         72.0       1      NA      NA         4      NA       3         4
    +#> 196         22.0       2      NA      NA     NA(a)      NA      NA         5
    +#> 197         18.5       2      NA      NA     NA(a)      NA      NA         6
    +#> 198         42.0       1      NA      NA         4      NA      10         4
    +#> 199         62.0       1      NA      NA     NA(a)      20      NA         1
    +#> 200         52.0       1      NA      NA     NA(a)      13      NA         1
    +#>     SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 195           16       3           NA           16                12
    +#> 196           13   NA(a)           NA           NA                NA
    +#> 197           NA   NA(a)           NA           NA                NA
    +#> 198           16       2           NA           16                 8
    +#> 199           16   NA(a)           NA           NA                NA
    +#> 200           13   NA(a)           16           NA                NA
    +#>     pack_years_der
    +#> 195          6.600
    +#> 196          0.007
    +#> 197          0.000
    +#> 198          9.000
    +#> 199             NA
    +#> 200         23.400
    +
    +combined_pack_years <- suppressWarnings(merge_rec_data(pack_years2009_2010,
    + pack_years2011_2012))
    +
    +head(combined_pack_years)
    +#>   DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 1           13       2      NA      NA     NA(a)      NA      NA         6
    +#> 2           27       2      NA      NA     NA(a)      NA      NA         6
    +#> 3           62       2      NA      NA     NA(a)      NA      NA         5
    +#> 4           52       1      NA      NA         4      NA      20         4
    +#> 5           67       1      NA      NA         4      NA      35         4
    +#> 6           62       1      NA      NA         4      NA      25         4
    +#>   SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 1           NA   NA(a)           NA           NA                NA
    +#> 2           NA   NA(a)           NA           NA                NA
    +#> 3           16   NA(a)           NA           NA                NA
    +#> 4           16       2           NA         18.5                 8
    +#> 5           16       3           NA         16.0                12
    +#> 6            8       3           NA          8.0                12
    +#>   pack_years_der
    +#> 1          0.000
    +#> 2          0.000
    +#> 3          0.007
    +#> 4         25.500
    +#> 5         68.250
    +#> 6         52.500
    +tail(combined_pack_years)
    +#>     DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 395         72.0       1      NA      NA         4      NA       3         4
    +#> 396         22.0       2      NA      NA     NA(a)      NA      NA         5
    +#> 397         18.5       2      NA      NA     NA(a)      NA      NA         6
    +#> 398         42.0       1      NA      NA         4      NA      10         4
    +#> 399         62.0       1      NA      NA     NA(a)      20      NA         1
    +#> 400         52.0       1      NA      NA     NA(a)      13      NA         1
    +#>     SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 395           16       3           NA           16                12
    +#> 396           13   NA(a)           NA           NA                NA
    +#> 397           NA   NA(a)           NA           NA                NA
    +#> 398           16       2           NA           16                 8
    +#> 399           16   NA(a)           NA           NA                NA
    +#> 400           13   NA(a)           16           NA                NA
    +#>     pack_years_der
    +#> 395          6.600
    +#> 396          0.007
    +#> 397          0.000
    +#> 398          9.000
    +#> 399             NA
    +#> 400         23.400
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/pack_years_fun_cat.html b/docs/reference/pack_years_fun_cat.html new file mode 100644 index 00000000..8dc5aaeb --- /dev/null +++ b/docs/reference/pack_years_fun_cat.html @@ -0,0 +1,391 @@ + + + + + + + + +Categorical smoking pack-years — pack_years_fun_cat • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical derived variable +(pack_years_cat) that categorizes smoking pack-years (pack_years_der).

    +
    + +
    pack_years_fun_cat(pack_years_der)
    + +

    Arguments

    +
    SMKDSTY

    derived variable that classifies an individual's smoking -status.

    SMKDSTY_A

    variable used in CCHS cycles 2001-2014 that classifies an +individual's smoking status.

    DHHGAGE_cont
    + + + + + +
    pack_years_der

    derived variable that calculates smoking pack-years +See pack_years_fun for documentation on how variable +was derived.

    + +

    Value

    + +

    value for pack year categories in the pack_years_cat variable.

    +

    Details

    + +

    pack-years is calculated by multiplying the number of cigarette +packs per day (20 cigarettes per pack) by the number of years.The categories +were based on the Cardiovascular Disease Population Risk Tool +(Douglas Manuel et al. 2018).

    +

    pack_years_cat uses the derived variable pack_years_der. Pack_years_der uses +age and various smoking variables that have been transformed by cchsflow (see +documentation on pack_year_der). In order to categorize pack years across CCHS +cycles, age and smoking variables must be transformed and harmonized.

    + +

    Examples

    +
     
    +# Using pack_years_fun_cat() to categorize pack year values across CCHS cycles
    +# pack_years_fun_cat() is specified in variable_details.csv along with the 
    +# CCHS variables and cycles included.
    +
    +# To transform pack_years_cat across cycles, use rec_with_table() for each
    +# CCHS cycle and specify pack_years_cat.
    +# Since pack_year_der is also also derived variable, you will have to specify 
    +# the variables that are derived from it.
    +# Since time_quit_smoking_der is also a derived variable in pack_year_der, 
    +# you will have to specify the variables that are derived from it.
    +# Then by using merge_rec_data(), you can combine pack_years_cat across
    +# cycles.
    +
    +library(cchsflow)
    +
    +pack_years_cat_2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +    "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208",
    +    "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +head(pack_years_cat_2009_2010)
    +#>   DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 1           13       2      NA      NA     NA(a)      NA      NA         6
    +#> 2           27       2      NA      NA     NA(a)      NA      NA         6
    +#> 3           62       2      NA      NA     NA(a)      NA      NA         5
    +#> 4           52       1      NA      NA         4      NA      20         4
    +#> 5           67       1      NA      NA         4      NA      35         4
    +#> 6           62       1      NA      NA         4      NA      25         4
    +#>   SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 1           NA   NA(a)           NA           NA                NA
    +#> 2           NA   NA(a)           NA           NA                NA
    +#> 3           16   NA(a)           NA           NA                NA
    +#> 4           16       2           NA         18.5                 8
    +#> 5           16       3           NA         16.0                12
    +#> 6            8       3           NA          8.0                12
    +#>   pack_years_der pack_years_cat
    +#> 1          0.000              1
    +#> 2          0.000              1
    +#> 3          0.007              2
    +#> 4         25.500              6
    +#> 5         68.250              8
    +#> 6         52.500              8
    +
    +pack_years_cat_2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +    "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +    "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208",
    +    "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +#> NOTE for SMKG207_cont: Missing 2001 Data
    +
    +tail(pack_years_cat_2011_2012)
    +#>     DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 195         72.0       1      NA      NA         4      NA       3         4
    +#> 196         22.0       2      NA      NA     NA(a)      NA      NA         5
    +#> 197         18.5       2      NA      NA     NA(a)      NA      NA         6
    +#> 198         42.0       1      NA      NA         4      NA      10         4
    +#> 199         62.0       1      NA      NA     NA(a)      20      NA         1
    +#> 200         52.0       1      NA      NA     NA(a)      13      NA         1
    +#>     SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 195           16       3           NA           16                12
    +#> 196           13   NA(a)           NA           NA                NA
    +#> 197           NA   NA(a)           NA           NA                NA
    +#> 198           16       2           NA           16                 8
    +#> 199           16   NA(a)           NA           NA                NA
    +#> 200           13   NA(a)           16           NA                NA
    +#>     pack_years_der pack_years_cat
    +#> 195          6.600              4
    +#> 196          0.007              2
    +#> 197          0.000              1
    +#> 198          9.000              4
    +#> 199             NA          NA(b)
    +#> 200         23.400              6
    +
    +combined_pack_years_cat <- suppressWarnings(merge_rec_data
    +(pack_years_cat_2009_2010,pack_years_cat_2011_2012))
    +
    +head(combined_pack_years_cat)
    +#>   DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 1           13       2      NA      NA     NA(a)      NA      NA         6
    +#> 2           27       2      NA      NA     NA(a)      NA      NA         6
    +#> 3           62       2      NA      NA     NA(a)      NA      NA         5
    +#> 4           52       1      NA      NA         4      NA      20         4
    +#> 5           67       1      NA      NA         4      NA      35         4
    +#> 6           62       1      NA      NA         4      NA      25         4
    +#>   SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 1           NA   NA(a)           NA           NA                NA
    +#> 2           NA   NA(a)           NA           NA                NA
    +#> 3           16   NA(a)           NA           NA                NA
    +#> 4           16       2           NA         18.5                 8
    +#> 5           16       3           NA         16.0                12
    +#> 6            8       3           NA          8.0                12
    +#>   pack_years_der pack_years_cat
    +#> 1          0.000              1
    +#> 2          0.000              1
    +#> 3          0.007              2
    +#> 4         25.500              6
    +#> 5         68.250              8
    +#> 6         52.500              8
    +tail(combined_pack_years_cat)
    +#>     DHHGAGE_cont SMK_01A SMK_05B SMK_05C SMK_09A_B SMK_204 SMK_208 SMKDSTY_A
    +#> 395         72.0       1      NA      NA         4      NA       3         4
    +#> 396         22.0       2      NA      NA     NA(a)      NA      NA         5
    +#> 397         18.5       2      NA      NA     NA(a)      NA      NA         6
    +#> 398         42.0       1      NA      NA         4      NA      10         4
    +#> 399         62.0       1      NA      NA     NA(a)      20      NA         1
    +#> 400         52.0       1      NA      NA     NA(a)      13      NA         1
    +#>     SMKG01C_cont SMKG09C SMKG203_cont SMKG207_cont time_quit_smoking
    +#> 395           16       3           NA           16                12
    +#> 396           13   NA(a)           NA           NA                NA
    +#> 397           NA   NA(a)           NA           NA                NA
    +#> 398           16       2           NA           16                 8
    +#> 399           16   NA(a)           NA           NA                NA
    +#> 400           13   NA(a)           16           NA                NA
    +#>     pack_years_der pack_years_cat
    +#> 395          6.600              4
    +#> 396          0.007              2
    +#> 397          0.000              1
    +#> 398          9.000              4
    +#> 399             NA          NA(b)
    +#> 400         23.400              6
    +
    + + + + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    + + + + + + + + + + + + diff --git a/docs/reference/pct_time_fun.html b/docs/reference/pct_time_fun.html index 8309980b..d77825b8 100644 --- a/docs/reference/pct_time_fun.html +++ b/docs/reference/pct_time_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    pct_time_fun(DHHGAGE_cont, SDCGCBG, SDCGRES)
    +
    pct_time_fun(DHHGAGE_cont, SDCGCBG, SDCGRES)

    Arguments

    @@ -205,86 +208,101 @@

    Note

    Canada for over 10 years is assigned a value of 15 years.

    Examples

    -
    # Using pct_time_fun() to create percent time values between CCHS cycles -# pct_time_fun() is specified in variable_details.csv along with the CCHS -# variables and cycles included. - -# To transform pct_time_der across cycles, use rec_with_table() for each CCHS -# cycle and specify pct_time_der, along with age (DHHGAGE_cont), whether or -# not someone was born in Canada (SDCGCBG), how long someone has lived in -# Canada (SDCGRES). Then by using merge_rec_data(), you can combine -# pct_time_der across cycles - -library(cchsflow) -pct_time2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "DHHGAGE_cont", "SDCGCBG", - "SDCGRES", "pct_time_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    #> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    head(pct_time2009_2010)
    #> DHHGAGE_cont SDCGCBG SDCGRES pct_time_der -#> 1 13 1 NA(a) 100.00000 -#> 2 27 2 2 55.55556 -#> 3 62 1 NA(a) 100.00000 -#> 4 52 1 NA(a) 100.00000 -#> 5 67 1 NA(a) 100.00000 -#> 6 62 1 NA(a) 100.00000
    -pct_time2011_2012 <- rec_with_table( - cchs2011_2012_p, c( - "DHHGAGE_cont", "SDCGCBG", - "SDCGRES", "pct_time_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    #> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    tail(pct_time2011_2012)
    #> DHHGAGE_cont SDCGCBG SDCGRES pct_time_der -#> 195 72.0 2 2 20.83333 -#> 196 22.0 1 NA(a) 100.00000 -#> 197 18.5 1 NA(a) 100.00000 -#> 198 42.0 2 2 35.71429 -#> 199 62.0 1 NA(a) 100.00000 -#> 200 52.0 1 NA(a) 100.00000
    -combined_pct_time <- merge_rec_data(pct_time2009_2010, pct_time2011_2012) -head(combined_pct_time)
    #> DHHGAGE_cont SDCGCBG SDCGRES pct_time_der -#> 1 13 1 NA(a) 100.00000 -#> 2 27 2 2 55.55556 -#> 3 62 1 NA(a) 100.00000 -#> 4 52 1 NA(a) 100.00000 -#> 5 67 1 NA(a) 100.00000 -#> 6 62 1 NA(a) 100.00000
    tail(combined_pct_time)
    #> DHHGAGE_cont SDCGCBG SDCGRES pct_time_der -#> 395 72.0 2 2 20.83333 -#> 396 22.0 1 NA(a) 100.00000 -#> 397 18.5 1 NA(a) 100.00000 -#> 398 42.0 2 2 35.71429 -#> 399 62.0 1 NA(a) 100.00000 -#> 400 52.0 1 NA(a) 100.00000
    -# Using pct_time_fun() to generate a value for percent time spent in Canada -# with user inputted values Let's say you are 27 years old who was born -# outside of Canada and have been living in Canada for less than 10 years. -# Your estimated percent time spent in Canada can be calculated as follows: - -pct_time <- pct_time_fun(DHHGAGE_cont = 27, SDCGCBG = 2, SDCGRES = 1) - -print(pct_time)
    #> [1] 16.66667
    +
    # Using pct_time_fun() to create percent time values between CCHS cycles
    +# pct_time_fun() is specified in variable_details.csv along with the CCHS
    +# variables and cycles included.
    +
    +# To transform pct_time_der across cycles, use rec_with_table() for each CCHS
    +# cycle and specify pct_time_der, along with age (DHHGAGE_cont), whether or
    +# not someone was born in Canada (SDCGCBG), how long someone has lived in
    +# Canada (SDCGRES). Then by using merge_rec_data(), you can combine
    +# pct_time_der across cycles
    +
    +library(cchsflow)
    +pct_time2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "DHHGAGE_cont", "SDCGCBG",
    +    "SDCGRES", "pct_time_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +head(pct_time2009_2010)
    +#>   DHHGAGE_cont SDCGCBG SDCGRES pct_time_der
    +#> 1           13       1   NA(a)    100.00000
    +#> 2           27       2       2     55.55556
    +#> 3           62       1   NA(a)    100.00000
    +#> 4           52       1   NA(a)    100.00000
    +#> 5           67       1   NA(a)    100.00000
    +#> 6           62       1   NA(a)    100.00000
    +
    +pct_time2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,  c(
    +    "DHHGAGE_cont", "SDCGCBG",
    +    "SDCGRES", "pct_time_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +tail(pct_time2011_2012)
    +#>     DHHGAGE_cont SDCGCBG SDCGRES pct_time_der
    +#> 195         72.0       2       2     20.83333
    +#> 196         22.0       1   NA(a)    100.00000
    +#> 197         18.5       1   NA(a)    100.00000
    +#> 198         42.0       2       2     35.71429
    +#> 199         62.0       1   NA(a)    100.00000
    +#> 200         52.0       1   NA(a)    100.00000
    +
    +combined_pct_time <- merge_rec_data(pct_time2009_2010, pct_time2011_2012)
    +head(combined_pct_time)
    +#>   DHHGAGE_cont SDCGCBG SDCGRES pct_time_der
    +#> 1           13       1   NA(a)    100.00000
    +#> 2           27       2       2     55.55556
    +#> 3           62       1   NA(a)    100.00000
    +#> 4           52       1   NA(a)    100.00000
    +#> 5           67       1   NA(a)    100.00000
    +#> 6           62       1   NA(a)    100.00000
    +tail(combined_pct_time)
    +#>     DHHGAGE_cont SDCGCBG SDCGRES pct_time_der
    +#> 395         72.0       2       2     20.83333
    +#> 396         22.0       1   NA(a)    100.00000
    +#> 397         18.5       1   NA(a)    100.00000
    +#> 398         42.0       2       2     35.71429
    +#> 399         62.0       1   NA(a)    100.00000
    +#> 400         52.0       1   NA(a)    100.00000
    +
    +# Using pct_time_fun() to generate a value for percent time spent in Canada
    +# with user inputted values Let's say you are 27 years old who was born
    +# outside of Canada and have been living in Canada for less than 10 years.
    +# Your estimated percent time spent in Canada can be calculated as follows:
    +
    +pct_time <- pct_time_fun(DHHGAGE_cont = 27, SDCGCBG = 2, SDCGRES = 1)
    +
    +print(pct_time)
    +#> [1] 16.66667
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/pct_time_fun_cat.html b/docs/reference/pct_time_fun_cat.html new file mode 100644 index 00000000..cda43157 --- /dev/null +++ b/docs/reference/pct_time_fun_cat.html @@ -0,0 +1,321 @@ + + + + + + + + +Categorical percent time in Canada — pct_time_fun_cat • cchsflow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    This function creates a categorical derived variable +(pct_time_der_cat10) that categorizes the derived percent time in Canada +variable (pct_time_der).

    +
    + +
    pct_time_fun_cat(pct_time_der)
    + +

    Arguments

    +
    + + + + + +
    pct_time_der

    derived continuous percent time in Canada. +See pct_time_fun for documentation on how variable was derived.

    + +

    Value

    + +

    value for categorical percent time in Canada using pct_time_der +variable.

    +

    Details

    + +

    The percent time in Canada provides an estimated percentage of the +time a person's life was spent in Canada.The categorical percent time in +Canada divides the continuous value into 10 percent intervals.

    +

    pct_time_der_cat10 uses the derived variable pct_time_der. pct_time_der uses +various variables that have been transformed by cchsflow (see documentation +on pct_time_der). In order to categorize percent time in Canada across CCHS +cycles, the variables must be transformed and harmonized.

    + +

    Examples

    +
    # Using pct_time_fun_cat() to create categorical percent time values 
    +# between CCHS cycles.
    +# pct_time_fun_cat() is specified in variable_details.csv along with the CCHS
    +# variables and cycles included.
    +
    +# To transform pct_time_der_cat10 across cycles, use rec_with_table() for 
    +# each CCHS cycle.
    +# Since pct_time_der is a derived variable, you will have to specify the 
    +# variables that are derived from it.
    +# Then by using merge_rec_data(), you can combine pct_time_der_cat10 across 
    +# cycles.
    +
    +library(cchsflow)
    +pct_time_cat2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "DHHGAGE_cont", "SDCGCBG",
    +    "SDCGRES", "pct_time_der", "pct_time_der_cat10"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +head(pct_time_cat2009_2010)
    +#>   DHHGAGE_cont SDCGCBG SDCGRES pct_time_der pct_time_der_cat10
    +#> 1           13       1   NA(a)    100.00000                 10
    +#> 2           27       2       2     55.55556                  6
    +#> 3           62       1   NA(a)    100.00000                 10
    +#> 4           52       1   NA(a)    100.00000                 10
    +#> 5           67       1   NA(a)    100.00000                 10
    +#> 6           62       1   NA(a)    100.00000                 10
    +
    +pct_time_cat2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,  c(
    +    "DHHGAGE_cont", "SDCGCBG",
    +    "SDCGRES", "pct_time_der", "pct_time_der_cat10"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SDCGCBG: CCHS 2001 does not have don't know (7) or refusal (8)
    +#> NOTE for SDCGRES: CCHS 2001 missing don't know (7), refusal (8)
    +tail(pct_time_cat2011_2012)
    +#>     DHHGAGE_cont SDCGCBG SDCGRES pct_time_der pct_time_der_cat10
    +#> 195         72.0       2       2     20.83333                  3
    +#> 196         22.0       1   NA(a)    100.00000                 10
    +#> 197         18.5       1   NA(a)    100.00000                 10
    +#> 198         42.0       2       2     35.71429                  4
    +#> 199         62.0       1   NA(a)    100.00000                 10
    +#> 200         52.0       1   NA(a)    100.00000                 10
    +
    +combined_pct_time_cat <- merge_rec_data(pct_time_cat2009_2010, 
    +pct_time_cat2011_2012)
    +head(combined_pct_time_cat)
    +#>   DHHGAGE_cont SDCGCBG SDCGRES pct_time_der pct_time_der_cat10
    +#> 1           13       1   NA(a)    100.00000                 10
    +#> 2           27       2       2     55.55556                  6
    +#> 3           62       1   NA(a)    100.00000                 10
    +#> 4           52       1   NA(a)    100.00000                 10
    +#> 5           67       1   NA(a)    100.00000                 10
    +#> 6           62       1   NA(a)    100.00000                 10
    +tail(combined_pct_time_cat)
    +#>     DHHGAGE_cont SDCGCBG SDCGRES pct_time_der pct_time_der_cat10
    +#> 395         72.0       2       2     20.83333                  3
    +#> 396         22.0       1   NA(a)    100.00000                 10
    +#> 397         18.5       1   NA(a)    100.00000                 10
    +#> 398         42.0       2       2     35.71429                  4
    +#> 399         62.0       1   NA(a)    100.00000                 10
    +#> 400         52.0       1   NA(a)    100.00000                 10
    +
    +
    + + + + + +
    + + +
    +

    Site built with pkgdown 1.6.1.

    +
    + +
    + + + + + + + + + + + + diff --git a/docs/reference/rec_with_table.html b/docs/reference/rec_with_table.html index 5abc550e..7ac9ce7d 100644 --- a/docs/reference/rec_with_table.html +++ b/docs/reference/rec_with_table.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -51,8 +55,7 @@ - - + @@ -70,7 +73,7 @@ - +
    @@ -92,7 +95,7 @@
    -
    rec_with_table(
    -  data,
    -  variables = NULL,
    -  database_name = NULL,
    -  variable_details = NULL,
    -  else_value = NA,
    -  append_to_data = FALSE,
    -  log = FALSE,
    -  notes = TRUE,
    -  var_labels = NULL,
    -  custom_function_path = NULL,
    -  attach_data_name = FALSE
    -)
    +
    rec_with_table(
    +  data,
    +  variables = NULL,
    +  database_name = NULL,
    +  variable_details = NULL,
    +  else_value = NA,
    +  append_to_data = FALSE,
    +  log = FALSE,
    +  notes = TRUE,
    +  var_labels = NULL,
    +  custom_function_path = NULL,
    +  attach_data_name = FALSE
    +)

    Arguments

    @@ -246,7 +249,7 @@

    Value

    Details

    The variable_details - dataframe needs the following variables to function:

    + dataframe needs the following variables to function:

    variable

    name of new (mutated) variable that is recoded

    toType

    type the variable is being recoded to cat = categorical, cont = continuous

    @@ -268,7 +271,7 @@

    Details For example in rec_w_table variable_details$recFrom = 2; variable_details$recTo = 4 is the same as sjmisc::rec(rec = "2=4"). - the pairs are obtained from the RecFrom and RecTo columns

    + the pairs are obtained from the RecFrom and RecTo columns

    recode pairs

    each recode pair is row. see above example or PBC-variableDetails.csv

    multiple values

    multiple old values that should be recoded into @@ -302,70 +305,82 @@

    Details

    Examples

    -
    library(cchsflow) -bmi2001 <- rec_with_table( - data = cchs2001_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    #> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    -head(bmi2001)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 1 1.422 56.25 27.81784 -#> 2 1.549 51.75 21.56788 -#> 3 1.803 78.75 24.22474 -#> 4 1.575 60.75 24.48980 -#> 5 1.727 63.00 21.12301 -#> 6 1.829 91.80 27.44197
    -bmi2011_2012 <- rec_with_table( - data = cchs2011_2012_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    -tail(bmi2011_2012)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 195 1.600 64.35 25.13672 -#> 196 1.880 80.10 22.66297 -#> 197 1.753 78.75 25.62635 -#> 198 1.651 83.70 30.70657 -#> 199 1.930 74.25 19.93342 -#> 200 1.575 76.50 30.83900
    -combined_bmi <- bind_rows(bmi2001, bmi2011_2012) -head(combined_bmi)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 1 1.422 56.25 27.81784 -#> 2 1.549 51.75 21.56788 -#> 3 1.803 78.75 24.22474 -#> 4 1.575 60.75 24.48980 -#> 5 1.727 63.00 21.12301 -#> 6 1.829 91.80 27.44197
    tail(combined_bmi)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> 395 1.600 64.35 25.13672 -#> 396 1.880 80.10 22.66297 -#> 397 1.753 78.75 25.62635 -#> 398 1.651 83.70 30.70657 -#> 399 1.930 74.25 19.93342 -#> 400 1.575 76.50 30.83900
    +
    library(cchsflow)
    +bmi2001 <- rec_with_table(
    +  data = cchs2001_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    +#> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    +
    +head(bmi2001)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der
    +#> 1   1.422   56.25    27.81784
    +#> 2   1.549   51.75    21.56788
    +#> 3   1.803   78.75    24.22474
    +#> 4   1.575   60.75    24.48980
    +#> 5   1.727   63.00    21.12301
    +#> 6   1.829   91.80    27.44197
    +
    +bmi2011_2012 <- rec_with_table(
    +  data = cchs2011_2012_p,  c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: Height is a reported in meters from 2005 CCHS onwards
    +
    +tail(bmi2011_2012)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der
    +#> 195   1.600   64.35    25.13672
    +#> 196   1.880   80.10    22.66297
    +#> 197   1.753   78.75    25.62635
    +#> 198   1.651   83.70    30.70657
    +#> 199   1.930   74.25    19.93342
    +#> 200   1.575   76.50    30.83900
    +
    +combined_bmi <- bind_rows(bmi2001, bmi2011_2012)
    +head(combined_bmi)
    +#>   HWTGHTM HWTGWTK HWTGBMI_der
    +#> 1   1.422   56.25    27.81784
    +#> 2   1.549   51.75    21.56788
    +#> 3   1.803   78.75    24.22474
    +#> 4   1.575   60.75    24.48980
    +#> 5   1.727   63.00    21.12301
    +#> 6   1.829   91.80    27.44197
    +tail(combined_bmi)
    +#>     HWTGHTM HWTGWTK HWTGBMI_der
    +#> 395   1.600   64.35    25.13672
    +#> 396   1.880   80.10    22.66297
    +#> 397   1.753   78.75    25.62635
    +#> 398   1.651   83.70    30.70657
    +#> 399   1.930   74.25    19.93342
    +#> 400   1.575   76.50    30.83900
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/recode_columns.html b/docs/reference/recode_columns.html index 122b6898..16ea0568 100644 --- a/docs/reference/recode_columns.html +++ b/docs/reference/recode_columns.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -51,8 +55,7 @@ - - + @@ -70,7 +73,7 @@ - +
    @@ -92,7 +95,7 @@
    -
    recode_columns(
    -  data,
    -  variables_to_process,
    -  data_name,
    -  log,
    -  print_note,
    -  else_default
    -)
    +
    recode_columns(
    +  data,
    +  variables_to_process,
    +  data_name,
    +  log,
    +  print_note,
    +  else_default
    +)

    Arguments

    @@ -213,24 +216,21 @@

    Value

    Returns recoded and labeled data

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/recode_variable_NA_formating.html b/docs/reference/recode_variable_NA_formating.html index b90f161e..52d42f2a 100644 --- a/docs/reference/recode_variable_NA_formating.html +++ b/docs/reference/recode_variable_NA_formating.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -50,8 +54,7 @@ - - + @@ -69,7 +72,7 @@ - +
    @@ -91,7 +94,7 @@
    -
    recode_variable_NA_formating(cell_value, var_type)
    +
    recode_variable_NA_formating(cell_value, var_type)

    Arguments

    @@ -187,24 +190,21 @@

    Value

    an appropriately coded tagged NA

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/resp_condition_fun1.html b/docs/reference/resp_condition_fun1.html index 76df6f28..7d79a426 100644 --- a/docs/reference/resp_condition_fun1.html +++ b/docs/reference/resp_condition_fun1.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -56,8 +60,7 @@ function is for CCHS cycles (2009-2014) that only use COPD and Emphysema as a combined variable. Asthma is used across CCHS cycles as a separate variable." /> - - + @@ -75,7 +78,7 @@ - +
    @@ -97,7 +100,7 @@
    -
    resp_condition_fun1(DHHGAGE_cont, CCC_091, CCC_031)
    +
    resp_condition_fun1(DHHGAGE_cont, CCC_091, CCC_031)

    Arguments

    @@ -212,82 +215,91 @@

    See a

    Examples

    -
    # Using resp_condition_fun1() to create values across CCHS cycles -# (2009-2014) resp_condition_fun1() is specified in -# variable_details.csv along with the CCHS variables and cycles included. - -# To transform resp_condition_der, use rec_with_table() for each CCHS cycle -# and specify resp_condition_der, along with the various respiratory -# variables. Then by using merge_rec_data() you can combine -# resp_condition_der across cycles. - -library(cchsflow) - -resp2009_2010 <- suppressWarnings(rec_with_table( - cchs2009_2010_p, c( - "DHHGAGE_cont", "CCC_091", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(resp2009_2010)
    #> CCC_031 CCC_091 DHHGAGE_cont resp_condition_der -#> 1 2 NA(a) 13 3 -#> 2 2 NA(a) 27 3 -#> 3 2 2 62 3 -#> 4 2 2 52 3 -#> 5 2 2 67 3 -#> 6 2 2 62 3
    -resp2011_2012 <- suppressWarnings(rec_with_table( - cchs2011_2012_p, c( - "DHHGAGE_cont", "CCC_091", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(resp2011_2012)
    #> CCC_031 CCC_091 DHHGAGE_cont resp_condition_der -#> 195 2 2 72.0 3 -#> 196 2 NA(a) 22.0 3 -#> 197 2 NA(a) 18.5 3 -#> 198 2 2 42.0 3 -#> 199 2 2 62.0 3 -#> 200 2 2 52.0 3
    -combined_resp <- - suppressWarnings(merge_rec_data(resp2009_2010, resp2011_2012)) - -head(combined_resp)
    #> CCC_031 CCC_091 DHHGAGE_cont resp_condition_der -#> 1 2 NA(a) 13 3 -#> 2 2 NA(a) 27 3 -#> 3 2 2 62 3 -#> 4 2 2 52 3 -#> 5 2 2 67 3 -#> 6 2 2 62 3
    tail(combined_resp)
    #> CCC_031 CCC_091 DHHGAGE_cont resp_condition_der -#> 395 2 2 72.0 3 -#> 396 2 NA(a) 22.0 3 -#> 397 2 NA(a) 18.5 3 -#> 398 2 2 42.0 3 -#> 399 2 2 62.0 3 -#> 400 2 2 52.0 3
    +
    # Using resp_condition_fun1() to create values across CCHS cycles
    +# (2009-2014) resp_condition_fun1() is specified in
    +# variable_details.csv along with the CCHS variables and cycles included.
    +
    +# To transform resp_condition_der, use rec_with_table() for each CCHS cycle
    +# and specify resp_condition_der, along with the various respiratory
    +# variables. Then by using merge_rec_data() you can combine
    +# resp_condition_der across cycles.
    +
    +library(cchsflow)
    +
    +resp2009_2010 <- suppressWarnings(rec_with_table(
    +  cchs2009_2010_p,  c(
    +    "DHHGAGE_cont", "CCC_091", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +head(resp2009_2010)
    +#>   CCC_031 CCC_091 DHHGAGE_cont resp_condition_der
    +#> 1       2   NA(a)           13                  3
    +#> 2       2   NA(a)           27                  3
    +#> 3       2       2           62                  3
    +#> 4       2       2           52                  3
    +#> 5       2       2           67                  3
    +#> 6       2       2           62                  3
    +
    +resp2011_2012 <- suppressWarnings(rec_with_table(
    +  cchs2011_2012_p, c(
    +    "DHHGAGE_cont", "CCC_091", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(resp2011_2012)
    +#>     CCC_031 CCC_091 DHHGAGE_cont resp_condition_der
    +#> 195       2       2         72.0                  3
    +#> 196       2   NA(a)         22.0                  3
    +#> 197       2   NA(a)         18.5                  3
    +#> 198       2       2         42.0                  3
    +#> 199       2       2         62.0                  3
    +#> 200       2       2         52.0                  3
    +
    +combined_resp <-
    + suppressWarnings(merge_rec_data(resp2009_2010, resp2011_2012))
    +
    +head(combined_resp)
    +#>   CCC_031 CCC_091 DHHGAGE_cont resp_condition_der
    +#> 1       2   NA(a)           13                  3
    +#> 2       2   NA(a)           27                  3
    +#> 3       2       2           62                  3
    +#> 4       2       2           52                  3
    +#> 5       2       2           67                  3
    +#> 6       2       2           62                  3
    +tail(combined_resp)
    +#>     CCC_031 CCC_091 DHHGAGE_cont resp_condition_der
    +#> 395       2       2         72.0                  3
    +#> 396       2   NA(a)         22.0                  3
    +#> 397       2   NA(a)         18.5                  3
    +#> 398       2       2         42.0                  3
    +#> 399       2       2         62.0                  3
    +#> 400       2       2         52.0                  3
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/resp_condition_fun2.html b/docs/reference/resp_condition_fun2.html index f2927043..1f9501d0 100644 --- a/docs/reference/resp_condition_fun2.html +++ b/docs/reference/resp_condition_fun2.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -54,8 +58,7 @@ condition. This function is for CCHS cycles (2005-2007) that use COPD &amp; Emphysema as separate variables, as well as Bronchitis. Asthma is used across CCHS cycles as a separate variable." /> - - + @@ -73,7 +76,7 @@ - +
    @@ -95,7 +98,7 @@
    -
    resp_condition_fun2(DHHGAGE_cont, CCC_91E, CCC_91F, CCC_91A, CCC_031)
    +
    resp_condition_fun2(DHHGAGE_cont, CCC_91E, CCC_91F, CCC_91A, CCC_031)

    Arguments

    @@ -216,82 +219,91 @@

    See a

    Examples

    -
    -# Using resp_condition_fun2() to create values across CCHS cycles -# (2005-2007) resp_condition_fun2() is specified in -# variable_details.csv along with the CCHS variables and cycles included. - -# To transform resp_condition_der, use rec_with_table() for each CCHS cycle -# and specify resp_condition_der, along with the various respiratory -# variables. Then by using merge_rec_data() you can combine -# resp_condition_der across cycles. - -library(cchsflow) - -resp2005 <- suppressWarnings(rec_with_table( - cchs2005_p, c( - "DHHGAGE_cont", "CCC_91E", "CCC_91F", "CCC_91A", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(resp2005)
    #> CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der -#> 1 2 2 NA(a) NA(a) 27 3 -#> 2 2 2 2 2 77 3 -#> 3 2 2 2 2 32 3 -#> 4 2 2 2 2 77 3 -#> 5 2 2 2 2 85 3 -#> 6 2 2 NA(a) NA(a) 13 3
    -resp2007_2008 <- suppressWarnings(rec_with_table( - cchs2007_2008_p, c( - "DHHGAGE_cont", "CCC_91E", "CCC_91F", "CCC_91A", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(resp2007_2008)
    #> CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der -#> 195 2 2 2 2 62 3 -#> 196 2 2 2 2 37 3 -#> 197 2 2 2 2 77 3 -#> 198 2 2 2 2 42 3 -#> 199 2 2 2 2 32 3 -#> 200 2 NA(b) 2 2 72 NA(b)
    -combined_resp <- suppressWarnings(merge_rec_data(resp2005, resp2007_2008)) - -head(combined_resp)
    #> CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der -#> 1 2 2 NA(a) NA(a) 27 3 -#> 2 2 2 2 2 77 3 -#> 3 2 2 2 2 32 3 -#> 4 2 2 2 2 77 3 -#> 5 2 2 2 2 85 3 -#> 6 2 2 NA(a) NA(a) 13 3
    tail(combined_resp)
    #> CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der -#> 395 2 2 2 2 62 3 -#> 396 2 2 2 2 37 3 -#> 397 2 2 2 2 77 3 -#> 398 2 2 2 2 42 3 -#> 399 2 2 2 2 32 3 -#> 400 2 NA(b) 2 2 72 NA(b)
    +
    
    +# Using resp_condition_fun2() to create values across CCHS cycles
    +# (2005-2007) resp_condition_fun2() is specified in
    +# variable_details.csv along with the CCHS variables and cycles included.
    +
    +# To transform resp_condition_der, use rec_with_table() for each CCHS cycle
    +# and specify resp_condition_der, along with the various respiratory
    +# variables. Then by using merge_rec_data() you can combine
    +# resp_condition_der across cycles.
    +
    +library(cchsflow)
    +
    +resp2005 <- suppressWarnings(rec_with_table(
    +  cchs2005_p, c(
    +    "DHHGAGE_cont", "CCC_91E", "CCC_91F", "CCC_91A", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +head(resp2005)
    +#>   CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der
    +#> 1       2       2   NA(a)   NA(a)           27                  3
    +#> 2       2       2       2       2           77                  3
    +#> 3       2       2       2       2           32                  3
    +#> 4       2       2       2       2           77                  3
    +#> 5       2       2       2       2           85                  3
    +#> 6       2       2   NA(a)   NA(a)           13                  3
    +
    +resp2007_2008 <- suppressWarnings(rec_with_table(
    +  cchs2007_2008_p,  c(
    +    "DHHGAGE_cont", "CCC_91E", "CCC_91F", "CCC_91A", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +
    +tail(resp2007_2008)
    +#>     CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der
    +#> 195       2       2       2       2           62                  3
    +#> 196       2       2       2       2           37                  3
    +#> 197       2       2       2       2           77                  3
    +#> 198       2       2       2       2           42                  3
    +#> 199       2       2       2       2           32                  3
    +#> 200       2   NA(b)       2       2           72              NA(b)
    +
    +combined_resp <- suppressWarnings(merge_rec_data(resp2005, resp2007_2008))
    +
    +head(combined_resp)
    +#>   CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der
    +#> 1       2       2   NA(a)   NA(a)           27                  3
    +#> 2       2       2       2       2           77                  3
    +#> 3       2       2       2       2           32                  3
    +#> 4       2       2       2       2           77                  3
    +#> 5       2       2       2       2           85                  3
    +#> 6       2       2   NA(a)   NA(a)           13                  3
    +tail(combined_resp)
    +#>     CCC_031 CCC_91A CCC_91E CCC_91F DHHGAGE_cont resp_condition_der
    +#> 395       2       2       2       2           62                  3
    +#> 396       2       2       2       2           37                  3
    +#> 397       2       2       2       2           77                  3
    +#> 398       2       2       2       2           42                  3
    +#> 399       2       2       2       2           32                  3
    +#> 400       2   NA(b)       2       2           72              NA(b)
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/resp_condition_fun3.html b/docs/reference/resp_condition_fun3.html index c7083b47..0d248009 100644 --- a/docs/reference/resp_condition_fun3.html +++ b/docs/reference/resp_condition_fun3.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -54,8 +58,7 @@ condition. This function for CCHS cycles (2001-2003) that use COPD and Emphysema as a combined variable, as well as Bronchitis. Asthma is used across CCHS cycles as a separate variable." /> - - + @@ -73,7 +76,7 @@ - +
    @@ -95,7 +98,7 @@
    -
    resp_condition_fun3(DHHGAGE_cont, CCC_091, CCC_91A, CCC_031)
    +
    resp_condition_fun3(DHHGAGE_cont, CCC_091, CCC_91A, CCC_031)

    Arguments

    @@ -212,81 +215,92 @@

    See a

    Examples

    -
    # Using resp_condition_fun3() to create values across CCHS cycles -# (2001-2003) resp_condition_fun3() is specified in -# variable_details.csv along with the CCHS variables and cycles included. - -# To transform resp_condition_der, use rec_with_table() for each CCHS cycle -# and specify resp_condition_der, along with the various respiratory -# variables. Then by using merge_rec_data() you can combine -# resp_condition_der across cycles. - -library(cchsflow) - -resp2001 <- suppressWarnings(rec_with_table( - cchs2001_p, c( - "DHHGAGE_cont", "CCC_091", "CCC_91A", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    -head(resp2001)
    #> CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der -#> 1 2 2 2 85 3 -#> 2 2 2 2 85 3 -#> 3 2 2 2 32 3 -#> 4 2 2 2 77 3 -#> 5 2 NA(a) 2 22 3 -#> 6 2 2 2 77 3
    -resp2003 <- suppressWarnings(rec_with_table( - cchs2003_p,c( - "DHHGAGE_cont", "CCC_091", "CCC_91A", "CCC_031", - "resp_condition_der" - ) -))
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    -tail(resp2003)
    #> CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der -#> 195 2 NA(a) 2 22 3 -#> 196 1 2 1 57 1 -#> 197 2 2 2 42 3 -#> 198 2 2 2 85 3 -#> 199 1 NA(a) 2 17 2 -#> 200 2 NA(a) 2 17 3
    -combined_resp <- suppressWarnings(merge_rec_data(resp2001, resp2003)) - -head(combined_resp)
    #> CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der -#> 1 2 2 2 85 3 -#> 2 2 2 2 85 3 -#> 3 2 2 2 32 3 -#> 4 2 2 2 77 3 -#> 5 2 NA(a) 2 22 3 -#> 6 2 2 2 77 3
    tail(combined_resp)
    #> CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der -#> 395 2 NA(a) 2 22 3 -#> 396 1 2 1 57 1 -#> 397 2 2 2 42 3 -#> 398 2 2 2 85 3 -#> 399 1 NA(a) 2 17 2 -#> 400 2 NA(a) 2 17 3
    +
    # Using resp_condition_fun3() to create values across CCHS cycles
    +# (2001-2003) resp_condition_fun3() is specified in
    +# variable_details.csv along with the CCHS variables and cycles included.
    +
    +# To transform resp_condition_der, use rec_with_table() for each CCHS cycle
    +# and specify resp_condition_der, along with the various respiratory
    +# variables. Then by using merge_rec_data() you can combine
    +# resp_condition_der across cycles.
    +
    +library(cchsflow)
    +
    +resp2001 <- suppressWarnings(rec_with_table(
    +  cchs2001_p, c(
    +    "DHHGAGE_cont", "CCC_091", "CCC_91A", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    +
    +head(resp2001)
    +#>   CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der
    +#> 1       2       2       2           85                  3
    +#> 2       2       2       2           85                  3
    +#> 3       2       2       2           32                  3
    +#> 4       2       2       2           77                  3
    +#> 5       2   NA(a)       2           22                  3
    +#> 6       2       2       2           77                  3
    +
    +resp2003 <- suppressWarnings(rec_with_table(
    +  cchs2003_p,c(
    +    "DHHGAGE_cont", "CCC_091", "CCC_91A", "CCC_031",
    +    "resp_condition_der"
    +  )
    +))
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for DHHGAGE_cont: Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses
    +
    +tail(resp2003)
    +#>     CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der
    +#> 195       2   NA(a)       2           22                  3
    +#> 196       1       2       1           57                  1
    +#> 197       2       2       2           42                  3
    +#> 198       2       2       2           85                  3
    +#> 199       1   NA(a)       2           17                  2
    +#> 200       2   NA(a)       2           17                  3
    +
    +combined_resp <- suppressWarnings(merge_rec_data(resp2001, resp2003))
    +
    +head(combined_resp)
    +#>   CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der
    +#> 1       2       2       2           85                  3
    +#> 2       2       2       2           85                  3
    +#> 3       2       2       2           32                  3
    +#> 4       2       2       2           77                  3
    +#> 5       2   NA(a)       2           22                  3
    +#> 6       2       2       2           77                  3
    +tail(combined_resp)
    +#>     CCC_031 CCC_091 CCC_91A DHHGAGE_cont resp_condition_der
    +#> 395       2   NA(a)       2           22                  3
    +#> 396       1       2       1           57                  1
    +#> 397       2       2       2           42                  3
    +#> 398       2       2       2           85                  3
    +#> 399       1   NA(a)       2           17                  2
    +#> 400       2   NA(a)       2           17                  3
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/set_data_labels.html b/docs/reference/set_data_labels.html index ded0eed3..59568704 100644 --- a/docs/reference/set_data_labels.html +++ b/docs/reference/set_data_labels.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -52,8 +56,7 @@ - - + @@ -71,7 +74,7 @@ - +
    @@ -93,7 +96,7 @@
    -
    set_data_labels(data_to_label, variable_details, variables_sheet = NULL)
    +
    set_data_labels(data_to_label, variable_details, variables_sheet = NULL)

    Arguments

    @@ -195,52 +198,62 @@

    Value

    labeled data_to_label

    Examples

    -
    library(cchsflow) -library(sjlabelled) -bmi2001 <- rec_with_table( - cchs2001_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    #> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    -bmi2003 <- rec_with_table( - cchs2003_p, c( - "HWTGHTM", - "HWTGWTK", "HWTGBMI_der" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    #> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    #> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    -combined_bmi <- bind_rows(bmi2001, bmi2003) - -get_label(combined_bmi)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> "" "" ""
    -labeled_combined_data <- set_data_labels(combined_bmi, - variable_details, - variables) - -get_label(labeled_combined_data)
    #> HWTGHTM HWTGWTK HWTGBMI_der -#> "Height" "Weight" "Derived BMI"
    +
    library(cchsflow)
    +library(sjlabelled)
    +bmi2001 <- rec_with_table(
    + cchs2001_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    +#> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    +
    +bmi2003 <- rec_with_table(
    +  cchs2003_p, c(
    +    "HWTGHTM",
    +    "HWTGWTK", "HWTGBMI_der"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for HWTGHTM: 2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points
    +#> NOTE for HWTGHTM: 74+ inches converted to 76 inches
    +
    +combined_bmi <- bind_rows(bmi2001, bmi2003)
    +
    +get_label(combined_bmi)
    +#>     HWTGHTM     HWTGWTK HWTGBMI_der 
    +#>          ""          ""          "" 
    +
    +labeled_combined_data <- set_data_labels(combined_bmi,
    + variable_details,
    + variables)
    +
    +get_label(labeled_combined_data)
    +#>       HWTGHTM       HWTGWTK   HWTGBMI_der 
    +#>      "Height"      "Weight" "Derived BMI" 
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/smoke_simple_fun.html b/docs/reference/smoke_simple_fun.html index 648b8c26..f52d6b56 100644 --- a/docs/reference/smoke_simple_fun.html +++ b/docs/reference/smoke_simple_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -58,8 +62,7 @@ former daily smoker quit &gt;5 years " /> - - + @@ -77,7 +80,7 @@ - +
    @@ -99,7 +102,7 @@
    -
    smoke_simple_fun(SMKDSTY, time_quit_smoking)
    +
    smoke_simple_fun(SMKDSTY_cat5, time_quit_smoking)

    Arguments

    - + +status. This variable captures cycles 2001-2018.

    @@ -204,81 +207,104 @@

    Arg

    Examples

    -
    # Using the 'smoke_simple_fun' function to create the derived smoking -# variable across CCHS cycles. -# smoke_simple_fun() is specified in the variable_details.csv - -# To create a harmonized smoke_simple variable across CCHS cycles, use -# rec_with_table() for each CCHS cycle and specify smoke_simple_fun and -# the required base variables. Since time_quit_smoking_der is also a derived -# variable, you will have to specify the variables that are derived from it. -# Using merge_rec_data(), you can combine smoke_simple across cycles. - -library(cchsflow) - -smoke_simple2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "SMKDSTY", "SMK_09A_B", "SMKG09C", "time_quit_smoking", - "smoke_simple" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(smoke_simple2009_2010)
    #> SMK_09A_B SMKDSTY SMKG09C time_quit_smoking smoke_simple -#> 1 NA(a) 6 NA(a) NA 0 -#> 2 NA(a) 6 NA(a) NA 0 -#> 3 NA(a) 5 NA(a) NA 2 -#> 4 4 4 2 8 3 -#> 5 4 4 3 12 3 -#> 6 4 4 3 12 3
    -smoke_simple2011_2012 <- rec_with_table( - cchs2011_2012_p,c( - "SMKDSTY", "SMK_09A_B", "SMKG09C", "time_quit_smoking", - "smoke_simple" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(smoke_simple2011_2012)
    #> SMK_09A_B SMKDSTY SMKG09C time_quit_smoking smoke_simple -#> 195 4 4 3 12 3 -#> 196 NA(a) 5 NA(a) NA 2 -#> 197 NA(a) 6 NA(a) NA 0 -#> 198 4 4 2 8 3 -#> 199 NA(a) 1 NA(a) NA 1 -#> 200 NA(a) 1 NA(a) NA 1
    -combined_smoke_simple <- -suppressWarnings(merge_rec_data(smoke_simple2009_2010,smoke_simple2011_2012)) - -head(combined_smoke_simple)
    #> SMK_09A_B SMKDSTY SMKG09C time_quit_smoking smoke_simple -#> 1 NA(a) 6 NA(a) NA 0 -#> 2 NA(a) 6 NA(a) NA 0 -#> 3 NA(a) 5 NA(a) NA 2 -#> 4 4 4 2 8 3 -#> 5 4 4 3 12 3 -#> 6 4 4 3 12 3
    tail(combined_smoke_simple)
    #> SMK_09A_B SMKDSTY SMKG09C time_quit_smoking smoke_simple -#> 395 4 4 3 12 3 -#> 396 NA(a) 5 NA(a) NA 2 -#> 397 NA(a) 6 NA(a) NA 0 -#> 398 4 4 2 8 3 -#> 399 NA(a) 1 NA(a) NA 1 -#> 400 NA(a) 1 NA(a) NA 1
    +
    # Using the 'smoke_simple_fun' function to create the derived smoking   
    +# variable across CCHS cycles.
    +# smoke_simple_fun() is specified in the variable_details.csv
    +
    +# To create a harmonized smoke_simple variable across CCHS cycles, use 
    +# rec_with_table() for each CCHS cycle and specify smoke_simple_fun and 
    +# the required base variables. Since time_quit_smoking_der is also a derived 
    +# variable, you will have to specify the variables that are derived from it.
    +# Using merge_rec_data(), you can combine smoke_simple across cycles.
    +
    +library(cchsflow)
    +
    +smoke_simple2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SMKDSTY", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +    "smoke_simple"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: SMKDSTY is missing from variable details therefore cannot be recoded
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> Warning: smoke_simple could not be derived because SMKDSTY_cat5 was never specified nor is it a function variable,
    +#>             therefore it was not recoded 
    +#> smoke_simple could not be derived because time_quit_smoking was never specified nor is it a function variable,
    +#>             therefore it was not recoded 
    +
    +head(smoke_simple2009_2010)
    +#>   SMK_09A_B SMKG09C time_quit_smoking
    +#> 1     NA(a)   NA(a)                NA
    +#> 2     NA(a)   NA(a)                NA
    +#> 3     NA(a)   NA(a)                NA
    +#> 4         4       2                 8
    +#> 5         4       3                12
    +#> 6         4       3                12
    +
    +smoke_simple2011_2012 <- rec_with_table(
    +  cchs2011_2012_p,c(
    +   "SMKDSTY", "SMK_09A_B", "SMKG09C", "time_quit_smoking",
    +   "smoke_simple"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> Warning: SMKDSTY is missing from variable details therefore cannot be recoded
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +#> Warning: smoke_simple could not be derived because SMKDSTY_cat5 was never specified nor is it a function variable,
    +#>             therefore it was not recoded 
    +#> smoke_simple could not be derived because time_quit_smoking was never specified nor is it a function variable,
    +#>             therefore it was not recoded 
    +
    +tail(smoke_simple2011_2012)
    +#>     SMK_09A_B SMKG09C time_quit_smoking
    +#> 195         4       3                12
    +#> 196     NA(a)   NA(a)                NA
    +#> 197     NA(a)   NA(a)                NA
    +#> 198         4       2                 8
    +#> 199     NA(a)   NA(a)                NA
    +#> 200     NA(a)   NA(a)                NA
    +
    +combined_smoke_simple <- 
    +suppressWarnings(merge_rec_data(smoke_simple2009_2010,smoke_simple2011_2012))
    +
    +head(combined_smoke_simple)
    +#>   SMK_09A_B SMKG09C time_quit_smoking
    +#> 1     NA(a)   NA(a)                NA
    +#> 2     NA(a)   NA(a)                NA
    +#> 3     NA(a)   NA(a)                NA
    +#> 4         4       2                 8
    +#> 5         4       3                12
    +#> 6         4       3                12
    +tail(combined_smoke_simple)
    +#>     SMK_09A_B SMKG09C time_quit_smoking
    +#> 395         4       3                12
    +#> 396     NA(a)   NA(a)                NA
    +#> 397     NA(a)   NA(a)                NA
    +#> 398         4       2                 8
    +#> 399     NA(a)   NA(a)                NA
    +#> 400     NA(a)   NA(a)                NA
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/time_quit_smoking_fun.html b/docs/reference/time_quit_smoking_fun.html index ee425d6f..b0ca8035 100644 --- a/docs/reference/time_quit_smoking_fun.html +++ b/docs/reference/time_quit_smoking_fun.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -53,8 +57,7 @@ that calculates the approximate time a former smoker has quit smoking based on various CCHS smoking variables. This variable is for CCHS respondents in CCHS surveys 2003-2014." /> - - + @@ -72,7 +75,7 @@ - +
    @@ -94,7 +97,7 @@
    -
    time_quit_smoking_fun(SMK_09A_B, SMKG09C)
    +
    time_quit_smoking_fun(SMK_09A_B, SMKG09C)

    Arguments

    SMKDSTYSMKDSTY_cat5

    derived variable that classifies an individual's smoking -status.

    time_quit_smoking
    @@ -195,80 +198,92 @@

    Value

    value for time since quit smoking in time_quit_smoking_der.

    Examples

    -
    # Using time_quit_smoking_fun() to create pack-years values across CCHS -# cycles. -# time_quit_smoking_fun() is specified in variable_details.csv along with the -# CCHS variables and cycles included. - -# To transform time_quit_smoking across cycles, use rec_with_table() for each -# CCHS cycle and specify time_quit_smoking, along with each smoking variable. -# Then by using merge_rec_data(), you can combine time_quit_smoking across -# cycles. - -library(cchsflow) - -time_quit2009_2010 <- rec_with_table( - cchs2009_2010_p, c( - "SMK_09A_B", "SMKG09C", "time_quit_smoking" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -head(time_quit2009_2010)
    #> SMK_09A_B SMKG09C time_quit_smoking -#> 1 NA(a) NA(a) NA -#> 2 NA(a) NA(a) NA -#> 3 NA(a) NA(a) NA -#> 4 4 2 8 -#> 5 4 3 12 -#> 6 4 3 12
    -time_quit2011_2012 <- rec_with_table( - cchs2011_2012_p, c( - "SMK_09A_B", "SMKG09C", "time_quit_smoking" - ) -)
    #> No variable_details detected. -#> Loading cchsflow variable_details
    #> Using the passed data variable name as database_name
    -tail(time_quit2011_2012)
    #> SMK_09A_B SMKG09C time_quit_smoking -#> 195 4 3 12 -#> 196 NA(a) NA(a) NA -#> 197 NA(a) NA(a) NA -#> 198 4 2 8 -#> 199 NA(a) NA(a) NA -#> 200 NA(a) NA(a) NA
    -combined_time_quit <- suppressWarnings(merge_rec_data(time_quit2009_2010, - time_quit2011_2012)) - -head(combined_time_quit)
    #> SMK_09A_B SMKG09C time_quit_smoking -#> 1 NA(a) NA(a) NA -#> 2 NA(a) NA(a) NA -#> 3 NA(a) NA(a) NA -#> 4 4 2 8 -#> 5 4 3 12 -#> 6 4 3 12
    tail(combined_time_quit)
    #> SMK_09A_B SMKG09C time_quit_smoking -#> 395 4 3 12 -#> 396 NA(a) NA(a) NA -#> 397 NA(a) NA(a) NA -#> 398 4 2 8 -#> 399 NA(a) NA(a) NA -#> 400 NA(a) NA(a) NA
    +
    # Using time_quit_smoking_fun() to create pack-years values across CCHS 
    +# cycles.
    +# time_quit_smoking_fun() is specified in variable_details.csv along with the
    +# CCHS variables and cycles included.
    +
    +# To transform time_quit_smoking across cycles, use rec_with_table() for each
    +# CCHS cycle and specify time_quit_smoking, along with each smoking variable.
    +# Then by using merge_rec_data(), you can combine time_quit_smoking across
    +# cycles.
    +
    +library(cchsflow)
    +
    +time_quit2009_2010 <- rec_with_table(
    +  cchs2009_2010_p, c(
    +    "SMK_09A_B", "SMKG09C", "time_quit_smoking"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +
    +head(time_quit2009_2010)
    +#>   SMK_09A_B SMKG09C time_quit_smoking
    +#> 1     NA(a)   NA(a)                NA
    +#> 2     NA(a)   NA(a)                NA
    +#> 3     NA(a)   NA(a)                NA
    +#> 4         4       2                 8
    +#> 5         4       3                12
    +#> 6         4       3                12
    +
    +time_quit2011_2012 <- rec_with_table(
    +  cchs2011_2012_p, c(
    +    "SMK_09A_B", "SMKG09C", "time_quit_smoking"
    +  )
    +)
    +#> No variable_details detected.
    +#>               Loading cchsflow variable_details
    +#> Using the passed data variable name as database_name
    +#> NOTE for SMKG09C: Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018
    +
    +tail(time_quit2011_2012)
    +#>     SMK_09A_B SMKG09C time_quit_smoking
    +#> 195         4       3                12
    +#> 196     NA(a)   NA(a)                NA
    +#> 197     NA(a)   NA(a)                NA
    +#> 198         4       2                 8
    +#> 199     NA(a)   NA(a)                NA
    +#> 200     NA(a)   NA(a)                NA
    +
    +combined_time_quit <- suppressWarnings(merge_rec_data(time_quit2009_2010,
    + time_quit2011_2012))
    +
    +head(combined_time_quit)
    +#>   SMK_09A_B SMKG09C time_quit_smoking
    +#> 1     NA(a)   NA(a)                NA
    +#> 2     NA(a)   NA(a)                NA
    +#> 3     NA(a)   NA(a)                NA
    +#> 4         4       2                 8
    +#> 5         4       3                12
    +#> 6         4       3                12
    +tail(combined_time_quit)
    +#>     SMK_09A_B SMKG09C time_quit_smoking
    +#> 395         4       3                12
    +#> 396     NA(a)   NA(a)                NA
    +#> 397     NA(a)   NA(a)                NA
    +#> 398         4       2                 8
    +#> 399     NA(a)   NA(a)                NA
    +#> 400     NA(a)   NA(a)                NA
    +
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/variable_details.html b/docs/reference/variable_details.html index f57eec9a..71d3b5f0 100644 --- a/docs/reference/variable_details.html +++ b/docs/reference/variable_details.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -50,8 +54,7 @@ - - + @@ -69,7 +72,7 @@ - +
    @@ -91,7 +94,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/docs/reference/variables.html b/docs/reference/variables.html index ab8f21dd..fcafbaac 100644 --- a/docs/reference/variables.html +++ b/docs/reference/variables.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -42,7 +46,7 @@ - + @@ -50,8 +54,7 @@ - - + @@ -69,7 +72,7 @@ - +
    @@ -91,7 +94,7 @@
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.6.1.

    diff --git a/inst/extdata/variable_details.csv b/inst/extdata/variable_details.csv index 592d6637..4e8d1e22 100644 --- a/inst/extdata/variable_details.csv +++ b/inst/extdata/variable_details.csv @@ -1,1660 +1,2040 @@ -variable,dummyVariable,toType,databaseStart,variableStart,fromType,recTo,numValidCat,catLabel,catLabelLong,units,recFrom,catStartLabel,variableStartShortLabel,variableStartLabel,notes, -ADL_01,ADL_01_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?",, -ADL_01,ADL_01_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,2,2,No,No,N/A,2,No,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?",, -ADL_01,ADL_01_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?",, -ADL_01,ADL_01_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?",, -ADL_01,ADL_01_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?",, -ADL_02,ADL_02_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?","In the 2001 CCHS, respondents were asked, ""Because of any condition or health problem, do you need the help of another person in shopping forgroceries or other necessities?""", -ADL_02,ADL_02_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,2,2,No,No,N/A,2,No,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?",, -ADL_02,ADL_02_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?",, -ADL_02,ADL_02_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?",, -ADL_02,ADL_02_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?",, -ADL_03,ADL_03_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?",, -ADL_03,ADL_03_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,2,2,No,No,N/A,2,No,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?",, -ADL_03,ADL_03_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?",, -ADL_03,ADL_03_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?",, -ADL_03,ADL_03_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?",, -ADL_04,ADL_04_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?",, -ADL_04,ADL_04_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,2,2,No,No,N/A,2,No,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?",, -ADL_04,ADL_04_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?",, -ADL_04,ADL_04_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?",, -ADL_04,ADL_04_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?",, -ADL_05,ADL_05_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?",, -ADL_05,ADL_05_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,2,2,No,No,N/A,2,No,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?",, -ADL_05,ADL_05_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?",, -ADL_05,ADL_05_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?",, -ADL_05,ADL_05_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?",, -ADL_06,ADL_06_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?",, -ADL_06,ADL_06_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,2,2,No,No,N/A,2,No,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?",, -ADL_06,ADL_06_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?",, -ADL_06,ADL_06_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?",, -ADL_06,ADL_06_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?",, -ADL_07,ADL_07_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?",, -ADL_07,ADL_07_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,2,2,No,No,N/A,2,No,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?",, -ADL_07,ADL_07_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?",, -ADL_07,ADL_07_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?",, -ADL_07,ADL_07_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?",, -ADL_der,ADL_der_catN/A_Func::adl_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,Func::adl_fun,N/A,N/A,N/A,N/A,N/A,N/A,Derived needs help with tasks,Derived needs help with tasks,"Derived variable based on ADL_01, ADL_02, ADL_03, ADL_04, ADL_05", -ADL_der,ADL_der_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,1,2,Needs help with tasks,Needs help with tasks,N/A,N/A,Needs help with tasks,Derived needs help with tasks,Derived needs help with tasks,, -ADL_der,ADL_der_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,2,2,Does not need help with tasks,Does need help with tasks,N/A,N/A,Does need help with tasks,Derived needs help with tasks,Derived needs help with tasks,, -ADL_der,ADL_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::b,2,missing,missing,N/A,N/A,Does need help with tasks,Derived needs help with tasks,Derived needs help with tasks,, -ADL_score_5,N/A,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,Func::adl_score_5_fun,6,N/A,N/A,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,0,6,Needs help with 0 tasks,Needs help with 0 tasks,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,1,6,Needs help with at least 1 task,Needs help with at least 1 task,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,2,6,Needs help with at least 2 tasks,Needs help with at least 2 tasks,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,3,6,Needs help with at least 3 tasks,Needs help with at least 3 tasks,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,4,6,Needs help with at least 4 tasks,Needs help with at least 4 tasks,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,5,6,Needs help with at least 5 tasks,Needs help with at least 5 tasks,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::a,6,not applicable,not applicable,N/A,N/A,N/A,N/A,N/A,, -ADL_score_5,ADL_score_5_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::b,6,missing,missing,N/A,N/A,N/A,N/A,N/A,, -ADLF6R,ADLF6R_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help with at least one task - (F),Needs help with at least one task - (F),, -ADLF6R,ADLF6R_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,2,2,No,No,N/A,2,No,Needs help with at least one task - (F),Needs help with at least one task - (F),, -ADLF6R,ADLF6R_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help with at least one task - (F),Needs help with at least one task - (F),, -ADLF6R,ADLF6R_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help with at least one task - (F),Needs help with at least one task - (F),, -ADLF6R,ADLF6R_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help with at least one task - (F),Needs help with at least one task - (F),, -ADM_RNO,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ADMA_RNO, cchs2003_p::ADMC_RNO, cchs2005_p::ADME_RNO, [ADM_RNO]",cont,copy,N/A,Sequential record number,Sequential record number,N/A,"[1,134072]",Sequential record number,Sequential record number,Sequential record number,, -ALC_1,ALC_1_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]",cat,1,2,yes,alcohol in the past year,N/A,1,"Past year, have you drank alcohol",d12,"Past year, have you drank alcohol",, -ALC_1,ALC_1_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]",cat,2,2,no,no alcohol in past week,N/A,2,"Past year, have you drank alcohol",d12,"Past year, have you drank alcohol",, -ALC_1,ALC_1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]",cat,NA::a,2,not applicable,not applicable,N/A,6,Not applicable,d12,"Past year, have you drank alcohol",, -ALC_1,ALC_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),d12,"Past year, have you drank alcohol",, -ALC_1,ALC_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]",cat,NA::b,2,missing,missing,N/A,else,else,d12,"Past year, have you drank alcohol",, -ALCDTTM,ALCDTTM_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,1,3,Regular,Regular Drinker,N/A,1,Regular Drinker,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,2,3,Occasional,Occasional Drinker,N/A,2,Occasional drinker,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,3,No drink in the last 12 months,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[ALCDTTM],cat,NA::b,3,missing,missing,N/A,else,else,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,1,3,Regular,Regular Drinker,N/A,1,Regular drinker,Drinker type (last 12 months),Type of drinker (last 12 months),"In CCHS cycles 2001, 2003, and 2005, ALCDTTM was derived from ALCDTYP in which former and never drinkers were combined into ""No drink in the last 12 months""", -ALCDTTM,ALCDTTM_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,2,3,Occasional,Occasional Drinker,N/A,2,Occasional drinker,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,3,Former drinker,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,4,Never drank,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::b,3,missing,missing,N/A,else,else,Drinker type (last 12 months),Type of drinker (last 12 months),, -ALCDTYP,ALCDTYP_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,1,4,Regular,Regular drinker,N/A,1,Regular drinker,DrinkerType,Type of drinker - (D),, -ALCDTYP,ALCDTYP_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,2,4,Occasional,Occasional drinker,N/A,2,Occasional drinker,DrinkerType,Type of drinker - (D),, -ALCDTYP,ALCDTYP_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,3,4,Former,Former drinker,N/A,3,Former drinker,DrinkerType,Type of drinker - (D),, -ALCDTYP,ALCDTYP_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,4,4,Never drank,Never drank,N/A,4,Never drank,DrinkerType,Type of drinker - (D),, -ALCDTYP,ALCDTYP_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,NA::a,4,Not applicable,not applicable,N/A,6,not applicable,DrinkerType,Type of drinker - (D),, -ALCDTYP,ALCDTYP_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),DrinkerType,Type of drinker - (D),Don't know (7) and refusal (8) not included in 2001 CCHS, -ALCDTYP,ALCDTYP_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2007_2008_p::ALNDTYP",cat,NA::b,4,missing,missing,N/A,else,else,DrinkerType,Type of drinker - (D),, -ALW_1,ALW_1_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]",cat,1,2,yes,alcohol in the past week,N/A,1,"Past week, had any alcohol",dany,"Past week, had any alcohol",, -ALW_1,ALW_1_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]",cat,2,2,no,no alcohol in past week,N/A,2,"Past week, had any alcohol",dany,"Past week, had any alcohol",, -ALW_1,ALW_1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]",cat,NA::a,2,not applicable,not applicable,N/A,6,Not applicable,dany,"Past week, had any alcohol",, -ALW_1,ALW_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),dany,"Past week, had any alcohol",, -ALW_1,ALW_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]",cat,NA::b,2,missing,missing,N/A,else,else,dany,"Past week, had any alcohol",, -ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, [ALW_2A1]",cont,copy,N/A,# of drinks - Sunday,Number of drinks on Sunday,drinks,"[1,40]",Number of drinks on Sunday,DailyConsumptionSunday,Number of drinks on Sunday,, -ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, [ALW_2A1]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionSunday,Number of drinks on Sunday,, -ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, [ALW_2A1]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionSunday,Number of drinks on Sunday,, -ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, [ALW_2A1]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionSunday,Number of drinks on Sunday,, -ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, [ALW_2A2]",cont,copy,N/A,# of drinks - Monday,Number of drinks on Monday,drinks,"[1,40]",Number of drinks on Monday,DailyConsumptionMonday,Number of drinks on Monday,, -ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, [ALW_2A2]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionMonday,Number of drinks on Monday,, -ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, [ALW_2A2]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionMonday,Number of drinks on Monday,, -ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, [ALW_2A2]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionMonday,Number of drinks on Monday,, -ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, [ALW_2A3]",cont,copy,N/A,# of drinks - Tuesday,Number of drinks on Tuesday,drinks,"[1,40]",Number of drinks on Tuesday,DailyConsumptionTuesday,Number of drinks on Tuesday,, -ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, [ALW_2A3]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionTuesday,Number of drinks on Tuesday,, -ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, [ALW_2A3]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionTuesday,Number of drinks on Tuesday,, -ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, [ALW_2A3]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionTuesday,Number of drinks on Tuesday,, -ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, [ALW_2A4]",cont,copy,N/A,# of drinks - Wednesday,Number of drinks on Wednesday,drinks,"[1,40]",Number of drinks on Wednesday,DailyConsumptionWednesday,Number of drinks on Wednesday,, -ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, [ALW_2A4]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionWednesday,Number of drinks on Wednesday,, -ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, [ALW_2A4]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionWednesday,Number of drinks on Wednesday,, -ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, [ALW_2A4]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionWednesday,Number of drinks on Wednesday,, -ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, [ALW_2A5]",cont,copy,N/A,# of drinks - Thursday,Number of drinks on Thursday,drinks,"[1,40]",Number of drinks on Thursday,DailyConsumptionThursday,Number of drinks on Thursday,, -ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, [ALW_2A5]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionThursday,Number of drinks on Thursday,, -ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, [ALW_2A5]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionThursday,Number of drinks on Thursday,, -ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, [ALW_2A5]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionThursday,Number of drinks on Thursday,, -ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, [ALW_2A6]",cont,copy,N/A,# of drinks - Friday,Number of drinks on Friday,drinks,"[1,40]",Number of drinks on Friday,DailyConsumptionFriday,Number of drinks on Friday,, -ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, [ALW_2A6]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionFriday,Number of drinks on Friday,, -ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, [ALW_2A6]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionFriday,Number of drinks on Friday,, -ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, [ALW_2A6]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionFriday,Number of drinks on Friday,, -ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, [ALW_2A7]",cont,copy,N/A,# of drinks - Saturday,Number of drinks on Saturday,drinks,"[1,40]",Number of drinks on Saturday,DailyConsumptionSaturday,Number of drinks on Saturday,, -ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, [ALW_2A7]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionSaturday,Number of drinks on Saturday,, -ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, [ALW_2A7]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionSaturday,Number of drinks on Saturday,, -ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, [ALW_2A7]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionSaturday,Number of drinks on Saturday,, -ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY , [ALWDDLY]",cont,copy,N/A,drinks/day,drinks/day,drinks/day,"[1,40]",drinks per day,AverageDailyConsumption,Average daily alcohol consumption,"2007-08, 09-10, 2010, 2012 cycles are categorical", -ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY , [ALWDDLY]",cont,NA::a,N/A,not applicable,not applicable,drinks/day,996,Not applicable,AverageDailyConsumption,Average daily alcohol consumption,, -ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY , [ALWDDLY]",cont,NA::b,N/A,missing,missing,drinks/day,"[997,999]",don't know (997); refusal (998); not stated (9),AverageDailyConsumption,Average daily alcohol consumption,, -ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY , [ALWDDLY]",cont,NA::b,N/A,missing,missing,drinks/day,else,else,AverageDailyConsumption,Average daily alcohol consumption,, -ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, [ALWDWKY]",cont,copy,N/A,drinks/week,drinks/week,drinks/week,"[0,449]",drinks per week,drinks/week,Weekly consumption of alcohol,shown as categorical variable in CCHS 2014 cycle, -ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, [ALWDWKY]",cont,NA::a,N/A,not applicable,not applicable,drinks/week,996,not applicable (996),drinks/week,Weekly consumption of alcohol,, -ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, [ALWDWKY]",cont,NA::b,N/A,missing,missing,drinks/week,"[997,999]",don't know (997); refusal (998); not stated (999),drinks/week,Weekly consumption of alcohol,, -ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, [ALWDWKY]",cont,NA::b,N/A,missing,missing,drinks/week,else,else,drinks/week,Weekly consumption of alcohol,, -binge_drinker,binge_drinker_catN/A_Func::binge_drinker_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,Func::binge_drinker_fun,N/A,N/A,N/A,N/A,N/A,N/A,Binge Drinker,Binge Drinker,"Derived from DHH_SEX, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7", -binge_drinker,binge_drinker_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,1,2,Binge drinker,Binge drinker,N/A,N/A,Binge drinker,Binge Drinker,Binge Drinker,, -binge_drinker,binge_drinker_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,2,2,Regular drinker,Regular drinker,N/A,N/A,Regular drinker,Binge Drinker,Binge Drinker,, -binge_drinker,binge_drinker_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::a,2,Not applicable,Not applicable,N/A,N/A,Not applicable,Binge Drinker,Binge Drinker,, -binge_drinker,binge_drinker_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::b,2,missing,missing,N/A,N/A,missing,Binge Drinker,Binge Drinker,, -CCC_031,CCC_031_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]",cat,1,2,Asthma,Asthma,N/A,1,Yes (Do you have asthma?),Asthma,Do you have asthma?,, -CCC_031,CCC_031_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]",cat,2,2,No asthma,No asthma,N/A,2,No (Do you have asthma?),Asthma,Do you have asthma?,, -CCC_031,CCC_031_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Asthma,Do you have asthma?,, -CCC_031,CCC_031_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Asthma,Do you have asthma?,, -CCC_031,CCC_031_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]",cat,NA::b,2,missing,missing,N/A,else,else,Asthma,Do you have asthma?,, -CCC_041,CCC_041_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]",cat,1,2,Fibromyalgia,Fibromyalgia,N/A,1,Yes (Do you have Fibromyalgia?),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/14, -CCC_041,CCC_041_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]",cat,2,2,No Fibromyalgia,Fibromyalgia,N/A,2,No (Do you have Fibromyalgia?),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/15, -CCC_041,CCC_041_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/16, -CCC_041,CCC_041_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/17, -CCC_041,CCC_041_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]",cat,NA::b,2,missing,missing,N/A,else,else,Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/18, -CCC_051,CCC_051_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]",cat,1,2,Arthritis/Rheumatism,Arthritis/Rheumatism,N/A,1,Yes (Do you have arthritis or rheumatism?),Arthritis/Rheumatism,Do you have arthritis or rheumatism?,, -CCC_051,CCC_051_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]",cat,2,2,No Arthritis/Rheumatism,No Arthritis/Rheumatism,N/A,2,No (Do you have arthritis or rheumatism?),Arthritis/Rheumatism,Do you have arthritis or rheumatism?,, -CCC_051,CCC_051_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Arthritis/Rheumatism,Do you have arthritis or rheumatism?,, -CCC_051,CCC_051_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Arthritis/Rheumatism,Do you have arthritis or rheumatism?,, -CCC_051,CCC_051_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]",cat,NA::b,2,missing,missing,N/A,else,else,Arthritis/Rheumatism,Do you have arthritis or rheumatism?,, -CCC_061,CCC_061_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]",cat,1,2,Back Problems,Back Problems,N/A,1,Yes (Do you have back problems?),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?",, -CCC_061,CCC_061_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]",cat,2,2,No Back Problems,No Back Problems,N/A,2,No (Do you have back problems?),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?",, -CCC_061,CCC_061_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?",, -CCC_061,CCC_061_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?",, -CCC_061,CCC_061_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]",cat,NA::b,2,missing,missing,N/A,else,else,Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?",, -CCC_071,CCC_071_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]",cat,1,2,Hypertension,Hypertension,N/A,1,Yes (Do you have high blood pressure?),Hypertension,Do you have high blood pressure,, -CCC_071,CCC_071_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]",cat,2,2,No Hypertension,No Hypertension,N/A,2,No (Do you have high blood pressure?),Hypertension,Do you have high blood pressure,, -CCC_071,CCC_071_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension,Do you have high blood pressure,, -CCC_071,CCC_071_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension,Do you have high blood pressure,, -CCC_071,CCC_071_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension,Do you have high blood pressure,, -CCC_072,CCC_072_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,1,2,Hypertension diagnosis,Hypertension diagnosis,N/A,1,Yes (Have you ever been diagnosed with high blood pressure?),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,, -CCC_072,CCC_072_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,2,2,No hypertension diagnosis,No hypertension diagnosis,N/A,2,No (Have you ever been diagnosed with high blood pressure?),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,, -CCC_072,CCC_072_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,, -CCC_072,CCC_072_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,, -CCC_072,CCC_072_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,, -CCC_073,CCC_073_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]",cat,1,2,Hypertension medication,Hypertension medication,N/A,1,Yes (In the past month have you taken any medicine for high blood pressure?),Hypertension medication,In the past month have you taken any medicine for high blood pressure?,, -CCC_073,CCC_073_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]",cat,2,2,No hypertension medication,No hypertension medication,N/A,2,No (In the past month have you taken any medicine for high blood pressure?),Hypertension medication,In the past month have you taken any medicine for high blood pressure?,, -CCC_073,CCC_073_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension medication,In the past month have you taken any medicine for high blood pressure?,, -CCC_073,CCC_073_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension medication,In the past month have you taken any medicine for high blood pressure?,, -CCC_073,CCC_073_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension medication,In the past month have you taken any medicine for high blood pressure?,, -CCC_081,CCC_081_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]",cat,1,2,Migraine Headache,Migraine Headache,N/A,1,Yes (Do you have Migraine Headaches?),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""", -CCC_081,CCC_081_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]",cat,2,2,No Migraine Headache,No Migraine Headache,N/A,2,No (Do you have Migraine Headaches?),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""", -CCC_081,CCC_081_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""", -CCC_081,CCC_081_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""", -CCC_081,CCC_081_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]",cat,NA::b,2,missing,missing,N/A,else,else,Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""", -CCC_091,CCC_091_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]",cat,1,2,COPD/emphysema,COPD/emphysema,N/A,1,"Yes (Do you have COPD(eg bronchitis,emphysema)?)",COPD/emphysema,"Do you have COPD(eg bronchitis,emphysema)",, -CCC_091,CCC_091_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]",cat,2,2,No COPD/emphysema,No COPD/emphysema,N/A,2,"No (Do you have COPD(eg bronchitis,emphysema)?)",COPD/emphysema,"Do you have COPD(eg bronchitis,emphysema)",, -CCC_091,CCC_091_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,COPD/emphysema,"Do you have COPD(eg bronchitis,emphysema)",, -CCC_091,CCC_091_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),COPD/emphysema,"Do you have COPD(eg bronchitis,emphysema)",, -CCC_091,CCC_091_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]",cat,NA::b,2,missing,missing,N/A,else,else,COPD/emphysema,"Do you have COPD(eg bronchitis,emphysema)",, -CCC_101,CCC_101_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]",cat,1,2,Diabetes,Diabetes,N/A,1,Yes (Do you have diabetes?),Diabetes,Do you have diabetes,, -CCC_101,CCC_101_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]",cat,2,2,No Diabetes,No Diabetes,N/A,2,No (Do you have diabetes?),Diabetes,Do you have diabetes,, -CCC_101,CCC_101_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Diabetes,Do you have diabetes,, -CCC_101,CCC_101_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Diabetes,Do you have diabetes,, -CCC_101,CCC_101_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]",cat,NA::b,2,missing,missing,N/A,else,else,Diabetes,Do you have diabetes,, -CCC_111,CCC_111_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,1,2,Epilepsy,Epilepsy,N/A,1,Yes (Do you have epilepsy?),Epilepsy,Do you have epilepsy?,, -CCC_111,CCC_111_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,2,2,No Epilepsy,No Epilepsy,N/A,2,No (Do you have epilepsy?),Epilepsy,Do you have epilepsy?,, -CCC_111,CCC_111_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Epilepsy,Do you have epilepsy?,, -CCC_111,CCC_111_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Epilepsy,Do you have epilepsy?,, -CCC_111,CCC_111_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::b,2,missing,missing,N/A,else,else,Epilepsy,Do you have epilepsy?,, -CCC_121,CCC_121_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]",cat,1,2,Heart Disease,Heart Disease,N/A,1,Yes (Do you have heart disease?),Heart Disease,Do you have heart disease,, -CCC_121,CCC_121_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]",cat,2,2,No Heart Disease,No Heart Disease,N/A,2,No (Do you have heart disease?),Heart Disease,Do you have heart disease,, -CCC_121,CCC_121_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Heart Disease,Do you have heart disease,, -CCC_121,CCC_121_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Heart Disease,Do you have heart disease,, -CCC_121,CCC_121_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]",cat,NA::b,2,missing,missing,N/A,else,else,Heart Disease,Do you have heart disease,, -CCC_131,CCC_131_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]",cat,1,2,Cancer,Cancer,N/A,1,Yes (Do you have cancer?),Cancer,Do you have cancer,, -CCC_131,CCC_131_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]",cat,2,2,No Cancer,No Cancer,N/A,2,No (Do you have cancer?),Cancer,Do you have cancer,, -CCC_131,CCC_131_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Cancer,Do you have cancer,, -CCC_131,CCC_131_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Cancer,Do you have cancer,, -CCC_131,CCC_131_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]",cat,NA::b,2,missing,missing,N/A,else,else,Cancer,Do you have cancer,, -CCC_151,CCC_151_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]",cat,1,2,Stroke,Stroke,N/A,1,Yes (Do you suffer from the effects of stroke?),Stroke,Do you suffer from effects of stroke,, -CCC_151,CCC_151_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]",cat,2,2,No Stroke,No Stroke,N/A,2,No (Do you suffer from the effects of stroke?),Stroke,Do you suffer from effects of stroke,, -CCC_151,CCC_151_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Stroke,Do you suffer from effects of stroke,, -CCC_151,CCC_151_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Stroke,Do you suffer from effects of stroke,, -CCC_151,CCC_151_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]",cat,NA::b,2,missing,missing,N/A,else,else,Stroke,Do you suffer from effects of stroke,, -CCC_171,CCC_171_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,1,2,Bowel disorder,Bowel disorder,N/A,1,Yes (Do you have a bowel disorder?),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?,, -CCC_171,CCC_171_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,2,2,No bowel disorder,No bowel disorder,N/A,2,No (Do you have a bowel disorder?),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?,, -CCC_171,CCC_171_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?,, -CCC_171,CCC_171_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?,, -CCC_171,CCC_171_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::b,2,missing,missing,N/A,else,else,Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?,, -CCC_251,CCC_251_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,1,2,Chronic fatigue,Chronic fatigue,N/A,1,Yes (Do you have chronic fatigue syndrome?),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?,, -CCC_251,CCC_251_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,2,2,No chronic fatigue,No chronic fatigue,N/A,2,No (Do you have chronic fatigue syndrome?),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?,, -CCC_251,CCC_251_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Chronic fatigue syndrome,Do you have chronic fatigue syndrome?,, -CCC_251,CCC_251_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?,, -CCC_251,CCC_251_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::b,2,missing,missing,N/A,else,else,Chronic fatigue syndrome,Do you have chronic fatigue syndrome?,, -CCC_280,CCC_280_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]",cat,1,2,Has a mood disorder,Has a mood disorder,N/A,1,Yes (Do you have a mood disorder?),Mood disorder,Do you have a mood disorder,, -CCC_280,CCC_280_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]",cat,2,2,Does not have a mood disorder,Does not have a mood disorder,N/A,2,No (Do you have a mood disorder?),Mood disorder,Do you have a mood disorder,, -CCC_280,CCC_280_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Mood disorder,Do you have a mood disorder,, -CCC_280,CCC_280_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Mood disorder,Do you have a mood disorder,, -CCC_280,CCC_280_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]",cat,NA::b,2,missing,missing,N/A,else,else,Mood disorder,Do you have a mood disorder,, -CCC_290,CCC_290_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]",cat,1,2,Has an anxiety disorder,Has an anxiety disorder,N/A,1,Yes (Do you have an anxiety disorder?),Anxiety Disorder,Anxiety Disorder,, -CCC_290,CCC_290_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]",cat,2,2,Does not have an anxiety disorder,Does not have an anxiety disorder,N/A,2,No (Do you have an anxiety disorder?),Anxiety Disorder,Anxiety Disorder,, -CCC_290,CCC_290_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Anxiety Disorder,Anxiety Disorder,, -CCC_290,CCC_290_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Anxiety Disorder,Anxiety Disorder,, -CCC_290,CCC_290_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]",cat,NA::b,2,missing,missing,N/A,else,else,Anxiety Disorder,Anxiety Disorder,, -CCC_31A,CCC_31A_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]",cat,1,2,Cancer diagnosis,Cancer diagnosis,N/A,1,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?,, -CCC_31A,CCC_31A_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]",cat,2,2,No cancer diagnosis,No cancer diagnosis,N/A,2,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?,, -CCC_31A,CCC_31A_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]",cat,NA::a,2,not applicable,not applicable,N/A,6,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?,, -CCC_31A,CCC_31A_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?,, -CCC_31A,CCC_31A_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]",cat,NA::b,2,missing,missing,N/A,else,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?,, -CCC_91A,CCC_91A_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,1,2,Bronchitis,Chronic bronchitis,N/A,1,Yes (Do you have chronic bronchitis?),Bronchitis,Do you have chronic bronchitis?,, -CCC_91A,CCC_91A_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,2,2,No bronchitis,No chronic bronchitis,N/A,2,No (Do you have chronic bronchitis?),Bronchitis,Do you have chronic bronchitis?,, -CCC_91A,CCC_91A_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Bronchitis,Do you have chronic bronchitis?,, -CCC_91A,CCC_91A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bronchitis,Do you have chronic bronchitis?,, -CCC_91A,CCC_91A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::b,2,missing,missing,N/A,else,else,Bronchitis,Do you have chronic bronchitis?,, -CCC_91E,CCC_91E_cat2_1,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,1,2,Emphysema,Emphysema,N/A,1,Yes (Do you have emphysema?),emphysema,Do you have emphysema?,, -CCC_91E,CCC_91E_cat2_2,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,2,2,No emphysema,No emphysema,N/A,2,No (Do you have emphysema?),emphysema,Do you have emphysema?,, -CCC_91E,CCC_91E_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,emphysema,Do you have emphysema?,, -CCC_91E,CCC_91E_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),emphysema,Do you have emphysema?,, -CCC_91E,CCC_91E_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::b,2,missing,missing,N/A,else,else,emphysema,Do you have emphysema?,, -CCC_91F,CCC_91F_cat2_1,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,1,2,COPD,COPD,N/A,1,Yes (Do you have COPD?),COPD,Do you have COPD?,, -CCC_91F,CCC_91F_cat2_2,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,2,2,No COPD,No COPD,N/A,2,No (Do you have COPD?),COPD,Do you have COPD?,, -CCC_91F,CCC_91F_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,COPD,Do you have COPD?,, -CCC_91F,CCC_91F_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),COPD,Do you have COPD?,, -CCC_91F,CCC_91F_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::b,2,missing,missing,N/A,else,else,COPD,Do you have COPD?,, -COPD_Emph_der,COPD_Emph_der_catN/A_Func::COPD_Emph_der_fun1,cat,"cchs2005_p, cchs2007_2008_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F]",N/A,Func::COPD_Emph_der_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,Derived from COPD and Emphysema variables, -COPD_Emph_der,COPD_Emph_der_catN/A_Func::COPD_Emph_der_fun2,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091]",N/A,Func::COPD_Emph_der_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,Derived from COPD and Emphysema variables, -COPD_Emph_der,COPD_Emph_der_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091]",N/A,1,3,Over 35 years with condition,Age over 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -COPD_Emph_der,COPD_Emph_der_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,2,3,Under 35 years with condition,Age under 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -COPD_Emph_der,COPD_Emph_der_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,3,3,No condition,No condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -COPD_Emph_der,COPD_Emph_der_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,NA::b,3,missing,missing,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -DHH_OWN,DHH_OWN_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,1,2,Yes,Yes,N/A,1,Yes,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,"Prior to 2009, CCHS restricted this variable to participants who were not living in an institution. In 2011, CCHS changed wording of responses to (1) owner and (2) renter", -DHH_OWN,DHH_OWN_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,2,2,No,No,N/A,2,No,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,, -DHH_OWN,DHH_OWN_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,, -DHH_OWN,DHH_OWN_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,, -DHH_OWN,DHH_OWN_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::b,2,missing,missing,N/A,else,else,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,, -DHH_SEX,DHH_SEX_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,1,2,Male,Male,N/A,1,Male,Sex,Sex,, -DHH_SEX,DHH_SEX_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,2,2,Female,Female,N/A,2,Female,Sex,Sex,, -DHH_SEX,DHH_SEX_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sex,Sex,, -DHH_SEX,DHH_SEX_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sex,Sex,, -DHH_SEX,DHH_SEX_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::b,2,missing,missing,N/A,else,else,Sex,Sex,, -DHHGAGE_5,DHHGAGE_5_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,5,age (12 to 19),age (12 to 19),years,"[1,3]",12 To 14 Years (1); 15 To 17 Years (2); 18 To 19 Years (3),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,5,age (20 to 39),age (20 to 39),years,"[4,7]",20 To 24 Years (4); 25 To 29 Years (5); 30 To 34 Years (6); 35 To 39 Years (7),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,5,age (40 to 59),age (40 to 59),years,"[8,11]",40 To 44 Years (8); 45 To 49 Years (9); 50 To 54 Years (10); 55 To 59 Years (11),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,5,age (60 to 79),age (60 to 79),years,"[12,15]",60 To 64 Years (12); 65 To 69 Years (13); 70 To 74 Years (14); 75 To 79 Years (15),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,5,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,else,else,years,else,else,Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,5,age (12 to 19),age (12 to 19),years,"[1,2]",12 To 14 Years (1); 15 To 19 Years (2),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,5,age (20 to 39),age (20 to 39),years,"[3,6]",20 To 24 Years (3); 25 To 29 Years (4); 30 To 34 Years (5); 35 To 39 Years (6),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,5,age (40 to 59),age (40 to 59),years,"[7,10]",40 To 44 Years (7); 45 To 49 Years (8); 50 To 54 Years (9); 55 To 59 Years (10),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,5,age (60 to 79),age (60 to 79),years,"[11,14]",60 To 64 Years (11); 65 To 69 Years (12); 70 To 74 Years (13); 75 To 79 Years (14),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat5_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,5,age (80 plus),age (80 plus),years,15,80 Years or more (15),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Categorical age,, -DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,else,else,years,else,else,Age,Categorical age,, -DHHGAGE_A,DHHGAGE_A_cat15_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,15,age (12 to 14),age (12 to 14),years,1,12 to 14 years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,15,age (15 to 19),age (15 to 19),years,2,15 to 19 years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,15,age (20 to 24),age (20 to 24),years,3,20 To 24 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,15,age (25 to 29),age (25 to 29),years,4,25 To 29 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,15,age (30 to 34),age (30 to 34),years,5,30 To 34 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,6,15,age (35 to 39),age (35 to 39),years,6,35 To 39 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,7,15,age (40 to 44),age (40 to 44),years,7,40 To 44 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,8,15,age (45 to 49),age (45 to 49),years,8,45 To 49 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,9,15,age (50 to 54),age (50 to 54),years,9,50 To 54 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,10,15,age (55 to 59),age (55 to 59),years,10,55 To 59 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_11,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,11,15,age (60 to 64),age (60 to 64),years,11,60 To 64 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_12,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,12,15,age (65 to 69),age (65 to 69),years,12,65 To 69 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_13,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,13,15,age (70 to 74),age (70 to 74),years,13,70 To 74 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_14,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,14,15,age (75 to 79),age (75 to 79),years,14,75 To 79 Years,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_15,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,15,15,age (80 plus),age (80 plus),years,15,80 Years or more,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,15,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_A,DHHGAGE_A_cat15_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,15,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),"Not applicable, don't know, refusal, not stated (96-99) were options only in CCHS 2003, but had zero responses", -DHHGAGE_A,DHHGAGE_A_cat15_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,15,missing,missing,years,else,else,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,16,age (12 to 14),age (12 to 14),years,1,12 To 14 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,16,age (15 to 17),age (15 to 17),years,2,15 To 17 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,16,age (18 to 19),age (18 to 19),years,3,18 To 19 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,16,age (20 to 24),age (20 to 24),years,4,20 To 24 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,16,age (25 to 29),age (25 to 29),years,5,25 To 29 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,6,16,age (30 to 34),age (30 to 34),years,6,30 To 34 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,7,16,age (35 to 39),age (35 to 39),years,7,35 To 39 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,8,16,age (40 to 44),age (40 to 44),years,8,40 To 44 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,9,16,age (45 to 49),age (45 to 49),years,9,45 To 49 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,10,16,age (50 to 54),age (50 to 54),years,10,50 To 54 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,11,16,age (55 to 59),age (55 to 59),years,11,55 To 59 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_12,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,12,16,age (60 to 64),age (60 to 64),years,12,60 To 64 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_13,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,13,16,age (65 to 69),age (65 to 69),years,13,65 To 69 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_14,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,14,16,age (70 to 74),age (70 to 74),years,14,70 To 74 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_15,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,15,16,age (75 to 79),age (75 to 79),years,15,75 To 79 Years,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_16,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,16,16,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,16,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,16,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),, -DHHGAGE_B,DHHGAGE_B_cat16_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,16,missing,missing,years,else,else,Age,Age - (G),, -DHHGAGE_C,DHHGAGE_C_catN/A_Func::age_cat_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,Func::age_cat_fun,N/A,N/A,N/A,years,N/A,N/A,Age,Categorical age,This variable is derived from DHHGAGE_cont, -DHHGAGE_C,DHHGAGE_C_cat16_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,1,16,age (12 to 14),age (12 to 14),years,N/A,12 To 14 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,2,16,age (15 to 17),age (15 to 17),years,N/A,15 To 17 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,3,16,age (18 to 19),age (18 to 19),years,N/A,18 To 19 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,4,16,age (20 to 24),age (20 to 24),years,N/A,20 To 24 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,5,16,age (25 to 29),age (25 to 29),years,N/A,25 To 29 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,6,16,age (30 to 34),age (30 to 34),years,N/A,30 To 34 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,7,16,age (35 to 39),age (35 to 39),years,N/A,35 To 39 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,8,16,age (40 to 44),age (40 to 44),years,N/A,40 To 44 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,9,16,age (45 to 49),age (45 to 49),years,N/A,45 To 49 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,10,16,age (50 to 54),age (50 to 54),years,N/A,50 To 54 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,11,16,age (55 to 59),age (55 to 59),years,N/A,55 To 59 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_12,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,12,16,age (60 to 64),age (60 to 64),years,N/A,60 To 64 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_13,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,13,16,age (65 to 69),age (65 to 69),years,N/A,65 To 69 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_14,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,14,16,age (70 to 74),age (70 to 74),years,N/A,70 To 74 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_15,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,15,16,age (75 to 79),age (75 to 79),years,N/A,75 To 79 Years,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_16,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,16,16,age (80 plus),age (80 plus),years,N/A,80 Years or more,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,NA::a,16,not applicable,not applicable,years,N/A,not applicable,Age,Categorical age,, -DHHGAGE_C,DHHGAGE_C_cat16_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],N/A,NA::b,16,missing,missing,years,N/A,missing,Age,Categorical age,, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,13,N/A,Age,converted categorical age (12 to 14),years,1,12 to 14 years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,17,N/A,Age,converted categorical age (15 to 19),years,2,15 to 19 years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,22,N/A,Age,converted categorical age (20 to 24),years,3,20 To 24 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,27,N/A,Age,converted categorical age (25 to 29),years,4,25 To 29 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,32,N/A,Age,converted categorical age (30 to 34),years,5,30 To 34 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,37,N/A,Age,converted categorical age (35 to 39),years,6,35 To 39 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,42,N/A,Age,converted categorical age (40 to 44),years,7,40 To 44 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,47,N/A,Age,converted categorical age (45 to 49),years,8,45 To 49 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,52,N/A,Age,converted categorical age (50 to 54),years,9,50 To 54 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,57,N/A,Age,converted categorical age (55 to 59),years,10,55 To 59 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,62,N/A,Age,converted categorical age (60 to 64),years,11,60 To 64 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,67,N/A,Age,converted categorical age (65 to 69),years,12,65 To 69 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,72,N/A,Age,converted categorical age (70 to 74),years,13,70 To 74 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,77,N/A,Age,converted categorical age (75 to 79),years,14,75 To 79 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,85,N/A,Age,converted categorical age (80 plus),years,15,80 Years or more,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),"Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses", -DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,N/A,missing,missing,years,else,else,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,13,N/A,Age,converted categorical age (12 to 14),years,1,12 To 14 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,16,N/A,Age,converted categorical age (15 to 17),years,2,15 To 17 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,18.5,N/A,Age,converted categorical age (18 to 19),years,3,18 To 19 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,22,N/A,Age,converted categorical age (20 to 24),years,4,20 To 24 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,27,N/A,Age,converted categorical age (25 to 29),years,5,25 To 29 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,32,N/A,Age,converted categorical age (30 to 34),years,6,30 To 34 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,37,N/A,Age,converted categorical age (35 to 39),years,7,35 To 39 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,42,N/A,Age,converted categorical age (40 to 44),years,8,40 To 44 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,47,N/A,Age,converted categorical age (45 to 49),years,9,45 To 49 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,52,N/A,Age,converted categorical age (50 to 54),years,10,50 To 54 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,57,N/A,Age,converted categorical age (55 to 59),years,11,55 To 59 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,62,N/A,Age,converted categorical age (60 to 64),years,12,60 To 64 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,67,N/A,Age,converted categorical age (65 to 69),years,13,65 To 69 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,72,N/A,Age,converted categorical age (70 to 74),years,14,70 To 74 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,77,N/A,Age,converted categorical age (75 to 79),years,15,75 To 79 Years,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,85,N/A,Age,converted categorical age (80 plus),years,16,80 Years or more,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),, -DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,N/A,missing,missing,years,else,else,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,8,age (12 to 19),age (12 to 19),years,"[1,3]",12 To 14 Years (1); 15 To 17 Years (2); 18 To 19 Years (3),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,8,age (20 to 29),age (20 to 29),years,"[4,5]",20 to 24 Years (4); 25 To 29 Years (5),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,8,age (30 to 39),age (30 to 39),years,"[6,7]",30 To 34 Years (6); 35 To 39 Years (7),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,8,age (40 to 49),age (40 to 49),years,"[8,9]",40 To 44 Years (8); 45 To 49 Years (9),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,8,age (50 to 59),age (50 to 59),years,"[10,11]",50 To 54 Years (10); 55 To 59 Years (11),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,6,8,age (60 to 69),age (60 to 69),years,"[12,13]",60 To 64 Years (12); 65 To 69 Years (13),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,7,8,age (70 to 79),age (70 to 79),years,"[14,15]",70 To 74 Years (14); 75 To 79 Years (15),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,8,8,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,else,else,years,else,else,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,8,age (12 to 19),age (12 to 19),years,"[1,2]",12 To 14 Years (1); 15 To 19 Years (2),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,8,age (20 to 29),age (20 to 29),years,"[3,4]",20 to 24 Years (3); 25 To 29 Years (4),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,8,age (30 to 39),age (30 to 39),years,"[5,6]",30 To 34 Years (5); 35 To 39 Years (6),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,8,age (40 to 49),age (40 to 49),years,"[7,8]",40 To 44 Years (7); 45 To 49 Years (8),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,8,age (50 to 59),age (50 to 59),years,"[9,10]",50 To 54 Years (9); 55 To 59 Years (10),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,6,8,age (60 to 69),age (60 to 69),years,"[11,12]",60 To 64 Years (11); 65 To 69 Years (12),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,7,8,age (70 to 79),age (70 to 79),years,"[13,14]",70 To 74 Years (13); 75 To 79 Years (14),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,8,8,age (80 plus),age (80 plus),years,15,80 plus Years,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),, -DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,else,else,years,else,else,Age,Age - (G),, -DHHGHSZ,DHHGHSZ_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,1,5,1 person,1 person,N/A,1,1 person,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,2,5,2 persons,2 persons,N/A,2,2 persons,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,3,5,3 persons,3 persons,N/A,3,3 persons,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,4,5,4 persons,4 persons,N/A,4,4 persons,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,5,5,5+ persons,5 or more persons,N/A,5,5 or more persons,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Household size,Household size - (G),, -DHHGHSZ,DHHGHSZ_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]",cat,NA::b,5,missing,missing,N/A,else,else,Household size,Household size - (G),, -DHHGMS,DHHGMS_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,1,4,Married,Married,N/A,1,Married,Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,2,4,Common-law,Common-law,N/A,2,Common-law,Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,3,4,Widow/Sep/Div,Widow/Sep/Div,N/A,3,Widow/separated/divorced,Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,4,4,Single/Never mar.,Single,N/A,4,Single/never married,Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Marital Status,Marital status - (G),, -DHHGMS,DHHGMS_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::b,4,missing,missing,N/A,else,else,Marital Status,Marital status - (G),, -diet_score,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, SFVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]",N/A,Func::diet_score_fun,N/A,N/A,N/A,N/A,N/A,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice",,, -diet_score,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, SFVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]",N/A,NA::b,N/A,missing,missing,N/A,N/A,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice",,, -DIS_10G,DIS_10G_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,1,5,All of the time,All of the time,N/A,1,All of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,2,5,Most of the time,Most of the time,N/A,2,Most of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,4,5,A little of the time,A little of the time,N/A,4,A little of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,5,5,None of the time,None of the time,N/A,5,None of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10G,DIS_10G_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]",cat,NA::b,5,missing,missing,N/A,else,else,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",, -DIS_10H,DIS_10H_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,1,5,All of the time,All of the time,N/A,1,All of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,2,5,Most of the time,Most of the time,N/A,2,Most of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,4,5,A little of the time,A little of the time,N/A,4,A little of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,5,5,None of the time,None of the time,N/A,5,None of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DIS_10H,DIS_10H_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]",cat,NA::b,5,missing,missing,N/A,else,else,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",, -DPS_02,DPS_02_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,1,2,Yes,Yes,N/A,1,Yes,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",, -DPS_02,DPS_02_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,2,2,No,No,N/A,2,No,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",, -DPS_02,DPS_02_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",, -DPS_02,DPS_02_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",, -DPS_02,DPS_02_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::b,2,missing,missing,N/A,else,else,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",, -DPS_03,DPS_03_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,1,4,All day long,All day long,N/A,1,All day long,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,2,4,Most of the day,Most of the day,N/A,2,Most of the day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,3,4,About half of the day,About half of the day,N/A,3,About half of the day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,4,4,Less than half of a day,Less than half of a day,N/A,4,Less than half of a day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_03,DPS_03_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::b,4,missing,missing,N/A,else,else,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",, -DPS_04,DPS_04_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,1,3,Every day,Every day,N/A,1,Every day,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_04,DPS_04_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,2,3,Almost every day,Almost every day,N/A,2,Almost every day,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_04,DPS_04_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,3,3,Less often,Less often,N/A,3,Less often,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_04,DPS_04_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_04,DPS_04_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_04,DPS_04_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::b,3,missing,missing,N/A,else,else,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",, -DPS_05,DPS_05_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?,, -DPS_05,DPS_05_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,2,2,No,No,N/A,2,No,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?,, -DPS_05,DPS_05_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?,, -DPS_05,DPS_05_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?,, -DPS_05,DPS_05_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?,, -DPS_06,DPS_06_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?,, -DPS_06,DPS_06_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,2,2,No,No,N/A,2,No,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?,, -DPS_06,DPS_06_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?,, -DPS_06,DPS_06_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?,, -DPS_06,DPS_06_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?,, -DPS_07,DPS_07_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,1,4,Gained weight,Gained weight,N/A,1,Gained weight,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,2,4,Lost weight,Lost weight,N/A,2,Lost weight,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,3,4,Stayed about the same,Stayed about the same,N/A,3,Stayed about the same,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,4,4,Was on a diet,Was on a diet,N/A,4,Was on a diet,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_07,DPS_07_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::b,4,missing,missing,N/A,else,else,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?",, -DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,copy,N/A,Weight,Weight,N/A,"[1,90]",Weight,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?,, -DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::a,N/A,not applicable,not applicable,N/A,996,not applicable,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?,, -DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::b,N/A,missing,missing,N/A,"[997,999]",don't know (999.7); refusal (999.8); not stated (999.9),Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?,, -DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::b,N/A,missing,missing,N/A,else,else,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?,, -DPS_08B,DPS_08B_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,1,2,Pounds,Pounds,N/A,1,Pounds,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?,, -DPS_08B,DPS_08B_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,2,2,Kilograms,Kilograms,N/A,2,Kilograms,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?,, -DPS_08B,DPS_08B_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?,, -DPS_08B,DPS_08B_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::b,2,missing,missing,N/A,9,not stated,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?,, -DPS_08B,DPS_08B_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?,, -DPS_09,DPS_09_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?,, -DPS_09,DPS_09_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,2,2,No,No,N/A,2,No,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?,, -DPS_09,DPS_09_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?,, -DPS_09,DPS_09_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?,, -DPS_09,DPS_09_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?,, -DPS_10,DPS_10_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,1,3,Every night,Every night,N/A,1,Every night,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_10,DPS_10_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,2,3,Nearly every night,Nearly every night,N/A,2,Nearly every night,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_10,DPS_10_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,3,3,Less often,Less often,N/A,3,Less often,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_10,DPS_10_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_10,DPS_10_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_10,DPS_10_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::b,3,missing,missing,N/A,else,else,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?",, -DPS_11,DPS_11_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?,, -DPS_11,DPS_11_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,2,2,No,No,N/A,2,No,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?,, -DPS_11,DPS_11_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?,, -DPS_11,DPS_11_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?,, -DPS_11,DPS_11_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?,, -DPS_12,DPS_12_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?",, -DPS_12,DPS_12_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,2,2,No,No,N/A,2,No,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?",, -DPS_12,DPS_12_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?",, -DPS_12,DPS_12_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?",, -DPS_12,DPS_12_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?",, -DPS_13,DPS_13_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?",, -DPS_13,DPS_13_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,2,2,No,No,N/A,2,No,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?",, -DPS_13,DPS_13_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?",, -DPS_13,DPS_13_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?",, -DPS_13,DPS_13_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?",, -DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,copy,N/A,Number of weeks,Number of weeks,weeks,"[2,53]",Number of week feel this way,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?,, -DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::a,N/A,not applicable,not applicable,weeks,96,not applicable,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?,, -DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::b,N/A,missing,missing,weeks,"[97,99]",don't know (97); refusal (98); not stated (99),Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?,, -DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::b,N/A,missing,missing,weeks,else,else,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?,, -DPSDMT,DPSDMT_cat12_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,1,12,January,January,N/A,1,January,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,2,12,February,February,N/A,2,February,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,3,12,March,March,N/A,3,March,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,4,12,April,April,N/A,4,April,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,5,12,May,May,N/A,5,May,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,6,12,June,June,N/A,6,June,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,7,12,July,July,N/A,7,July,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,8,12,August,August,N/A,8,August,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,9,12,September,September,N/A,9,September,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,10,12,October,October,N/A,10,October,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,11,12,November,November,N/A,11,November,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_12,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,12,12,December,December,N/A,12,December,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::a,12,not applicable,not applicable,N/A,96,not applicable,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::b,12,missing,missing,N/A,99,not stated,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDMT,DPSDMT_cat12_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::b,12,missing,missing,N/A,else,else,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D),, -DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,copy,N/A,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,N/A,"[0,0.90]",Predicted Probability,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,"Variable was documented as a categorical variable with categories 0, 0.05, 0.25, 0.50, 0.80, 0.90 across all cycles. See documentation for DPSDPP() for more details, or type ?DPSDPP in the console.", -DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::a,N/A,not applicable,not applicable,N/A,9.96,not applicable,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,, -DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::b,N/A,missing,missing,N/A,9.99,not stated,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,, -DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::b,N/A,missing,missing,N/A,else,else,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,, -DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,copy,N/A,Depression Scale - Short Form Score,Depression Scale - Short Form Score,N/A,"[0,8]",Short Form Score,Depression Scale - Short Form Score,Depression Scale - Short Form Score,, -DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::a,N/A,not applicable,not applicable,N/A,96,not applicable,Depression Scale - Short Form Score,Depression Scale - Short Form Score,, -DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::b,N/A,missing,missing,N/A,99,not stated,Depression Scale - Short Form Score,,, -DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::b,N/A,missing,missing,N/A,else,else,Depression Scale - Short Form Score,,, -DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,copy,N/A,Number of weeks,Number of weeks,weeks,"[2,53]",Number of weeks felt depressed,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D),, -DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::a,N/A,not applicable,not applicable,weeks,96,not applicable,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D),, -DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::b,N/A,missing,missing,weeks,99,not stated,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D),, -DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::b,N/A,missing,missing,weeks,else,else,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D),, -EDUDR04,EDUDR04_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,1,4,Less than high school,Less than High School,N/A,1,< Than Secondary,Education,Highest level/education - respondent 4 levels - (D),Slight change in wording of categories from CCHS 2011 onwards, -EDUDR04,EDUDR04_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,2,4,High school graduate,High School Graduate,N/A,2,Secondary grad,Education,Highest level/education - respondent 4 levels - (D),, -EDUDR04,EDUDR04_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,3,4,Some post-secondary education,Some post-secondary education,N/A,3,Other post-sec.,Education,Highest level/education - respondent 4 levels - (D),, -EDUDR04,EDUDR04_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,4,4,Post-secondary graduate,Post-secondary graduate,N/A,4,Post-sec. grad,Education,Highest level/education - respondent 4 levels - (D),, -EDUDR04,EDUDR04_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Education,Highest level/education - respondent 4 levels - (D),, -EDUDR04,EDUDR04_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Education,Highest level/education - respondent 4 levels - (D),CCHS 2001 does not have don't know (7) or refusal (8), -EDUDR04,EDUDR04_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,4,missing,missing,N/A,else,else,Education,Highest level/education - respondent 4 levels - (D),, -FINF1,FINF1_cat2_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,1,2,Yes,Yes,N/A,1,Yes,Some food insecurity in past 12 months,Some food insecurity in past 12 months,, -FINF1,FINF1_cat2_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,2,2,No,No,N/A,2,No,Some food insecurity in past 12 months,Some food insecurity in past 12 months,, -FINF1,FINF1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Some food insecurity in past 12 months,Some food insecurity in past 12 months,, -FINF1,FINF1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Some food insecurity in past 12 months,Some food insecurity in past 12 months,, -FINF1,FINF1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,else,else,Some food insecurity in past 12 months,Some food insecurity in past 12 months,, -FLU_160,FLU_160_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]",cat,1,2,Yes,Yes,N/A,1,Yes,Ever had a flu shot,Have you ever had a flu shot?,"In 2007, question was reworded to ""Have you ever had a seasonal flu shot?""", -FLU_160,FLU_160_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]",cat,2,2,No,No,N/A,2,No,Ever had a flu shot,Have you ever had a flu shot?,, -FLU_160,FLU_160_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Ever had a flu shot,Have you ever had a flu shot?,, -FLU_160,FLU_160_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Ever had a flu shot,Have you ever had a flu shot?,, -FLU_160,FLU_160_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]",cat,NA::b,2,missing,missing,N/A,else,else,Ever had a flu shot,Have you ever had a flu shot?,, -FLU_162,FLU_162_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,1,3,<1 year ago,<1 year ago,N/A,1,<1 year ago,Last time had flu shot,When did you have your last flu shot?,, -FLU_162,FLU_162_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,2,3,1-<2 years ago,1-<2 years ago,N/A,2,1-<2 years ago,Last time had flu shot,When did you have your last flu shot?,, -FLU_162,FLU_162_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,3,3,2 years ago or more,2 years ago or more,N/A,3,2 years ago or more,Last time had flu shot,When did you have your last flu shot?,, -FLU_162,FLU_162_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Last time had flu shot,When did you have your last flu shot?,, -FLU_162,FLU_162_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Last time had flu shot,When did you have your last flu shot?,, -FLU_162,FLU_162_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]",cat,NA::b,3,missing,missing,N/A,else,else,Last time had flu shot,When did you have your last flu shot?,, -food_insecurity_der,food_insecurity_der_cat2_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,2,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,"This variable is derived from FINF1, FSCDHFS, FSCDHFS2 by dichotomizing food insecurity into 2 categories. See ?food_insecurity_der for more details", -food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_1,cat,cchs2005_p,[FSCEDHFS],cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,0,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,2,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,3,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,cchs2005_p,[FSCEDHFS],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,0,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,2,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,, -FSCDHFS,FSCDHFS_cat4_0,cat,cchs2005_p,[FSCEDHFS],cat,0,4,Secure,Secure,N/A,0,Secure,Food security,Household food security status - (D),CCHS 2005 has different categories from other CCHS cycles so new variable created, -FSCDHFS,FSCDHFS_cat4_1,cat,cchs2005_p,[FSCEDHFS],cat,1,4,Without hunger,Without hunger,N/A,1,Without hunger,Food security,Household food security status - (D),, -FSCDHFS,FSCDHFS_cat4_2,cat,cchs2005_p,[FSCEDHFS],cat,2,4,W/mod. hunger,With moderate hunger,N/A,2,With moderate hunger,Food security,Household food security status - (D),, -FSCDHFS,FSCDHFS_cat4_3,cat,cchs2005_p,[FSCEDHFS],cat,3,4,W/severe hunger,With severe hunger,N/A,3,With severe hunger,Food security,Household food security status - (D),, -FSCDHFS,FSCDHFS_cat4_NA::a,cat,cchs2005_p,[FSCEDHFS],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Food security,Household food security status - (D),, -FSCDHFS,FSCDHFS_cat4_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food security,Household food security status - (D),, -FSCDHFS,FSCDHFS_cat4_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,4,missing,missing,N/A,else,else,Food security,Household food security status - (D),, -FSCDHFS2,FSCDHFS2_cat3_0,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,0,3,Food secure,Food secure,N/A,0,Food secure,Food security,Household Food Security Status (HC),, -FSCDHFS2,FSCDHFS2_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,1,3,Mod. food insec.,Mod. food insec.,N/A,1,Moderate food insecurity,Food security,Household Food Security Status (HC),, -FSCDHFS2,FSCDHFS2_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,2,3,Sev. food insec.,Sev. food insec.,N/A,2,Severe food insecurity,Food security,Household Food Security Status (HC),, -FSCDHFS2,FSCDHFS2_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Food security,Household Food Security Status (HC),, -FSCDHFS2,FSCDHFS2_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food security,Household Food Security Status (HC),, -FSCDHFS2,FSCDHFS2_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2],cat,NA::b,3,missing,missing,N/A,else,else,Food security,Household Food Security Status (HC),, -FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, [FVCDCAR]",cont,copy,N/A,Daily carrots,Daily carrots,N/A,"[0,20]",Daily consumption - carrots - (D),Daily carrots,Daily consumption - carrots - (D),, -FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, [FVCDCAR]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily carrots,Daily consumption - carrots - (D),, -FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, [FVCDCAR]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily carrots,Daily consumption - carrots - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, [FVCDCAR]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily carrots,Daily consumption - carrots - (D),, -FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, [FVCDFRU]",cont,copy,N/A,Daily fruit,Daily fruit,N/A,"[0,20]",Daily consumption - fruit - (D),Daily fruit,Daily consumption - fruit - (D),, -FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, [FVCDFRU]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily fruit,Daily consumption - fruit - (D),, -FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, [FVCDFRU]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily fruit,Daily consumption - fruit - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, [FVCDFRU]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily fruit,Daily consumption - fruit - (D),, -FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, [FVCDJUI]",cont,copy,N/A,Daily juice,Daily juice,N/A,"[0,20]",Daily consumption - fruit juice - (D),Daily juice,Daily consumption - fruit juice - (D),, -FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, [FVCDJUI]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily juice,Daily consumption - fruit juice - (D),, -FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, [FVCDJUI]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily juice,Daily consumption - fruit juice - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, [FVCDJUI]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily juice,Daily consumption - fruit juice - (D),, -FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, [FVCDPOT]",cont,copy,N/A,Daily potatoes,Daily potatoes,N/A,"[0,20]",Daily consumption - potatoes - (D),Daily potatoes,Daily consumption - potatoes - (D),, -FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, [FVCDPOT]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily potatoes,Daily consumption - potatoes - (D),, -FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, [FVCDPOT]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily potatoes,Daily consumption - potatoes - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, [FVCDPOT]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily potatoes,Daily consumption - potatoes - (D),, -FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, [FVCDSAL]",cont,copy,N/A,Daily salad,Daily salad,N/A,"[0,20]",Daily consumption - green salad - (D),Daily salad,Daily consumption - green salad - (D),, -FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, [FVCDSAL]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily salad,Daily consumption - green salad - (D),, -FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, [FVCDSAL]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily salad,Daily consumption - green salad - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, [FVCDSAL]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily salad,Daily consumption - green salad - (D),, -FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,copy,N/A,Daily total fruits and vegetables,Daily total fruits and vegetables,N/A,"[0,20]",Daily consumption - total fruits and veg. - (D),Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),, -FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),, -FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),, -FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, [FVCDVEG]",cont,copy,N/A,Daily other vegetables,Daily other vegetables,N/A,"[0,20]",Daily consumption other vegetables - (D),Daily other vegetables,Daily consumption other vegetables - (D),, -FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, [FVCDVEG]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily other vegetables,Daily consumption other vegetables - (D),, -FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, [FVCDVEG]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily other vegetables,Daily consumption other vegetables - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, [FVCDVEG]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily other vegetables,Daily consumption other vegetables - (D),, -GEN_01,GEN_01_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,1,5,Excellent,Excellent,N/A,1,Excellent,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,2,5,Very good,Very good,N/A,2,Very good,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,3,5,Good,Good,N/A,3,Good,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,4,5,Fair,Fair,N/A,4,Fair,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,5,5,Poor,Poor,N/A,5,Poor,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_01,GEN_01_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?",, -GEN_02A,GEN_02A_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,1,5,Very satisfied,Very satisfied,N/A,1,Very satisfied,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,2,5,Satisfied,Satisfied,N/A,2,Satisfied,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,3,5,Neither satisfied or dissatisfied,Neither satisfied or dissatisfied,N/A,3,Neither satisfied or dissatisfied,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,4,5,Dissatisfied,Dissatisfied,N/A,4,Dissatisfied,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,5,5,Very dissatisfied,Very dissatisfied,N/A,5,Very dissatisfied,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Satisfication with life,How satisfied are you with your life in general,, -GEN_02A,GEN_02A_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::b,5,missing,missing,N/A,else,else,Satisfication with life,How satisfied are you with your life in general,, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,10,5,Very satisfied,Very satisfied,N/A,1,Very satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?","For CCHS cycles 2003-2007, GEN_02A2 was derived from GEN_02A where the values were rescaled to match GEN_02A2", -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,7,5,Satisfied,Satisfied,N/A,2,Satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,5,5,Neither satisfied or dissatisfied,Neither satisfied or dissatisfied,N/A,3,Neither satisfied or dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,2,5,Dissatisfied,Dissatisfied,N/A,4,Dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,0,5,Very dissatisfied,Very dissatisfied,N/A,5,Very dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::b,5,missing,missing,N/A,else,else,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,0,11,Very dissatisfied,Very dissatisfied,N/A,0,Very dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,1,11,1,1,N/A,1,1,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,2,11,2,2,N/A,2,2,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,3,11,3,3,N/A,3,3,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,4,11,4,4,N/A,4,4,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,5,11,5,5,N/A,5,5,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,6,11,6,6,N/A,6,6,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,7,11,7,7,N/A,7,7,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,8,11,8,8,N/A,8,8,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,9,11,9,9,N/A,9,9,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,10,11,Very satisfied,Very satisfied,N/A,10,Very satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,NA::a,11,not applicable,not applicable,N/A,96,not applicable,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,NA::b,11,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[GEN_02A2],cat,NA::b,11,missing,missing,N/A,else,else,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",, -GEN_02B,GEN_02B_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,1,5,Excellent,Excellent,N/A,1,Excellent,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,2,5,Very good,Very good,N/A,2,Very good,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,3,5,Good,Good,N/A,3,Good,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,4,5,Fair,Fair,N/A,4,Fair,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,5,5,Poor,Poor,N/A,5,Poor,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_02B,GEN_02B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?",, -GEN_07,GEN_07_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,1,5,Not at all,Not at all,N/A,1,Not at all,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,2,5,Not very,Not very,N/A,2,Not very,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,3,5,A bit,A bit,N/A,3,A bit,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,4,5,Quite a bit,Quite a bit,N/A,4,Quite a bit,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,5,5,Extremely,Extremely,N/A,5,Extremely,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_07,GEN_07_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,1,5,Not at all,Not at all,N/A,1,Not at all,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,2,5,Not very,Not very,N/A,2,Not very,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,3,5,A bit,A bit,N/A,3,A bit,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,4,5,Quite a bit,Quite a bit,N/A,4,Quite a bit,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,5,5,Extremely,Extremely,N/A,5,Extremely,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_09,GEN_09_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived work stress,"Would you say that most days were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",, -GEN_10,GEN_10_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,1,4,Very strong,Very strong,N/A,1,Very strong,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,2,4,Somewhat strong,Somewhat strong,N/A,2,Somewhat strong,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,3,4,Somewhat weak,Somewhat weak,N/A,3,Somewhat weak,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,4,4,Very weak,Very weak,N/A,4,Very weak,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEN_10,GEN_10_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]",cat,NA::b,4,missing,missing,N/A,else,else,Sense of belonging in the community,How would you describe your sense of belonging to your local community?,, -GEODPMF,GEODPMF_cat97_1,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10911,97,EASTERN REGIONAL INTEGRATED HA,EASTERN REGIONAL INTEGRATED HA,N/A,10911,EASTERN REGIONAL INTEGRATED HA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_2,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10912,97,CENTRAL REGIONAL INTEGRATED HA,CENTRAL REGIONAL INTEGRATED HA,N/A,10912,CENTRAL REGIONAL INTEGRATED HA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_3,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10913,97,WESTERN/LABRADOR-GRENFELL REGIONAL HA,WESTERN/LABRADOR-GRENFELL REGIONAL HA,N/A,10913,WESTERN/LABRADOR-GRENFELL REGIONAL HA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_4,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,11901,97,PRINCE EDWARD ISLAND,PRINCE EDWARD ISLAND,N/A,11901,PRINCE EDWARD ISLAND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_5,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12910,97,SOUTH SHORE-SOUTH WEST NOVA,SOUTH SHORE-SOUTH WEST NOVA,N/A,12910,SOUTH SHORE-SOUTH WEST NOVA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_6,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12923,97,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,N/A,12923,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_7,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12930,97,COLCHESTER EAST HANTS-CUMBERLAND,COLCHESTER EAST HANTS-CUMBERLAND,N/A,12930,COLCHESTER EAST HANTS-CUMBERLAND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_8,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12940,97,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,N/A,12940,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_9,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12958,97,CAPE BRETON DISTRICT HEALTH AUTHORITY,CAPE BRETON DISTRICT HEALTH AUTHORITY,N/A,12958,CAPE BRETON DISTRICT HEALTH AUTHORITY,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_10,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12969,97,CAPITAL DISTRICT HEALTH AUTHORITY,CAPITAL DISTRICT HEALTH AUTHORITY,N/A,12969,CAPITAL DISTRICT HEALTH AUTHORITY,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_11,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13901,97,ZONE 1,ZONE 1,N/A,13901,ZONE 1,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_12,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13902,97,ZONE 2,ZONE 2,N/A,13902,ZONE 2,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_13,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13903,97,ZONE 3,ZONE 3,N/A,13903,ZONE 3,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_14,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13904,97,ZONES 4 AND 5,ZONES 4 AND 5,N/A,13904,ZONES 4 AND 5,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_15,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13906,97,ZONES 6 AND 7,ZONES 6 AND 7,N/A,13906,ZONES 6 AND 7,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_16,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24901,97,REGION DU BAS-SAINT-LAURENT,REGION DU BAS-SAINT-LAURENT,N/A,24901,REGION DU BAS-SAINT-LAURENT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_17,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24902,97,REGION DU SAGUENAY - LAC-SAINT-JEAN,REGION DU SAGUENAY - LAC-SAINT-JEAN,N/A,24902,REGION DU SAGUENAY - LAC-SAINT-JEAN,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_18,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24903,97,REGION DE LA CAPITALE-NATIONALE,REGION DE LA CAPITALE-NATIONALE,N/A,24903,REGION DE LA CAPITALE-NATIONALE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_19,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24904,97,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,N/A,24904,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_20,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24905,97,REGION DE L'ESTRIE,REGION DE L'ESTRIE,N/A,24905,REGION DE L'ESTRIE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_21,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24906,97,REGION DE MONTREAL,REGION DE MONTREAL,N/A,24906,REGION DE MONTREAL,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_22,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24907,97,REGION DE L'OUTAOUAIS,REGION DE L'OUTAOUAIS,N/A,24907,REGION DE L'OUTAOUAIS,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_23,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24908,97,REGION DE L'ABITIBI-TEMISCAMINGUE,REGION DE L'ABITIBI-TEMISCAMINGUE,N/A,24908,REGION DE L'ABITIBI-TEMISCAMINGUE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_24,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24909,97,REGION DE LA COTE-NORD,REGION DE LA COTE-NORD,N/A,24909,REGION DE LA COTE-NORD,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_25,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24911,97,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,N/A,24911,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_26,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24912,97,REGION DE LA CHAUDIERE-APPALACHES,REGION DE LA CHAUDIERE-APPALACHES,N/A,24912,REGION DE LA CHAUDIERE-APPALACHES,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_27,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24913,97,REGION DE LAVAL,REGION DE LAVAL,N/A,24913,REGION DE LAVAL,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_28,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24914,97,REGION DE LANAUDIERE,REGION DE LANAUDIERE,N/A,24914,REGION DE LANAUDIERE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_29,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24915,97,REGION DES LAURENTIDES,REGION DES LAURENTIDES,N/A,24915,REGION DES LAURENTIDES,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_30,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24916,97,REGION DE LA MONTEREGIE,REGION DE LA MONTEREGIE,N/A,24916,REGION DE LA MONTEREGIE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_31,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35926,97,DISTRICT OF ALGOMA HEALTH UNIT,DISTRICT OF ALGOMA HEALTH UNIT,N/A,35926,DISTRICT OF ALGOMA HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_32,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35927,97,BRANT COUNTY HEALTH UNIT,BRANT COUNTY HEALTH UNIT,N/A,35927,BRANT COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_33,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35930,97,DURHAM REGIONAL HEALTH UNIT,DURHAM REGIONAL HEALTH UNIT,N/A,35930,DURHAM REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_34,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35931,97,ELGIN-ST THOMAS HEALTH UNIT,ELGIN-ST THOMAS HEALTH UNIT,N/A,35931,ELGIN-ST THOMAS HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_35,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35933,97,GREY BRUCE HEALTH UNIT,GREY BRUCE HEALTH UNIT,N/A,35933,GREY BRUCE HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_36,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35934,97,HALDIMAND-NORFOLK HEALTH UNIT,HALDIMAND-NORFOLK HEALTH UNIT,N/A,35934,HALDIMAND-NORFOLK HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_37,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35935,97,HALIBURTON-KAWARTHA-PINE RIDGE DHU,HALIBURTON-KAWARTHA-PINE RIDGE DHU,N/A,35935,HALIBURTON-KAWARTHA-PINE RIDGE DHU,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_38,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35936,97,HALTON REGIONAL HEALTH UNIT,HALTON REGIONAL HEALTH UNIT,N/A,35936,HALTON REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_39,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35937,97,CITY OF HAMILTON HEALTH UNIT,CITY OF HAMILTON HEALTH UNIT,N/A,35937,CITY OF HAMILTON HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_40,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35938,97,HASTINGS AND PRINCE EDWARD COUNTIES HU,HASTINGS AND PRINCE EDWARD COUNTIES HU,N/A,35938,HASTINGS AND PRINCE EDWARD COUNTIES HU,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_41,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35939,97,HURON AND PERTH HEALTH UNITS,HURON AND PERTH HEALTH UNITS,N/A,35939,HURON AND PERTH HEALTH UNITS,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_42,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35940,97,CHATHAM-KENT HEALTH UNIT,CHATHAM-KENT HEALTH UNIT,N/A,35940,CHATHAM-KENT HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_43,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35941,97,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,N/A,35941,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_44,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35942,97,LAMBTON HEALTH UNIT,LAMBTON HEALTH UNIT,N/A,35942,LAMBTON HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_45,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35943,97,LEEDS-GRENVILLE-LANARK DHU,LEEDS-GRENVILLE-LANARK DHU,N/A,35943,LEEDS-GRENVILLE-LANARK DHU,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_46,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35944,97,MIDDLESEX-LONDON HEALTH UNIT,MIDDLESEX-LONDON HEALTH UNIT,N/A,35944,MIDDLESEX-LONDON HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_47,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35946,97,NIAGARA REGIONAL AREA HEALTH UNIT,NIAGARA REGIONAL AREA HEALTH UNIT,N/A,35946,NIAGARA REGIONAL AREA HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_48,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35947,97,NORTH BAY AND TIMISKAMING HEALTH UNITS,NORTH BAY AND TIMISKAMING HEALTH UNITS,N/A,35947,NORTH BAY AND TIMISKAMING HEALTH UNITS,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_49,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35949,97,NORTHWESTERN HEALTH UNIT,NORTHWESTERN HEALTH UNIT,N/A,35949,NORTHWESTERN HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_50,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35951,97,CITY OF OTTAWA HEALTH UNIT,CITY OF OTTAWA HEALTH UNIT,N/A,35951,CITY OF OTTAWA HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_51,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35952,97,OXFORD COUNTY HEALTH UNIT,OXFORD COUNTY HEALTH UNIT,N/A,35952,OXFORD COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_52,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35953,97,PEEL REGIONAL HEALTH UNIT,PEEL REGIONAL HEALTH UNIT,N/A,35953,PEEL REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_53,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35955,97,PETERBOROUGH COUNTY-CITY HEALTH UNIT,PETERBOROUGH COUNTY-CITY HEALTH UNIT,N/A,35955,PETERBOROUGH COUNTY-CITY HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_54,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35956,97,PORCUPINE HEALTH UNIT,PORCUPINE HEALTH UNIT,N/A,35956,PORCUPINE HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_55,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35957,97,RENFREW COUNTY AND DISTRICT HEALTH UNIT,RENFREW COUNTY AND DISTRICT HEALTH UNIT,N/A,35957,RENFREW COUNTY AND DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_56,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35958,97,EASTERN ONTARIO HEALTH UNIT,EASTERN ONTARIO HEALTH UNIT,N/A,35958,EASTERN ONTARIO HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_57,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35960,97,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,N/A,35960,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_58,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35961,97,SUDBURY AND DISTRICT HEALTH UNIT,SUDBURY AND DISTRICT HEALTH UNIT,N/A,35961,SUDBURY AND DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_59,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35962,97,THUNDER BAY DISTRICT HEALTH UNIT,THUNDER BAY DISTRICT HEALTH UNIT,N/A,35962,THUNDER BAY DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_60,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35965,97,WATERLOO HEALTH UNIT,WATERLOO HEALTH UNIT,N/A,35965,WATERLOO HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_61,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35966,97,WELLINGTON-DUFFERIN-GUELPH HU,WELLINGTON-DUFFERIN-GUELPH HU,N/A,35966,WELLINGTON-DUFFERIN-GUELPH HU,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_62,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35968,97,WINDSOR-ESSEX COUNTY HEALTH UNIT,WINDSOR-ESSEX COUNTY HEALTH UNIT,N/A,35968,WINDSOR-ESSEX COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_63,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35970,97,YORK REGIONAL HEALTH UNIT,YORK REGIONAL HEALTH UNIT,N/A,35970,YORK REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_64,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35995,97,CITY OF TORONTO HEALTH UNIT,CITY OF TORONTO HEALTH UNIT,N/A,35995,CITY OF TORONTO HEALTH UNIT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_65,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46901,97,WINNIPEG RHA,WINNIPEG RHA,N/A,46901,WINNIPEG RHA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_66,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46902,97,PRAIRIE M. HEALTH,PRAIRIE M. HEALTH,N/A,46902,PRAIRIE M. HEALTH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_67,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46903,97,INTERLAKE-EASTERN RHA,INTERLAKE-EASTERN RHA,N/A,46903,INTERLAKE-EASTERN RHA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_68,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46904,97,NORTHEN RHA,NORTHEN RHA,N/A,46904,NORTHEN RHA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_69,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46905,97,SOUTHEN HEALTH,SOUTHEN HEALTH,N/A,46905,SOUTHEN HEALTH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_70,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47901,97,SUN COUNTRY/FIVE HILLS/CYPRESS,SUN COUNTRY/FIVE HILLS/CYPRESS,N/A,47901,SUN COUNTRY/FIVE HILLS/CYPRESS,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_71,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47904,97,REGINA QU'APPELLE,REGINA QU'APPELLE,N/A,47904,REGINA QU'APPELLE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_72,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47905,97,SUNRISE/KELSEY TRAIL,SUNRISE/KELSEY TRAIL,N/A,47905,SUNRISE/KELSEY TRAIL,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_73,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47906,97,SASKATOON,SASKATOON,N/A,47906,SASKATOON,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_74,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47907,97,HEARTLAND/PRAIRIE NORTH,HEARTLAND/PRAIRIE NORTH,N/A,47907,HEARTLAND/PRAIRIE NORTH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_75,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47909,97,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,N/A,47909,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_76,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48931,97,SOUTH ZONE,SOUTH ZONE,N/A,48931,SOUTH ZONE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_77,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48932,97,CALGARY ZONE,CALGARY ZONE,N/A,48932,CALGARY ZONE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_78,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48933,97,CENTRAL ZONE,CENTRAL ZONE,N/A,48933,CENTRAL ZONE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_79,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48934,97,EDMONTON ZONE,EDMONTON ZONE,N/A,48934,EDMONTON ZONE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_80,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48935,97,NORTH ZONE,NORTH ZONE,N/A,48935,NORTH ZONE,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_81,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59911,97,EAST KOOTENAY,EAST KOOTENAY,N/A,59911,EAST KOOTENAY,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_82,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59912,97,KOOTENAY-BOUNDARY,KOOTENAY-BOUNDARY,N/A,59912,KOOTENAY-BOUNDARY,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_83,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59913,97,OKANAGAN,OKANAGAN,N/A,59913,OKANAGAN,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_84,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59914,97,THOMPSON/CARIBOO,THOMPSON/CARIBOO,N/A,59914,THOMPSON/CARIBOO,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_85,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59921,97,FRASER EAST,FRASER EAST,N/A,59921,FRASER EAST,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_86,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59922,97,FRASER NORTH,FRASER NORTH,N/A,59922,FRASER NORTH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_87,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59923,97,FRASER SOUTH,FRASER SOUTH,N/A,59923,FRASER SOUTH,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_88,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59931,97,RICHMOND,RICHMOND,N/A,59931,RICHMOND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_89,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59932,97,VANCOUVER,VANCOUVER,N/A,59932,VANCOUVER,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_90,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59933,97,NORTH SHORE/COAST GARIBALDI,NORTH SHORE/COAST GARIBALDI,N/A,59933,NORTH SHORE/COAST GARIBALDI,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_91,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59941,97,SOUTH VANCOUVER ISLAND,SOUTH VANCOUVER ISLAND,N/A,59941,SOUTH VANCOUVER ISLAND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_92,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59942,97,CENTRAL VANCOUVER ISLAND,CENTRAL VANCOUVER ISLAND,N/A,59942,CENTRAL VANCOUVER ISLAND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_93,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59943,97,NORTH VANCOUVER ISLAND,NORTH VANCOUVER ISLAND,N/A,59943,NORTH VANCOUVER ISLAND,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_94,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59951,97,NORTHWEST,NORTHWEST,N/A,59951,NORTHWEST,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_95,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59952,97,NORTHERN INTERIOR,NORTHERN INTERIOR,N/A,59952,NORTHERN INTERIOR,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_96,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59953,97,NORTHEAST,NORTHEAST,N/A,59953,NORTHEAST,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_97,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,60901,97,YUKON/NORTHWEST TERRITORIES/NUNAVUT,YUKON/NORTHWEST TERRITORIES/NUNAVUT,N/A,60901,YUKON/NORTHWEST TERRITORIES/NUNAVUT,Health Region - (G),Health Region - (G),, -GEODPMF,GEODPMF_cat97_NA::b,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,NA::b,97,missing,missing,N/A,else,else,Health Region - (G),Health Region - (G),, -GEOGPRV,GEOGPRV_cat11_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,10,11,NL,Nfld. & Labrador,N/A,10,Nfld. & Labrador,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,11,11,PEI,Prince Edward Island,N/A,11,Prince Edward Island,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,12,11,NS,Nova Scotia,N/A,12,Nova Scotia,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,13,11,NB,New Brunswick,N/A,13,New Brunswick,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,24,11,QC,Quebec,N/A,24,Quebec,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,35,11,ON,Ontario,N/A,35,Ontario,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,46,11,MB,Manitoba,N/A,46,Manitoba,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,47,11,SK,Saskatchewan,N/A,47,Saskatchewan,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,48,11,AB,Alberta,N/A,48,Alberta,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,59,11,BC,British Columbia,N/A,59,British Columbia,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,60,11,YT/NT/NU,Yukon/NWT/Nunavut,N/A,60,Yukon/NWT/Nunavut,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,NA::a,11,not applicable,not applicable,N/A,96,not applicable,Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,NA::b,11,missing,missing,N/A,"[97,99]","don't know (97), refusal (98), not stated (99)",Province,Province of residence of respondent - (G),, -GEOGPRV,GEOGPRV_cat11_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]",cat,NA::b,11,missing,missing,N/A,else,else,Province,Province of residence of respondent - (G),, -HCU_1AA,HCU_1AA_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]",cat,1,2,Yes,Yes (Has regular medical doctor),N/A,1,Yes (Has regular medical doctor),Has regular medical doctor,Do you have a regular medical doctor?,, -HCU_1AA,HCU_1AA_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]",cat,2,2,No,No (Does not have regular medical doctor),N/A,2,No (Does not have regular medical doctor),Has regular medical doctor,Do you have a regular medical doctor?,, -HCU_1AA,HCU_1AA_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Has regular medical doctor,Do you have a regular medical doctor?,, -HCU_1AA,HCU_1AA_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Has regular medical doctor,Do you have a regular medical doctor?,, -HCU_1AA,HCU_1AA_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]",cat,NA::b,2,missing,missing,N/A,else,else,Has regular medical doctor,Do you have a regular medical doctor?,, -HUIDCOG,HUIDCOG_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,1,6,No cognit prob,No cognition problems,N/A,1,No cognit prob,Cognition prob. - function code - (D),Cognition prob. - function code - (D),CCHS 2007 onwards uses cognition levels which coincide with HUI Mark 3, -HUIDCOG,HUIDCOG_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,2,6,Little difficult,Little difficulty,N/A,2,Little difficulty,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,3,6,Some forgetful,Some forgetful,N/A,3,Some forgetful,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,4,6,Forget/dif think,Forgetful/difficulty thinking,N/A,4,Forget/dif think,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,5,6,Very forgetful,Very forgetful,N/A,5,Very forgetful,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,6,6,Can't remember,Can't remember,N/A,6,Can't remember,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDCOG,HUIDCOG_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Cognition prob. - function code - (D),Cognition prob. - function code - (D),CCHS 2001 does not include don't know (97) or refusal (98), -HUIDCOG,HUIDCOG_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]",cat,NA::b,6,missing,missing,N/A,else,else,Cognition prob. - function code - (D),Cognition prob. - function code - (D),, -HUIDEMO,HUIDEMO_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,1,5,Happy in life,Happy in life,N/A,1,Happy in life,Emotional problems - function code - (D),Emotional problems - function code - (D),CCHS 2007 onwards uses emotional levels which coincide with HUI Mark 3, -HUIDEMO,HUIDEMO_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,2,5,Somewhat happy,Somewhat happy,N/A,2,Somewhat happy,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDEMO,HUIDEMO_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,3,5,Somewhat unhappy,Somewhat unhappy,N/A,3,Somewhat unhappy,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDEMO,HUIDEMO_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,4,5,Very unhappy,Very unhappy,N/A,4,Very unhappy,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDEMO,HUIDEMO_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,5,5,Life not worth,Life not worth,N/A,5,Life not worth,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDEMO,HUIDEMO_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDEMO,HUIDEMO_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Emotional problems - function code - (D),Emotional problems - function code - (D),CCHS 2001 does not include don't know (7) or refusal (8), -HUIDEMO,HUIDEMO_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]",cat,NA::b,5,missing,missing,N/A,else,else,Emotional problems - function code - (D),Emotional problems - function code - (D),, -HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, [HUIDHSI]",cont,copy,N/A,HUI score,Health Utility Index (HUI3) - (D),N/A,"[-0.359,1]",Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),, -HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, [HUIDHSI]",cont,NA::a,N/A,not applicable,not applicable,N/A,99.996,not applicable (99.996),Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),, -HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, [HUIDHSI]",cont,NA::b,N/A,missing,missing,N/A,"[99.997,99.999]","don't know (99.997), refusal (99.998), not stated (99.999)",Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),, -HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, [HUIDHSI]",cont,NA::b,N/A,missing,missing,N/A,else,else,Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),, -HUIGDEX,HUIGDEX_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,1,3,No dext prob,No problems,N/A,1,No dext prob,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",, -HUIGDEX,HUIGDEX_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,2,3,Dext/no help,No help needed,N/A,2,Dext/no help,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",, -HUIGDEX,HUIGDEX_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,3,3,Dext/need help,Needs help,N/A,3,Dext/need help,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",, -HUIGDEX,HUIGDEX_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",, -HUIGDEX,HUIGDEX_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8), -HUIGDEX,HUIGDEX_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]",cat,NA::b,3,missing,missing,N/A,else,else,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",, -HUIGHER,HUIGHER_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,1,3,No hearing prob,No hearing problem,N/A,1,No hearing prob,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",, -HUIGHER,HUIGHER_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,2,3,Hear corrected,Hearing corrected,N/A,2,Hear corrected,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",, -HUIGHER,HUIGHER_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,3,3,Hear n-corrected,Hearing not-corrected,N/A,3,Hear n-corrected,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",, -HUIGHER,HUIGHER_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",, -HUIGHER,HUIGHER_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8), -HUIGHER,HUIGHER_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]",cat,NA::b,3,missing,missing,N/A,else,else,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,1,4,No mobil. Prob.,No mobil. Prob.,N/A,1,No mobil. Prob.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,2,4,Mob-no aid req.,Mob-no aid req.,N/A,2,Mob-no aid req.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,3,4,Need mech supp.,Need mech supp.,N/A,3,Need mech supp.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,4,4,Can't walk,Can't walk,N/A,4,Can't walk,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGMOB,HUIGMOB_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8), -HUIGMOB,HUIGMOB_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]",cat,NA::b,4,missing,missing,N/A,else,else,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",, -HUIGSPE,HUIGSPE_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]",cat,1,2,No speech prob,No speech problem,N/A,1,No speech prob,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",, -HUIGSPE,HUIGSPE_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]",cat,2,2,Part/not underst,Part/not underst,N/A,2,Part/not underst,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",, -HUIGSPE,HUIGSPE_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",, -HUIGSPE,HUIGSPE_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",CCHS 2001 does not include don't know (7) or refusal (8), -HUIGSPE,HUIGSPE_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]",cat,NA::b,2,missing,missing,N/A,else,else,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,1,5,No visual probl.,No visual problems,N/A,1,No visual probl.,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,2,5,Corr. by lenses,Corrected by lenses,N/A,2,Corr. by lenses,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,3,5,Hypermet/n corr,Hypermetropia/no correction,N/A,3,Hypermet/n corr,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,4,5,Myopia/n corr,Myopia/no correction,N/A,4,Myopia/n corr,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,5,5,Myopia & hypermet,Myopia & hypermetropia,N/A,5,Myopia & hypermet,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUIGVIS,HUIGVIS_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",CCHS 2001 does not include don't know (7) or refusal (8), -HUIGVIS,HUIGVIS_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]",cat,NA::b,5,missing,missing,N/A,else,else,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",, -HUPDPAD,HUPDPAD_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,1,5,No pain/discomf,No pain/discomf,N/A,1,No pain/discomf,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,2,5,Doesn't prev act,Doesn't prev act,N/A,2,Doesn't prev act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,3,5,Prevents few act,Prevents few act,N/A,3,Prevents few act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,4,5,Prev. some act,Prev. some act,N/A,4,Prev. some act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,5,5,Prev. most act,Prev. most act,N/A,5,Prev. most act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HUPDPAD,HUPDPAD_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),CCHS 2001 does not include don't know (7) or refusal (8), -HUPDPAD,HUPDPAD_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]",cat,NA::b,5,missing,missing,N/A,else,else,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),, -HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, [HWTGBMI]",cont,copy,N/A,BMI,Body Mass Index,kg/m2,"[11.91,57.9]","BMI / self-report - (D,G)",BMI,"BMI / self-report - (D,G)","CCHS 2001 restricts BMI to ages 20-64. Consider using using HWTGBMI_der for the most concistent BMI variable across all CCHS cycles. See documentation for BMI_fun() in derived variables for more details, or type ?BMI_fun in the console.", -HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI",cont,NA::a,N/A,not applicable,not applicable,kg/m2,999.6,Not applicable,BMI,"BMI / self-report - (D,G)","CCHS 2001 and 2003 codes not applicable and missing variables as 999.6 and 999.7-999.9 respectively, while CCHS 2005 onwards codes not applicable and missing variables as 999.96 and 999.7-999.99 respectively", -HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI",cont,NA::b,N/A,missing,missing,kg/m2,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),BMI,"BMI / self-report - (D,G)",Don't know (999.7) and refusal (999.8) not included in 2001 CCHS, -HWTGBMI,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGBMI, [HWTGBMI]",cont,NA::a,N/A,not applicable,not applicable,kg/m2,999.96,Not applicable,BMI,"BMI / self-report - (D,G)",, -HWTGBMI,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGBMI, [HWTGBMI]",cont,NA::b,N/A,missing,missing,kg/m2,"[999.97,999.99]",don't know (999.97); refusal (999.98); not stated (999.99),BMI,"BMI / self-report - (D,G)",, -HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, [HWTGBMI]",cont,NA::b,N/A,missing,missing,kg/m2,else,else,BMI,"BMI / self-report - (D,G)",, -HWTGBMI_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[HWTGHTM, HWTGWTK]",N/A,Func::bmi_fun,N/A,N/A,N/A,kg/m2,N/A,N/A,Derived BMI,Derived Body Mass Index,"BMI variable derived from the harmonized height and weight variables. See documentation for BMI_fun() in derived variables for more details, or type ?BMI_fun in the console.", -HWTGBMI_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[HWTGHTM, HWTGWTK]",N/A,NA::b,N/A,missing,missing,kg/m2,N/A,N/A,Derived BMI,Derived Body Mass Index,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.118,N/A,Height,converted height (3'8 IN - 44 inches),meters,1,3'8 IN - 44 inches,Height,Height,"2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points", -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.143,N/A,Height,converted height (3'9 IN - 45 inches),meters,2,3'9 IN - 45 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.168,N/A,Height,converted height (3'10 IN - 46 inches),meters,3,3'10 IN - 46 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.194,N/A,Height,converted height (3'11 IN - 47 inches),meters,4,3'11 IN - 47 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.219,N/A,Height,converted height (4'0 IN - 48 inches),meters,5,4'0 IN - 48 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.245,N/A,Height,converted height (4'1 IN - 49 inches),meters,6,4'1 IN - 49 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.27,N/A,Height,converted height (4'2 IN - 50 inches),meters,7,4'2 IN - 50 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.295,N/A,Height,converted height (4'3 IN - 51 inches),meters,8,4'3 IN - 51 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.321,N/A,Height,converted height (4'4 IN - 52 inches),meters,9,4'4 IN - 52 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.346,N/A,Height,converted height (4'5 IN - 53 inches),meters,10,4'5 IN - 53 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.372,N/A,Height,converted height (4'6 IN - 54 inches),meters,11,4'6 IN - 54 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.397,N/A,Height,converted height (4'7 IN - 55 inches),meters,12,4'7 IN - 55 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.422,N/A,Height,converted height (4'8 IN - 56 inches),meters,13,4'8 IN - 56 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.448,N/A,Height,converted height (4'9 IN - 57 inches),meters,14,4'9 IN - 57 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.473,N/A,Height,converted height (4'10 IN - 58 inches),meters,15,4'10 IN - 58 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.499,N/A,Height,converted height (4'11 in - 59 inches),meters,16,4'11 in - 59 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.524,N/A,Height,converted height (5'0 IN - 60 inches),meters,17,5'0 IN - 60 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.549,N/A,Height,converted height (5'1 IN - 61 inches),meters,18,5'1 IN - 61 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.575,N/A,Height,converted height (5'2 IN - 62 inches),meters,19,5'2 IN - 62 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.6,N/A,Height,converted height (5'3 IN - 63 inches),meters,20,5'3 IN - 63 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.626,N/A,Height,converted height (5'4 IN - 64 inches),meters,21,5'4 IN - 64 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.651,N/A,Height,converted height (5'5 IN - 65 inches),meters,22,5'5 IN - 65 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.676,N/A,Height,converted height (5'6 IN - 66 inches),meters,23,5'6 IN - 66 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.702,N/A,Height,converted height (5'7 IN - 67 inches),meters,24,5'7 IN - 67 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.727,N/A,Height,converted height (5'8 IN - 68 inches),meters,25,5'8 IN - 68 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.753,N/A,Height,converted height (5'9 IN - 69 inches),meters,26,5'9 IN - 69 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.778,N/A,Height,converted height (5'10 IN - 70 inches),meters,27,5'10 IN - 70 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.803,N/A,Height,converted height (5'11 IN - 71 inches),meters,28,5'11 IN - 71 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.829,N/A,Height,converted height (6'0 IN - 72 inches),meters,29,6'0 IN - 72 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.854,N/A,Height,converted height (6'1 IN - 73 inches),meters,30,6'1 IN - 73 inches,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.93,N/A,Height,converted height (6'2 IN+ - 74+ inches),meters,31,6'2 IN+ - 74+ inches,Height,Height,74+ inches converted to 76 inches, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::a,N/A,not applicable,not applicable,meters,96,not applicable,Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::b,N/A,missing,missing,meters,99,not stated (99),Height,Height,, -HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::b,N/A,missing,missing,meters,else,else,Height,Height,, -HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGHTM, [HWTGHTM]",cont,copy,N/A,Height,Height,meters,"[0.914,2.134]",Height,Height,"Height (metres)/self-reported - (D,G)",Height is a reported in meters from 2005 CCHS onwards, -HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGHTM, [HWTGHTM]",cont,NA::a,N/A,not applicable,not applicable,meters,9.996,not applicable,Height,"Height (metres)/self-reported - (D,G)",, -HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGHTM, [HWTGHTM]",cont,NA::b,N/A,missing,missing,meters,"[9.997,9.999]","don't know (9.997), refusal (9.998), not stated (9.999)",Height,"Height (metres)/self-reported - (D,G)",, -HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::HWTEGHTM, [HWTGHTM]",cont,NA::b,N/A,missing,missing,meters,else,else,Height,"Height (metres)/self-reported - (D,G)",, -HWTGWTK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, [HWTGWTK]",cont,copy,N/A,Weight,Weight - kilograms,kg,"[27.0,135.0]","Weight - kilograms (D, G)",Weight,"Weight - kilograms (D, G)",, -HWTGWTK,N/A,cont,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGWTK, cchs2005_p::HWTEGWTK, [HWTGWTK]",cont,NA::a,N/A,not applicable,not applicable,kg,999.96,not applicable,Weight,"Weight - kilograms (D, G)",, -HWTGWTK,N/A,cont,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGWTK, cchs2005_p::HWTEGWTK, [HWTGWTK]",cont,NA::b,N/A,missing,missing,kg,"[999.97,999.99]",don't know (999.97); refusal (999.98); not stated (999.99),Weight,"Weight - kilograms (D, G)",, -HWTGWTK,N/A,cont,cchs2003_p,cchs2003_p::HWTCGWTK,cont,NA::a,N/A,not applicable,not applicable,kg,996,not applicable,Weight,"Weight - kilograms (D, G)",, -HWTGWTK,N/A,cont,cchs2003_p,cchs2003_p::HWTCGWTK,cont,NA::b,N/A,missing,missing,kg,"[997,999]",don't know (997); refusal (998); not stated (999),Weight,"Weight - kilograms (D, G)",, -HWTGWTK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, [HWTGWTK]",cont,NA::b,N/A,missing,missing,kg,else,else,Weight,"Weight - kilograms (D, G)",, -id_year,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[data_name, ADM_RNO]",N/A,id_from::unite,N/A,N/A,N/A,N/A,N/A,N/A,Unique ID,Unique ID,Variable appends data_name to sequential random number to generate a unique identifier for all respondents , -INCDRCA,INCDRCA_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,1,10,Decile 1,Decile 2,N/A,1,Decile 1,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,2,10,Decile 2,Decile 3,N/A,2,Decile 2,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,3,10,Decile 3,Decile 4,N/A,3,Decile 3,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,4,10,Decile 4,Decile 5,N/A,4,Decile 4,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,5,10,Decile 5,Decile 6,N/A,5,Decile 5,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,6,10,Decile 6,Decile 7,N/A,6,Decile 6,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,7,10,Decile 7,Decile 8,N/A,7,Decile 7,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,8,10,Decile 8,Decile 9,N/A,8,Decile 8,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,9,10,Decile 9,Decile 10,N/A,9,Decile 9,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,10,10,Decile 10,Decile 11,N/A,10,Decile 10,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution,Household income distribution - (D),, -INCDRCA,INCDRCA_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution,Household income distribution - (D),, -INCDRPR,INCDRPR_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,1,10,Decile 1,Decile 2,N/A,1,Decile 1,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,2,10,Decile 2,Decile 3,N/A,2,Decile 2,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,3,10,Decile 3,Decile 4,N/A,3,Decile 3,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,4,10,Decile 4,Decile 5,N/A,4,Decile 4,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,5,10,Decile 5,Decile 6,N/A,5,Decile 5,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,6,10,Decile 6,Decile 7,N/A,6,Decile 6,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,7,10,Decile 7,Decile 8,N/A,7,Decile 7,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,8,10,Decile 8,Decile 9,N/A,8,Decile 8,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,9,10,Decile 9,Decile 10,N/A,9,Decile 9,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,10,10,Decile 10,Decile 11,N/A,10,Decile 10,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRPR,INCDRPR_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution provincial level,household inc. distribution-prov. level - (D),, -INCDRRS,INCDRRS_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,1,10,Decile 1,Decile 2,N/A,1,Decile 1,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,2,10,Decile 2,Decile 3,N/A,2,Decile 2,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,3,10,Decile 3,Decile 4,N/A,3,Decile 3,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,4,10,Decile 4,Decile 5,N/A,4,Decile 4,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,5,10,Decile 5,Decile 6,N/A,5,Decile 5,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,6,10,Decile 6,Decile 7,N/A,6,Decile 6,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,7,10,Decile 7,Decile 8,N/A,7,Decile 7,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,8,10,Decile 8,Decile 9,N/A,8,Decile 8,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,9,10,Decile 9,Decile 10,N/A,9,Decile 9,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,10,10,Decile 10,Decile 11,N/A,10,Decile 10,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution health region level,household inc. distribution- hr level - (D),, -INCDRRS,INCDRRS_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution health region level,household inc. distribution- hr level - (D),, -INCGHH_A,INCGHH_A_cat6_1,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,1,6,No income,No income,$/year,1,No income,Household income,"Total household income from all sources (D, G)","CCHS 2001 classifies no income and less than $15,000 as separate categories", -INCGHH_A,INCGHH_A_cat6_2,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,2,6,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_3,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,3,6,"$15,000-29,999","$15,000-29,999",$/year,3,"$15,000-29,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_4,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,4,6,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_5,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,5,6,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_6,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,6,6,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_NA::a,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::a,6,not applicable,not applicable,$/year,96,not applicable,Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_NA::b,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,6,missing,missing,$/year,"[97,99]","don't know (97), refusal (98), not stated (99)",Household income,"Total household income from all sources (D, G)",, -INCGHH_A,INCGHH_A_cat6_NA::b,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,6,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_1,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,1,5,"No income or less than $15,000","No income or less than $15,000",$/year,1,"No income or less than $15,000",Household income,"Total household income from all sources (D, G)","CCHS 2003 and 2005 classifies no income and less than $15,000 as one category", -INCGHH_B,INCGHH_B_cat5_2,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,2,5,"$15,000-29,999","$15,000-29,999",$/year,2,"$15,000-29,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_3,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,3,5,"$30,000-$49,999","$30,000-$49,999",$/year,3,"$30,000-$49,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_4,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,4,5,"$50,000-$79,999","$50,000-$79,999",$/year,4,"$50,000-$79,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_5,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,5,5,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_NA::a,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::a,5,not applicable,not applicable,$/year,6,not applicable,Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,5,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,"Total household income from all sources (D, G)",, -INCGHH_B,INCGHH_B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,5,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,1,5,"No income or less than $20,000","No income or less than $20,000",$/year,1,"No income or less than $20,000",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2015",[INCGHH],cat,2,5,"$20,000-39,999","$20,000-39,999",$/year,2,"$20,000-39,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2016",[INCGHH],cat,3,5,"$40,000-$59,999","$40,000-$59,999",$/year,3,"$40,000-$59,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2017",[INCGHH],cat,4,5,"$60,000-$79,999","$60,000-$79,999",$/year,4,"$60,000-$79,999",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2018",[INCGHH],cat,5,5,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2019",[INCGHH],cat,NA::a,5,not applicable,not applicable,$/year,6,not applicable,Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2020",[INCGHH],cat,NA::b,5,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,"Total household income from all sources (D, G)",, -INCGHH_C,INCGHH_C_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2021",[INCGHH],cat,NA::b,5,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)",, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,7500,N/A,No income,No income,$/year,1,No income,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,7500,N/A,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,22500,N/A,"$15,000-29,999","$15,000-29,999",$/year,3,"$15,000-29,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,40000,N/A,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,60000,N/A,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::a,N/A,not applicable,not applicable,$/year,96,not applicable,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,N/A,missing,missing,$/year,"[97,99]","don't know (97), refusal (98), not stated (99)",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,7500,N/A,"No income or less than $15,000","No income or less than $15,000",$/year,1,"No income or less than $15,000",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,22500,N/A,"$15,000-29,999","$15,000-29,999",$/year,2,"$15,000-29,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,40000,N/A,"$30,000-$49,999","$30,000-$49,999",$/year,3,"$30,000-$49,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,60000,N/A,"$50,000-$79,999","$50,000-$79,999",$/year,4,"$50,000-$79,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::a,N/A,not applicable,not applicable,$/year,6,not applicable,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,N/A,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,10000,N/A,"No income or less than $20,000","No income or less than $20,000",$/year,1,"No income or less than $20,000",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,30000,N/A,"$20,000-39,999","$20,000-39,999",$/year,2,"$20,000-39,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,50000,N/A,"$40,000-$59,999","$40,000-$59,999",$/year,3,"$40,000-$59,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,70000,N/A,"$60,000-$79,999","$60,000-$79,999",$/year,4,"$60,000-$79,999",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,NA::a,N/A,not applicable,not applicable,$/year,6,not applicable,Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,NA::b,N/A,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,Total household income from all sources - continuous,, -INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH],cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous,, -INCGPER_A,INCGPER_A_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,1,6,No income,No income,Dollars,1,No income,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,2,6,"Less than $15,000","Less than $15,000",Dollars,2,"Less than $15,000",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,3,6,"$15,000-$29,999","$15,000-$29,1000",Dollars,3,"$15,000-$29,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,4,6,"$30,000-$49,999","$30,000-$49,1000",Dollars,4,"$30,000-$49,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,5,6,"$50,000-$79,999","$50,000-$79,1000",Dollars,5,"$50,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,6,6,"$80,000 or more","$80,000 or more",Dollars,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::a,6,not applicable,not applicable,Dollars,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_A,INCGPER_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,6,missing,missing,Dollars,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G)",CCHS 2001 missing 97 (don't know) and 98 (refusal), -INCGPER_A,INCGPER_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,6,missing,missing,Dollars,else,else,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,1,6,No income,No income,Dollars,1,No income,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,2,6,"Less than $20,000","Less than $20,000",Dollars,2,"Less than $20,000",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,3,6,"$20,000-$39,999","$20,000-$39,999",Dollars,3,"$20,000-$39,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,4,6,"$40,000-$59,999","$40,000-$59,999",Dollars,4,"$40,000-$59,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,5,6,"$60,000-$79,999","$60,000-$79,999",Dollars,5,"$60,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_6,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,6,6,"$80,000 or more","$80,000 or more",Dollars,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::a,6,not applicable,not applicable,Dollars,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::b,6,missing,missing,Dollars,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_B,INCGPER_B_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::b,6,missing,missing,Dollars,else,else,Personal income,"Total pers. inc. from all sources (D, G)",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,0,N/A,No income,No income,Dollars,1,No income,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,7500,N/A,"Less than $15,000","Less than $15,000",Dollars,2,"Less than $15,000",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,22500,N/A,"$15,000-$29,999","$15,000-$29,1000",Dollars,3,"$15,000-$29,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,40000,N/A,"$30,000-$49,999","$30,000-$49,1000",Dollars,4,"$30,000-$49,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,60000,N/A,"$50,000-$79,999","$50,000-$79,1000",Dollars,5,"$50,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,100000,N/A,"$80,000 or more","$80,000 or more",Dollars,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::a,N/A,not applicable,not applicable,Dollars,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,N/A,missing,missing,Dollars,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,N/A,missing,missing,Dollars,else,else,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,0,N/A,No income,No income,Dollars,1,No income,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,10000,N/A,"Less than $20,000","Less than $20,000",Dollars,2,"Less than $20,000",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,30000,N/A,"$20,000-$39,999","$20,000-$39,999",Dollars,3,"$20,000-$39,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,50000,N/A,"$40,000-$59,999","$40,000-$59,999",Dollars,4,"$40,000-$59,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,70000,N/A,"$60,000-$79,999","$60,000-$79,999",Dollars,5,"$60,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,100000,N/A,"$80,000 or more","$80,000 or more",Dollars,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::a,N/A,not applicable,not applicable,Dollars,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::b,N/A,missing,missing,Dollars,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER],cat,NA::b,N/A,missing,missing,Dollars,else,else,Personal income,"Total pers. inc. from all sources (D, G) - continuous",, -LBFA_31A,LBFA_31A_cat9_1,cat,cchs2001_p,[LBFA_31A],cat,1,9,Management,Management,N/A,1,Management,Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_2,cat,cchs2001_p,[LBFA_31A],cat,2,9,Professional (including accountants),Professional (including accountants),N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_3,cat,cchs2001_p,[LBFA_31A],cat,3,9,"Technologist, Technician or Tech Occ","Technologist, Technician or Tech Occ",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_4,cat,cchs2001_p,[LBFA_31A],cat,4,9,"Administrative, Financial or Clerical","Administrative, Financial or Clerical",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_5,cat,cchs2001_p,[LBFA_31A],cat,5,9,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_6,cat,cchs2001_p,[LBFA_31A],cat,6,9,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_7,cat,cchs2001_p,[LBFA_31A],cat,7,9,"Farming, Forestry, Fishing, Mining","Farming, Forestry, Fishing, Mining",N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_8,cat,cchs2001_p,[LBFA_31A],cat,8,9,"Processing, Manufacturing, Utilities","Processing, Manufacturing, Utilities",N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_9,cat,cchs2001_p,[LBFA_31A],cat,9,9,Other,Other,N/A,9,Other,Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,9,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,9,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?,, -LBFA_31A,LBFA_31A_cat9_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,9,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,"Management, Health, Education, Art, Culture",Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,2,5,"Business, Finance, Admin","Business, Finance, Admin",N/A,2,"Business, Finance, Admin",Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,3,5,Sales or Service,Sales or Service,N/A,3,Sales or Service,Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,4,5,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,4,"Trades, Transport or Equipment Operator",Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,5,Unique to Prim. Ind./Proc./Manu.,Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::b,5,missing,missing,N/A,9,not stated,Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::b,5,missing,missing,N/A,else,else,Occupation,Occupation group - (G),, -LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,Management,Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2014", -LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2015", -LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2016", -LBFA_31A_a,LBFA_31A_a_cat5_2,cat,cchs2001_p,[LBFA_31A],cat,2,5,"Business, Finance, Admin","Business, Finance, Admin",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_3,cat,cchs2001_p,[LBFA_31A],cat,3,5,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_4,cat,cchs2001_p,[LBFA_31A],cat,4,5,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_5,cat,cchs2001_p,[LBFA_31A],cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2014", -LBFA_31A_a,LBFA_31A_a_cat5_5,cat,cchs2001_p,[LBFA_31A],cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2015", -LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,9,Other,Occupation,Which of the following best describes your occupation?,"""Other"" has no equivalent in LBSGSOC recoded to 'NA::b' missing", -LBFA_31A_a,LBFA_31A_a_cat5_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,5,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?,, -LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,"Management, Health, Education, Art, Culture",Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,2,6,"Business, Finance, Admin","Business, Finance, Admin",N/A,2,"Business, Finance, Admin",Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,3,6,Sales or Service,Sales or Service,N/A,3,Sales or Service,Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,4,6,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,4,"Trades, Transport or Equipment Operator",Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,5,Unique to Prim. Ind./Proc./Manu.,Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::a,6,not applicable,not applicable,N/A,6,not applicable,Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::b,6,missing,missing,N/A,9,not stated,Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[LBSGSOC],cat,NA::b,6,missing,missing,N/A,else,else,Occupation,Occupation group - (G),, -LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,Management,Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2014", -LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2015", -LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2016", -LBFA_31A_b,LBFA_31A_b_cat6_2,cat,cchs2001_p,[LBFA_31A],cat,2,6,"Business, Finance, Admin","Business, Finance, Admin",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_3,cat,cchs2001_p,[LBFA_31A],cat,3,6,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_4,cat,cchs2001_p,[LBFA_31A],cat,4,6,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_5,cat,cchs2001_p,[LBFA_31A],cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2014", -LBFA_31A_b,LBFA_31A_b_cat6_5,cat,cchs2001_p,[LBFA_31A],cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2015", -LBFA_31A_b,LBFA_31A_b_cat6_6,cat,cchs2001_p,[LBFA_31A],cat,6,6,Other,Other,N/A,9,Other,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?,, -LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,6,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?,, -MED_1P,MED_1P_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,1,2,Yes,Yes,N/A,1,Yes,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",CCHS 2001 does not provide examples of sleeping pills in its literal question, -MED_1P,MED_1P_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,2,2,No,No,N/A,2,No,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",, -MED_1P,MED_1P_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",, -MED_1P,MED_1P_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",, -MED_1P,MED_1P_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::b,2,missing,missing,N/A,else,else,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",, -number_conditions,number_conditions_catN/A_Func::multiple_conditions_fun1,cat,cchs2001_p,"DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, resp_condition_der, CCC_051]",N/A,Func::multiple_conditions_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Number of chronic conditions,Number of chronic conditions,"This variable is derived from CCC_121, CCC_131, CCC_151, CCC_171, resp_condition, CCC_050", -number_conditions,number_conditions_catN/A_Func::multiple_conditions_fun2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,Func::multiple_conditions_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Number of chronic conditions,Number of chronic conditions,"This variable is derived from CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition, CCC_051", -number_conditions,number_conditions_cat6_0,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2011_2012_p, cchs2013_2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,0,6,0,0,N/A,N/A,0,Number of chronic conditions,Number of chronic conditions,, -number_conditions,number_conditions_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,1,6,1,1,N/A,N/A,1,Number of chronic conditions,Number of chronic conditions,, -number_conditions,number_conditions_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,2,6,2,2,N/A,N/A,2,Number of chronic conditions,Number of chronic conditions,, -number_conditions,number_conditions_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,3,6,3,3,N/A,N/A,3,Number of chronic conditions,Number of chronic conditions,, -number_conditions,number_conditions_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,4,6,4,4,N/A,N/A,4,Number of chronic conditions,Number of chronic conditions,, -number_conditions,number_conditions_cat6_5+,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,5+,6,5+,5+,N/A,N/A,5+,Number of chronic conditions,Number of chronic conditions,, -PAC_4A,PAC_4A_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,1,6,None,None,hours/week,1,None,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,2,6,Less than one hour,Less than one hour,hours/week,2,Less than one hour,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,3,6,1-5 hours,1-5 hours,hours/week,3,1-5 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,4,6,6-10 hours,6-10 hours,hours/week,4,6-10 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,5,6,11-20 hours,11-20 hours,hours/week,5,11-20 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,6,6,More than 20 hours,More than 20 hours,hours/week,6,More than 20 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::a,6,not applicable,not applicable,hours/week,96,not applicable,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::b,6,missing,missing,hours/week,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4A,PAC_4A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::b,6,missing,missing,hours/week,else,else,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,1,6,None,None,hours/week,1,None,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,2,6,Less than one hour,Less than one hour,hours/week,2,Less than one hour,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,3,6,1-5 hours,1-5 hours,hours/week,3,1-5 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,4,6,6-10 hours,6-10 hours,hours/week,4,6-10 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,5,6,11-20 hours,11-20 hours,hours/week,5,11-20 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,6,6,More than 20 hours,More than 20 hours,hours/week,6,More than 20 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::a,6,not applicable,not applicable,hours/week,96,not applicable,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::b,6,missing,missing,hours/week,"[97,99]",don't know (97); refusal (98); not stated (99),No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_4B,PAC_4B_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::b,6,missing,missing,hours/week,else,else,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?",, -PAC_7,PAC_7_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,1,3,Yes,Yes,N/A,1,Yes,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7,PAC_7_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,2,3,No,No,N/A,2,No,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7,PAC_7_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,3,3,No work/no school,No work/no school,N/A,3,No work/no school,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7,PAC_7_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7,PAC_7_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7,PAC_7_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::b,3,missing,missing,N/A,else,else,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?,, -PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,copy,N/A,No. of times/3 mo./walking work/school,No. of times walking work/school,N/A,"[1,270]",No. of times walking work/school,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school,, -PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::a,N/A,not applicable,not applicable,N/A,996,not applicable,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school,, -PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::b,N/A,missing,missing,N/A,"[997,999]",don't know (997); refusal (998); not stated (999),No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school,, -PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::b,N/A,missing,missing,N/A,else,else,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school,, -PAC_7B,PAC_7B_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,1,4,1 to 15 minutes,1 to 15 minutes,mins,1,1 to 15 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,2,4,16 to 30 minutes,16 to 30 minutes,mins,2,16 to 30 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,3,4,31 to 60 minutes,31 to 60 minutes,mins,3,31 to 60 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,4,4,More than 1 hour,More than 1 hour,mins,4,More than 1 hour,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::a,4,not applicable,not applicable,mins,6,not applicable,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::b,4,missing,missing,mins,"[7,9]",don't know (7); refusal (8); not stated (9),Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_7B,PAC_7B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::b,4,missing,missing,mins,else,else,Time spent - walking to go work/school,About how much time did you spend on each occasion?,, -PAC_8,PAC_8_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,1,3,Yes,Yes,N/A,1,Yes,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8,PAC_8_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,2,3,No,No,N/A,2,No,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8,PAC_8_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,3,3,No work/no school,No work/no school,N/A,3,No work/no school,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8,PAC_8_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8,PAC_8_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8,PAC_8_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::b,3,missing,missing,N/A,else,else,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?,, -PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,copy,N/A,No. of times/3 mo./biking work/school,No. of times biking work/school,times/3 mos.,"[1,270]",No. of times biking work/school,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school,, -PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::a,N/A,not applicable,not applicable,times/3 mos.,996,not applicable,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school,, -PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::b,N/A,missing,missing,times/3 mos.,"[997,999]",don't know (997); refusal (998); not stated (999),No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school,, -PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::b,N/A,missing,missing,times/3 mos.,else,else,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school,, -PAC_8B,PAC_8B_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,1,4,1 to 15 minutes,1 to 15 minutes,mins,1,1 to 15 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,2,4,16 to 30 minutes,16 to 30 minutes,mins,2,16 to 30 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,3,4,31 to 60 minutes,31 to 60 minutes,mins,3,31 to 60 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,4,4,More than 1 hour,More than 1 hour,mins,4,More than 1 hour,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::a,4,not applicable,not applicable,mins,6,not applicable,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::b,4,missing,missing,mins,"[7,9]",don't know (7); refusal (8); not stated (9),Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PAC_8B,PAC_8B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::b,4,missing,missing,mins,else,else,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?,, -PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,copy,N/A,Physical Activity,Average daily leisure time energy expenditure in METs,METS,"[0,43.5]",Daily energy expenditure - (D),Physical Activity,Daily energy expenditure - (D),, -PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::a,N/A,not applicable,not applicable,METS,99.6,Not applicable,Physical Activity,Daily energy expenditure - (D),, -PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,METS,"[99.7,99.9]",don't know (99.7); refusal (99.8); not stated (99.9),Physical Activity,Daily energy expenditure - (D),Don't know (99.7) and refusal (99.8) not included in 2001 CCHS, -PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,METS,else,else,Physical Activity,Daily energy expenditure - (D),, -pack_years_der,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]",N/A,Func::pack_years_fun,N/A,N/A,N/A,Years,N/A,N/A,Smoking pack-years,Smoking pack-years,PackYears variable derived from various harmonized smoking variables, -pack_years_der,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]",N/A,NA::b,N/A,missing,missing,Years,N/A,N/A,Smoking pack-years,Smoking pack-years,, -pct_time_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]",N/A,Func::pct_time_fun,N/A,N/A,N/A,%,N/A,N/A,Percent time in Canada,Percentage of time in Canada,"Percent time in Canada derived from Age, immigration status, and time in Canada variables", -pct_time_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]",N/A,NA::b,N/A,missing,missing,%,N/A,N/A,Percent time in Canada,Percentage of time in Canada,, -RAC_1,RAC_1_cat3_1,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_2,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,2,3,Often,Often,N/A,2,Often,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_3,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,3,3,Never,Never,N/A,3,Never,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_NA::a,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_NA::b,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_NA::b,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::b,3,missing,missing,N/A,else,else,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_NA::a,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::a,3,not applicable,not applicable,N/A,96,not applicable,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",CCHS 2003 codes N/A as 96 and missing as 97-99, -RAC_1,RAC_1_cat3_NA::b,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::b,3,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_1,RAC_1_cat3_NA::b,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::b,3,missing,missing,N/A,else,else,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",, -RAC_2A,RAC_2A_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2A,RAC_2A_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,2,3,Often,Often,N/A,2,Often,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2A,RAC_2A_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,3,3,Never,Never,N/A,3,Never,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2A,RAC_2A_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2A,RAC_2A_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2A,RAC_2A_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::b,3,missing,missing,N/A,else,else,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?,, -RAC_2B,RAC_2B_cat3_1,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,"In CCHS 2001, work and school reduction were combined into one variable. From CCHS 2003 onwards they were split into 2 variables (RAC_2B1 & RAC_2B2)", -RAC_2B,RAC_2B_cat3_2,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,2,3,Often,Often,N/A,2,Often,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,, -RAC_2B,RAC_2B_cat3_3,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,3,3,Never,Never,N/A,3,Never,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,, -RAC_2B,RAC_2B_cat3_NA::a,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::a,3,not applicable,not applicable,N/A,4,not applicable,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,, -RAC_2B,RAC_2B_cat3_NA::b,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,, -RAC_2B,RAC_2B_cat3_NA::b,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::b,3,missing,missing,N/A,else,else,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,, -RAC_2B1,RAC_2B1_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,1,4,Sometimes,Sometimes,N/A,1,Sometimes,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,2,4,Often,Often,N/A,2,Often,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,3,4,Never,Never,N/A,3,Never,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,4,4,Not attend school,Not attend school,N/A,4,Not attend school,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B1,RAC_2B1_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::b,4,missing,missing,N/A,else,else,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?",, -RAC_2B2,RAC_2B2_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,1,4,Sometimes,missing,N/A,1,Sometimes,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,2,4,Often,Often,N/A,2,Often,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,3,4,Never,Never,N/A,3,Never,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,4,4,Has no job,Has no job,N/A,4,Has no job,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2B2,RAC_2B2_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::b,4,missing,missing,N/A,else,else,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?",, -RAC_2C,RAC_2C_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RAC_2C,RAC_2C_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,2,3,Often,Often,N/A,2,Often,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RAC_2C,RAC_2C_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,3,3,Never,Never,N/A,3,Never,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RAC_2C,RAC_2C_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RAC_2C,RAC_2C_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RAC_2C,RAC_2C_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::b,3,missing,missing,N/A,else,else,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?",, -RACAG5,RACAG5_cat4_1,cat,cchs2001_p,cchs2001_p::RACAG5,cat,1,4,Injury,Injury,N/A,1,Injury,Cause of health problem - (G),Cause of health problem - (G),"CCHS 2001 has different categories from other cycles, hence a new variable created", -RACAG5,RACAG5_cat4_2,cat,cchs2001_p,cchs2001_p::RACAG5,cat,2,4,Disease/illness,Disease/illness,N/A,2,Disease/illness,Cause of health problem - (G),Cause of health problem - (G),, -RACAG5,RACAG5_cat4_3,cat,cchs2001_p,cchs2001_p::RACAG5,cat,3,4,Aging,Aging,N/A,3,Aging,Cause of health problem - (G),Cause of health problem - (G),, -RACAG5,RACAG5_cat4_4,cat,cchs2001_p,cchs2001_p::RACAG5,cat,4,4,Other,Other,N/A,4,Other,Cause of health problem - (G),Cause of health problem - (G),, -RACAG5,RACAG5_cat4_NA::a,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Cause of health problem - (G),Cause of health problem - (G),, -RACAG5,RACAG5_cat4_NA::b,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Cause of health problem - (G),Cause of health problem - (G),, -RACAG5,RACAG5_cat4_NA::b,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::b,4,missing,missing,N/A,else,else,Cause of health problem - (G),Cause of health problem - (G),, -RACDIMP,RACDIMP_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Impact of health problems,Impact of health problems,, -RACDIMP,RACDIMP_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,2,3,Often,Often,N/A,2,Often,Impact of health problems,Impact of health problems,, -RACDIMP,RACDIMP_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,3,3,Never,Never,N/A,3,Never,Impact of health problems,Impact of health problems,, -RACDIMP,RACDIMP_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Impact of health problems,Impact of health problems,, -RACDIMP,RACDIMP_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Impact of health problems,Impact of health problems,, -RACDIMP,RACDIMP_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::b,3,missing,missing,N/A,else,else,Impact of health problems,Impact of health problems,, -RACDPAL,RACDPAL_catN/A_Func::RACDPAL_fun,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,Func::RACDPAL_fun,N/A,N/A,N/A,N/A,N/A,N/A,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_1,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,1,3,Sometimes,Sometimes,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_2,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,2,3,Often,Often,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_3,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,3,3,Never,Never,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_NA::b,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,NA::b,3,missing,missing,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,2,3,Often,Often,N/A,2,Often,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,3,3,Never,Never,N/A,3,Never,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Participation and activity limitation,Participation and activity limitation,, -RACDPAL,RACDPAL_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::b,3,missing,missing,N/A,else,else,Participation and activity limitation,Participation and activity limitation,, -RACG5,RACG5_cat6_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,1,6,Injury,Injury,N/A,1,Injury,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,2,6,Disease/illness,Disease/illness,N/A,2,Disease/illness,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,3,6,Aging,Aging,N/A,3,Aging,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,4,6,Existed at birth,Existed at birth,N/A,4,Existed at birth,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,5,6,Work conditions,Work conditions,N/A,5,Work conditions,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_6,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,6,6,Other,Other,N/A,6,Other,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Cause of health problem,Cause of health problem,, -RACG5,RACG5_cat6_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::b,6,missing,missing,N/A,else,else,Cause of health problem,Cause of health problem,, -resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun1,cat,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_031]",N/A,Func::resp_condition_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables", -resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun2,cat,"cchs2005_p, cchs2007_2008_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,Func::resp_condition_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables", -resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun3,cat,"cchs2001_p, cchs2003_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91A, CCC_031]",N/A,Func::resp_condition_fun3,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables", -resp_condition_der,resp_condition_der_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,1,3,Over 35 years with condition,Age over 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -resp_condition_der,resp_condition_der_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,2,3,Under 35 years with condition,Age under 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -resp_condition_der,resp_condition_der_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,3,3,No condition,No condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -resp_condition_der,resp_condition_der_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,NA::b,3,missing,missing,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition,, -SDC_5A_1,SDC_5A_1_cat4_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,1,4,English ,English only,N/A,1,English ,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,2,4,French,French only,N/A,2,French,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,3,4,English & French,English & French,N/A,3,English & French,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,4,4,Neither,Neither English nor French,N/A,4,Neither,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDC_5A_1,SDC_5A_1_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1],cat,NA::b,4,missing,missing,N/A,else,else,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?",, -SDCDFOLS,SDCDFOLS_cat4_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,1,4,English ,English only,N/A,1,English ,First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,2,4,French,French only,N/A,2,French,First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,3,4,English & French,English & French,N/A,3,English & French,First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,4,4,Neither,Neither English nor French,N/A,4,Neither,First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),First official language spoken,First official language spoken,, -SDCDFOLS,SDCDFOLS_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS],cat,NA::b,4,missing,missing,N/A,else,else,First official language spoken,First official language spoken,, -SDCFIMM,SDCFIMM_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]",cat,1,2,Yes,Yes,N/A,1,Yes,Immigrant status (D),Are you an immigrant?,, -SDCFIMM,SDCFIMM_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]",cat,2,2,No,No,N/A,2,No,Immigrant status (D),Are you an immigrant?,, -SDCFIMM,SDCFIMM_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Immigrant status (D),Are you an immigrant?,, -SDCFIMM,SDCFIMM_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Immigrant status (D),Are you an immigrant?,, -SDCFIMM,SDCFIMM_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]",cat,NA::b,2,missing,missing,N/A,else,else,Immigrant status (D),Are you an immigrant?,, -SDCGCBG,SDCGCBG_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]",cat,1,2,Canada,Canada,N/A,1,Canada,Country of birth - (G),Country of birth - (G),, -SDCGCBG,SDCGCBG_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]",cat,2,2,Other,Other,N/A,2,Other,Country of birth - (G),Country of birth - (G),, -SDCGCBG,SDCGCBG_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Country of birth - (G),Country of birth - (G),, -SDCGCBG,SDCGCBG_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Country of birth - (G),Country of birth - (G),CCHS 2001 does not have don't know (7) or refusal (8), -SDCGCBG,SDCGCBG_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]",cat,NA::b,2,missing,missing,N/A,else,else,Country of birth - (G),Country of birth - (G),, -SDCGCGT,SDCGCGT_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]",cat,1,2,White,White,N/A,1,White,Ethnicity,"Cultural or racial origin - (D, G)",, -SDCGCGT,SDCGCGT_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]",cat,2,2,Non-white,Non-white,N/A,2,Visible minority,Ethnicity,"Cultural or racial origin - (D, G)",, -SDCGCGT,SDCGCGT_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Ethnicity,"Cultural or racial origin - (D, G)",, -SDCGCGT,SDCGCGT_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Ethnicity,"Cultural or racial origin - (D, G)","CCHS 2001 missing don't know (7), refusal (8)", -SDCGCGT,SDCGCGT_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]",cat,NA::b,2,missing,missing,N/A,else,else,Ethnicity,"Cultural or racial origin - (D, G)",, -SDCGLHM,SDCGLHM_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,1,4,English w/ or w/o other,English with or without other language,N/A,1,English with or without other language,Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,2,4,French w/ or w/o other,French with or without other language,N/A,2,French with or without other language,Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,3,4,English & French w/ or w/o other,English & French with or without other language,N/A,3,English & French with or without other language,Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,4,4,Neither,Neither English nor French (other),N/A,4,Neither English nor French (other),Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Language(s) spoken at home,Language(s) spoken at home,, -SDCGLHM,SDCGLHM_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM],cat,NA::b,4,missing,missing,N/A,else,else,Language(s) spoken at home,Language(s) spoken at home,, -SDCGLNG,SDCGLNG_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,1,4,English w/ or w/o other,English with or without other language,N/A,1,English with or without other language,Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,2,4,French w/ or w/o other,French with or without other language,N/A,2,French with or without other language,Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,3,4,English & French w/ or w/o other,English & French with or without other language,N/A,3,English & French with or without other language,Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,4,4,Neither,Neither English nor French (other),N/A,4,Neither English nor French (other),Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Languages - can converse in,Languages - can converse in,, -SDCGLNG,SDCGLNG_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::b,4,missing,missing,N/A,else,else,Languages - can converse in,Languages - can converse in,, -SDCGRES,SDCGRES_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]",cat,1,2,0 to 9 years,0 to 9 years,N/A,1,0 to 9 years,Length in Canada,"Length/time in Canada since imm. (D, G)",, -SDCGRES,SDCGRES_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]",cat,2,2,10 years or more,10 years or more,N/A,2,10 years or more,Length in Canada,"Length/time in Canada since imm. (D, G)",, -SDCGRES,SDCGRES_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Length in Canada,"Length/time in Canada since imm. (D, G)",, -SDCGRES,SDCGRES_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Length in Canada,"Length/time in Canada since imm. (D, G)","CCHS 2001 missing don't know (7), refusal (8)", -SDCGRES,SDCGRES_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]",cat,NA::b,2,missing,missing,N/A,else,else,Length in Canada,"Length/time in Canada since imm. (D, G)",, -SLP_02,SLP_02_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,1,5,None of the time,None of the time,N/A,1,None of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,5,5,All the time,All the time,N/A,5,All the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02,SLP_02_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02],cat,NA::b,5,missing,missing,N/A,else,else,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02_A,SLP_02_A_cat3_1,cat,cchs2001_p,[GENA_04],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,CCHS 2001 has different categories from other cycles, -SLP_02_A,SLP_02_A_cat3_2,cat,cchs2001_p,[GENA_04],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02_A,SLP_02_A_cat3_3,cat,cchs2001_p,[GENA_04],cat,3,3,Never,Never,N/A,3,Never,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02_A,SLP_02_A_cat3_NA::a,cat,cchs2001_p,[GENA_04],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02_A,SLP_02_A_cat3_NA::b,cat,cchs2001_p,[GENA_04],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_02_A,SLP_02_A_cat3_NA::b,cat,cchs2001_p,[GENA_04],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,, -SLP_03,SLP_03_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,1,5,None of the time,None of the time,N/A,1,None of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,5,5,All the time,All the time,N/A,5,All the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat3_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat3_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03,SLP_03_cat3_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03],cat,NA::b,3,missing,missing,N/A,else,else,Frequency - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03_A,SLP_03_A_cat3_1,cat,cchs2001_p,[GENA_05],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,CCHS 2001 has different categories from other cycles, -SLP_03_A,SLP_03_A_cat3_2,cat,cchs2001_p,[GENA_05],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03_A,SLP_03_A_cat3_3,cat,cchs2001_p,[GENA_05],cat,3,3,Never,Never,N/A,3,Never,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03_A,SLP_03_A_cat3_NA::a,cat,cchs2001_p,[GENA_05],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03_A,SLP_03_A_cat3_NA::b,cat,cchs2001_p,[GENA_05],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_03_A,SLP_03_A_cat3_NA::b,cat,cchs2001_p,[GENA_05],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,, -SLP_04,SLP_04_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,1,5,None of the time,None of the time,N/A,1,None of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,5,5,All the time,All the time,N/A,5,All the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04,SLP_04_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04],cat,NA::b,5,missing,missing,N/A,else,else,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04_A,SLP_04_A_cat3_1,cat,cchs2001_p,[GENA_06],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,CCHS 2001 has different categories from other cycles, -SLP_04_A,SLP_04_A_cat3_2,cat,cchs2001_p,[GENA_06],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04_A,SLP_04_A_cat3_3,cat,cchs2001_p,[GENA_06],cat,3,3,Never,Never,N/A,3,Never,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04_A,SLP_04_A_cat3_NA::a,cat,cchs2001_p,[GENA_06],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04_A,SLP_04_A_cat3_NA::b,cat,cchs2001_p,[GENA_06],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLP_04_A,SLP_04_A_cat3_NA::b,cat,cchs2001_p,[GENA_06],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,, -SLPG01,SLPG01_cat11_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,1,11,<2 hours,<2 hours,Hours,1,<2 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,CCHS 2011-2012 onwards omitted 2-<3 hours category, -SLPG01,SLPG01_cat11_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,2,11,3-<4 hours,3-<4 hours,Hours,2,3-<4 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,3,11,4-<5 hours,4-<5 hours,Hours,3,4-<5 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,4,11,5-<6 hours,5-<6 hours,Hours,4,5-<6 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_5,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,5,11,6-<7 hours,6-<7 hours,Hours,5,6-<7 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_6,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,6,11,7-<8 hours,7-<8 hours,Hours,6,7-<8 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_7,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,7,11,8-<9 hours,8-<9 hours,Hours,7,8-<9 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_8,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,8,11,9-<10 hours,9-<10 hours,Hours,8,9-<10 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_9,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,9,11,10-<11 hours,10-<11 hours,Hours,9,10-<11 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_10,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,10,11,11-<12 hours,11-<12 hours,Hours,10,11-<12 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_11,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,11,11,>= 12 hours,>= 12 hours,Hours,11,>= 12 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::a,11,not applicable,not applicable,Hours,96,not applicable,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::b,11,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01,SLPG01_cat11_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::b,11,missing,missing,Hours,else,else,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_1,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,1,12,<2 hours,<2 hours,Hours,1,<2 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_2,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,2,12,2-<3 hours,2-<3 hours,Hours,2,2-<3 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_3,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,3,12,3-<4 hours,3-<4 hours,Hours,3,3-<4 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_4,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,4,12,4-<5 hours,4-<5 hours,Hours,4,4-<5 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_5,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,5,12,5-<6 hours,5-<6 hours,Hours,5,5-<6 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_6,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,6,12,6-<7 hours,6-<7 hours,Hours,6,6-<7 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_7,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,7,12,7-<8 hours,7-<8 hours,Hours,7,7-<8 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_8,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,8,12,8-<9 hours,8-<9 hours,Hours,8,8-<9 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_9,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,9,12,9-<10 hours,9-<10 hours,Hours,9,9-<10 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_10,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,10,12,10-<11 hours,10-<11 hours,Hours,10,10-<11 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_11,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,11,12,11-<12 hours,11-<12 hours,Hours,11,11-<12 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_12,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,12,12,>= 12 hours,>= 12 hours,Hours,12,>= 12 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_NA::a,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::a,12,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_NA::b,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,12,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_A,SLPG01_A_cat12_NA::b,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,12,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,1,N/A,Hours,converted hours (<2 hours),Hours,1,converted hours (<2 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,2.5,N/A,Hours,convereted hours (2-<3 hours),Hours,2,convereted hours (2-<3 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,3.5,N/A,Hours,converted hours (3-<4 hours),Hours,3,converted hours (3-<4 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,4.5,N/A,Hours,converted hours (4-<5 hours),Hours,4,converted hours (4-<5 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,5.5,N/A,Hours,converted hours (5-<6 hours),Hours,5,converted hours (5-<6 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,6.5,N/A,Hours,converted hours (6-<7 hours),Hours,6,converted hours (6-<7 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,7.5,N/A,Hours,converted hours (7-<8 hours),Hours,7,converted hours (7-<8 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,8.5,N/A,Hours,converted hours (8-<9 hours),Hours,8,converted hours (8-<9 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,9.5,N/A,Hours,converted hours (9-<10 hours),Hours,9,converted hours (9-<10 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,10.5,N/A,Hours,converted hours (10-<11 hours),Hours,10,converted hours (10-<11 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,11.5,N/A,Hours,converted hours (11-<12 hours),Hours,11,converted hours (11-<12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,13,N/A,Hours,converted hours (>= 12 hours),Hours,12,converted hours (>= 12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::a,N/A,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,N/A,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,N/A,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,1,11,<2 hours,converted hours (<2 hours),Hours,1,converted hours (<2 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,3.5,11,3-<4 hours,converted hours (3-<4 hours),Hours,2,converted hours (3-<4 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,4.5,11,4-<5 hours,converted hours (4-<5 hours),Hours,3,converted hours (4-<5 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,5.5,11,5-<6 hours,converted hours (5-<6 hours),Hours,4,converted hours (5-<6 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,6.5,11,6-<7 hours,converted hours (6-<7 hours),Hours,5,converted hours (6-<7 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,7.5,11,7-<8 hours,converted hours (7-<8 hours),Hours,6,converted hours (7-<8 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,8.5,11,8-<9 hours,converted hours (8-<9 hours),Hours,7,converted hours (8-<9 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,9.5,11,9-<10 hours,converted hours (9-<10 hours),Hours,8,converted hours (9-<10 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,10.5,11,10-<11 hours,converted hours (10-<11 hours),Hours,9,converted hours (10-<11 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,11.5,11,11-<12 hours,converted hours (11-<12 hours),Hours,10,converted hours (11-<12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,13,11,>= 12 hours,converted hours (>= 12 hours),Hours,11,converted hours (>= 12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::a,11,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::b,11,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01],cat,NA::b,11,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?,, -SMK_01A,SMK_01A_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]",cat,1,2,yes,yes,N/A,1,Yes,s100,"In lifetime, smoked 100 or more cigarettes",, -SMK_01A,SMK_01A_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]",cat,2,2,no,no,N/A,2,No,s100,"In lifetime, smoked 100 or more cigarettes",, -SMK_01A,SMK_01A_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,s100,"In lifetime, smoked 100 or more cigarettes",, -SMK_01A,SMK_01A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),s100,"In lifetime, smoked 100 or more cigarettes",, -SMK_01A,SMK_01A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]",cat,NA::b,2,missing,missing,N/A,else,else,s100,"In lifetime, smoked 100 or more cigarettes",, -SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, [SMK_05B]",cont,copy,N/A,Cigarettes/day - occasional,# of cigarettes smoked daily - daily smoker,cigarettes,"[1,40]",# of cigarettes smoked daily - occasional smoker,cigdayo,# of cigarettes smoked daily - occasional smoker,, -SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, [SMK_05B]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,cigdayo,# of cigarettes smoked daily - occasional smoker,, -SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, [SMK_05B]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),cigdayo,# of cigarettes smoked daily - occasional smoker,, -SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, [SMK_05B]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,cigdayo,# of cigarettes smoked daily - occasional smoker,, -SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, [SMK_05C]",cont,copy,N/A,# days smoked at least 1 cigarette,# days smoked at least 1 cigarette,days,"[0,30]",# days smoked at least 1 cigarette,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",, -SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, [SMK_05C]",cont,NA::a,N/A,not applicable,not applicable,days,96,not applicable,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",, -SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, [SMK_05C]",cont,NA::b,N/A,missing,missing,days,"[97,99]",don't know (97); refusal (98); not stated (99),Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",, -SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, [SMK_05C]",cont,NA::b,N/A,missing,missing,days,else,else,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",, -SMK_05D,SMK_05D_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]",cat,1,2,yes,Occasional smoker who previously smoked daily,N/A,1,Yes,evd,Ever smoked cigarettes daily - occasional smoker,, -SMK_05D,SMK_05D_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]",cat,2,2,no,Occasional smoker never daily,N/A,2,No,evd,Ever smoked cigarettes daily - occasional smoker,, -SMK_05D,SMK_05D_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,evd,Ever smoked cigarettes daily - occasional smoker,, -SMK_05D,SMK_05D_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),evd,Ever smoked cigarettes daily - occasional smoker,, -SMK_05D,SMK_05D_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]",cat,NA::b,2,missing,missing,N/A,else,else,evd,Ever smoked cigarettes daily - occasional smoker,, -SMK_06A_A,SMK_06A_A_cat4_1,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,1,4,<1 year,Less than one year ago,years,1,Less than one year ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_2,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,2,4,1 to 2 years,1 year to 2 years ago,years,2,1 year to 2 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_3,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,3,4,3 to 5 years,3 years to 5 years ago,years,3,3 years to 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_4,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,4,4,>5 years,More than 5 years ago,years,4,More than 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_NA::a,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::a,4,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_A,SMK_06A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,4,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,1,4,<1 year,Less than one year ago,years,1,Less than one year,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,2,4,1 to 2 years,1 year to less than 2 years ago,years,2,1 year to < 2 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,3,4,2 to 3 years,2 years to less than 3 years ago,years,3,2 years to < 3 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,4,4,>= 3 years,3 or more years ago,years,4,3 or more years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::a,4,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_B,SMK_06A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::b,4,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,0.5,N/A,stpn,converted age - Less than one year ago,years,1,Less than one year ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,1.5,N/A,stpn,converted age - 1 year to 2 years ago,years,2,1 year to 2 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,4,N/A,stpn,converted age - 3 years to 5 years ago,years,3,3 years to 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,6,N/A,stpn,converted age - More than 5 years ago,years,4,More than 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,N/A,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,0.5,N/A,stpn,converted age - Less than one year ago,years,1,Less than one year,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,1.5,N/A,stpn,converted age - 1 year to less than 2 years ago,years,2,1 year to < 2 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,2.5,N/A,stpn,converted age - 2 years to less than 3 years ago,years,3,2 years to < 3 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,4,N/A,stpn,converted age - 3 or more years ago,years,4,3 or more years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]",cat,NA::b,N/A,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?",, -SMK_09A_A,SMK_09A_A_cat4_1,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,1,4,<1 year,Less than one year ago,years,1,Less than one year ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_2,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,2,4,1 to 2 years,1 year to 2 years ago,years,2,1 year to 2 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_3,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,3,4,3 to 5 years,3 years to 5 years ago,years,3,3 years to 5 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_4,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,4,4,>5 years,More than 5 years ago,years,4,More than 5 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_NA::a,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::a,4,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_A,SMK_09A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,4,missing,missing,years,else,else,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,1,4,<1 year,Less than one year ago,years,1,Less than 1 year,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,2,4,1 to <2 years,1 year to less than 2 years ago,years,2,1 to <2 years,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,3,4,2 to <3 years,2 years to less than 3 years ago,years,3,2 to <3 years,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,4,4,>= 3 years,3 or more years ago,years,4,3 years or more,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::a,4,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_B,SMK_09A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::b,4,missing,missing,years,else,else,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,0.5,N/A,stpo,converted age - Less than one year ago,years,1,Less than one year ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,1.5,N/A,stpo,converted age - 1 year to 2 years ago,years,2,1 year to 2 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,4,N/A,stpo,converted age - 3 years to 5 years ago,years,3,3 years to 5 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,6,N/A,stpo,converted age - More than 5 years ago,years,4,More than 5 years ago,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,N/A,missing,missing,years,else,else,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,0.5,N/A,stpo,converted age - Less than one year ago,years,1,Less than 1 year,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,1.5,N/A,stpo,converted age - 1 year to less than 2 years ago,years,2,1 to <2 years,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,2.5,N/A,stpo,converted age - 2 years to less than 3 years ago,years,3,2 to <3 years,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,4,N/A,stpo,converted age - 3 or more years ago,years,4,3 years or more,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]",cat,NA::b,N/A,missing,missing,years,else,else,stpd,When did you stop smoking daily - occasional smoker - (G),, -SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, [SMK_204]",cont,copy,N/A,Cigarettes/day - daily,# of cigarettes smoked daily - daily smoker,cigarettes,"[1,80]",# of cigarettes smoked daily - daily smoker,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, [SMK_204]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, [SMK_204]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, [SMK_204]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,copy,N/A,Cigarettes/day - historic daily,Cigarettes/day - historic daily,cigarettes,"[1,80]",# of cigarettes smoke each day - former daily,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?,, -SMKDSTY,SMKDSTY_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,1,6,Daily,Daily smoker,N/A,1,Daily,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,2,6,Occassional (former daily),Former daily current occasional smoker,N/A,2,Occassional,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,3,6,Always occassional,Never daily current occasional smoker,N/A,3,Always occassional,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,4,6,Former daily,Former daily current nonsmoker,N/A,4,Former daily,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,5,6,Former occasional,Never daily current nonsmoker (former occasional),N/A,5,Former occasional,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,6,6,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D),, -SMKDSTY,SMKDSTY_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,6,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,1,3,Current,Current smoker,,"[1,3]",Daily (1); Occassional (2); Always occassional (3),Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,2,3,Former,Former smoker,,"[4,5]",Former daily(4); Former occassional (5),Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,3,3,Never smoked,Never smoked,,6,Never smoked,Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::a,3,not applicable,not applicable,,96,not applicable,Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,3,missing,missing,,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D),, -SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,3,missing,missing,,else,else,Smoke status,Type of smoker - (D),, -SMKG01C_A,SMKG01C_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,1,10,5 To 11 Years,age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,2,10,12 To 14 Years,age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,3,10,15 To 19 Years,age smoked first whole cigarette (18 to 19),years,3,15 To 19 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,4,10,20 To 24 Years,age smoked first whole cigarette (20 to 24),years,4,20 To 24 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,5,10,25 To 29 Years,age smoked first whole cigarette (25 to 29),years,5,25 To 29 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,6,10,30 To 34 Years,age smoked first whole cigarette (30 to 34),years,6,30 To 34 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,7,10,35 To 39 Years,age smoked first whole cigarette (35 to 39),years,7,35 To 39 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,8,10,40 To 44 Years,age smoked first whole cigarette (40 to 44),years,8,40 To 44 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,9,10,45 To 49 Years,age smoked first whole cigarette (45 to 49),years,9,45 To 49 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,10,10,50 Years or more,age smoked first whole cigarette (50 plus),years,10,50 Years or more,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G),, -SMKG01C_A,SMKG01C_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,10,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,1,11,5 To 11 Years,age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,2,11,12 To 14 Years,age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,3,11,15 To 17 Years,age smoked first whole cigarette (15 to 17),years,3,15 To 17 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,4,11,18 To 19 Years,age smoked first whole cigarette (18 to 19),years,4,18 To 19 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,5,11,20 To 24 Years,age smoked first whole cigarette (20 to 24),years,5,20 To 24 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,6,11,25 To 29 Years,age smoked first whole cigarette (25 to 29),years,6,25 To 29 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,7,11,30 To 34 Years,age smoked first whole cigarette (30 to 34),years,7,30 To 34 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,8,11,35 To 39 Years,age smoked first whole cigarette (35 to 39),years,8,35 To 39 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,9,11,40 To 44 Years,age smoked first whole cigarette (40 to 44),years,9,40 To 44 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,10,11,45 To 49 Years,age smoked first whole cigarette (45 to 49),years,10,45 To 49 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,11,11,50 Years or more,age smoked first whole cigarette (50 plus),years,11,50 Years or more,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G),, -SMKG01C_B,SMKG01C_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::b,11,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,8,N/A,agec1,converted categorical age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,13,N/A,agec1,converted categorical age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,17,N/A,agec1,converted categorical age smoked first whole cigarette (18 to 19),years,3,15 To 19 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,22,N/A,agec1,converted categorical age smoked first whole cigarette (20 to 24),years,4,20 To 24 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,27,N/A,agec1,converted categorical age smoked first whole cigarette (25 to 29),years,5,25 To 29 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,32,N/A,agec1,converted categorical age smoked first whole cigarette (30 to 34),years,6,30 To 34 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,37,N/A,agec1,converted categorical age smoked first whole cigarette (35 to 39),years,7,35 To 39 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,42,N/A,agec1,converted categorical age smoked first whole cigarette (40 to 44),years,8,40 To 44 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,47,N/A,agec1,converted categorical age smoked first whole cigarette (45 to 49),years,9,45 To 49 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,55,N/A,agec1,converted categorical age smoked first whole cigarette (50 plus),years,10,50 Years or more,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,N/A,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,8,N/A,agec1,converted categorical age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,13,N/A,agec1,converted categorical age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,16,N/A,agec1,converted categorical age smoked first whole cigarette (15 to 17),years,3,15 To 17 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,18.5,N/A,agec1,converted categorical age smoked first whole cigarette (18 to 19),years,4,18 To 19 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,22,N/A,agec1,converted categorical age smoked first whole cigarette (20 to 24),years,5,20 To 24 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,27,N/A,agec1,converted categorical age smoked first whole cigarette (25 to 29),years,6,25 To 29 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,32,N/A,agec1,converted categorical age smoked first whole cigarette (30 to 34),years,7,30 To 34 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,37,N/A,agec1,converted categorical age smoked first whole cigarette (35 to 39),years,8,35 To 39 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,42,N/A,agec1,converted categorical age smoked first whole cigarette (40 to 44),years,9,40 To 44 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,47,N/A,agec1,converted categorical age smoked first whole cigarette (45 to 49),years,10,45 To 49 Years,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,55,N/A,agec1,converted categorical age smoked first whole cigarette (50 plus),years,11,50 Years or more,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G),, -SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]",cat,NA::b,N/A,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G),, -SMKG06C,SMKG06C_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,1,3,3 to 5 years,3 to 5 years,years,1,3 to 5 years,stpny,Years since stopped smoking daily - never daily,, -SMKG06C,SMKG06C_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,2,3,6 to 10 years,6 to 10 years,years,2,6 to 10 years,stpny,Years since stopped smoking daily - never daily,, -SMKG06C,SMKG06C_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,3,3,11+ years,11 or more years,years,3,11 or more years,stpny,Years since stopped smoking daily - never daily,, -SMKG06C,SMKG06C_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::a,3,not applicable,not applicable,years,6,not applicable,stpny,Years since stopped smoking daily - never daily,, -SMKG06C,SMKG06C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::b,3,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpny,Years since stopped smoking daily - never daily,, -SMKG06C,SMKG06C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::b,3,missing,missing,years,else,else,stpny,Years since stopped smoking daily - never daily,, -SMKG09C,SMKG09C_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,1,3,3 to 5 years,3 to 5 years,years,1,3 to 5 years,stpdy,Years since stopped smoking daily - former daily,, -SMKG09C,SMKG09C_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,2,3,6 to 10 years,6 to 10 years,years,2,6 to 10 years,stpdy,Years since stopped smoking daily - former daily,, -SMKG09C,SMKG09C_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,3,3,11+ years,11 or more years,years,3,11 or more years,stpdy,Years since stopped smoking daily - former daily,, -SMKG09C,SMKG09C_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,NA::a,3,not applicable,not applicable,years,6,not applicable,stpdy,Years since stopped smoking daily - former daily,, -SMKG09C,SMKG09C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,NA::b,3,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpdy,Years since stopped smoking daily - former daily,, -SMKG09C,SMKG09C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]",cat,NA::b,3,missing,missing,years,else,else,stpdy,Years since stopped smoking daily - former daily,, -SMKG203_A,SMKG203_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,1,10,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,2,10,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,3,10,15 to 19 Years,age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,4,10,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,5,10,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,6,10,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,7,10,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,8,10,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,9,10,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,10,10,50 Years or more,age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_A,SMKG203_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,10,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,1,11,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,2,11,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,3,11,15 To 17 Years,age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,4,11,18 To 19 Years,age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,5,11,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,6,11,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,7,11,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,8,11,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,9,11,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,10,11,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,11,11,50 Years or more,age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::a,11,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,11,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_B,SMKG203_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,11,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,17,N/A,agecigd,converted categorical age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,55,N/A,agecigd,converted categorical age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,N/A,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,16,N/A,agecigd,converted categorical age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,18.5,N/A,agecigd,converted categorical age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,55,N/A,agecigd,converted categorical age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G),, -SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,N/A,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G),, -SMKG207_A,SMKG207_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,1,10,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,2,10,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,3,10,15 to 19 Years,age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,4,10,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,5,10,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,6,10,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,7,10,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,8,10,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,9,10,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,10,10,50 Years or more,age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_A,SMKG207_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,10,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,1,11,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,2,11,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,3,11,15 To 17 Years,age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,4,11,18 To 19 Years,age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,5,11,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,6,11,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,7,11,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,8,11,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,9,11,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,10,11,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,11,11,50 Years or more,age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::a,11,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,11,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_B,SMKG207_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,11,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,17,N/A,agecigd,converted categorical age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,55,N/A,agecigd,converted categorical age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,N/A,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,16,N/A,agecigd,converted categorical age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,18.5,N/A,agecigd,converted categorical age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,,Missing 2001 Data -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,,Missing 2001 Data -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,,Missing 2001 Data -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,55,N/A,agecigd,converted categorical age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,,Missing 2001 Data -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,,Missing 2001 Data -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,N/A,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,, -smoke_simple,smoke_simple_catN/A_Func::smoke_simple_fun,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,Func::smoke_simple_fun,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,1,4,Non-smoker (never smoked),Non-smoker (never smoked),N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,2,4,Current smoker (daily and occasional),Current smoker (daily and occasional),N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,3,4,Former daily smoker quit less than 5 years or former occasional smoker ,Former daily smoker quit less than 5 years or former occasional smoker ,N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,4,4,Former daily smoker quit >5 years,Former daily smoker quit >5 years,N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,NA::a,4,not applicable,not applicable,N/A,N/A,N/A,N/A,N/A,, -smoke_simple,smoke_simple_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]",N/A,NA::b,4,missing,missing,N/A,N/A,N/A,N/A,N/A,, -time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,Func::time_quit_smoking_fun,N/A,N/A,N/A,Years,N/A,N/A,Time since quit,Time since quit smoking,Variable derived from various harmonized smoking variables, -time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,NA::a,N/A,not applicable,not applicable,Years,N/A,N/A,Time since quit,Time since quit smoking,, -time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,NA::b,N/A,missing,missing,Years,N/A,N/A,Time since quit,Time since quit smoking,, -WTS_M,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::WTSAM, cchs2003_p::WTSC_M, cchs2005_p::WTSE_M, [WTS_M]",N/A,copy,N/A,N/A,N/A,N/A,"[1.17,26332.62]",N/A,Weights,Weights - Master,, \ No newline at end of file +variable,dummyVariable,toType,databaseStart,variableStart,fromType,recTo,numValidCat,catLabel,catLabelLong,units,recFrom,catStartLabel,variableStartShortLabel,variableStartLabel,notes +ADL_01,ADL_01_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005,[ADL_01]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,2,2,No,No,N/A,2,No,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_01,ADL_01_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_01,ADL_01_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01,ADL_01_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - preparing meals,"Because of any condition or health problem, do you need the help of another person in preparing meals?", +ADL_01_A,ADL_01_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_01_A,ADL_01_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_01_A,ADL_01_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_01_A,ADL_01_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_01_A,ADL_01_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_01_A,ADL_01_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_01_A,ADL_01_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_02,ADL_02_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?","In the 2001 CCHS, respondents were asked, ""Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?""" +ADL_02,ADL_02_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,2,2,No,No,N/A,2,No,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?", +ADL_02,ADL_02_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?", +ADL_02,ADL_02_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?", +ADL_02,ADL_02_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - getting to appointments,"Because of any physical condition or mental condition or health problem, do you need the help of another person with getting to appointments and running errands such as shopping for groceries?", +ADL_02,ADL_02_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_02,ADL_02_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_02,ADL_02_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_02,ADL_02_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_02,ADL_02_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - preparing meals,"Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?", +ADL_02_A,ADL_02_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_02_A,ADL_02_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_02_A,ADL_02_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_02_A,ADL_02_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_02_A,ADL_02_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_02_A,ADL_02_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_02_A,ADL_02_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - getting to appointments,"Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?", +ADL_03,ADL_03_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,2,2,No,No,N/A,2,No,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_03,ADL_03_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_03,ADL_03_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03,ADL_03_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - doing housework,"Because of any condition or health problem, do you need the help of another person in doing normal everyday housework?", +ADL_03_A,ADL_03_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_03_A,ADL_03_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_03_A,ADL_03_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_03_A,ADL_03_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_03_A,ADL_03_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_03_A,ADL_03_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_03_A,ADL_03_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - doing housework,"Because of any physical condition, mental condition or health problem, do you have any difficulty with doing everyday housework?", +ADL_04,ADL_04_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,2,2,No,No,N/A,2,No,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_04,ADL_04_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_04,ADL_04_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04,ADL_04_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - personal care,"Because of any condition or health problem, do you need the help of another person in personal care such as washing, dressing or eating?", +ADL_04_A,ADL_04_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_04_A,ADL_04_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_04_A,ADL_04_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_04_A,ADL_04_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_04_A,ADL_04_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_04_A,ADL_04_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_04_A,ADL_04_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - personal care,"Because of any physical condition, mental condition or health problem, do you have any difficulty with personal care such as bathing, dressing, eating or taking medication?", +ADL_05,ADL_05_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,2,2,No,No,N/A,2,No,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_05,ADL_05_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_05,ADL_05_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05,ADL_05_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - moving about inside house,"Because of any condition or health problem, do you need the help of another person in moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_05_A,ADL_05_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_05_A,ADL_05_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - moving about inside house,"Because of any physical condition, mental condition or health problem, do you have any difficulty with moving about inside the house?", +ADL_06,ADL_06_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,2,2,No,No,N/A,2,No,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030",cat,1,2,Yes,Yes,N/A,"[3,4]",Yes,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_06,ADL_06_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030",cat,2,2,No,No,N/A,"[1,2]",No,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?","For 2015 onwards, question is changed from ""Because of condition, do you need the help of another person in X"" to ""Because of condition, do you have any difficulty with X?""; however, the answer categories indicate if they had the help of another person. 'Yes, difficulty, but can do it with the help of others' and 'Cannot do it all' are combined for 'Yes'. 'No, no difficulty' and 'Yes, difficulty, but do not require help of others' are combined for 'No'. In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_06,ADL_06_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06,ADL_06_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - looking after finances,"Because of any physical condition or mental condition or health problem, do you need the help of another person with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,1,4,"Yes difficulty, need help","Yes difficulty, need help",N/A,3,"Yes difficulty, need help",Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?","For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_06_A,ADL_06_A_cat4_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,2,4,"Yes difficulty, no help","Yes difficulty, no help",N/A,2,"Yes difficulty, no help",Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,3,4,No difficulty,No difficulty,N/A,1,No difficulty,Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,4,4,Cannot do it at all,Cannot do it at all,N/A,4,Cannot do it at all,Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_06_A,ADL_06_A_cat4_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030],cat,NA::b,4,missing,missing,N/A,else,else,Needs help - looking after finances,"Because of any physical condition, mental condition or health problem, do you have any difficulty with looking after your personal finances such as making bank transactions or paying bills?", +ADL_07,ADL_07_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?", +ADL_07,ADL_07_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,2,2,No,No,N/A,2,No,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?", +ADL_07,ADL_07_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?", +ADL_07,ADL_07_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?", +ADL_07,ADL_07_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D",cat,NA::b,2,missing,missing,N/A,else,else,Needs help - heavy household chores,"Because of any physical condition or mental condition or health problem, do you need the help of another person with doing heavy household chores such as spring cleaning or yard work?", +ADL_der,ADL_der_catN/A_Func::adl_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,Func::adl_fun,N/A,N/A,N/A,N/A,N/A,N/A,Derived needs help with tasks,Derived needs help with tasks,"Derived variable based on ADL_01, ADL_02, ADL_03, ADL_04, ADL_05" +ADL_der,ADL_der_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,1,2,Needs help with tasks,Needs help with tasks,N/A,N/A,Needs help with tasks,Derived needs help with tasks,Derived needs help with tasks, +ADL_der,ADL_der_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,2,2,Does not need help with tasks,Does need help with tasks,N/A,N/A,Does need help with tasks,Derived needs help with tasks,Derived needs help with tasks, +ADL_der,ADL_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::b,2,missing,missing,N/A,N/A,Does need help with tasks,Derived needs help with tasks,Derived needs help with tasks, +ADL_score_5,ADL_score_5_catN/A_Func::adl_score_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,Func::adl_score_5_fun,6,N/A,N/A,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,0,6,Needs help with 0 tasks,Needs help with 0 tasks,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,1,6,Needs help with at least 1 task,Needs help with at least 1 task,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,2,6,Needs help with at least 2 tasks,Needs help with at least 2 tasks,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,3,6,Needs help with at least 3 tasks,Needs help with at least 3 tasks,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,4,6,Needs help with at least 4 tasks,Needs help with at least 4 tasks,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,5,6,Needs help with at least 5 tasks,Needs help with at least 5 tasks,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::a,6,not applicable,not applicable,N/A,N/A,N/A,N/A,N/A, +ADL_score_5,ADL_score_5_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]",N/A,NA::b,6,missing,missing,N/A,N/A,N/A,N/A,N/A, +ADLF6R,ADLF6R_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,1,2,Yes,Yes,N/A,1,Yes,Needs help with at least one task - (F),Needs help with at least one task - (F), +ADLF6R,ADLF6R_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,2,2,No,No,N/A,2,No,Needs help with at least one task - (F),Needs help with at least one task - (F), +ADLF6R,ADLF6R_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Needs help with at least one task - (F),Needs help with at least one task - (F), +ADLF6R,ADLF6R_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Needs help with at least one task - (F),Needs help with at least one task - (F), +ADLF6R,ADLF6R_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]",cat,NA::b,2,missing,missing,N/A,else,else,Needs help with at least one task - (F),Needs help with at least one task - (F), +ADM_RNO,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ADMA_RNO, cchs2003_p::ADMC_RNO, cchs2005_p::ADME_RNO, [ADM_RNO]",cont,copy,N/A,Sequential record number,Sequential record number,N/A,"[1,999998]",Sequential record number,Sequential record number,Sequential record number, +ALC_1,ALC_1_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]",cat,1,2,yes,alcohol in the past year,N/A,1,"Past year, have you drank alcohol",d12,"Past year, have you drank alcohol", +ALC_1,ALC_1_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]",cat,2,2,no,no alcohol in past year,N/A,2,"Past year, have you drank alcohol",d12,"Past year, have you drank alcohol", +ALC_1,ALC_1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]",cat,NA::a,2,not applicable,not applicable,N/A,6,Not applicable,d12,"Past year, have you drank alcohol", +ALC_1,ALC_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),d12,"Past year, have you drank alcohol", +ALC_1,ALC_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]",cat,NA::b,2,missing,missing,N/A,else,else,d12,"Past year, have you drank alcohol", +ALC_005,ALC_005_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]",cat,1,2,yes,alcohol in the lifetime,N/A,1,"In lifetime, ever had a drink?",dever,"In lifetime, ever had a drink?", +ALC_005,ALC_005_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]",cat,2,2,no,no alcohol in lifetime,N/A,2,"In lifetime, ever had a drink?",dever,"In lifetime, ever had a drink?", +ALC_005,ALC_005_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]",cat,NA::a,2,not applicable,not applicable,N/A,6,Not applicable,dever,"In lifetime, ever had a drink?", +ALC_005,ALC_005_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),dever,"In lifetime, ever had a drink?", +ALC_005,ALC_005_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]",cat,NA::b,2,missing,missing,N/A,else,else,dever,"In lifetime, ever had a drink?", +ALCDTTM,ALCDTTM_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,1,3,Regular,Regular Drinker,N/A,1,Regular Drinker,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,2,3,Occasional,Occasional Drinker,N/A,2,Occasional drinker,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,3,No drink in the last 12 months,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]",cat,NA::b,3,missing,missing,N/A,else,else,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,1,3,Regular,Regular Drinker,N/A,1,Regular drinker,Drinker type (last 12 months),Type of drinker (last 12 months),"In CCHS cycles 2001, 2003, and 2005, ALCDTTM was derived from ALCDTYP in which former and never drinkers were combined into ""No drink in the last 12 months""" +ALCDTTM,ALCDTTM_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,2,3,Occasional,Occasional Drinker,N/A,2,Occasional drinker,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,3,Former drinker,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,3,3,No drink in last 12 months,No drink in last 12 months,N/A,4,Never drank,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTTM,ALCDTTM_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP",cat,NA::b,3,missing,missing,N/A,else,else,Drinker type (last 12 months),Type of drinker (last 12 months), +ALCDTYP,ALCDTYP_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,1,4,Regular,Regular drinker,N/A,1,Regular drinker,DrinkerType,Type of drinker - (D), +ALCDTYP,ALCDTYP_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,2,4,Occasional,Occasional drinker,N/A,2,Occasional drinker,DrinkerType,Type of drinker - (D), +ALCDTYP,ALCDTYP_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,3,4,Former,Former drinker,N/A,3,Former drinker,DrinkerType,Type of drinker - (D), +ALCDTYP,ALCDTYP_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,4,4,Never drank,Never drank,N/A,4,Never drank,DrinkerType,Type of drinker - (D), +ALCDTYP,ALCDTYP_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,NA::a,4,Not applicable,not applicable,N/A,6,not applicable,DrinkerType,Type of drinker - (D), +ALCDTYP,ALCDTYP_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),DrinkerType,Type of drinker - (D),Don't know (7) and refusal (8) not included in 2001 CCHS +ALCDTYP,ALCDTYP_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]",cat,NA::b,4,missing,missing,N/A,else,else,DrinkerType,Type of drinker - (D), +ALW_1,ALW_1_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]",cat,1,2,yes,alcohol in the past week,N/A,1,"Past week, had any alcohol",dany,"Past week, had any alcohol", +ALW_1,ALW_1_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]",cat,2,2,no,no alcohol in past week,N/A,2,"Past week, had any alcohol",dany,"Past week, had any alcohol", +ALW_1,ALW_1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]",cat,NA::a,2,not applicable,not applicable,N/A,6,Not applicable,dany,"Past week, had any alcohol", +ALW_1,ALW_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),dany,"Past week, had any alcohol", +ALW_1,ALW_1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]",cat,NA::b,2,missing,missing,N/A,else,else,dany,"Past week, had any alcohol", +ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, cchs2015_2016_p::ALW_010, cchs2017_2018_p::ALW_010, [ALW_2A1]",cont,copy,N/A,# of drinks - Sunday,Number of drinks on Sunday,drinks,"[0,50]",Number of drinks on Sunday,DailyConsumptionSunday,Number of drinks on Sunday, +ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, cchs2015_2016_p::ALW_010, cchs2017_2018_p::ALW_010, [ALW_2A1]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionSunday,Number of drinks on Sunday, +ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, cchs2015_2016_p::ALW_010, cchs2017_2018_p::ALW_010, [ALW_2A1]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionSunday,Number of drinks on Sunday, +ALW_2A1,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, cchs2015_2016_p::ALW_010, cchs2017_2018_p::ALW_010, [ALW_2A1]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionSunday,Number of drinks on Sunday, +ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, cchs2015_2016_p::ALW_015, cchs2017_2018_p::ALW_015, [ALW_2A2]",cont,copy,N/A,# of drinks - Monday,Number of drinks on Monday,drinks,"[0,50]",Number of drinks on Monday,DailyConsumptionMonday,Number of drinks on Monday, +ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, cchs2015_2016_p::ALW_015, cchs2017_2018_p::ALW_015, [ALW_2A2]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionMonday,Number of drinks on Monday, +ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, cchs2015_2016_p::ALW_015, cchs2017_2018_p::ALW_015, [ALW_2A2]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionMonday,Number of drinks on Monday, +ALW_2A2,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, cchs2015_2016_p::ALW_015, cchs2017_2018_p::ALW_015, [ALW_2A2]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionMonday,Number of drinks on Monday, +ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, cchs2015_2016_p::ALW_020, cchs2017_2018_p::ALW_020, [ALW_2A3]",cont,copy,N/A,# of drinks - Tuesday,Number of drinks on Tuesday,drinks,"[0,50]",Number of drinks on Tuesday,DailyConsumptionTuesday,Number of drinks on Tuesday, +ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, cchs2015_2016_p::ALW_020, cchs2017_2018_p::ALW_020, [ALW_2A3]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionTuesday,Number of drinks on Tuesday, +ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, cchs2015_2016_p::ALW_020, cchs2017_2018_p::ALW_020, [ALW_2A3]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionTuesday,Number of drinks on Tuesday, +ALW_2A3,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, cchs2015_2016_p::ALW_020, cchs2017_2018_p::ALW_020, [ALW_2A3]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionTuesday,Number of drinks on Tuesday, +ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, cchs2015_2016_p::ALW_025, cchs2017_2018_p::ALW_025, [ALW_2A4]",cont,copy,N/A,# of drinks - Wednesday,Number of drinks on Wednesday,drinks,"[0,50]",Number of drinks on Wednesday,DailyConsumptionWednesday,Number of drinks on Wednesday, +ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, cchs2015_2016_p::ALW_025, cchs2017_2018_p::ALW_025, [ALW_2A4]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionWednesday,Number of drinks on Wednesday, +ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, cchs2015_2016_p::ALW_025, cchs2017_2018_p::ALW_025, [ALW_2A4]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionWednesday,Number of drinks on Wednesday, +ALW_2A4,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, cchs2015_2016_p::ALW_025, cchs2017_2018_p::ALW_025, [ALW_2A4]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionWednesday,Number of drinks on Wednesday, +ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, cchs2015_2016_p::ALW_030, cchs2017_2018_p::ALW_030, [ALW_2A5]",cont,copy,N/A,# of drinks - Thursday,Number of drinks on Thursday,drinks,"[0,50]",Number of drinks on Thursday,DailyConsumptionThursday,Number of drinks on Thursday, +ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, cchs2015_2016_p::ALW_030, cchs2017_2018_p::ALW_030, [ALW_2A5]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionThursday,Number of drinks on Thursday, +ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, cchs2015_2016_p::ALW_030, cchs2017_2018_p::ALW_030, [ALW_2A5]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionThursday,Number of drinks on Thursday, +ALW_2A5,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, cchs2015_2016_p::ALW_030, cchs2017_2018_p::ALW_030, [ALW_2A5]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionThursday,Number of drinks on Thursday, +ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, cchs2015_2016_p::ALW_035, cchs2017_2018_p::ALW_035, [ALW_2A6]",cont,copy,N/A,# of drinks - Friday,Number of drinks on Friday,drinks,"[0,50]",Number of drinks on Friday,DailyConsumptionFriday,Number of drinks on Friday, +ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, cchs2015_2016_p::ALW_035, cchs2017_2018_p::ALW_035, [ALW_2A6]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionFriday,Number of drinks on Friday, +ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, cchs2015_2016_p::ALW_035, cchs2017_2018_p::ALW_035, [ALW_2A6]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionFriday,Number of drinks on Friday, +ALW_2A6,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, cchs2015_2016_p::ALW_035, cchs2017_2018_p::ALW_035, [ALW_2A6]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionFriday,Number of drinks on Friday, +ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, cchs2015_2016_p::ALW_040, cchs2017_2018_p::ALW_040, [ALW_2A7]",cont,copy,N/A,# of drinks - Saturday,Number of drinks on Saturday,drinks,"[0,50]",Number of drinks on Saturday,DailyConsumptionSaturday,Number of drinks on Saturday, +ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, cchs2015_2016_p::ALW_040, cchs2017_2018_p::ALW_040, [ALW_2A7]",cont,NA::a,N/A,not applicable,not applicable,drinks,996,not applicable,DailyConsumptionSaturday,Number of drinks on Saturday, +ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, cchs2015_2016_p::ALW_040, cchs2017_2018_p::ALW_040, [ALW_2A7]",cont,NA::b,N/A,missing,missing,drinks,"[997,999]",don't know (997); refusal (998); not stated (999),DailyConsumptionSaturday,Number of drinks on Saturday, +ALW_2A7,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, cchs2015_2016_p::ALW_040, cchs2017_2018_p::ALW_040, [ALW_2A7]",cont,NA::b,N/A,missing,missing,drinks,else,else,DailyConsumptionSaturday,Number of drinks on Saturday, +ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY, cchs2015_2016_p::ALWDVDLY, cchs2017_2018_p::ALWDVDLY, [ALWDDLY]",cont,copy,N/A,drinks/day,drinks/day,drinks/day,"[0,40]",drinks per day,AverageDailyConsumption,Average daily alcohol consumption,"2007-08, 09-10, 2010, 2012 cycles are categorical" +ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY, cchs2015_2016_p::ALWDVDLY, cchs2017_2018_p::ALWDVDLY, [ALWDDLY]",cont,NA::a,N/A,not applicable,not applicable,drinks/day,996,Not applicable,AverageDailyConsumption,Average daily alcohol consumption, +ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY, cchs2015_2016_p::ALWDVDLY, cchs2017_2018_p::ALWDVDLY, [ALWDDLY]",cont,NA::b,N/A,missing,missing,drinks/day,"[997,999]",don't know (997); refusal (998); not stated (9),AverageDailyConsumption,Average daily alcohol consumption, +ALWDDLY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY, cchs2015_2016_p::ALWDVDLY, cchs2017_2018_p::ALWDVDLY, [ALWDDLY]",cont,NA::b,N/A,missing,missing,drinks/day,else,else,AverageDailyConsumption,Average daily alcohol consumption, +ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, cchs2015_2016_p::ALWDVWKY, cchs2017_2018_p::ALWDVWKY, [ALWDWKY]",cont,copy,N/A,drinks/week,drinks/week,drinks/week,"[0,449]",drinks per week,drinks/week,Weekly consumption of alcohol,shown as categorical variable in CCHS 2014 cycle +ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, cchs2015_2016_p::ALWDVWKY, cchs2017_2018_p::ALWDVWKY, [ALWDWKY]",cont,NA::a,N/A,not applicable,not applicable,drinks/week,996,not applicable (996),drinks/week,Weekly consumption of alcohol, +ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, cchs2015_2016_p::ALWDVWKY, cchs2017_2018_p::ALWDVWKY, [ALWDWKY]",cont,NA::b,N/A,missing,missing,drinks/week,"[997,999]",don't know (997); refusal (998); not stated (999),drinks/week,Weekly consumption of alcohol, +ALWDWKY,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, cchs2015_2016_p::ALWDVWKY, cchs2017_2018_p::ALWDVWKY, [ALWDWKY]",cont,NA::b,N/A,missing,missing,drinks/week,else,else,drinks/week,Weekly consumption of alcohol, +ALWDVSTR_der,ALWDVSTR_der_catN/A_Func::low_drink_short_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,Func::low_drink_short_fun,N/A,N/A,N/A,N/A,N/A,N/A,Short Term Drinking Risk,Low drinking - Increased short term risks due to drinking,"Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/ykau5/ . Derived from DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7." +ALWDVSTR_der,ALWDVSTR_der_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,1,2,Increased short term health risk,Increased short term health risk due to drinking,N/A,1,Increased short term health risk due to drinking,Short Term Drinking Risk,Low drinking - Increased short term risks due to drinking, +ALWDVSTR_der,ALWDVSTR_der_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,2,2,No increased short term health risk,No increased short term health risk due to drinking,N/A,2,No increased short term health risk due to drinking,Short Term Drinking Risk,Low drinking - Increased short term risks due to drinking, +ALWDVSTR_der,ALWDVSTR_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::b,2,missing,missing,N/A,N/A,missing,Short Term Drinking Risk,Low drinking - Increased short term risks due to drinking, +ALWDVLTR_der,ALWDVLTR_der_catN/A_Func::low_drink_long_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,Func::low_drink_long_fun,N/A,N/A,N/A,N/A,N/A,N/A,Long Term Drinking Risk,Low drinking - Increased long term risks due to drinking, +ALWDVLTR_der,ALWDVLTR_der_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,1,2,Increased long term health risk,Increased long term health risk due to drinking,N/A,1,Increased long term health risk due to drinking,Long Term Drinking Risk,Low drinking - Increased long term risks due to drinking,"Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/ykau5/ . Derived from DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7." +ALWDVLTR_der,ALWDVLTR_der_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,2,2,No increased long term health risk,No increased long term health risk due to drinking,N/A,2,No increased long term health risk due to drinking,Long Term Drinking Risk,Low drinking - Increased long term risks due to drinking, +ALWDVLTR_der,ALWDVLTR_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::b,2,missing,missing,N/A,N/A,missing,Long Term Drinking Risk,Low drinking - Increased long term risks due to drinking, +binge_drinker,binge_drinker_catN/A_Func::binge_drinker_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,Func::binge_drinker_fun,N/A,N/A,N/A,N/A,N/A,N/A,Binge Drinker,Binge Drinker,"Derived from DHH_SEX, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7" +binge_drinker,binge_drinker_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,1,2,Binge drinker,Binge drinker,N/A,N/A,Binge drinker,Binge Drinker,Binge Drinker, +binge_drinker,binge_drinker_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,2,2,Regular drinker,Regular drinker,N/A,N/A,Regular drinker,Binge Drinker,Binge Drinker, +binge_drinker,binge_drinker_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::a,2,Not applicable,Not applicable,N/A,N/A,Not applicable,Binge Drinker,Binge Drinker, +binge_drinker,binge_drinker_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",N/A,NA::b,2,missing,missing,N/A,N/A,missing,Binge Drinker,Binge Drinker, +CCC_031,CCC_031_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]",cat,1,2,Asthma,Asthma,N/A,1,Yes (Do you have asthma?),Asthma,Do you have asthma?, +CCC_031,CCC_031_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]",cat,2,2,No asthma,No asthma,N/A,2,No (Do you have asthma?),Asthma,Do you have asthma?, +CCC_031,CCC_031_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Asthma,Do you have asthma?, +CCC_031,CCC_031_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Asthma,Do you have asthma?, +CCC_031,CCC_031_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]",cat,NA::b,2,missing,missing,N/A,else,else,Asthma,Do you have asthma?, +CCC_041,CCC_041_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]",cat,1,2,Fibromyalgia,Fibromyalgia,N/A,1,Yes (Do you have Fibromyalgia?),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/14 +CCC_041,CCC_041_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]",cat,2,2,No Fibromyalgia,Fibromyalgia,N/A,2,No (Do you have Fibromyalgia?),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/15 +CCC_041,CCC_041_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/16 +CCC_041,CCC_041_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/17 +CCC_041,CCC_041_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]",cat,NA::b,2,missing,missing,N/A,else,else,Fibromyalgia,Do you have Fibromyalgia?,Missing data 2007-2013/18 +CCC_051,CCC_051_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]",cat,1,2,Arthritis/Rheumatism,Arthritis/Rheumatism,N/A,1,Yes (Do you have arthritis or rheumatism?),Arthritis/Rheumatism,Do you have arthritis or rheumatism?, +CCC_051,CCC_051_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]",cat,2,2,No Arthritis/Rheumatism,No Arthritis/Rheumatism,N/A,2,No (Do you have arthritis or rheumatism?),Arthritis/Rheumatism,Do you have arthritis or rheumatism?, +CCC_051,CCC_051_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Arthritis/Rheumatism,Do you have arthritis or rheumatism?, +CCC_051,CCC_051_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Arthritis/Rheumatism,Do you have arthritis or rheumatism?, +CCC_051,CCC_051_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]",cat,NA::b,2,missing,missing,N/A,else,else,Arthritis/Rheumatism,Do you have arthritis or rheumatism?, +CCC_061,CCC_061_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]",cat,1,2,Back Problems,Back Problems,N/A,1,Yes (Do you have back problems?),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?", +CCC_061,CCC_061_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]",cat,2,2,No Back Problems,No Back Problems,N/A,2,No (Do you have back problems?),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?", +CCC_061,CCC_061_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?", +CCC_061,CCC_061_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?", +CCC_061,CCC_061_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]",cat,NA::b,2,missing,missing,N/A,else,else,Back Problems,"Do you have back problems, excluding fibromyalgia and arthritis diagnosed by a health professional?", +CCC_071,CCC_071_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]",cat,1,2,Hypertension,Hypertension,N/A,1,Yes (Do you have high blood pressure?),Hypertension,Do you have high blood pressure?, +CCC_071,CCC_071_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]",cat,2,2,No Hypertension,No Hypertension,N/A,2,No (Do you have high blood pressure?),Hypertension,Do you have high blood pressure?, +CCC_071,CCC_071_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension,Do you have high blood pressure?, +CCC_071,CCC_071_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension,Do you have high blood pressure?, +CCC_071,CCC_071_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension,Do you have high blood pressure?, +CCC_072,CCC_072_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,1,2,Hypertension diagnosis,Hypertension diagnosis,N/A,1,Yes (Have you ever been diagnosed with high blood pressure?),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?, +CCC_072,CCC_072_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,2,2,No hypertension diagnosis,No hypertension diagnosis,N/A,2,No (Have you ever been diagnosed with high blood pressure?),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?, +CCC_072,CCC_072_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?, +CCC_072,CCC_072_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?, +CCC_072,CCC_072_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?, +CCC_073,CCC_073_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]",cat,1,2,Hypertension medication,Hypertension medication,N/A,1,Yes (In the past month have you taken any medicine for high blood pressure?),Hypertension medication,In the past month have you taken any medicine for high blood pressure?, +CCC_073,CCC_073_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]",cat,2,2,No hypertension medication,No hypertension medication,N/A,2,No (In the past month have you taken any medicine for high blood pressure?),Hypertension medication,In the past month have you taken any medicine for high blood pressure?, +CCC_073,CCC_073_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Hypertension medication,In the past month have you taken any medicine for high blood pressure?, +CCC_073,CCC_073_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Hypertension medication,In the past month have you taken any medicine for high blood pressure?, +CCC_073,CCC_073_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]",cat,NA::b,2,missing,missing,N/A,else,else,Hypertension medication,In the past month have you taken any medicine for high blood pressure?, +CCC_081,CCC_081_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]",cat,1,2,Migraine Headache,Migraine Headache,N/A,1,Yes (Do you have Migraine Headaches?),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""" +CCC_081,CCC_081_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]",cat,2,2,No Migraine Headache,No Migraine Headache,N/A,2,No (Do you have Migraine Headaches?),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""" +CCC_081,CCC_081_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""" +CCC_081,CCC_081_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""" +CCC_081,CCC_081_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]",cat,NA::b,2,missing,missing,N/A,else,else,Migraine Headache,"Remember, we're interested in conditions diagnosed by a health professional. Do you have migraine headaches?","2011 onward asks, ""Remember, we are interested in conditions diagnosed by a health professional and that are expected to last or have already lasted 6 months or more. Do you have migraine headaches?""" +CCC_091,CCC_091_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]",cat,1,2,COPD/emphysema/bronchitis,COPD/emphysema/bronchitis,N/A,1,"Yes (Do you have COPD(eg bronchitis,emphysema)?)",COPD/emphysema/bronchitis,"Do you have COPD (eg bronchitis,emphysema)?", +CCC_091,CCC_091_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]",cat,2,2,No COPD/emphysema/bronchitis,No COPD/emphysema/bronchitis,N/A,2,"No (Do you have COPD(eg bronchitis,emphysema)?)",COPD/emphysema/bronchitis,"Do you have COPD (eg bronchitis,emphysema)?", +CCC_091,CCC_091_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,COPD/emphysema/bronchitis,"Do you have COPD (eg bronchitis,emphysema)?", +CCC_091,CCC_091_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),COPD/emphysema/bronchitis,"Do you have COPD (eg bronchitis,emphysema)?", +CCC_091,CCC_091_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]",cat,NA::b,2,missing,missing,N/A,else,else,COPD/emphysema/bronchitis,"Do you have COPD (eg bronchitis,emphysema)?", +CCC_101,CCC_101_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]",cat,1,2,Diabetes,Diabetes,N/A,1,Yes (Do you have diabetes?),Diabetes,Do you have diabetes?, +CCC_101,CCC_101_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]",cat,2,2,No Diabetes,No Diabetes,N/A,2,No (Do you have diabetes?),Diabetes,Do you have diabetes?, +CCC_101,CCC_101_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Diabetes,Do you have diabetes?, +CCC_101,CCC_101_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Diabetes,Do you have diabetes?, +CCC_101,CCC_101_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]",cat,NA::b,2,missing,missing,N/A,else,else,Diabetes,Do you have diabetes?, +CCC_111,CCC_111_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,1,2,Epilepsy,Epilepsy,N/A,1,Yes (Do you have epilepsy?),Epilepsy,Do you have epilepsy?, +CCC_111,CCC_111_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,2,2,No Epilepsy,No Epilepsy,N/A,2,No (Do you have epilepsy?),Epilepsy,Do you have epilepsy?, +CCC_111,CCC_111_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Epilepsy,Do you have epilepsy?, +CCC_111,CCC_111_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Epilepsy,Do you have epilepsy?, +CCC_111,CCC_111_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111",cat,NA::b,2,missing,missing,N/A,else,else,Epilepsy,Do you have epilepsy?, +CCC_121,CCC_121_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]",cat,1,2,Heart Disease,Heart Disease,N/A,1,Yes (Do you have heart disease?),Heart Disease,Do you have heart disease?, +CCC_121,CCC_121_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]",cat,2,2,No Heart Disease,No Heart Disease,N/A,2,No (Do you have heart disease?),Heart Disease,Do you have heart disease?, +CCC_121,CCC_121_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Heart Disease,Do you have heart disease?, +CCC_121,CCC_121_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Heart Disease,Do you have heart disease?, +CCC_121,CCC_121_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]",cat,NA::b,2,missing,missing,N/A,else,else,Heart Disease,Do you have heart disease?, +CCC_131,CCC_131_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]",cat,1,2,Cancer,Cancer,N/A,1,Yes (Do you have cancer?),Cancer,Do you have cancer?, +CCC_131,CCC_131_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]",cat,2,2,No Cancer,No Cancer,N/A,2,No (Do you have cancer?),Cancer,Do you have cancer?, +CCC_131,CCC_131_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Cancer,Do you have cancer?, +CCC_131,CCC_131_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Cancer,Do you have cancer?, +CCC_131,CCC_131_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]",cat,NA::b,2,missing,missing,N/A,else,else,Cancer,Do you have cancer?, +CCC_151,CCC_151_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]",cat,1,2,Stroke,Stroke,N/A,1,Yes (Do you suffer from the effects of stroke?),Stroke,Do you suffer from effects of stroke?, +CCC_151,CCC_151_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]",cat,2,2,No Stroke,No Stroke,N/A,2,No (Do you suffer from the effects of stroke?),Stroke,Do you suffer from effects of stroke?, +CCC_151,CCC_151_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Stroke,Do you suffer from effects of stroke?, +CCC_151,CCC_151_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Stroke,Do you suffer from effects of stroke?, +CCC_151,CCC_151_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]",cat,NA::b,2,missing,missing,N/A,else,else,Stroke,Do you suffer from effects of stroke?, +CCC_171,CCC_171_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,1,2,Bowel disorder,Bowel disorder,N/A,1,Yes (Do you have a bowel disorder?),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?, +CCC_171,CCC_171_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,2,2,No bowel disorder,No bowel disorder,N/A,2,No (Do you have a bowel disorder?),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?, +CCC_171,CCC_171_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?, +CCC_171,CCC_171_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?, +CCC_171,CCC_171_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]",cat,NA::b,2,missing,missing,N/A,else,else,Bowel disorder,Do you have a bowel disorder such as Crohn's Disease or colitis?, +CCC_251,CCC_251_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,1,2,Chronic fatigue,Chronic fatigue,N/A,1,Yes (Do you have chronic fatigue syndrome?),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?, +CCC_251,CCC_251_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,2,2,No chronic fatigue,No chronic fatigue,N/A,2,No (Do you have chronic fatigue syndrome?),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?, +CCC_251,CCC_251_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Chronic fatigue syndrome,Do you have chronic fatigue syndrome?, +CCC_251,CCC_251_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Chronic fatigue syndrome,Do you have chronic fatigue syndrome?, +CCC_251,CCC_251_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]",cat,NA::b,2,missing,missing,N/A,else,else,Chronic fatigue syndrome,Do you have chronic fatigue syndrome?, +CCC_280,CCC_280_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]",cat,1,2,Has a mood disorder,Has a mood disorder,N/A,1,Yes (Do you have a mood disorder?),Mood disorder,Do you have a mood disorder?, +CCC_280,CCC_280_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]",cat,2,2,Does not have a mood disorder,Does not have a mood disorder,N/A,2,No (Do you have a mood disorder?),Mood disorder,Do you have a mood disorder?, +CCC_280,CCC_280_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Mood disorder,Do you have a mood disorder?, +CCC_280,CCC_280_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Mood disorder,Do you have a mood disorder?, +CCC_280,CCC_280_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]",cat,NA::b,2,missing,missing,N/A,else,else,Mood disorder,Do you have a mood disorder?, +CCC_290,CCC_290_cat2_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]",cat,1,2,Has an anxiety disorder,Has an anxiety disorder,N/A,1,Yes (Do you have an anxiety disorder?),Anxiety Disorder,Do you have an anxiety disorder?, +CCC_290,CCC_290_cat2_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]",cat,2,2,Does not have an anxiety disorder,Does not have an anxiety disorder,N/A,2,No (Do you have an anxiety disorder?),Anxiety Disorder,Do you have an anxiety disorder?, +CCC_290,CCC_290_cat2_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Anxiety Disorder,Do you have an anxiety disorder?, +CCC_290,CCC_290_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Anxiety Disorder,Do you have an anxiety disorder?, +CCC_290,CCC_290_cat2_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]",cat,NA::b,2,missing,missing,N/A,else,else,Anxiety Disorder,Do you have an anxiety disorder?, +CCC_31A,CCC_31A_cat2_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]",cat,1,2,Cancer diagnosis,Cancer diagnosis,N/A,1,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?, +CCC_31A,CCC_31A_cat2_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]",cat,2,2,No cancer diagnosis,No cancer diagnosis,N/A,2,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?, +CCC_31A,CCC_31A_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]",cat,NA::a,2,not applicable,not applicable,N/A,6,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?, +CCC_31A,CCC_31A_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?, +CCC_31A,CCC_31A_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]",cat,NA::b,2,missing,missing,N/A,else,Yes (Have you ever been diagnosed with cancer?),Cancer Diagnosis,Have you ever been diagnosed with cancer?, +CCC_91A,CCC_91A_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,1,2,Bronchitis,Chronic bronchitis,N/A,1,Yes (Do you have chronic bronchitis?),Bronchitis,Do you have chronic bronchitis?, +CCC_91A,CCC_91A_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,2,2,No bronchitis,No chronic bronchitis,N/A,2,No (Do you have chronic bronchitis?),Bronchitis,Do you have chronic bronchitis?, +CCC_91A,CCC_91A_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Bronchitis,Do you have chronic bronchitis?, +CCC_91A,CCC_91A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bronchitis,Do you have chronic bronchitis?, +CCC_91A,CCC_91A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]",cat,NA::b,2,missing,missing,N/A,else,else,Bronchitis,Do you have chronic bronchitis?, +CCC_91E,CCC_91E_cat2_1,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,1,2,Emphysema,Emphysema,N/A,1,Yes (Do you have emphysema?),emphysema,Do you have emphysema?, +CCC_91E,CCC_91E_cat2_2,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,2,2,No emphysema,No emphysema,N/A,2,No (Do you have emphysema?),emphysema,Do you have emphysema?, +CCC_91E,CCC_91E_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,emphysema,Do you have emphysema?, +CCC_91E,CCC_91E_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),emphysema,Do you have emphysema?, +CCC_91E,CCC_91E_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E",cat,NA::b,2,missing,missing,N/A,else,else,emphysema,Do you have emphysema?, +CCC_91F,CCC_91F_cat2_1,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,1,2,COPD,COPD,N/A,1,Yes (Do you have COPD?),COPD,Do you have COPD?, +CCC_91F,CCC_91F_cat2_2,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,2,2,No COPD,No COPD,N/A,2,No (Do you have COPD?),COPD,Do you have COPD?, +CCC_91F,CCC_91F_cat2_NA::a,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,COPD,Do you have COPD?, +CCC_91F,CCC_91F_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),COPD,Do you have COPD?, +CCC_91F,CCC_91F_cat2_NA::b,cat,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F",cat,NA::b,2,missing,missing,N/A,else,else,COPD,Do you have COPD?, +CCC_075,CCC_075_cat2_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075],cat,1,2,High blood cholesterol,High blood cholesterol,N/A,1,High blood cholesterol,Blood cholesterol,Do you have high blood cholesterol or lipids?,Respondent are 18+ years old to answer this question in CCHS 2015-2018 +CCC_075,CCC_075_cat2_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075],cat,2,2,No high blood cholesterol,No high blood cholesterol,N/A,2,No high blood cholesterol,Blood cholesterol,Do you have high blood cholesterol or lipids?, +CCC_075,CCC_075_cat2_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Blood cholesterol,Do you have high blood cholesterol or lipids?, +CCC_075,CCC_075_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Blood cholesterol,Do you have high blood cholesterol or lipids?, +CCC_075,CCC_075_cat2_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075],cat,NA::b,2,missing,missing,N/A,else,else,Blood cholesterol,Do you have high blood cholesterol or lipids?, +COPD_Emph_der,COPD_Emph_der_catN/A_Func::COPD_Emph_der_fun1,cat,"cchs2005_p, cchs2007_2008_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F]",N/A,Func::COPD_Emph_der_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,Derived from COPD and Emphysema variables +COPD_Emph_der,COPD_Emph_der_catN/A_Func::COPD_Emph_der_fun2,cat,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091]",N/A,Func::COPD_Emph_der_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,Derived from COPD and Emphysema variables +COPD_Emph_der,COPD_Emph_der_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, CCC_091]",N/A,1,3,Over 35 years with condition,Age over 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +COPD_Emph_der,COPD_Emph_der_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,2,3,Under 35 years with condition,Age under 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +COPD_Emph_der,COPD_Emph_der_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,3,3,No condition,No condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +COPD_Emph_der,COPD_Emph_der_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_091]",N/A,NA::b,3,missing,missing,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +DHH_OWN,DHH_OWN_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,1,2,Yes,Yes,N/A,1,Yes,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?,"Prior to 2009, CCHS restricted this variable to participants who were not living in an institution. In 2011, CCHS changed wording of responses to (1) owner and (2) renter" +DHH_OWN,DHH_OWN_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,2,2,No,No,N/A,2,No,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?, +DHH_OWN,DHH_OWN_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?, +DHH_OWN,DHH_OWN_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?, +DHH_OWN,DHH_OWN_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]",cat,NA::b,2,missing,missing,N/A,else,else,Dwelling - owned by a member of hsld,Is this dwelling owned by a member of this household?, +DHH_SEX,DHH_SEX_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,1,2,Male,Male,N/A,1,Male,Sex,Sex, +DHH_SEX,DHH_SEX_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,2,2,Female,Female,N/A,2,Female,Sex,Sex, +DHH_SEX,DHH_SEX_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sex,Sex, +DHH_SEX,DHH_SEX_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sex,Sex, +DHH_SEX,DHH_SEX_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]",cat,NA::b,2,missing,missing,N/A,else,else,Sex,Sex, +DHHGAGE_5,DHHGAGE_5_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,5,age (12 to 19),age (12 to 19),years,"[1,3]",12 To 14 Years (1); 15 To 17 Years (2); 18 To 19 Years (3),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,5,age (20 to 39),age (20 to 39),years,"[4,7]",20 To 24 Years (4); 25 To 29 Years (5); 30 To 34 Years (6); 35 To 39 Years (7),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,5,age (40 to 59),age (40 to 59),years,"[8,11]",40 To 44 Years (8); 45 To 49 Years (9); 50 To 54 Years (10); 55 To 59 Years (11),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,5,age (60 to 79),age (60 to 79),years,"[12,15]",60 To 64 Years (12); 65 To 69 Years (13); 70 To 74 Years (14); 75 To 79 Years (15),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,5,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,else,else,years,else,else,Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,5,age (12 to 19),age (12 to 19),years,"[1,2]",12 To 14 Years (1); 15 To 19 Years (2),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,5,age (20 to 39),age (20 to 39),years,"[3,6]",20 To 24 Years (3); 25 To 29 Years (4); 30 To 34 Years (5); 35 To 39 Years (6),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,5,age (40 to 59),age (40 to 59),years,"[7,10]",40 To 44 Years (7); 45 To 49 Years (8); 50 To 54 Years (9); 55 To 59 Years (10),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,5,age (60 to 79),age (60 to 79),years,"[11,14]",60 To 64 Years (11); 65 To 69 Years (12); 70 To 74 Years (13); 75 To 79 Years (14),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat5_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,5,age (80 plus),age (80 plus),years,15,80 Years or more (15),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Categorical age, +DHHGAGE_5,DHHGAGE_5_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,else,else,years,else,else,Age,Categorical age, +DHHGAGE_A,DHHGAGE_A_cat15_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,15,age (12 to 14),age (12 to 14),years,1,12 to 14 years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,15,age (15 to 19),age (15 to 19),years,2,15 to 19 years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,15,age (20 to 24),age (20 to 24),years,3,20 To 24 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,15,age (25 to 29),age (25 to 29),years,4,25 To 29 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,15,age (30 to 34),age (30 to 34),years,5,30 To 34 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,6,15,age (35 to 39),age (35 to 39),years,6,35 To 39 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,7,15,age (40 to 44),age (40 to 44),years,7,40 To 44 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,8,15,age (45 to 49),age (45 to 49),years,8,45 To 49 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,9,15,age (50 to 54),age (50 to 54),years,9,50 To 54 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,10,15,age (55 to 59),age (55 to 59),years,10,55 To 59 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_11,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,11,15,age (60 to 64),age (60 to 64),years,11,60 To 64 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_12,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,12,15,age (65 to 69),age (65 to 69),years,12,65 To 69 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_13,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,13,15,age (70 to 74),age (70 to 74),years,13,70 To 74 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_14,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,14,15,age (75 to 79),age (75 to 79),years,14,75 To 79 Years,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_15,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,15,15,age (80 plus),age (80 plus),years,15,80 Years or more,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,15,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_A,DHHGAGE_A_cat15_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,15,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),"Not applicable, don't know, refusal, not stated (96-99) were options only in CCHS 2003, but had zero responses" +DHHGAGE_A,DHHGAGE_A_cat15_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,15,missing,missing,years,else,else,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,16,age (12 to 14),age (12 to 14),years,1,12 To 14 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,16,age (15 to 17),age (15 to 17),years,2,15 To 17 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,16,age (18 to 19),age (18 to 19),years,3,18 To 19 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,16,age (20 to 24),age (20 to 24),years,4,20 To 24 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,16,age (25 to 29),age (25 to 29),years,5,25 To 29 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,6,16,age (30 to 34),age (30 to 34),years,6,30 To 34 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,7,16,age (35 to 39),age (35 to 39),years,7,35 To 39 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,8,16,age (40 to 44),age (40 to 44),years,8,40 To 44 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,9,16,age (45 to 49),age (45 to 49),years,9,45 To 49 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,10,16,age (50 to 54),age (50 to 54),years,10,50 To 54 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,11,16,age (55 to 59),age (55 to 59),years,11,55 To 59 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_12,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,12,16,age (60 to 64),age (60 to 64),years,12,60 To 64 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_13,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,13,16,age (65 to 69),age (65 to 69),years,13,65 To 69 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_14,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,14,16,age (70 to 74),age (70 to 74),years,14,70 To 74 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_15,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,15,16,age (75 to 79),age (75 to 79),years,15,75 To 79 Years,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_16,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,16,16,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,16,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,16,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G), +DHHGAGE_B,DHHGAGE_B_cat16_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,16,missing,missing,years,else,else,Age,Age - (G), +DHHGAGE_C,DHHGAGE_C_catN/A_Func::age_cat_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,Func::age_cat_fun,N/A,N/A,N/A,years,N/A,N/A,Age,Categorical age,This variable is derived from DHHGAGE_cont +DHHGAGE_C,DHHGAGE_C_cat16_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,1,16,age (12 to 14),age (12 to 14),years,N/A,12 To 14 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,2,16,age (15 to 17),age (15 to 17),years,N/A,15 To 17 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,3,16,age (18 to 19),age (18 to 19),years,N/A,18 To 19 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,4,16,age (20 to 24),age (20 to 24),years,N/A,20 To 24 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,5,16,age (25 to 29),age (25 to 29),years,N/A,25 To 29 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,6,16,age (30 to 34),age (30 to 34),years,N/A,30 To 34 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,7,16,age (35 to 39),age (35 to 39),years,N/A,35 To 39 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,8,16,age (40 to 44),age (40 to 44),years,N/A,40 To 44 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,9,16,age (45 to 49),age (45 to 49),years,N/A,45 To 49 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,10,16,age (50 to 54),age (50 to 54),years,N/A,50 To 54 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,11,16,age (55 to 59),age (55 to 59),years,N/A,55 To 59 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_12,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,12,16,age (60 to 64),age (60 to 64),years,N/A,60 To 64 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_13,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,13,16,age (65 to 69),age (65 to 69),years,N/A,65 To 69 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_14,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,14,16,age (70 to 74),age (70 to 74),years,N/A,70 To 74 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_15,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,15,16,age (75 to 79),age (75 to 79),years,N/A,75 To 79 Years,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_16,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,16,16,age (80 plus),age (80 plus),years,N/A,80 Years or more,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,NA::a,16,not applicable,not applicable,years,N/A,not applicable,Age,Categorical age, +DHHGAGE_C,DHHGAGE_C_cat16_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],N/A,NA::b,16,missing,missing,years,N/A,missing,Age,Categorical age, +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,13,N/A,Age,converted categorical age (12 to 14),years,1,12 to 14 years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,17,N/A,Age,converted categorical age (15 to 19),years,2,15 to 19 years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,22,N/A,Age,converted categorical age (20 to 24),years,3,20 To 24 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,27,N/A,Age,converted categorical age (25 to 29),years,4,25 To 29 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,32,N/A,Age,converted categorical age (30 to 34),years,5,30 To 34 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,37,N/A,Age,converted categorical age (35 to 39),years,6,35 To 39 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,42,N/A,Age,converted categorical age (40 to 44),years,7,40 To 44 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,47,N/A,Age,converted categorical age (45 to 49),years,8,45 To 49 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,52,N/A,Age,converted categorical age (50 to 54),years,9,50 To 54 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,57,N/A,Age,converted categorical age (55 to 59),years,10,55 To 59 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,62,N/A,Age,converted categorical age (60 to 64),years,11,60 To 64 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,67,N/A,Age,converted categorical age (65 to 69),years,12,65 To 69 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,72,N/A,Age,converted categorical age (70 to 74),years,13,70 To 74 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,77,N/A,Age,converted categorical age (75 to 79),years,14,75 To 79 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,85,N/A,Age,converted categorical age (80 plus),years,15,80 Years or more,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G),"Not applicable, don't know, refusal, not stated (96-99) were options in CCHS 2003, but had zero responses" +DHHGAGE_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,N/A,missing,missing,years,else,else,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,13,N/A,Age,converted categorical age (12 to 14),years,1,12 To 14 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,16,N/A,Age,converted categorical age (15 to 17),years,2,15 To 17 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,18.5,N/A,Age,converted categorical age (18 to 19),years,3,18 To 19 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,22,N/A,Age,converted categorical age (20 to 24),years,4,20 To 24 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,27,N/A,Age,converted categorical age (25 to 29),years,5,25 To 29 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,32,N/A,Age,converted categorical age (30 to 34),years,6,30 To 34 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,37,N/A,Age,converted categorical age (35 to 39),years,7,35 To 39 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,42,N/A,Age,converted categorical age (40 to 44),years,8,40 To 44 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,47,N/A,Age,converted categorical age (45 to 49),years,9,45 To 49 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,52,N/A,Age,converted categorical age (50 to 54),years,10,50 To 54 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,57,N/A,Age,converted categorical age (55 to 59),years,11,55 To 59 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,62,N/A,Age,converted categorical age (60 to 64),years,12,60 To 64 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,67,N/A,Age,converted categorical age (65 to 69),years,13,65 To 69 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,72,N/A,Age,converted categorical age (70 to 74),years,14,70 To 74 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,77,N/A,Age,converted categorical age (75 to 79),years,15,75 To 79 Years,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,85,N/A,Age,converted categorical age (80 plus),years,16,80 Years or more,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G), +DHHGAGE_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,N/A,missing,missing,years,else,else,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,1,8,age (12 to 19),age (12 to 19),years,"[1,3]",12 To 14 Years (1); 15 To 17 Years (2); 18 To 19 Years (3),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,2,8,age (20 to 29),age (20 to 29),years,"[4,5]",20 to 24 Years (4); 25 To 29 Years (5),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,3,8,age (30 to 39),age (30 to 39),years,"[6,7]",30 To 34 Years (6); 35 To 39 Years (7),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,4,8,age (40 to 49),age (40 to 49),years,"[8,9]",40 To 44 Years (8); 45 To 49 Years (9),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,5,8,age (50 to 59),age (50 to 59),years,"[10,11]",50 To 54 Years (10); 55 To 59 Years (11),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,6,8,age (60 to 69),age (60 to 69),years,"[12,13]",60 To 64 Years (12); 65 To 69 Years (13),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,7,8,age (70 to 79),age (70 to 79),years,"[14,15]",70 To 74 Years (14); 75 To 79 Years (15),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,8,8,age (80 plus),age (80 plus),years,16,80 Years or more,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]",cat,NA::b,8,else,else,years,else,else,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,1,8,age (12 to 19),age (12 to 19),years,"[1,2]",12 To 14 Years (1); 15 To 19 Years (2),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,2,8,age (20 to 29),age (20 to 29),years,"[3,4]",20 to 24 Years (3); 25 To 29 Years (4),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,3,8,age (30 to 39),age (30 to 39),years,"[5,6]",30 To 34 Years (5); 35 To 39 Years (6),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,4,8,age (40 to 49),age (40 to 49),years,"[7,8]",40 To 44 Years (7); 45 To 49 Years (8),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,5,8,age (50 to 59),age (50 to 59),years,"[9,10]",50 To 54 Years (9); 55 To 59 Years (10),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,6,8,age (60 to 69),age (60 to 69),years,"[11,12]",60 To 64 Years (11); 65 To 69 Years (12),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,7,8,age (70 to 79),age (70 to 79),years,"[13,14]",70 To 74 Years (13); 75 To 79 Years (14),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,8,8,age (80 plus),age (80 plus),years,15,80 plus Years,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::a,8,not applicable,not applicable,years,96,not applicable,Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age,Age - (G), +DHHGAGE_D,DHHGAGE_D_cat8_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE",cat,NA::b,8,else,else,years,else,else,Age,Age - (G), +DHHGHSZ,DHHGHSZ_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,1,5,1 person,1 person,N/A,1,1 person,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,2,5,2 persons,2 persons,N/A,2,2 persons,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,3,5,3 persons,3 persons,N/A,3,3 persons,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,4,5,4 persons,4 persons,N/A,4,4 persons,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,5,5,5+ persons,5 or more persons,N/A,5,5 or more persons,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Household size,Household size - (G), +DHHGHSZ,DHHGHSZ_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]",cat,NA::b,5,missing,missing,N/A,else,else,Household size,Household size - (G), +DHHGMS,DHHGMS_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,1,4,Married,Married,N/A,1,Married,Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,2,4,Common-law,Common-law,N/A,2,Common-law,Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,3,4,Widow/Sep/Div,Widow/Sep/Div,N/A,3,Widow/separated/divorced,Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,4,4,Single/Never mar.,Single,N/A,4,Single/never married,Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Marital Status,Marital status - (G), +DHHGMS,DHHGMS_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]",cat,NA::b,4,missing,missing,N/A,else,else,Marital Status,Marital status - (G), +diet_score,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, FVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]",N/A,Func::diet_score_fun,N/A,N/A,N/A,N/A,N/A,Diet score ,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice", +diet_score,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, FVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]",N/A,NA::b,N/A,missing,missing,N/A,N/A,Diet score ,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice", +diet_score_cat3,diet_score_cat3N/A_Func::diet_score_fun_cat,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,Func::diet_score_fun_cat,N/A,N/A,N/A,N/A,N/A,N/A,Categorical diet score,Categorical diet score, +diet_score_cat3,diet_score_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,1,3,Poor diet,Poor diet,N/A,1,Poor diet,Categorical diet score,Categorical diet score, +diet_score_cat3,diet_score_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,2,3,Fair diet,Fair diet,N/A,2,Fair diet,Categorical diet score,Categorical diet score, +diet_score_cat3,diet_score_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,3,3,Adequate diet,Adequate diet,N/A,3,Adequate diet,Categorical diet score,Categorical diet score, +diet_score_cat3,diet_score_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,NA::a,3,not applicable,not applicable,N/A,NA::a,not applicable,Categorical diet score,Categorical diet score, +diet_score_cat3,diet_score_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],N/A,NA::b,3,missing,missing,N/A,NA::b,missing,Categorical diet score,Categorical diet score, +DIS_10G,DIS_10G_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,1,5,All of the time,All of the time,N/A,1,All of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,2,5,Most of the time,Most of the time,N/A,2,Most of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,4,5,A little of the time,A little of the time,N/A,4,A little of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,5,5,None of the time,None of the time,N/A,5,None of the time,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10G,DIS_10G_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]",cat,NA::b,5,missing,missing,N/A,else,else,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?", +DIS_10H,DIS_10H_cat5_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,1,5,All of the time,All of the time,N/A,1,All of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,2,5,Most of the time,Most of the time,N/A,2,Most of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,4,5,A little of the time,A little of the time,N/A,4,A little of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,5,5,None of the time,None of the time,N/A,5,None of the time,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DIS_10H,DIS_10H_cat5_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]",cat,NA::b,5,missing,missing,N/A,else,else,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?", +DPS_02,DPS_02_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,1,2,Yes,Yes,N/A,1,Yes,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?", +DPS_02,DPS_02_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,2,2,No,No,N/A,2,No,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?", +DPS_02,DPS_02_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?", +DPS_02,DPS_02_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?", +DPS_02,DPS_02_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02],cat,NA::b,2,missing,missing,N/A,else,else,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?", +DPS_03,DPS_03_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,1,4,All day long,All day long,N/A,1,All day long,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,2,4,Most of the day,Most of the day,N/A,2,Most of the day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,3,4,About half of the day,About half of the day,N/A,3,About half of the day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,4,4,Less than half of a day,Less than half of a day,N/A,4,Less than half of a day,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_03,DPS_03_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03],cat,NA::b,4,missing,missing,N/A,else,else,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?", +DPS_04,DPS_04_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,1,3,Every day,Every day,N/A,1,Every day,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_04,DPS_04_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,2,3,Almost every day,Almost every day,N/A,2,Almost every day,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_04,DPS_04_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,3,3,Less often,Less often,N/A,3,Less often,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_04,DPS_04_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_04,DPS_04_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_04,DPS_04_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04],cat,NA::b,3,missing,missing,N/A,else,else,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?", +DPS_05,DPS_05_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?, +DPS_05,DPS_05_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,2,2,No,No,N/A,2,No,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?, +DPS_05,DPS_05_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?, +DPS_05,DPS_05_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?, +DPS_05,DPS_05_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_05],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - lose interest in things - 2 wk,During those 2 weeks did you lose interest in most things?, +DPS_06,DPS_06_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?, +DPS_06,DPS_06_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,2,2,No,No,N/A,2,No,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?, +DPS_06,DPS_06_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?, +DPS_06,DPS_06_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?, +DPS_06,DPS_06_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_06],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - felt tired out / low on energy - 2 wk,Did you feel tired out or low on energy all of the time?, +DPS_07,DPS_07_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,1,4,Gained weight,Gained weight,N/A,1,Gained weight,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,2,4,Lost weight,Lost weight,N/A,2,Lost weight,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,3,4,Stayed about the same,Stayed about the same,N/A,3,Stayed about the same,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,4,4,Was on a diet,Was on a diet,N/A,4,Was on a diet,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_07,DPS_07_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_07],cat,NA::b,4,missing,missing,N/A,else,else,Sad/depressed - weight change - 2 wk,"Did you gain weight, lose weight or stay about the same?", +DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,copy,N/A,Weight,Weight,N/A,"[1,90]",Weight,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?, +DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::a,N/A,not applicable,not applicable,N/A,996,not applicable,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?, +DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::b,N/A,missing,missing,N/A,"[997,999]",don't know (999.7); refusal (999.8); not stated (999.9),Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?, +DPS_08A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08A],cont,NA::b,N/A,missing,missing,N/A,else,else,Sad/depressed - weight change (amount) - 2 wk,About how much did you gain/lose?, +DPS_08B,DPS_08B_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,1,2,Pounds,Pounds,N/A,1,Pounds,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?, +DPS_08B,DPS_08B_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,2,2,Kilograms,Kilograms,N/A,2,Kilograms,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?, +DPS_08B,DPS_08B_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?, +DPS_08B,DPS_08B_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::b,2,missing,missing,N/A,9,not stated,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?, +DPS_08B,DPS_08B_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_08B],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - weight change (lb/kg) - 2 wk,Interviewer: Was that in pounds or in kilograms?, +DPS_09,DPS_09_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?, +DPS_09,DPS_09_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,2,2,No,No,N/A,2,No,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?, +DPS_09,DPS_09_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?, +DPS_09,DPS_09_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?, +DPS_09,DPS_09_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_09],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - trouble falling asleep - 2 wk,Did you have more trouble falling asleep than you usually do?, +DPS_10,DPS_10_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,1,3,Every night,Every night,N/A,1,Every night,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_10,DPS_10_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,2,3,Nearly every night,Nearly every night,N/A,2,Nearly every night,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_10,DPS_10_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,3,3,Less often,Less often,N/A,3,Less often,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_10,DPS_10_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_10,DPS_10_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_10,DPS_10_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_10],cat,NA::b,3,missing,missing,N/A,else,else,Sad/depressed trouble falling asleep - frequency - 2 wk,"How often did that happen: (every night, nearly every night, or less often)?", +DPS_11,DPS_11_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?, +DPS_11,DPS_11_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,2,2,No,No,N/A,2,No,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?, +DPS_11,DPS_11_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?, +DPS_11,DPS_11_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?, +DPS_11,DPS_11_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_11],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - trouble concentrating - 2 wk,Did you have a lot more trouble concentrating than usual?, +DPS_12,DPS_12_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?", +DPS_12,DPS_12_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,2,2,No,No,N/A,2,No,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?", +DPS_12,DPS_12_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?", +DPS_12,DPS_12_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?", +DPS_12,DPS_12_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_12],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - felt down on self - 2 wk,"At these times, people sometimes feel down on themselves, no good or worthless. Did you feel this way?", +DPS_13,DPS_13_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,1,2,Yes,Yes,N/A,1,Yes,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?", +DPS_13,DPS_13_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,2,2,No,No,N/A,2,No,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?", +DPS_13,DPS_13_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?", +DPS_13,DPS_13_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?", +DPS_13,DPS_13_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_13],cat,NA::b,2,missing,missing,N/A,else,else,Sad/depressed - thought a lot about death - 2 wk,"Did you think a lot about death - either your own, someone elses, or death in general?", +DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,copy,N/A,Number of weeks,Number of weeks,weeks,"[2,53]",Number of week feel this way,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?, +DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::a,N/A,not applicable,not applicable,weeks,96,not applicable,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?, +DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::b,N/A,missing,missing,weeks,"[97,99]",don't know (97); refusal (98); not stated (99),Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?, +DPS_14,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_14],cont,NA::b,N/A,missing,missing,weeks,else,else,Sad/depressed - number of weeks - 12 mo,About how many weeks altogether did you feel this way during the past 12 months?, +DPSDMT,DPSDMT_cat12_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,1,12,January,January,N/A,1,January,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,2,12,February,February,N/A,2,February,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,3,12,March,March,N/A,3,March,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,4,12,April,April,N/A,4,April,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,5,12,May,May,N/A,5,May,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,6,12,June,June,N/A,6,June,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,7,12,July,July,N/A,7,July,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,8,12,August,August,N/A,8,August,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,9,12,September,September,N/A,9,September,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,10,12,October,October,N/A,10,October,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,11,12,November,November,N/A,11,November,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_12,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,12,12,December,December,N/A,12,December,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::a,12,not applicable,not applicable,N/A,96,not applicable,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::b,12,missing,missing,N/A,99,not stated,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDMT,DPSDMT_cat12_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADMT, cchs2003_p::DPSCDMT, cchs2005_p::DPSEDMT, [DPSDMT]",cat,NA::b,12,missing,missing,N/A,else,else,Specific month when felt depressed,Specific month felt depressed - 2 weeks in a row - (D), +DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,copy,N/A,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,N/A,"[0,0.90]",Predicted Probability,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,"Variable was documented as a categorical variable with categories 0, 0.05, 0.25, 0.50, 0.80, 0.90 across all cycles. See documentation for DPSDPP() for more details, or type ?DPSDPP in the console." +DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::a,N/A,not applicable,not applicable,N/A,9.96,not applicable,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability, +DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::b,N/A,missing,missing,N/A,9.99,not stated,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability, +DPSDPP,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]",cont,NA::b,N/A,missing,missing,N/A,else,else,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability, +DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,copy,N/A,Depression Scale - Short Form Score,Depression Scale - Short Form Score,N/A,"[0,8]",Short Form Score,Depression Scale - Short Form Score,Depression Scale - Short Form Score, +DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::a,N/A,not applicable,not applicable,N/A,96,not applicable,Depression Scale - Short Form Score,Depression Scale - Short Form Score, +DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::b,N/A,missing,missing,N/A,99,not stated,Depression Scale - Short Form Score,Depression Scale - Short Form Score, +DPSDSF,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]",cont,NA::b,N/A,missing,missing,N/A,else,else,Depression Scale - Short Form Score,Depression Scale - Short Form Score, +DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,copy,N/A,Number of weeks,Number of weeks,weeks,"[2,53]",Number of weeks felt depressed,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D), +DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::a,N/A,not applicable,not applicable,weeks,96,not applicable,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D), +DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::b,N/A,missing,missing,weeks,99,not stated,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D), +DPSDWK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]",cont,NA::b,N/A,missing,missing,weeks,else,else,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D), +DEPDVSEV,DEPDVSEV_cat6_1,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,1,6,No depression,No depression,N/A,0,No depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D),This module is a validated instrument to measure self-reported depression. It is called PHQ-9 and was developed by Spitzer et al (1999). It was first introduced in the CCHS in 2015. +DEPDVSEV,DEPDVSEV_cat6_2,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,2,6,Minimal depression,Minimal depression,N/A,1,Minimal depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,DEPDVSEV_cat6_3,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,3,6,Mild depression,Mild depression,N/A,2,Mild depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,DEPDVSEV_cat6_4,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,4,6,Moderate depression,Moderate depression,N/A,3,Moderate depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,DEPDVSEV_cat6_5,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,5,6,Moderately severe depression,Moderately severe depression,N/A,4,Moderately severe depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,DEPDVSEV_cat6_6,,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,6,6,Severe depression,Severe depression,N/A,5,Severe depression,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,NA::a,N/A,not applicable,not applicable,N/A,6,not applicable,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,NA::b,N/A,missing,missing,N/A,"[7,9]",not stated,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +DEPDVSEV,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],cat,NA::b,N/A,missing,missing,N/A,else,else,Depression scale - severity of depression - (D),Depression scale - severity of depression - (D), +EDUDR04,EDUDR04_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,1,4,Less than high school,Less than High School,N/A,1,< Than Secondary,Education,Highest level/education - respondent 4 levels - (D),Slight change in wording of categories from CCHS 2011 onwards +EDUDR04,EDUDR04_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,2,4,High school graduate,High School Graduate,N/A,2,Secondary grad,Education,Highest level/education - respondent 4 levels - (D), +EDUDR04,EDUDR04_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,3,4,Some post-secondary education,Some post-secondary education,N/A,3,Other post-sec.,Education,Highest level/education - respondent 4 levels - (D), +EDUDR04,EDUDR04_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,4,4,Post-secondary graduate,Post-secondary graduate,N/A,4,Post-sec. grad,Education,Highest level/education - respondent 4 levels - (D), +EDUDR04,EDUDR04_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Education,Highest level/education - respondent 4 levels - (D), +EDUDR04,EDUDR04_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Education,Highest level/education - respondent 4 levels - (D),CCHS 2001 does not have don't know (7) or refusal (8) +EDUDR04,EDUDR04_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,4,missing,missing,N/A,else,else,Education,Highest level/education - respondent 4 levels - (D), +EDUDR03,EDUDR03_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,1,3,Less than high school,Less than High School,N/A,1,< Than Secondary,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,2,3,High school graduate,High School Graduate,N/A,2,Secondary grad,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,3,3,Post-secondary graduate,Post-secondary graduate,N/A,"[3,4]",Post-sec. grad,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]",cat,NA::b,3,missing,missing,N/A,else,else,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,1,3,Less than high school,Less than High School,N/A,1,< Than Secondary,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,2,3,High school graduate,High School Graduate,N/A,2,Secondary grad,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_3,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,3,3,Post-secondary graduate,Post-secondary graduate,N/A,3,Post-sec. grad,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Education,Highest level/education - respondent 3 levels - (D), +EDUDR03,EDUDR03_cat3_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Education,Highest level/education - respondent 3 levels - (D),CCHS 2015-2018 does not have don't know (7) or refusal (8) +EDUDR03,EDUDR03_cat3_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3",cat,NA::b,3,missing,missing,N/A,else,else,Education,Highest level/education - respondent 3 levels - (D), +energy_exp,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, PAA_045, PAA_050, PAA_075, PAA_080, PAADVDYS, PAADVVIG, PAYDVTOA, PAYDVADL, PAY_105, PAYDVDYS]",N/A,func::energy_exp_fun,N/A,N/A,N/A,N/A,N/A,Daily energy expenditure,Physical Activity,Daily energy expenditure,Used for all cycles. Derived from various physical activity measure for 18+ and 12-17 years old. +energy_exp,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, PAA_045, PAA_050, PAA_075, PAA_080, PAADVDYS, PAADVVIG, PAYDVTOA, PAYDVADL, PAY_105, PAYDVDYS]",N/A,NA::b,N/A,missing,missing,N/A,N/A,Daily energy expenditure,Physical Activity,Daily energy expenditure, +energy_exp,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,copy,N/A,Daily energry expenditure,Daily energry expenditure,N/A,"[0,43.5]",Daily energy expenditure - (D),Physical Activity,Daily energy expenditure, +energy_exp,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::a,N/A,not applicable,not applicable,N/A,99.6,Not applicable,Physical Activity,Daily energy expenditure, +energy_exp,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,N/A,"[99.7,99.9]",don't know (99.7); refusal (99.8); not stated (99.9),Physical Activity,Daily energy expenditure, +energy_exp,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,N/A,else,else,Physical Activity,Daily energy expenditure, +FINF1,FINF1_cat2_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,1,2,Yes,Yes,N/A,1,Yes,Some food insecurity in past 12 months,Some food insecurity in past 12 months, +FINF1,FINF1_cat2_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,2,2,No,No,N/A,2,No,Some food insecurity in past 12 months,Some food insecurity in past 12 months, +FINF1,FINF1_cat2_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Some food insecurity in past 12 months,Some food insecurity in past 12 months, +FINF1,FINF1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Some food insecurity in past 12 months,Some food insecurity in past 12 months, +FINF1,FINF1_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,else,else,Some food insecurity in past 12 months,Some food insecurity in past 12 months, +FLU_160,FLU_160_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]",cat,1,2,Yes,Yes,N/A,1,Yes,Ever had a flu shot,Have you ever had a flu shot?,"In 2007, question was reworded to ""Have you ever had a seasonal flu shot?"" In 2015-2018, question was reworded to ""Have you ever had a seasonal flu shot, excluding the H1N1 flu shot?""" +FLU_160,FLU_160_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]",cat,2,2,No,No,N/A,2,No,Ever had a flu shot,Have you ever had a flu shot?, +FLU_160,FLU_160_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Ever had a flu shot,Have you ever had a flu shot?, +FLU_160,FLU_160_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Ever had a flu shot,Have you ever had a flu shot?, +FLU_160,FLU_160_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]",cat,NA::b,2,missing,missing,N/A,else,else,Ever had a flu shot,Have you ever had a flu shot?, +FLU_162,FLU_162_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,1,3,<1 year ago,<1 year ago,N/A,1,<1 year ago,Last time had flu shot,When did you have your last flu shot?,"In 2015-2018, question was reworded to ""When did you have your last seasonal flu shot?""" +FLU_162,FLU_162_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,2,3,1-<2 years ago,1-<2 years ago,N/A,2,1-<2 years ago,Last time had flu shot,When did you have your last flu shot?, +FLU_162,FLU_162_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,3,3,2 years ago or more,2 years ago or more,N/A,3,2 years ago or more,Last time had flu shot,When did you have your last flu shot?, +FLU_162,FLU_162_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Last time had flu shot,When did you have your last flu shot?, +FLU_162,FLU_162_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Last time had flu shot,When did you have your last flu shot?, +FLU_162,FLU_162_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]",cat,NA::b,3,missing,missing,N/A,else,else,Last time had flu shot,When did you have your last flu shot?, +food_insecurity_der,food_insecurity_der_cat2_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,2,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months,"This variable is derived from FINF1, FSCDHFS, FSCDHFS2 by dichotomizing food insecurity into 2 categories. See ?food_insecurity_der for more details" +food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1",cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_1,cat,cchs2005_p,[FSCEDHFS],cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,0,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,2,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_2,cat,cchs2005_p,[FSCEDHFS],cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,3,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,cchs2005_p,[FSCEDHFS],cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,1,2,No food insecurity,No food insecurity in the last 12 months,N/A,0,No food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,1,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,2,2,Food insecurity,Food insecurity in the last 12 months,N/A,2,Food insecurity in the last 12 months,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +food_insecurity_der,food_insecurity_der_cat2_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::b,2,missing,missing,N/A,else,else,Food insecurity (last 12 months),Derived food insecurity in the last 12 months, +FSCDHFS,FSCDHFS_cat4_0,cat,cchs2005_p,[FSCEDHFS],cat,0,4,Secure,Secure,N/A,0,Secure,Food security,Household food security status - (D),CCHS 2005 has different categories from other CCHS cycles so new variable created +FSCDHFS,FSCDHFS_cat4_1,cat,cchs2005_p,[FSCEDHFS],cat,1,4,Without hunger,Without hunger,N/A,1,Without hunger,Food security,Household food security status - (D), +FSCDHFS,FSCDHFS_cat4_2,cat,cchs2005_p,[FSCEDHFS],cat,2,4,W/mod. hunger,With moderate hunger,N/A,2,With moderate hunger,Food security,Household food security status - (D), +FSCDHFS,FSCDHFS_cat4_3,cat,cchs2005_p,[FSCEDHFS],cat,3,4,W/severe hunger,With severe hunger,N/A,3,With severe hunger,Food security,Household food security status - (D), +FSCDHFS,FSCDHFS_cat4_NA::a,cat,cchs2005_p,[FSCEDHFS],cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Food security,Household food security status - (D), +FSCDHFS,FSCDHFS_cat4_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food security,Household food security status - (D), +FSCDHFS,FSCDHFS_cat4_NA::b,cat,cchs2005_p,[FSCEDHFS],cat,NA::b,4,missing,missing,N/A,else,else,Food security,Household food security status - (D), +FSCDHFS2,FSCDHFS2_cat3_0,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,0,3,Food secure,Food secure,N/A,0,Food secure,Food security,Household Food Security Status (HC), +FSCDHFS2,FSCDHFS2_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,1,3,Mod. food insec.,Mod. food insec.,N/A,1,Moderate food insecurity,Food security,Household Food Security Status (HC), +FSCDHFS2,FSCDHFS2_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,2,3,Sev. food insec.,Sev. food insec.,N/A,2,Severe food insecurity,Food security,Household Food Security Status (HC), +FSCDHFS2,FSCDHFS2_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Food security,Household Food Security Status (HC), +FSCDHFS2,FSCDHFS2_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Food security,Household Food Security Status (HC), +FSCDHFS2,FSCDHFS2_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]",cat,NA::b,3,missing,missing,N/A,else,else,Food security,Household Food Security Status (HC), +FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, cchs2015_2016_p::FVCDVORA, cchs2017_2018_p::FVCDVORA, [FVCDCAR]",cont,copy,N/A,Daily carrots,Daily carrots,N/A,"[0,30]",Daily consumption - carrots - (D),Daily carrots,Daily consumption - carrots - (D),2015 onward changed question to look at all orange-coloured vegetables +FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, cchs2015_2016_p::FVCDVORA, cchs2017_2018_p::FVCDVORA, [FVCDCAR]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily carrots,Daily consumption - carrots - (D), +FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, cchs2015_2016_p::FVCDVORA, cchs2017_2018_p::FVCDVORA, [FVCDCAR]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily carrots,Daily consumption - carrots - (D),"Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS" +FVCDCAR,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, cchs2015_2016_p::FVCDVORA, cchs2017_2018_p::FVCDVORA, [FVCDCAR]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily carrots,Daily consumption - carrots - (D), +FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, cchs2015_2016_p::FVCDVFRU, cchs2017_2018_p::FVCDVFRU, [FVCDFRU]",cont,copy,N/A,Daily fruit,Daily fruit,N/A,"[0,73]",Daily consumption - fruit - (D),Daily fruit,Daily consumption - fruit - (D), +FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, cchs2015_2016_p::FVCDVFRU, cchs2017_2018_p::FVCDVFRU, [FVCDFRU]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily fruit,Daily consumption - fruit - (D), +FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, cchs2015_2016_p::FVCDVFRU, cchs2017_2018_p::FVCDVFRU, [FVCDFRU]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily fruit,Daily consumption - fruit - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +FVCDFRU,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, cchs2015_2016_p::FVCDVFRU, cchs2017_2018_p::FVCDVFRU, [FVCDFRU]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily fruit,Daily consumption - fruit - (D), +FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, cchs2015_2016_p::FVCDVJUI, cchs2017_2018_p::FVCDVJUI, [FVCDJUI]",cont,copy,N/A,Daily juice,Daily juice,N/A,"[0,47]",Daily consumption - fruit juice - (D),Daily juice,Daily consumption - fruit juice - (D), +FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, cchs2015_2016_p::FVCDVJUI, cchs2017_2018_p::FVCDVJUI, [FVCDJUI]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily juice,Daily consumption - fruit juice - (D), +FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, cchs2015_2016_p::FVCDVJUI, cchs2017_2018_p::FVCDVJUI, [FVCDJUI]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily juice,Daily consumption - fruit juice - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +FVCDJUI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, cchs2015_2016_p::FVCDVJUI, cchs2017_2018_p::FVCDVJUI, [FVCDJUI]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily juice,Daily consumption - fruit juice - (D), +FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, cchs2015_2016_p::FVCDVPOT, cchs2017_2018_p::FVCDVPOT, [FVCDPOT]",cont,copy,N/A,Daily potatoes,Daily potatoes,N/A,"[0,30]",Daily consumption - potatoes - (D),Daily potatoes,Daily consumption - potatoes - (D), +FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, cchs2015_2016_p::FVCDVPOT, cchs2017_2018_p::FVCDVPOT, [FVCDPOT]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily potatoes,Daily consumption - potatoes - (D), +FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, cchs2015_2016_p::FVCDVPOT, cchs2017_2018_p::FVCDVPOT, [FVCDPOT]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily potatoes,Daily consumption - potatoes - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +FVCDPOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, cchs2015_2016_p::FVCDVPOT, cchs2017_2018_p::FVCDVPOT, [FVCDPOT]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily potatoes,Daily consumption - potatoes - (D), +FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, cchs2015_2016_p::FVCDVGRN, cchs2017_2018_p::FVCDVGRN, [FVCDSAL]",cont,copy,N/A,Daily salad,Daily salad,N/A,"[0,60]",Daily consumption - green salad - (D),Daily salad,Daily consumption - green salad - (D),2015 onwards changed question to look at dark green vegetables +FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, cchs2015_2016_p::FVCDVGRN, cchs2017_2018_p::FVCDVGRN, [FVCDSAL]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily salad,Daily consumption - green salad - (D), +FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, cchs2015_2016_p::FVCDVGRN, cchs2017_2018_p::FVCDVGRN, [FVCDSAL]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily salad,Daily consumption - green salad - (D),"Don't know (999.7) and refusal (999.8) not included in 2001, 2015-2016, 2017-2018 CCHS" +FVCDSAL,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, cchs2015_2016_p::FVCDVGRN, cchs2017_2018_p::FVCDVGRN, [FVCDSAL]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily salad,Daily consumption - green salad - (D), +FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, cchs2015_2016_p::FVCDVTOT, cchs2017_2018_p::FVCDVTOT, [FVCDTOT]",cont,copy,N/A,Daily total fruits and vegetables,Daily total fruits and vegetables,N/A,"[0,70]",Daily consumption - total fruits and veg. - (D),Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D), +FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D), +FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +FVCDTOT,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, cchs2015_2016_p::FVCDVTOT, cchs2017_2018_p::FVCDVTOT, [FVCDTOT]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D), +FVCDTOT,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FVCDVTOT, cchs2017_2018_p::FVCDVTOT, [FVCDTOT]",cont,NA::a,N/A,not applicable,not applicable,N/A,9999.6,Not applicable,Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D),Not applicable (9999.6) not included in 2015-2016 CCHS +FVCDTOT,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FVCDVTOT, cchs2017_2018_p::FVCDVTOT, [FVCDTOT]",cont,NA::b,N/A,missing,missing,N/A,9999.9,don't know (999.7); refusal (999.8); not stated (999.9),Daily total fruits and vegetables,Daily consumption - total fruits and veg. - (D), +FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, cchs2015_2016_p::FVCDVVEG, cchs2017_2018_p::FVCDVVEG, [FVCDVEG]",cont,copy,N/A,Daily other vegetables,Daily other vegetables,N/A,"[0,30]",Daily consumption other vegetables - (D),Daily other vegetables,Daily consumption other vegetables - (D), +FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, cchs2015_2016_p::FVCDVVEG, cchs2017_2018_p::FVCDVVEG, [FVCDVEG]",cont,NA::a,N/A,not applicable,not applicable,N/A,999.6,Not applicable,Daily other vegetables,Daily consumption other vegetables - (D), +FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, cchs2015_2016_p::FVCDVVEG, cchs2017_2018_p::FVCDVVEG, [FVCDVEG]",cont,NA::b,N/A,missing,missing,N/A,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),Daily other vegetables,Daily consumption other vegetables - (D),Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +FVCDVEG,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, cchs2015_2016_p::FVCDVVEG, cchs2017_2018_p::FVCDVVEG, [FVCDVEG]",cont,NA::b,N/A,missing,missing,N/A,else,else,Daily other vegetables,Daily consumption other vegetables - (D), +GEN_01,GEN_01_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,1,5,Excellent,Excellent,N/A,1,Excellent,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,2,5,Very good,Very good,N/A,2,Very good,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,3,5,Good,Good,N/A,3,Good,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,4,5,Fair,Fair,N/A,4,Fair,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,5,5,Poor,Poor,N/A,5,Poor,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_01,GEN_01_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived health,"In general, would you say your health is (excellent, very good, good, fair or poor)?", +GEN_02A,GEN_02A_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,1,5,Very satisfied,Very satisfied,N/A,1,Very satisfied,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,2,5,Satisfied,Satisfied,N/A,2,Satisfied,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,3,5,Neither satisfied or dissatisfied,Neither satisfied or dissatisfied,N/A,3,Neither satisfied or dissatisfied,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,4,5,Dissatisfied,Dissatisfied,N/A,4,Dissatisfied,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,5,5,Very dissatisfied,Very dissatisfied,N/A,5,Very dissatisfied,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Satisfication with life,How satisfied are you with your life in general, +GEN_02A,GEN_02A_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]",cat,NA::b,5,missing,missing,N/A,else,else,Satisfication with life,How satisfied are you with your life in general, +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,10,5,Very satisfied,Very satisfied,N/A,1,Very satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?","For CCHS cycles 2003-2007, GEN_02A2 was derived from GEN_02A where the values were rescaled to match GEN_02A2" +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,7,5,Satisfied,Satisfied,N/A,2,Satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,5,5,Neither satisfied or dissatisfied,Neither satisfied or dissatisfied,N/A,3,Neither satisfied or dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,2,5,Dissatisfied,Dissatisfied,N/A,4,Dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,0,5,Very dissatisfied,Very dissatisfied,N/A,5,Very dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A",cat,NA::b,5,missing,missing,N/A,else,else,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,0,11,Very dissatisfied,Very dissatisfied,N/A,0,Very dissatisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,1,11,1,1,N/A,1,1,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,2,11,2,2,N/A,2,2,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,3,11,3,3,N/A,3,3,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,4,11,4,4,N/A,4,4,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,5,11,5,5,N/A,5,5,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,6,11,6,6,N/A,6,6,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,7,11,7,7,N/A,7,7,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,8,11,8,8,N/A,8,8,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,9,11,9,9,N/A,9,9,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,10,11,Very satisfied,Very satisfied,N/A,10,Very satisfied,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,NA::a,11,not applicable,not applicable,N/A,96,not applicable,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?",CCHS 2015-2018 does not have not applicable (96) +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,NA::b,11,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02A2,N/A,cont,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]",cat,NA::b,11,missing,missing,N/A,else,else,Satisfaction with life in general,"Using a scale of 0 to 10, where 0 means ""very dissatisfied"" and 10 means ""Very satisfied"", how do you feel about life as a whole right now?", +GEN_02B,GEN_02B_cat5_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,1,5,Excellent,Excellent,N/A,1,Excellent,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,2,5,Very good,Very good,N/A,2,Very good,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,3,5,Good,Good,N/A,3,Good,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,4,5,Fair,Fair,N/A,4,Fair,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,5,5,Poor,Poor,N/A,5,Poor,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_02B,GEN_02B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived mental health,"In general, would you say your mental health is (excellent, very good, good, fair, poor)?", +GEN_07,GEN_07_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,1,5,Not at all,Not at all,N/A,1,Not at all,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,2,5,Not very,Not very,N/A,2,Not very,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,3,5,A bit,A bit,N/A,3,A bit,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,4,5,Quite a bit,Quite a bit,N/A,4,Quite a bit,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,5,5,Extremely,Extremely,N/A,5,Extremely,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?",CCHS 2015-2018 does not have not applicable (6) +GEN_07,GEN_07_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_07,GEN_07_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived life stress,"Thinking about the amount of stress in your life, would you say that most days are (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,1,5,Not at all,Not at all,N/A,1,Not at all,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,2,5,Not very,Not very,N/A,2,Not very,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,3,5,A bit,A bit,N/A,3,A bit,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,4,5,Quite a bit,Quite a bit,N/A,4,Quite a bit,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,5,5,Extremely,Extremely,N/A,5,Extremely,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_09,GEN_09_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]",cat,NA::b,5,missing,missing,N/A,else,else,Self-perceived work stress,"Would you say that most days at work were (not at all stressful, not very stressful, a bit stressful, quite a bit stressful, extremely stressful)?", +GEN_10,GEN_10_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,1,4,Very strong,Very strong,N/A,1,Very strong,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,2,4,Somewhat strong,Somewhat strong,N/A,2,Somewhat strong,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,3,4,Somewhat weak,Somewhat weak,N/A,3,Somewhat weak,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,4,4,Very weak,Very weak,N/A,4,Very weak,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEN_10,GEN_10_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]",cat,NA::b,4,missing,missing,N/A,else,else,Sense of belonging in the community,How would you describe your sense of belonging to your local community?, +GEODPMF,GEODPMF_cat97_1,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10911,97,EASTERN REGIONAL INTEGRATED HA,EASTERN REGIONAL INTEGRATED HA,N/A,10911,EASTERN REGIONAL INTEGRATED HA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_2,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10912,97,CENTRAL REGIONAL INTEGRATED HA,CENTRAL REGIONAL INTEGRATED HA,N/A,10912,CENTRAL REGIONAL INTEGRATED HA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_3,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,10913,97,WESTERN/LABRADOR-GRENFELL REGIONAL HA,WESTERN/LABRADOR-GRENFELL REGIONAL HA,N/A,10913,WESTERN/LABRADOR-GRENFELL REGIONAL HA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_4,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,11901,97,PRINCE EDWARD ISLAND,PRINCE EDWARD ISLAND,N/A,11901,PRINCE EDWARD ISLAND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_5,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12910,97,SOUTH SHORE-SOUTH WEST NOVA,SOUTH SHORE-SOUTH WEST NOVA,N/A,12910,SOUTH SHORE-SOUTH WEST NOVA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_6,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12923,97,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,N/A,12923,ANNAPOLIS VALLEY DISTRICT HEALTH AUT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_7,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12930,97,COLCHESTER EAST HANTS-CUMBERLAND,COLCHESTER EAST HANTS-CUMBERLAND,N/A,12930,COLCHESTER EAST HANTS-CUMBERLAND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_8,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12940,97,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,N/A,12940,PICTOU COUNTY-GUYSBOROUGH ANTIGONISH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_9,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12958,97,CAPE BRETON DISTRICT HEALTH AUTHORITY,CAPE BRETON DISTRICT HEALTH AUTHORITY,N/A,12958,CAPE BRETON DISTRICT HEALTH AUTHORITY,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_10,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,12969,97,CAPITAL DISTRICT HEALTH AUTHORITY,CAPITAL DISTRICT HEALTH AUTHORITY,N/A,12969,CAPITAL DISTRICT HEALTH AUTHORITY,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_11,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13901,97,ZONE 1,ZONE 1,N/A,13901,ZONE 1,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_12,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13902,97,ZONE 2,ZONE 2,N/A,13902,ZONE 2,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_13,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13903,97,ZONE 3,ZONE 3,N/A,13903,ZONE 3,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_14,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13904,97,ZONES 4 AND 5,ZONES 4 AND 5,N/A,13904,ZONES 4 AND 5,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_15,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,13906,97,ZONES 6 AND 7,ZONES 6 AND 7,N/A,13906,ZONES 6 AND 7,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_16,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24901,97,REGION DU BAS-SAINT-LAURENT,REGION DU BAS-SAINT-LAURENT,N/A,24901,REGION DU BAS-SAINT-LAURENT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_17,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24902,97,REGION DU SAGUENAY - LAC-SAINT-JEAN,REGION DU SAGUENAY - LAC-SAINT-JEAN,N/A,24902,REGION DU SAGUENAY - LAC-SAINT-JEAN,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_18,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24903,97,REGION DE LA CAPITALE-NATIONALE,REGION DE LA CAPITALE-NATIONALE,N/A,24903,REGION DE LA CAPITALE-NATIONALE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_19,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24904,97,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,N/A,24904,REGION DE LA MAURICIE-CENTRE-DU-QUEBEC,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_20,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24905,97,REGION DE L'ESTRIE,REGION DE L'ESTRIE,N/A,24905,REGION DE L'ESTRIE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_21,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24906,97,REGION DE MONTREAL,REGION DE MONTREAL,N/A,24906,REGION DE MONTREAL,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_22,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24907,97,REGION DE L'OUTAOUAIS,REGION DE L'OUTAOUAIS,N/A,24907,REGION DE L'OUTAOUAIS,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_23,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24908,97,REGION DE L'ABITIBI-TEMISCAMINGUE,REGION DE L'ABITIBI-TEMISCAMINGUE,N/A,24908,REGION DE L'ABITIBI-TEMISCAMINGUE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_24,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24909,97,REGION DE LA COTE-NORD,REGION DE LA COTE-NORD,N/A,24909,REGION DE LA COTE-NORD,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_25,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24911,97,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,N/A,24911,REG. DE LA GASPESIE-ILES-DE-LA-MADELEINE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_26,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24912,97,REGION DE LA CHAUDIERE-APPALACHES,REGION DE LA CHAUDIERE-APPALACHES,N/A,24912,REGION DE LA CHAUDIERE-APPALACHES,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_27,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24913,97,REGION DE LAVAL,REGION DE LAVAL,N/A,24913,REGION DE LAVAL,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_28,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24914,97,REGION DE LANAUDIERE,REGION DE LANAUDIERE,N/A,24914,REGION DE LANAUDIERE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_29,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24915,97,REGION DES LAURENTIDES,REGION DES LAURENTIDES,N/A,24915,REGION DES LAURENTIDES,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_30,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,24916,97,REGION DE LA MONTEREGIE,REGION DE LA MONTEREGIE,N/A,24916,REGION DE LA MONTEREGIE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_31,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35926,97,DISTRICT OF ALGOMA HEALTH UNIT,DISTRICT OF ALGOMA HEALTH UNIT,N/A,35926,DISTRICT OF ALGOMA HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_32,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35927,97,BRANT COUNTY HEALTH UNIT,BRANT COUNTY HEALTH UNIT,N/A,35927,BRANT COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_33,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35930,97,DURHAM REGIONAL HEALTH UNIT,DURHAM REGIONAL HEALTH UNIT,N/A,35930,DURHAM REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_34,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35931,97,ELGIN-ST THOMAS HEALTH UNIT,ELGIN-ST THOMAS HEALTH UNIT,N/A,35931,ELGIN-ST THOMAS HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_35,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35933,97,GREY BRUCE HEALTH UNIT,GREY BRUCE HEALTH UNIT,N/A,35933,GREY BRUCE HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_36,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35934,97,HALDIMAND-NORFOLK HEALTH UNIT,HALDIMAND-NORFOLK HEALTH UNIT,N/A,35934,HALDIMAND-NORFOLK HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_37,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35935,97,HALIBURTON-KAWARTHA-PINE RIDGE DHU,HALIBURTON-KAWARTHA-PINE RIDGE DHU,N/A,35935,HALIBURTON-KAWARTHA-PINE RIDGE DHU,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_38,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35936,97,HALTON REGIONAL HEALTH UNIT,HALTON REGIONAL HEALTH UNIT,N/A,35936,HALTON REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_39,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35937,97,CITY OF HAMILTON HEALTH UNIT,CITY OF HAMILTON HEALTH UNIT,N/A,35937,CITY OF HAMILTON HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_40,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35938,97,HASTINGS AND PRINCE EDWARD COUNTIES HU,HASTINGS AND PRINCE EDWARD COUNTIES HU,N/A,35938,HASTINGS AND PRINCE EDWARD COUNTIES HU,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_41,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35939,97,HURON AND PERTH HEALTH UNITS,HURON AND PERTH HEALTH UNITS,N/A,35939,HURON AND PERTH HEALTH UNITS,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_42,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35940,97,CHATHAM-KENT HEALTH UNIT,CHATHAM-KENT HEALTH UNIT,N/A,35940,CHATHAM-KENT HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_43,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35941,97,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,N/A,35941,KINGSTON-FRONTENAC-LENNOX-ADDINGTON HU,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_44,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35942,97,LAMBTON HEALTH UNIT,LAMBTON HEALTH UNIT,N/A,35942,LAMBTON HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_45,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35943,97,LEEDS-GRENVILLE-LANARK DHU,LEEDS-GRENVILLE-LANARK DHU,N/A,35943,LEEDS-GRENVILLE-LANARK DHU,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_46,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35944,97,MIDDLESEX-LONDON HEALTH UNIT,MIDDLESEX-LONDON HEALTH UNIT,N/A,35944,MIDDLESEX-LONDON HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_47,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35946,97,NIAGARA REGIONAL AREA HEALTH UNIT,NIAGARA REGIONAL AREA HEALTH UNIT,N/A,35946,NIAGARA REGIONAL AREA HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_48,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35947,97,NORTH BAY AND TIMISKAMING HEALTH UNITS,NORTH BAY AND TIMISKAMING HEALTH UNITS,N/A,35947,NORTH BAY AND TIMISKAMING HEALTH UNITS,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_49,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35949,97,NORTHWESTERN HEALTH UNIT,NORTHWESTERN HEALTH UNIT,N/A,35949,NORTHWESTERN HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_50,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35951,97,CITY OF OTTAWA HEALTH UNIT,CITY OF OTTAWA HEALTH UNIT,N/A,35951,CITY OF OTTAWA HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_51,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35952,97,OXFORD COUNTY HEALTH UNIT,OXFORD COUNTY HEALTH UNIT,N/A,35952,OXFORD COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_52,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35953,97,PEEL REGIONAL HEALTH UNIT,PEEL REGIONAL HEALTH UNIT,N/A,35953,PEEL REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_53,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35955,97,PETERBOROUGH COUNTY-CITY HEALTH UNIT,PETERBOROUGH COUNTY-CITY HEALTH UNIT,N/A,35955,PETERBOROUGH COUNTY-CITY HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_54,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35956,97,PORCUPINE HEALTH UNIT,PORCUPINE HEALTH UNIT,N/A,35956,PORCUPINE HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_55,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35957,97,RENFREW COUNTY AND DISTRICT HEALTH UNIT,RENFREW COUNTY AND DISTRICT HEALTH UNIT,N/A,35957,RENFREW COUNTY AND DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_56,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35958,97,EASTERN ONTARIO HEALTH UNIT,EASTERN ONTARIO HEALTH UNIT,N/A,35958,EASTERN ONTARIO HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_57,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35960,97,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,N/A,35960,SIMCOE MUSKOKA DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_58,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35961,97,SUDBURY AND DISTRICT HEALTH UNIT,SUDBURY AND DISTRICT HEALTH UNIT,N/A,35961,SUDBURY AND DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_59,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35962,97,THUNDER BAY DISTRICT HEALTH UNIT,THUNDER BAY DISTRICT HEALTH UNIT,N/A,35962,THUNDER BAY DISTRICT HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_60,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35965,97,WATERLOO HEALTH UNIT,WATERLOO HEALTH UNIT,N/A,35965,WATERLOO HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_61,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35966,97,WELLINGTON-DUFFERIN-GUELPH HU,WELLINGTON-DUFFERIN-GUELPH HU,N/A,35966,WELLINGTON-DUFFERIN-GUELPH HU,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_62,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35968,97,WINDSOR-ESSEX COUNTY HEALTH UNIT,WINDSOR-ESSEX COUNTY HEALTH UNIT,N/A,35968,WINDSOR-ESSEX COUNTY HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_63,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35970,97,YORK REGIONAL HEALTH UNIT,YORK REGIONAL HEALTH UNIT,N/A,35970,YORK REGIONAL HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_64,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,35995,97,CITY OF TORONTO HEALTH UNIT,CITY OF TORONTO HEALTH UNIT,N/A,35995,CITY OF TORONTO HEALTH UNIT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_65,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46901,97,WINNIPEG RHA,WINNIPEG RHA,N/A,46901,WINNIPEG RHA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_66,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46902,97,PRAIRIE M. HEALTH,PRAIRIE M. HEALTH,N/A,46902,PRAIRIE M. HEALTH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_67,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46903,97,INTERLAKE-EASTERN RHA,INTERLAKE-EASTERN RHA,N/A,46903,INTERLAKE-EASTERN RHA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_68,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46904,97,NORTHEN RHA,NORTHEN RHA,N/A,46904,NORTHEN RHA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_69,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,46905,97,SOUTHEN HEALTH,SOUTHEN HEALTH,N/A,46905,SOUTHEN HEALTH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_70,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47901,97,SUN COUNTRY/FIVE HILLS/CYPRESS,SUN COUNTRY/FIVE HILLS/CYPRESS,N/A,47901,SUN COUNTRY/FIVE HILLS/CYPRESS,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_71,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47904,97,REGINA QU'APPELLE,REGINA QU'APPELLE,N/A,47904,REGINA QU'APPELLE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_72,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47905,97,SUNRISE/KELSEY TRAIL,SUNRISE/KELSEY TRAIL,N/A,47905,SUNRISE/KELSEY TRAIL,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_73,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47906,97,SASKATOON,SASKATOON,N/A,47906,SASKATOON,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_74,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47907,97,HEARTLAND/PRAIRIE NORTH,HEARTLAND/PRAIRIE NORTH,N/A,47907,HEARTLAND/PRAIRIE NORTH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_75,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,47909,97,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,N/A,47909,PRINCE ALBERT/MAMAWETAN/KEEWATIN/ATHABA,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_76,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48931,97,SOUTH ZONE,SOUTH ZONE,N/A,48931,SOUTH ZONE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_77,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48932,97,CALGARY ZONE,CALGARY ZONE,N/A,48932,CALGARY ZONE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_78,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48933,97,CENTRAL ZONE,CENTRAL ZONE,N/A,48933,CENTRAL ZONE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_79,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48934,97,EDMONTON ZONE,EDMONTON ZONE,N/A,48934,EDMONTON ZONE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_80,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,48935,97,NORTH ZONE,NORTH ZONE,N/A,48935,NORTH ZONE,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_81,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59911,97,EAST KOOTENAY,EAST KOOTENAY,N/A,59911,EAST KOOTENAY,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_82,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59912,97,KOOTENAY-BOUNDARY,KOOTENAY-BOUNDARY,N/A,59912,KOOTENAY-BOUNDARY,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_83,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59913,97,OKANAGAN,OKANAGAN,N/A,59913,OKANAGAN,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_84,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59914,97,THOMPSON/CARIBOO,THOMPSON/CARIBOO,N/A,59914,THOMPSON/CARIBOO,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_85,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59921,97,FRASER EAST,FRASER EAST,N/A,59921,FRASER EAST,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_86,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59922,97,FRASER NORTH,FRASER NORTH,N/A,59922,FRASER NORTH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_87,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59923,97,FRASER SOUTH,FRASER SOUTH,N/A,59923,FRASER SOUTH,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_88,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59931,97,RICHMOND,RICHMOND,N/A,59931,RICHMOND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_89,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59932,97,VANCOUVER,VANCOUVER,N/A,59932,VANCOUVER,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_90,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59933,97,NORTH SHORE/COAST GARIBALDI,NORTH SHORE/COAST GARIBALDI,N/A,59933,NORTH SHORE/COAST GARIBALDI,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_91,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59941,97,SOUTH VANCOUVER ISLAND,SOUTH VANCOUVER ISLAND,N/A,59941,SOUTH VANCOUVER ISLAND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_92,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59942,97,CENTRAL VANCOUVER ISLAND,CENTRAL VANCOUVER ISLAND,N/A,59942,CENTRAL VANCOUVER ISLAND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_93,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59943,97,NORTH VANCOUVER ISLAND,NORTH VANCOUVER ISLAND,N/A,59943,NORTH VANCOUVER ISLAND,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_94,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59951,97,NORTHWEST,NORTHWEST,N/A,59951,NORTHWEST,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_95,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59952,97,NORTHERN INTERIOR,NORTHERN INTERIOR,N/A,59952,NORTHERN INTERIOR,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_96,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,59953,97,NORTHEAST,NORTHEAST,N/A,59953,NORTHEAST,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_97,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,60901,97,YUKON/NORTHWEST TERRITORIES/NUNAVUT,YUKON/NORTHWEST TERRITORIES/NUNAVUT,N/A,60901,YUKON/NORTHWEST TERRITORIES/NUNAVUT,Health Region - (G),Health Region - (G), +GEODPMF,GEODPMF_cat97_NA::b,cat,"cchs2013_2014_p, cchs2014_p",[GEODPMF],cat,NA::b,97,missing,missing,N/A,else,else,Health Region - (G),Health Region - (G), +GEOGPRV,GEOGPRV_cat11_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,10,11,NL,Nfld. & Labrador,N/A,10,Nfld. & Labrador,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,11,11,PEI,Prince Edward Island,N/A,11,Prince Edward Island,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,12,11,NS,Nova Scotia,N/A,12,Nova Scotia,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,13,11,NB,New Brunswick,N/A,13,New Brunswick,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,24,11,QC,Quebec,N/A,24,Quebec,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,35,11,ON,Ontario,N/A,35,Ontario,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,46,11,MB,Manitoba,N/A,46,Manitoba,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,47,11,SK,Saskatchewan,N/A,47,Saskatchewan,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,48,11,AB,Alberta,N/A,48,Alberta,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,59,11,BC,British Columbia,N/A,59,British Columbia,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_11,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,60,11,YT/NT/NU,Yukon/NWT/Nunavut,N/A,"[60,62]",Yukon/NWT/Nunavut,Province,Province of residence of respondent - (G),"CCHS2015_2016 and CCHS2017_2018 divides category into Yukon (60), NWT (61), and Nunavut (62)" +GEOGPRV,GEOGPRV_cat11_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,NA::a,11,not applicable,not applicable,N/A,96,not applicable,Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,NA::b,11,missing,missing,N/A,"[97,99]","don't know (97), refusal (98), not stated (99)",Province,Province of residence of respondent - (G), +GEOGPRV,GEOGPRV_cat11_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]",cat,NA::b,11,missing,missing,N/A,else,else,Province,Province of residence of respondent - (G), +HCU_1AA,HCU_1AA_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]",cat,1,2,Yes,Yes (Has regular medical doctor),N/A,1,Yes (Has regular medical doctor),Has regular medical doctor,Do you have a regular medical doctor?,"In 2015-2018, question was reworded to ""Do you have a regular health care provider?""" +HCU_1AA,HCU_1AA_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]",cat,2,2,No,No (Does not have regular medical doctor),N/A,2,No (Does not have regular medical doctor),Has regular medical doctor,Do you have a regular medical doctor?, +HCU_1AA,HCU_1AA_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Has regular medical doctor,Do you have a regular medical doctor?, +HCU_1AA,HCU_1AA_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Has regular medical doctor,Do you have a regular medical doctor?, +HCU_1AA,HCU_1AA_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]",cat,NA::b,2,missing,missing,N/A,else,else,Has regular medical doctor,Do you have a regular medical doctor?, +HUIDCOG,HUIDCOG_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,1,6,No cognit prob,No cognition problems,N/A,1,No cognit prob,Cognition prob. - function code - (D),Cognition prob. - function code - (D),CCHS 2007 onwards uses cognition levels which coincide with HUI Mark 3 +HUIDCOG,HUIDCOG_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,2,6,Little difficult,Little difficulty,N/A,2,Little difficulty,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,3,6,Some forgetful,Some forgetful,N/A,3,Some forgetful,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,4,6,Forget/dif think,Forgetful/difficulty thinking,N/A,4,Forget/dif think,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,5,6,Very forgetful,Very forgetful,N/A,5,Very forgetful,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,6,6,Can't remember,Can't remember,N/A,6,Can't remember,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDCOG,HUIDCOG_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Cognition prob. - function code - (D),Cognition prob. - function code - (D),"CCHS 2001, 2015-2018 does not include don't know (97) or refusal (98)" +HUIDCOG,HUIDCOG_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]",cat,NA::b,6,missing,missing,N/A,else,else,Cognition prob. - function code - (D),Cognition prob. - function code - (D), +HUIDEMO,HUIDEMO_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,1,5,Happy in life,Happy in life,N/A,1,Happy in life,Emotional problems - function code - (D),Emotional problems - function code - (D),CCHS 2007 onwards uses emotional levels which coincide with HUI Mark 3 +HUIDEMO,HUIDEMO_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,2,5,Somewhat happy,Somewhat happy,N/A,2,Somewhat happy,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDEMO,HUIDEMO_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,3,5,Somewhat unhappy,Somewhat unhappy,N/A,3,Somewhat unhappy,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDEMO,HUIDEMO_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,4,5,Very unhappy,Very unhappy,N/A,4,Very unhappy,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDEMO,HUIDEMO_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,5,5,Life not worth,Life not worth,N/A,5,Life not worth,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDEMO,HUIDEMO_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDEMO,HUIDEMO_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Emotional problems - function code - (D),Emotional problems - function code - (D),"CCHS 2001, 2015-2018 does not include don't know (7) or refusal (8)" +HUIDEMO,HUIDEMO_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]",cat,NA::b,5,missing,missing,N/A,else,else,Emotional problems - function code - (D),Emotional problems - function code - (D), +HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,copy,N/A,HUI score,Health Utility Index (HUI3) - (D),N/A,"[-0.359,1]",Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D), +HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::a,N/A,not applicable,not applicable,N/A,99.996,not applicable (99.996),Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D), +HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,N/A,missing,missing,N/A,"[99.997,99.999]","don't know (99.997), refusal (99.998), not stated (99.999)",Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D), +HUIDHSI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,N/A,missing,missing,N/A,else,else,Health Utility Index (HUI3) - (D),Health Utility Index (HUI3) - (D), +HUIDHSI_cat10,HUIDHSI_cat10_1,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,1,10,Decile 1,Decile 1,N/A,"[-0.359,-0.2231)",Decile 1,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_2,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,2,10,Decile 2,Decile 2,N/A,"[-0.2231,-0.0872)",Decile 2,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_3,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,3,10,Decile 3,Decile 3,N/A,"[-0.0872,0.0487)",Decile 3,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_4,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,4,10,Decile 4,Decile 4,N/A,"[0.0487,0.1846)",Decile 4,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_5,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,5,10,Decile 5,Decile 5,N/A,"[0.1846,0.3205)",Decile 5,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_6,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,6,10,Decile 6,Decile 6,N/A,"[0.3205,0.4564)",Decile 6,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_7,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,7,10,Decile 7,Decile 7,N/A,"[0.4564,0.5923)",Decile 7,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_8,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,8,10,Decile 8,Decile 8,N/A,"[0.5923,0.7282)",Decile 8,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_9,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,9,10,Decile 9,Decile 9,N/A,"[0.7282,0.8641)",Decile 9,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_10,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,10,10,Decile 10,Decile 10,N/A,"[0.8641,1]",Decile 10,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_NA::a,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::a,10,not applicable,not applicable,N/A,99.996,not applicable (99.996),Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,10,missing,missing,N/A,"[99.997,99.999]","don't know (99.997), refusal (99.998), not stated (99.999)",Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat10,HUIDHSI_cat10_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,10,missing,missing,N/A,else,else,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_1,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,1,20,Group 1,Group 1,N/A,"[-0.359,-0.29105)",Group 1,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_2,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,2,20,Group 2,Group 2,N/A,"[-0.29105,-0.2231)",Group 2,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_3,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,3,20,Group 3,Group 3,N/A,"[-0.2231,-0.15515)",Group 3,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_4,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,4,20,Group 4,Group 4,N/A,"[-0.15515,-0.0872)",Group 4,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_5,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,5,20,Group 5,Group 5,N/A,"[-0.0872,-0.01925)",Group 5,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_6,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,6,20,Group 6,Group 6,N/A,"[-0.01925,0.0487)",Group 6,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_7,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,7,20,Group 7,Group 7,N/A,"[0.0487,0.11665)",Group 7,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_8,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,8,20,Group 8,Group 8,N/A,"[0.11665,0.1846)",Group 8,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_9,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,9,20,Group 9,Group 9,N/A,"[0.1846,0.25255)",Group 9,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_10,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,10,20,Group 10,Group 10,N/A,"[0.25255,0.3205)",Group 10,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_11,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,11,20,Group 11,Group 11,N/A,"[0.3205,0.38845)",Group 11,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_12,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,12,20,Group 12,Group 12,N/A,"[0.38845,0.4564)",Group 12,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_13,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,13,20,Group 13,Group 13,N/A,"[0.4564,0.52435)",Group 13,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_14,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,14,20,Group 14,Group 14,N/A,"[0.52435,0.5923)",Group 14,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_15,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,15,20,Group 15,Group 15,N/A,"[0.5923,0.66025)",Group 15,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_16,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,16,20,Group 16,Group 16,N/A,"[0.66025,0.7282)",Group 16,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_17,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,17,20,Group 17,Group 17,N/A,"[0.7282,0.79615)",Group 17,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_18,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,18,20,Group 18,Group 18,N/A,"[0.79615,0.8641)",Group 18,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_19,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,19,20,Group 19,Group 19,N/A,"[0.8641,0.93205)",Group 19,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_20,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,20,20,Group 20,Group 20,N/A,"[0.93205,1]",Group 20,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_NA::a,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::a,20,not applicable,not applicable,N/A,99.996,not applicable (99.996),Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,20,missing,missing,N/A,"[99.997,99.999]","don't know (99.997), refusal (99.998), not stated (99.999)",Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat20,HUIDHSI_cat20_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,20,missing,missing,N/A,else,else,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_1,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,1,50,Group 1,Group 1,N/A,"[-0.359,-0.33182)",Group 1,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_2,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,2,50,Group 2,Group 2,N/A,"[-0.33182,-0.30464)",Group 2,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_3,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,3,50,Group 3,Group 3,N/A,"[-0.30464,-0.27746)",Group 3,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_4,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,4,50,Group 4,Group 4,N/A,"[-0.27746,-0.25028)",Group 4,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_5,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,5,50,Group 5,Group 5,N/A,"[-0.25028,-0.2231)",Group 5,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_6,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,6,50,Group 6,Group 6,N/A,"[-0.2231,-0.19592)",Group 6,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_7,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,7,50,Group 7,Group 7,N/A,"[-0.19592,-0.16874)",Group 7,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_8,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,8,50,Group 8,Group 8,N/A,"[-0.16874,-0.14156)",Group 8,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_9,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,9,50,Group 9,Group 9,N/A,"[-0.14156,-0.11438)",Group 9,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_10,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,10,50,Group 10,Group 10,N/A,"[-0.11438,-0.0872)",Group 10,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_11,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,11,50,Group 11,Group 11,N/A,"[-0.0872,-0.06002)",Group 11,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_12,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,12,50,Group 12,Group 12,N/A,"[-0.06002,-0.03284)",Group 12,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_13,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,13,50,Group 13,Group 13,N/A,"[-0.03284,-0.00566000000000004)",Group 13,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_14,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,14,50,Group 14,Group 14,N/A,"[-0.00566000000000004,0.02152)",Group 14,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_15,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,15,50,Group 15,Group 15,N/A,"[0.02152,0.0487)",Group 15,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_16,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,16,50,Group 16,Group 16,N/A,"[0.0487,0.07588)",Group 16,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_17,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,17,50,Group 17,Group 17,N/A,"[0.07588,0.10306)",Group 17,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_18,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,18,50,Group 18,Group 18,N/A,"[0.10306,0.13024)",Group 18,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_19,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,19,50,Group 19,Group 19,N/A,"[0.13024,0.15742)",Group 19,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_20,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,20,50,Group 20,Group 20,N/A,"[0.15742,0.1846)",Group 20,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_21,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,21,50,Group 21,Group 21,N/A,"[0.1846,0.21178)",Group 21,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_22,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,22,50,Group 22,Group 22,N/A,"[0.21178,0.23896)",Group 22,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_23,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,23,50,Group 23,Group 23,N/A,"[0.23896,0.26614)",Group 23,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_24,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,24,50,Group 24,Group 24,N/A,"[0.26614,0.29332)",Group 24,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_25,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,25,50,Group 25,Group 25,N/A,"[0.29332,0.3205)",Group 25,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_26,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,26,50,Group 26,Group 26,N/A,"[0.3205,0.34768)",Group 26,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_27,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,27,50,Group 27,Group 27,N/A,"[0.34768,0.37486)",Group 27,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_28,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,28,50,Group 28,Group 28,N/A,"[0.37486,0.40204)",Group 28,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_29,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,29,50,Group 29,Group 29,N/A,"[0.40204,0.42922)",Group 29,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_30,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,30,50,Group 30,Group 30,N/A,"[0.42922,0.4564)",Group 30,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_31,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,31,50,Group 31,Group 31,N/A,"[0.4564,0.48358)",Group 31,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_32,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,32,50,Group 32,Group 32,N/A,"[0.48358,0.51076)",Group 32,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_33,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,33,50,Group 33,Group 33,N/A,"[0.51076,0.53794)",Group 33,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_34,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,34,50,Group 34,Group 34,N/A,"[0.53794,0.56512)",Group 34,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_35,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,35,50,Group 35,Group 35,N/A,"[0.56512,0.5923)",Group 35,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_36,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,36,50,Group 36,Group 36,N/A,"[0.5923,0.61948)",Group 36,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_37,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,37,50,Group 37,Group 37,N/A,"[0.61948,0.64666)",Group 37,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_38,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,38,50,Group 38,Group 38,N/A,"[0.64666,0.67384)",Group 38,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_39,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,39,50,Group 39,Group 39,N/A,"[0.67384,0.70102)",Group 39,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_40,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,40,50,Group 40,Group 40,N/A,"[0.70102,0.7282)",Group 40,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_41,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,41,50,Group 41,Group 41,N/A,"[0.7282,0.75538)",Group 41,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_42,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,42,50,Group 42,Group 42,N/A,"[0.75538,0.78256)",Group 42,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_43,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,43,50,Group 43,Group 43,N/A,"[0.78256,0.80974)",Group 43,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_44,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,44,50,Group 44,Group 44,N/A,"[0.80974,0.83692)",Group 44,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_45,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,45,50,Group 45,Group 45,N/A,"[0.83692,0.8641)",Group 45,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_46,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,46,50,Group 46,Group 46,N/A,"[0.8641,0.89128)",Group 46,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_47,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,47,50,Group 47,Group 47,N/A,"[0.89128,0.91846)",Group 47,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_48,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,48,50,Group 48,Group 48,N/A,"[0.91846,0.94564)",Group 48,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_49,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,49,50,Group 49,Group 49,N/A,"[0.94564,0.97282)",Group 49,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_50,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,50,50,Group 50,Group 50,N/A,"[0.97282,1]",Group 50,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_NA::a,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::a,50,not applicable,not applicable,N/A,99.996,not applicable (99.996),Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,50,missing,missing,N/A,"[99.997,99.999]","don't know (99.997), refusal (99.998), not stated (99.999)",Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIDHSI_cat50,HUIDHSI_cat50_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]",cont,NA::b,50,missing,missing,N/A,else,else,Categorical Health Utility Index (HUI3),Categorical Health Utility Index (HUI3), +HUIGDEX,HUIGDEX_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,1,3,No dext prob,No problems,N/A,1,No dext prob,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)", +HUIGDEX,HUIGDEX_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,2,3,Dext/no help,No help needed,N/A,2,Dext/no help,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)", +HUIGDEX,HUIGDEX_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,3,3,Dext/need help,Needs help,N/A,3,Dext/need help,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)", +HUIGDEX,HUIGDEX_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)", +HUIGDEX,HUIGDEX_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8) +HUIGDEX,HUIGDEX_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]",cat,NA::b,3,missing,missing,N/A,else,else,"Dexterity trouble - function code (D, G)","Dexterity trouble - function code (D, G)", +HUIGHER,HUIGHER_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,1,3,No hearing prob,No hearing problem,N/A,1,No hearing prob,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)", +HUIGHER,HUIGHER_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,2,3,Hear corrected,Hearing corrected,N/A,2,Hear corrected,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)", +HUIGHER,HUIGHER_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,3,3,Hear n-corrected,Hearing not-corrected,N/A,3,Hear n-corrected,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)", +HUIGHER,HUIGHER_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)", +HUIGHER,HUIGHER_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8) +HUIGHER,HUIGHER_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]",cat,NA::b,3,missing,missing,N/A,else,else,"Hearing problems - function code (D, G)","Hearing problems - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,1,4,No mobil. Prob.,No mobil. Prob.,N/A,1,No mobil. Prob.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,2,4,Mob-no aid req.,Mob-no aid req.,N/A,2,Mob-no aid req.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,3,4,Need mech supp.,Need mech supp.,N/A,3,Need mech supp.,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,4,4,Can't walk,Can't walk,N/A,4,Can't walk,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGMOB,HUIGMOB_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)",CCHS 2001 does not include don't know (7) or refusal (8) +HUIGMOB,HUIGMOB_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]",cat,NA::b,4,missing,missing,N/A,else,else,"Mobility trouble - function code (D, G)","Mobility trouble - function code (D, G)", +HUIGSPE,HUIGSPE_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]",cat,1,2,No speech prob,No speech problem,N/A,1,No speech prob,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)", +HUIGSPE,HUIGSPE_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]",cat,2,2,Part/not underst,Part/not underst,N/A,2,Part/not underst,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)", +HUIGSPE,HUIGSPE_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)", +HUIGSPE,HUIGSPE_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)",CCHS 2001 does not include don't know (7) or refusal (8) +HUIGSPE,HUIGSPE_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]",cat,NA::b,2,missing,missing,N/A,else,else,"Speech trouble - function code - (D, G)","Speech trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,1,5,No visual probl.,No visual problems,N/A,1,No visual probl.,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,2,5,Corr. by lenses,Corrected by lenses,N/A,2,Corr. by lenses,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,3,5,Hypermet/n corr,Hypermetropia/no correction,N/A,3,Hypermet/n corr,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,4,5,Myopia/n corr,Myopia/no correction,N/A,4,Myopia/n corr,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,5,5,Myopia & hypermet,Myopia & hypermetropia,N/A,5,Myopia & hypermet,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUIGVIS,HUIGVIS_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)",CCHS 2001 does not include don't know (7) or refusal (8) +HUIGVIS,HUIGVIS_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]",cat,NA::b,5,missing,missing,N/A,else,else,"Vision trouble - function code - (D, G)","Vision trouble - function code - (D, G)", +HUPDPAD,HUPDPAD_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,1,5,No pain/discomf,No pain/discomf,N/A,1,No pain/discomf,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,2,5,Doesn't prev act,Doesn't prev act,N/A,2,Doesn't prev act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,3,5,Prevents few act,Prevents few act,N/A,3,Prevents few act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,4,5,Prev. some act,Prev. some act,N/A,4,Prev. some act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,5,5,Prev. most act,Prev. most act,N/A,5,Prev. most act,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HUPDPAD,HUPDPAD_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D),CCHS 2001 does not include don't know (7) or refusal (8) +HUPDPAD,HUPDPAD_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]",cat,NA::b,5,missing,missing,N/A,else,else,Act. prevent/pain - function code - (D),Act. prevent/pain - function code - (D), +HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, cchs2015_2016_p::HWTDGBMI, cchs2017_2018_p::HWTDGBMI, [HWTGBMI]",cont,copy,N/A,BMI,Body Mass Index,kg/m2,"[11.91,57.9]","BMI / self-report - (D,G)",BMI,"BMI / self-report - (D,G)","CCHS 2001 restricts BMI to ages 20-64. CCHS 2015-2016 uses adjusted BMI. Consider using using HWTGBMI_der for the most concistent BMI variable across all CCHS cycles. See documentation for BMI_fun() in derived variables for more details, or type ?BMI_fun in the console." +HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI",cont,NA::a,N/A,not applicable,not applicable,kg/m2,999.6,Not applicable,BMI,"BMI / self-report - (D,G)","CCHS 2001 and 2003 codes not applicable and missing variables as 999.6 and 999.7-999.9 respectively, while CCHS 2005 onwards codes not applicable and missing variables as 999.96 and 999.7-999.99 respectively" +HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI",cont,NA::b,N/A,missing,missing,kg/m2,"[999.7,999.9]",don't know (999.7); refusal (999.8); not stated (999.9),BMI,"BMI / self-report - (D,G)",Don't know (999.7) and refusal (999.8) not included in 2001 CCHS +HWTGBMI,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGBMI, cchs2015_2016_p::HWTDGBMI, cchs2017_2018_p::HWTDGBMI, [HWTGBMI]",cont,NA::a,N/A,not applicable,not applicable,kg/m2,999.96,Not applicable,BMI,"BMI / self-report - (D,G)", +HWTGBMI,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGBMI, cchs2015_2016_p::HWTDGBMI, cchs2017_2018_p::HWTDGBMI, [HWTGBMI]",cont,NA::b,N/A,missing,missing,kg/m2,"[999.97,999.99]",don't know (999.97); refusal (999.98); not stated (999.99),BMI,"BMI / self-report - (D,G)", +HWTGBMI,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, cchs2015_2016_p::HWTDGBMI, cchs2017_2018_p::HWTDGBMI, [HWTGBMI]",cont,NA::b,N/A,missing,missing,kg/m2,else,else,BMI,"BMI / self-report - (D,G)", +HWTGBMI_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[HWTGHTM, HWTGWTK]",N/A,Func::bmi_fun,N/A,N/A,N/A,kg/m2,N/A,N/A,Derived BMI,Derived Body Mass Index,"BMI variable derived from the harmonized height and weight variables. See documentation for BMI_fun() in derived variables for more details, or type ?BMI_fun in the console." +HWTGBMI_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[HWTGHTM, HWTGWTK]",N/A,NA::b,N/A,missing,missing,kg/m2,N/A,N/A,Derived BMI,Derived Body Mass Index, +HWTGBMI_der_cat4,HWTGBMI_der_cat4N/A_Func::bmi_fun_cat,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,Func::bmi_fun_cat,N/A,N/A,N/A,N/A,N/A,N/A,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,1,4,Underweight,Underweight with BMI less than 18.5,kg/m2,1,Underweight,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,2,4,Normal weight,Normal weight with BMI between 18.5 and 25,kg/m2,2,Normal weight,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,3,4,Overweight,Overweight with BMI between 25 and 30,kg/m2,3,Overweight,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,4,4,Obese,Obese with BMI greater than 30,kg/m2,4,Obese,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,NA::a,4,not applicable,not applicable,kg/m2,NA::a,not applicable,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGBMI_der_cat4,HWTGBMI_der_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],N/A,NA::b,4,missing,missing,kg/m2,NA::b,missing,Categorical BMI (int'l),Categorical body mass index (international standard), +HWTGCOR,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[HWTDGCOR],N/A,copy,N/A,Adjusted BMI,Adjusted body mass index,kg/m2,"[14.23,56.72]",Adjusted BMI,Adjusted BMI,Adjusted body mass index, +HWTGCOR,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[HWTDGCOR],N/A,NA::a,N/A,not applicable,not applicable,kg/m2,999.96,Not applicable,Adjusted BMI,Adjusted body mass index, +HWTGCOR,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[HWTDGCOR],N/A,NA::b,N/A,missing,missing,kg/m2,"[999.97,999.99]",don't know (999.97); refusal (999.98); not stated (999.99),Adjusted BMI,Adjusted body mass index, +HWTGCOR,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[HWTDGCOR],N/A,NA::b,N/A,missing,missing,kg/m2,else,else,Adjusted BMI,Adjusted body mass index, +HWTGCOR_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, HWTGHTM, HWTGWTK]",N/A,Func::adjusted_bmi_fun,N/A,N/A,N/A,kg/m2,N/A,N/A,Derived adjusted BMI,Derived adjusted body mass index,"Adjusted BMI variable derived from the harmonized sex, height and weight variables. See documentation for adjusted_bmi_fun() in derived variables for more details, or type ?adjusted_bmi_fun in the console." +HWTGCOR_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX,HWTGHTM, HWTGWTK]",N/A,NA::b,N/A,missing,missing,kg/m2,N/A,N/A,Derived adjusted BMI,Derived adjusted body mass index, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.118,N/A,Height,converted height (3'8 IN - 44 inches),meters,1,3'8 IN - 44 inches,Height,Height,"2001 and 2003 CCHS use inches, values converted to meters to 3 decimal points" +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.143,N/A,Height,converted height (3'9 IN - 45 inches),meters,2,3'9 IN - 45 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.168,N/A,Height,converted height (3'10 IN - 46 inches),meters,3,3'10 IN - 46 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.194,N/A,Height,converted height (3'11 IN - 47 inches),meters,4,3'11 IN - 47 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.219,N/A,Height,converted height (4'0 IN - 48 inches),meters,5,4'0 IN - 48 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.245,N/A,Height,converted height (4'1 IN - 49 inches),meters,6,4'1 IN - 49 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.27,N/A,Height,converted height (4'2 IN - 50 inches),meters,7,4'2 IN - 50 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.295,N/A,Height,converted height (4'3 IN - 51 inches),meters,8,4'3 IN - 51 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.321,N/A,Height,converted height (4'4 IN - 52 inches),meters,9,4'4 IN - 52 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.346,N/A,Height,converted height (4'5 IN - 53 inches),meters,10,4'5 IN - 53 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.372,N/A,Height,converted height (4'6 IN - 54 inches),meters,11,4'6 IN - 54 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.397,N/A,Height,converted height (4'7 IN - 55 inches),meters,12,4'7 IN - 55 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.422,N/A,Height,converted height (4'8 IN - 56 inches),meters,13,4'8 IN - 56 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.448,N/A,Height,converted height (4'9 IN - 57 inches),meters,14,4'9 IN - 57 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.473,N/A,Height,converted height (4'10 IN - 58 inches),meters,15,4'10 IN - 58 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.499,N/A,Height,converted height (4'11 in - 59 inches),meters,16,4'11 in - 59 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.524,N/A,Height,converted height (5'0 IN - 60 inches),meters,17,5'0 IN - 60 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.549,N/A,Height,converted height (5'1 IN - 61 inches),meters,18,5'1 IN - 61 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.575,N/A,Height,converted height (5'2 IN - 62 inches),meters,19,5'2 IN - 62 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.6,N/A,Height,converted height (5'3 IN - 63 inches),meters,20,5'3 IN - 63 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.626,N/A,Height,converted height (5'4 IN - 64 inches),meters,21,5'4 IN - 64 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.651,N/A,Height,converted height (5'5 IN - 65 inches),meters,22,5'5 IN - 65 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.676,N/A,Height,converted height (5'6 IN - 66 inches),meters,23,5'6 IN - 66 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.702,N/A,Height,converted height (5'7 IN - 67 inches),meters,24,5'7 IN - 67 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.727,N/A,Height,converted height (5'8 IN - 68 inches),meters,25,5'8 IN - 68 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.753,N/A,Height,converted height (5'9 IN - 69 inches),meters,26,5'9 IN - 69 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.778,N/A,Height,converted height (5'10 IN - 70 inches),meters,27,5'10 IN - 70 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.803,N/A,Height,converted height (5'11 IN - 71 inches),meters,28,5'11 IN - 71 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.829,N/A,Height,converted height (6'0 IN - 72 inches),meters,29,6'0 IN - 72 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.854,N/A,Height,converted height (6'1 IN - 73 inches),meters,30,6'1 IN - 73 inches,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,1.93,N/A,Height,converted height (6'2 IN+ - 74+ inches),meters,31,6'2 IN+ - 74+ inches,Height,Height,74+ inches converted to 76 inches +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::a,N/A,not applicable,not applicable,meters,96,not applicable,Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::b,N/A,missing,missing,meters,99,not stated (99),Height,Height, +HWTGHTM,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT",cat,NA::b,N/A,missing,missing,meters,else,else,Height,Height, +HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGHTM, cchs2015_2016_p::HWTDGHTM, cchs2017_2018_p::HWTDGHTM, [HWTGHTM]",cont,copy,N/A,Height,Height,meters,"[0.914,2.134]",Height,Height,"Height (metres)/self-reported - (D,G)",Height is a reported in meters from 2005 CCHS onwards +HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGHTM, cchs2015_2016_p::HWTDGHTM, cchs2017_2018_p::HWTDGHTM, [HWTGHTM]",cont,NA::a,N/A,not applicable,not applicable,meters,9.996,not applicable,Height,"Height (metres)/self-reported - (D,G)", +HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGHTM, cchs2015_2016_p::HWTDGHTM, cchs2017_2018_p::HWTDGHTM, [HWTGHTM]",cont,NA::b,N/A,missing,missing,meters,"[9.997,9.999]","don't know (9.997), refusal (9.998), not stated (9.999)",Height,"Height (metres)/self-reported - (D,G)", +HWTGHTM,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::HWTEGHTM, cchs2015_2016_p::HWTDGHTM, cchs2017_2018_p::HWTDGHTM, [HWTGHTM]",cont,NA::b,N/A,missing,missing,meters,else,else,Height,"Height (metres)/self-reported - (D,G)", +HWTGWTK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, cchs2015_2016_p::HWTDGWTK, cchs2017_2018_p::HWTDGWTK, [HWTGWTK]",cont,copy,N/A,Weight,Weight - kilograms,kg,"[27.0,135.0]","Weight - kilograms (D, G)",Weight,"Weight - kilograms (D, G)", +HWTGWTK,N/A,cont,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGWTK, cchs2005_p::HWTEGWTK, cchs2015_2016_p::HWTDGWTK, cchs2017_2018_p::HWTDGWTK, [HWTGWTK]",cont,NA::a,N/A,not applicable,not applicable,kg,999.96,not applicable,Weight,"Weight - kilograms (D, G)", +HWTGWTK,N/A,cont,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGWTK, cchs2005_p::HWTEGWTK, cchs2015_2016_p::HWTDGWTK, cchs2017_2018_p::HWTDGWTK, [HWTGWTK]",cont,NA::b,N/A,missing,missing,kg,"[999.97,999.99]",don't know (999.97); refusal (999.98); not stated (999.99),Weight,"Weight - kilograms (D, G)", +HWTGWTK,N/A,cont,cchs2003_p,cchs2003_p::HWTCGWTK,cont,NA::a,N/A,not applicable,not applicable,kg,996,not applicable,Weight,"Weight - kilograms (D, G)", +HWTGWTK,N/A,cont,cchs2003_p,cchs2003_p::HWTCGWTK,cont,NA::b,N/A,missing,missing,kg,"[997,999]",don't know (997); refusal (998); not stated (999),Weight,"Weight - kilograms (D, G)", +HWTGWTK,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, cchs2015_2016_p::HWTDGWTK, cchs2017_2018_p::HWTDGWTK, [HWTGWTK]",cont,NA::b,N/A,missing,missing,kg,else,else,Weight,"Weight - kilograms (D, G)", +id_year,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[data_name, ADM_RNO]",N/A,id_from::unite,N/A,N/A,N/A,N/A,N/A,N/A,Unique ID,Unique ID,Variable appends data_name to sequential random number to generate a unique identifier for all respondents +immigration_der,immigration_derN/A_Func::immigration_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,Func::immigration_fun,N/A,N/A,N/A,N/A,N/A,N/A,Immigration category,Immigration category,"Derived from SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES" +immigration_der,immigration_der_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,1,6,White Canada-born,White Canada-born,N/A,1,White Canada-born,Immigration category,Immigration category, +immigration_der,immigration_der_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,2,6,Non-white Canadian born,Non-white Canadian born,N/A,2,Non-white Canadian born,Immigration category,Immigration category, +immigration_der,immigration_der_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,3,6,White immigrant born outside of Canada (0-9 years in Canada),White immigrant born outside of Canada (0-9 years in Canada),N/A,3,White immigrant born outside of Canada (0-9 years in Canada),Immigration category,Immigration category, +immigration_der,immigration_der_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,4,6,Non-white immigrant born outside of Canada (0-9 years in Canada),Non-white immigrant born outside of Canada (0-9 years in Canada),N/A,4,Non-white immigrant born outside of Canada (0-9 years in Canada),Immigration category,Immigration category, +immigration_der,immigration_der_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,5,6,White immigrant born outside of Canada (10+ years in Canada),White immigrant born outside of Canada (10+ years in Canada),N/A,5,White immigrant born outside of Canada (10+ years in Canada),Immigration category,Immigration category, +immigration_der,immigration_der_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,6,6,Non-white immigrant born outside of Canada (10+ years in Canada),Non-white immigrant born outside of Canada (10+ years in Canada),N/A,6,Non-white immigrant born outside of Canada (10+ years in Canada),Immigration category,Immigration category, +immigration_der,immigration_der_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,NA::a,6,not applicable,not applicable,N/A,NA::a,not applicable,Immigration category,Immigration category, +immigration_der,immigration_der_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]",N/A,NA::b,6,missing,missing,N/A,NA::b,missing,Immigration category,Immigration category, +INCDRCA,INCDRCA_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,1,10,Decile 1,Decile 1,N/A,1,Decile 1,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,2,10,Decile 2,Decile 2,N/A,2,Decile 2,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,3,10,Decile 3,Decile 3,N/A,3,Decile 3,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,4,10,Decile 4,Decile 4,N/A,4,Decile 4,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,5,10,Decile 5,Decile 5,N/A,5,Decile 5,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,6,10,Decile 6,Decile 6,N/A,6,Decile 6,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,7,10,Decile 7,Decile 7,N/A,7,Decile 7,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,8,10,Decile 8,Decile 8,N/A,8,Decile 8,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,9,10,Decile 9,Decile 9,N/A,9,Decile 9,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,10,10,Decile 10,Decile 10,N/A,10,Decile 10,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution,Household income distribution - (D), +INCDRCA,INCDRCA_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution,Household income distribution - (D), +INCDRPR,INCDRPR_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,1,10,Decile 1,Decile 1,N/A,1,Decile 1,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,2,10,Decile 2,Decile 2,N/A,2,Decile 2,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,3,10,Decile 3,Decile 3,N/A,3,Decile 3,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,4,10,Decile 4,Decile 4,N/A,4,Decile 4,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,5,10,Decile 5,Decile 5,N/A,5,Decile 5,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,6,10,Decile 6,Decile 6,N/A,6,Decile 6,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,7,10,Decile 7,Decile 7,N/A,7,Decile 7,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,8,10,Decile 8,Decile 8,N/A,8,Decile 8,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,9,10,Decile 9,Decile 9,N/A,9,Decile 9,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,10,10,Decile 10,Decile 10,N/A,10,Decile 10,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRPR,INCDRPR_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution provincial level,household inc. distribution-prov. level - (D), +INCDRRS,INCDRRS_cat10_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,1,10,Decile 1,Decile 1,N/A,1,Decile 1,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,2,10,Decile 2,Decile 2,N/A,2,Decile 2,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,3,10,Decile 3,Decile 3,N/A,3,Decile 3,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,4,10,Decile 4,Decile 4,N/A,4,Decile 4,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,5,10,Decile 5,Decile 5,N/A,5,Decile 5,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,6,10,Decile 6,Decile 6,N/A,6,Decile 6,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,7,10,Decile 7,Decile 7,N/A,7,Decile 7,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,8,10,Decile 8,Decile 8,N/A,8,Decile 8,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,9,10,Decile 9,Decile 9,N/A,9,Decile 9,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,10,10,Decile 10,Decile 10,N/A,10,Decile 10,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,NA::a,10,not applicable,not applicable,N/A,96,not applicable,Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,NA::b,10,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Household income distribution health region level,household inc. distribution- hr level - (D), +INCDRRS,INCDRRS_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]",cat,NA::b,10,missing,missing,N/A,else,else,Household income distribution health region level,household inc. distribution- hr level - (D), +INCGHH_A,INCGHH_A_cat6_1,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,1,6,No income,No income,$/year,1,No income,Household income,"Total household income from all sources (D, G)","CCHS 2001 classifies no income and less than $15,000 as separate categories" +INCGHH_A,INCGHH_A_cat6_2,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,2,6,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_3,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,3,6,"$15,000-29,999","$15,000-29,999",$/year,3,"$15,000-29,999",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_4,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,4,6,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_5,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,5,6,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_6,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,6,6,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_NA::a,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::a,6,not applicable,not applicable,$/year,96,not applicable,Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_NA::b,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,6,missing,missing,$/year,"[97,99]","don't know (97), refusal (98), not stated (99)",Household income,"Total household income from all sources (D, G)", +INCGHH_A,INCGHH_A_cat6_NA::b,cat,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,6,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_1,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,1,5,"No income or less than $15,000","No income or less than $15,000",$/year,1,"No income or less than $15,000",Household income,"Total household income from all sources (D, G)","CCHS 2003 and 2005 classifies no income and less than $15,000 as one category" +INCGHH_B,INCGHH_B_cat5_2,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,2,5,"$15,000-29,999","$15,000-29,999",$/year,2,"$15,000-29,999",Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_3,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,3,5,"$30,000-$49,999","$30,000-$49,999",$/year,3,"$30,000-$49,999",Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_4,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,4,5,"$50,000-$79,999","$50,000-$79,999",$/year,4,"$50,000-$79,999",Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_5,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,5,5,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_NA::a,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::a,5,not applicable,not applicable,$/year,6,not applicable,Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,5,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,"Total household income from all sources (D, G)", +INCGHH_B,INCGHH_B_cat5_NA::b,cat,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,5,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,1,5,"No income or less than $20,000","No income or less than $20,000",$/year,1,"No income or less than $20,000",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,2,5,"$20,000-39,999","$20,000-39,999",$/year,2,"$20,000-39,999",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,3,5,"$40,000-$59,999","$40,000-$59,999",$/year,3,"$40,000-$59,999",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,4,5,"$60,000-$79,999","$60,000-$79,999",$/year,4,"$60,000-$79,999",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,5,5,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::a,5,not applicable,not applicable,$/year,6,not applicable,Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::b,5,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,"Total household income from all sources (D, G)", +INCGHH_C,INCGHH_C_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::b,5,missing,missing,$/year,else,else,Household income,"Total household income from all sources (D, G)", +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,7500,N/A,No income,No income,$/year,1,No income,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,7500,N/A,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,22500,N/A,"$15,000-29,999","$15,000-29,999",$/year,3,"$15,000-29,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,40000,N/A,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,60000,N/A,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::a,N/A,not applicable,not applicable,$/year,96,not applicable,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,N/A,missing,missing,$/year,"[97,99]","don't know (97), refusal (98), not stated (99)",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,cchs2001_p,cchs2001_p::INCAGHH,cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,7500,N/A,"No income or less than $15,000","No income or less than $15,000",$/year,1,"No income or less than $15,000",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,22500,N/A,"$15,000-29,999","$15,000-29,999",$/year,2,"$15,000-29,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,40000,N/A,"$30,000-$49,999","$30,000-$49,999",$/year,3,"$30,000-$49,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,60000,N/A,"$50,000-$79,999","$50,000-$79,999",$/year,4,"$50,000-$79,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::a,N/A,not applicable,not applicable,$/year,6,not applicable,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,N/A,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH",cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,10000,N/A,"No income or less than $20,000","No income or less than $20,000",$/year,1,"No income or less than $20,000",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,30000,N/A,"$20,000-39,999","$20,000-39,999",$/year,2,"$20,000-39,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,50000,N/A,"$40,000-$59,999","$40,000-$59,999",$/year,3,"$40,000-$59,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,70000,N/A,"$60,000-$79,999","$60,000-$79,999",$/year,4,"$60,000-$79,999",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,5,"$80,000 or more",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::a,N/A,not applicable,not applicable,$/year,6,not applicable,Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::b,N/A,missing,missing,$/year,"[7,9]","don't know (7), refusal (8), not stated (9)",Household income,Total household income from all sources - continuous, +INCGHH_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]",cat,NA::b,N/A,missing,missing,$/year,else,else,Household income,Total household income from all sources - continuous, +INCGPER_A,INCGPER_A_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,1,6,No income,No income,$/year,1,No income,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,2,6,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,3,6,"$15,000-$29,999","$15,000-$29,999",$/year,3,"$15,000-$29,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,4,6,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,5,6,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,6,6,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::a,6,not applicable,not applicable,$/year,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_A,INCGPER_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,6,missing,missing,$/year,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G)",CCHS 2001 missing 97 (don't know) and 98 (refusal) +INCGPER_A,INCGPER_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,6,missing,missing,$/year,else,else,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,1,6,No income,No income,$/year,1,No income,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,2,6,"Less than $20,000","Less than $20,000",$/year,2,"Less than $20,000",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,3,6,"$20,000-$39,999","$20,000-$39,999",$/year,3,"$20,000-$39,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,4,6,"$40,000-$59,999","$40,000-$59,999",$/year,4,"$40,000-$59,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,5,6,"$60,000-$79,999","$60,000-$79,999",$/year,5,"$60,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_6,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,6,6,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::a,6,not applicable,not applicable,$/year,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::b,6,missing,missing,$/year,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_B,INCGPER_B_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::b,6,missing,missing,$/year,else,else,Personal income,"Total pers. inc. from all sources (D, G)", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,0,N/A,No income,No income,$/year,1,No income,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,7500,N/A,"Less than $15,000","Less than $15,000",$/year,2,"Less than $15,000",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,22500,N/A,"$15,000-$29,999","$15,000-$29,999",$/year,3,"$15,000-$29,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,40000,N/A,"$30,000-$49,999","$30,000-$49,999",$/year,4,"$30,000-$49,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,60000,N/A,"$50,000-$79,999","$50,000-$79,999",$/year,5,"$50,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::a,N/A,not applicable,not applicable,$/year,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,N/A,missing,missing,$/year,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER",cat,NA::b,N/A,missing,missing,$/year,else,else,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,0,N/A,No income,No income,$/year,1,No income,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,10000,N/A,"Less than $20,000","Less than $20,000",$/year,2,"Less than $20,000",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,30000,N/A,"$20,000-$39,999","$20,000-$39,999",$/year,3,"$20,000-$39,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,50000,N/A,"$40,000-$59,999","$40,000-$59,999",$/year,4,"$40,000-$59,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,70000,N/A,"$60,000-$79,999","$60,000-$79,999",$/year,5,"$60,000-$79,999",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,100000,N/A,"$80,000 or more","$80,000 or more",$/year,6,"$80,000 or more",Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::a,N/A,not applicable,not applicable,$/year,96,not applicable,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::b,N/A,missing,missing,$/year,"[97,99]",don't know (97); refusal (98); not stated (99),Personal income,"Total pers. inc. from all sources (D, G) - continuous", +INCGPER_cont,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]",cat,NA::b,N/A,missing,missing,$/year,else,else,Personal income,"Total pers. inc. from all sources (D, G) - continuous", +LBFA_31A,LBFA_31A_cat9_1,cat,cchs2001_p,[LBFA_31A],cat,1,9,Management,Management,N/A,1,Management,Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_2,cat,cchs2001_p,[LBFA_31A],cat,2,9,Professional (including accountants),Professional (including accountants),N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_3,cat,cchs2001_p,[LBFA_31A],cat,3,9,"Technologist, Technician or Tech Occ","Technologist, Technician or Tech Occ",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_4,cat,cchs2001_p,[LBFA_31A],cat,4,9,"Administrative, Financial or Clerical","Administrative, Financial or Clerical",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_5,cat,cchs2001_p,[LBFA_31A],cat,5,9,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_6,cat,cchs2001_p,[LBFA_31A],cat,6,9,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_7,cat,cchs2001_p,[LBFA_31A],cat,7,9,"Farming, Forestry, Fishing, Mining","Farming, Forestry, Fishing, Mining",N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_8,cat,cchs2001_p,[LBFA_31A],cat,8,9,"Processing, Manufacturing, Utilities","Processing, Manufacturing, Utilities",N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_9,cat,cchs2001_p,[LBFA_31A],cat,9,9,Other,Other,N/A,9,Other,Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,9,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,9,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?, +LBFA_31A,LBFA_31A_cat9_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,9,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,"Management, Health, Education, Art, Culture",Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,2,5,"Business, Finance, Admin","Business, Finance, Admin",N/A,2,"Business, Finance, Admin",Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,3,5,Sales or Service,Sales or Service,N/A,3,Sales or Service,Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,4,5,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,4,"Trades, Transport or Equipment Operator",Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,5,Unique to Prim. Ind./Proc./Manu.,Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::b,5,missing,missing,N/A,9,not stated,Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::b,5,missing,missing,N/A,else,else,Occupation,Occupation group - (G), +LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,Management,Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2014" +LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2015" +LBFA_31A_a,LBFA_31A_a_cat5_1,cat,cchs2001_p,[LBFA_31A],cat,1,5,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2016" +LBFA_31A_a,LBFA_31A_a_cat5_2,cat,cchs2001_p,[LBFA_31A],cat,2,5,"Business, Finance, Admin","Business, Finance, Admin",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_3,cat,cchs2001_p,[LBFA_31A],cat,3,5,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_4,cat,cchs2001_p,[LBFA_31A],cat,4,5,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_5,cat,cchs2001_p,[LBFA_31A],cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2014" +LBFA_31A_a,LBFA_31A_a_cat5_5,cat,cchs2001_p,[LBFA_31A],cat,5,5,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2015" +LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,9,Other,Occupation,Which of the following best describes your occupation?,"""Other"" has no equivalent in LBSGSOC recoded to 'NA::b' missing" +LBFA_31A_a,LBFA_31A_a_cat5_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,5,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?, +LBFA_31A_a,LBFA_31A_a_cat5_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,5,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,"Management, Health, Education, Art, Culture",Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,2,6,"Business, Finance, Admin","Business, Finance, Admin",N/A,2,"Business, Finance, Admin",Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,3,6,Sales or Service,Sales or Service,N/A,3,Sales or Service,Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,4,6,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,4,"Trades, Transport or Equipment Operator",Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_5,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,5,Unique to Prim. Ind./Proc./Manu.,Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::a,6,not applicable,not applicable,N/A,6,not applicable,Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::b,6,missing,missing,N/A,9,not stated,Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]",cat,NA::b,6,missing,missing,N/A,else,else,Occupation,Occupation group - (G), +LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,1,Management,Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2014" +LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,2,Professional (including accountants),Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2015" +LBFA_31A_b,LBFA_31A_b_cat6_1,cat,cchs2001_p,[LBFA_31A],cat,1,6,"Management, Health, Education, Art, Culture","Management, Health, Education, Art, Culture",N/A,3,"Technologist, Technician or Tech Occ",Occupation,Which of the following best describes your occupation?,"The three categories in CCHS 2001 ""Management, Professional (including accountants), Technologist, Technician or Tech Occ"" were combined into one category ""Management, Health, Education, Art, Culture"" to harmonize with CCHS cycles 2007-2016" +LBFA_31A_b,LBFA_31A_b_cat6_2,cat,cchs2001_p,[LBFA_31A],cat,2,6,"Business, Finance, Admin","Business, Finance, Admin",N/A,4,"Administrative, Financial or Clerical",Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_3,cat,cchs2001_p,[LBFA_31A],cat,3,6,Sales or Service,Sales or Service,N/A,5,Sales or Service,Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_4,cat,cchs2001_p,[LBFA_31A],cat,4,6,"Trades, Transport or Equipment Operator","Trades, Transport or Equipment Operator",N/A,6,"Trades, Transport or Equipment Operator",Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_5,cat,cchs2001_p,[LBFA_31A],cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,7,"Farming, Forestry, Fishing, Mining",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2014" +LBFA_31A_b,LBFA_31A_b_cat6_5,cat,cchs2001_p,[LBFA_31A],cat,5,6,Unique to Prim. Ind./Proc./Manu.,Unique to Prim. Ind./Proc./Manu.,N/A,8,"Processing, Manufacturing, Utilities",Occupation,Which of the following best describes your occupation?,"The two categories in CCHS 2001, ""Farming, Forestry, Fishing, Mining"" and ""Processing, Manufacturing, Utilities"", were combined into one category ""Farming, Forestry, Fishing, Mining, Processing, Manufacturing, Utilities"", to harmonize with CCHS 2007-2015" +LBFA_31A_b,LBFA_31A_b_cat6_6,cat,cchs2001_p,[LBFA_31A],cat,6,6,Other,Other,N/A,9,Other,Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_NA::a,cat,cchs2001_p,[LBFA_31A],cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Occupation,Which of the following best describes your occupation?, +LBFA_31A_b,LBFA_31A_b_cat6_NA::b,cat,cchs2001_p,[LBFA_31A],cat,NA::b,6,missing,missing,N/A,else,else,Occupation,Which of the following best describes your occupation?, +low_drink_score,low_drink_score_cat4N/A_Func::low_drink_score_fun,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,Func::low_drink_score_fun,N/A,N/A,N/A,N/A,N/A,N/A,Low risk drinking score,Low risk drinking score,"Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/eprg7/ . Derived from DHH_SEX, ALWDWKY." +low_drink_score,low_drink_score_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,1,4,Low risk,Low risk,N/A,1,Low risk,Low risk drinking score,Low risk drinking score, +low_drink_score,low_drink_score_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,2,4,Marginal risk,Marginal risk,N/A,2,Marginal risk,Low risk drinking score,Low risk drinking score, +low_drink_score,low_drink_score_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,3,4,Medium risk,Medium risk,N/A,3,Medium risk,Low risk drinking score,Low risk drinking score, +low_drink_score,low_drink_score_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,4,4,High risk,High risk,N/A,4,High risk,Low risk drinking score,Low risk drinking score, +low_drink_score,low_drink_score_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]",N/A,NA::b,4,missing,missing,N/A,N/A,N/A,Low risk drinking score,Low risk drinking score, +low_drink_score1,low_drink_score1_cat5N/A_Func::low_drink_score_fun1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,Func::low_drink_score_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,1,5,Low risk - never drank,Low risk - never drank,N/A,1,Low risk - never drank,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,2,5,Low risk - former drinker,Low risk - former drinker,N/A,2,Low risk - former drinker,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,3,5,Marginal risk,Marginal risk,N/A,3,Marginal risk,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,4,5,Medium risk,Medium risk,N/A,4,Medium risk,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,5,5,High risk,High risk,N/A,5,High risk,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +low_drink_score1,low_drink_score1_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]",N/A,NA::b,5,missing,missing,N/A,N/A,N/A,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories, +MED_1P,MED_1P_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,1,2,Yes,Yes,N/A,1,Yes,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?",CCHS 2001 does not provide examples of sleeping pills in its literal question +MED_1P,MED_1P_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,2,2,No,No,N/A,2,No,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?", +MED_1P,MED_1P_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?", +MED_1P,MED_1P_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?", +MED_1P,MED_1P_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]",cat,NA::b,2,missing,missing,N/A,else,else,Medication - sleeping pills,"In the past month, did you take sleeping pills such as Imovane, Nytol or Starnoc?", +number_conditions,number_conditions_catN/A_Func::multiple_conditions_fun1,cat,cchs2001_p,"DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, resp_condition_der, CCC_051]",N/A,Func::multiple_conditions_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Number of chronic conditions,Number of chronic conditions,"This variable is derived from CCC_121, CCC_131, CCC_151, CCC_171, resp_condition, CCC_050" +number_conditions,number_conditions_catN/A_Func::multiple_conditions_fun2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,Func::multiple_conditions_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Number of chronic conditions,Number of chronic conditions,"This variable is derived from CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition, CCC_051. Variable can be extended to 2018 when bowel condition not included." +number_conditions,number_conditions_cat6_0,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2011_2012_p, cchs2013_2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,0,6,0,0,N/A,N/A,0,Number of chronic conditions,Number of chronic conditions, +number_conditions,number_conditions_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,1,6,1,1,N/A,N/A,1,Number of chronic conditions,Number of chronic conditions, +number_conditions,number_conditions_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,2,6,2,2,N/A,N/A,2,Number of chronic conditions,Number of chronic conditions, +number_conditions,number_conditions_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,3,6,3,3,N/A,N/A,3,Number of chronic conditions,Number of chronic conditions, +number_conditions,number_conditions_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,4,6,4,4,N/A,N/A,4,Number of chronic conditions,Number of chronic conditions, +number_conditions,number_conditions_cat6_5+,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]",N/A,5+,6,5+,5+,N/A,N/A,5+,Number of chronic conditions,Number of chronic conditions, +PAA_045,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_045],cat,copy,N/A,No. hours sweat,No. hours sweat,hours/week,"[0,160]",No. hours sweat,Sports / fitness / rec phys act - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_045,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_045],cat,NA::a,N/A,not applicable,not applicable,hours/week,996,not applicable,Sports / fitness / rec phys act - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_045,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_045],cat,NA::b,N/A,missing,missing,hours/week,"[997,999]",don't know (997); refusal (998); not stated (999),Sports / fitness / rec phys act - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_045,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_045],cat,NA::b,N/A,missing,missing,hours/week,else,else,Sports / fitness / rec phys act - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_050,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_050],cat,copy,N/A,No. minutes sweat,No. minutes sweat,minutes/week,"[0,1680]",No. minutes sweat,Sports / fitness / rec phys act - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_050,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_050],cat,NA::a,N/A,not applicable,not applicable,minutes/week,9996,not applicable,Sports / fitness / rec phys act - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_050,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_050],cat,NA::b,N/A,missing,missing,minutes/week,"[9997,9999]",don't know (9997); refusal (9998); not stated (9999),Sports / fitness / rec phys act - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_050,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_050],cat,NA::b,N/A,missing,missing,minutes/week,else,else,Sports / fitness / rec phys act - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_075,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_075],cat,copy,N/A,No. hours sweat,No. hours sweat,hours/week,"[0,168]",No. hours sweat,Other physical activities - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_075,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_075],cat,NA::a,N/A,not applicable,not applicable,hours/week,996,not applicable,Other physical activities - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_075,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_075],cat,NA::b,N/A,missing,missing,hours/week,"[997,999]",don't know (997); refusal (998); not stated (999),Other physical activities - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_075,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_075],cat,NA::b,N/A,missing,missing,hours/week,else,else,Other physical activities - 7 d - total - hours,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_080,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_080],cat,copy,N/A,No. minutes sweat,No. minutes sweat,minutes/week,"[0,4880]",No. minutes sweat,Other physical activities - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_080,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_080],cat,NA::a,N/A,not applicable,not applicable,minutes/week,9996,not applicable,Other physical activities - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_080,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_080],cat,NA::b,N/A,missing,missing,minutes/week,"[9997,9999]",don't know (9997); refusal (9998); not stated (9999),Other physical activities - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAA_080,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAA_080],cat,NA::b,N/A,missing,missing,minutes/week,else,else,Other physical activities - 7 d - total - minutes,"(18+ years old) In the last 7 days, how much time in total did you spend doing these activities that made you sweat at least a little and breathe harder?", +PAADVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVVIG],cont,copy,N/A,No. minutes - vigorous physical activity - 7d,No. minutes - vigorous physical activity - 7d,minutes/week,"[0,6000]",No. minutes - vigorous physical activity - 7d,Total minutes of vigorous activity over a week,(18+ years old) Total minutes of vigorous activity - 7 d - (D), +PAADVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVVIG],cont,NA::a,N/A,not applicable,not applicable,minutes/week,99996,not applicable,Total minutes of vigorous activity over a week,(18+ years old) Total minutes of vigorous activity - 7 d - (D), +PAADVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVVIG],cont,NA::b,N/A,missing,missing,minutes/week,"[99997,99999]",don't know (99997); refusal (99998); not stated (99999),Total minutes of vigorous activity over a week,(18+ years old) Total minutes of vigorous activity - 7 d - (D), +PAADVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVVIG],cont,NA::b,N/A,missing,missing,minutes/week,else,else,Total minutes of vigorous activity over a week,(18+ years old) Total minutes of vigorous activity - 7 d - (D), +PAADVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVDYS],cont,copy,N/A,No. active days - 7d,No. active days - 7d,days,"[0,7]",No. active days - 7d,No. active days - 7d,(18+ years old) Number of active days - 7 d - (D), +PAADVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVDYS],cont,NA::a,N/A,not applicable,not applicable,days,96,not applicable,No. active days - 7d,(18+ years old) Number of active days - 7 d - (D), +PAADVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVDYS],cont,NA::b,N/A,missing,missing,days,"[97,99]",don't know (97); refusal (98); not stated (99),No. active days - 7d,(18+ years old) Number of active days - 7 d - (D), +PAADVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAADVDYS],cont,NA::b,N/A,missing,missing,days,else,else,No. active days - 7d,(18+ years old) Number of active days - 7 d - (D), +PAC_4A,PAC_4A_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,1,6,None,None,hours/week,1,None,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,2,6,Less than one hour,Less than one hour,hours/week,2,Less than one hour,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,3,6,1-5 hours,1-5 hours,hours/week,3,1-5 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,4,6,6-10 hours,6-10 hours,hours/week,4,6-10 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,5,6,11-20 hours,11-20 hours,hours/week,5,11-20 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,6,6,More than 20 hours,More than 20 hours,hours/week,6,More than 20 hours,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::a,6,not applicable,not applicable,hours/week,96,not applicable,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::b,6,missing,missing,hours/week,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4A,PAC_4A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A",cat,NA::b,6,missing,missing,hours/week,else,else,No./hours spent - walking work/school,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,1,6,None,None,hours/week,1,None,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,2,6,Less than one hour,Less than one hour,hours/week,2,Less than one hour,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,3,6,1-5 hours,1-5 hours,hours/week,3,1-5 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,4,6,6-10 hours,6-10 hours,hours/week,4,6-10 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,5,6,11-20 hours,11-20 hours,hours/week,5,11-20 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,6,6,More than 20 hours,More than 20 hours,hours/week,6,More than 20 hours,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::a,6,not applicable,not applicable,hours/week,96,not applicable,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::b,6,missing,missing,hours/week,"[97,99]",don't know (97); refusal (98); not stated (99),No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_4B,PAC_4B_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B",cat,NA::b,6,missing,missing,hours/week,else,else,No. of hrs. biking - to work/school,"In a typical week, how much time did you usually spend bicycling to work or to school or while doing errands?", +PAC_7,PAC_7_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,1,3,Yes,Yes,N/A,1,Yes,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7,PAC_7_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,2,3,No,No,N/A,2,No,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7,PAC_7_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,3,3,No work/no school,No work/no school,N/A,3,No work/no school,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7,PAC_7_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7,PAC_7_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7,PAC_7_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7],cat,NA::b,3,missing,missing,N/A,else,else,Walked to work or school / last 3 mo.,[Other than the ( X ) times you already reported walking for exercise was there any other time / Was there any time] in the past 3 months when you walked to and from work or school?, +PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,copy,N/A,No. of times/3 mo./walking work/school,No. of times walking work/school,N/A,"[1,270]",No. of times walking work/school,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school, +PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::a,N/A,not applicable,not applicable,N/A,996,not applicable,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school, +PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::b,N/A,missing,missing,N/A,"[997,999]",don't know (997); refusal (998); not stated (999),No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school, +PAC_7A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7A],cont,NA::b,N/A,missing,missing,N/A,else,else,No. of times/3 mo./walking work/school,No. of times/3 mo./walking work/school, +PAC_7B,PAC_7B_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,1,4,1 to 15 minutes,1 to 15 minutes,mins,1,1 to 15 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,2,4,16 to 30 minutes,16 to 30 minutes,mins,2,16 to 30 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,3,4,31 to 60 minutes,31 to 60 minutes,mins,3,31 to 60 minutes,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,4,4,More than 1 hour,More than 1 hour,mins,4,More than 1 hour,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::a,4,not applicable,not applicable,mins,6,not applicable,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::b,4,missing,missing,mins,"[7,9]",don't know (7); refusal (8); not stated (9),Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_7B,PAC_7B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7B],cat,NA::b,4,missing,missing,mins,else,else,Time spent - walking to go work/school,About how much time did you spend on each occasion?, +PAC_8,PAC_8_cat3_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,1,3,Yes,Yes,N/A,1,Yes,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8,PAC_8_cat3_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,2,3,No,No,N/A,2,No,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8,PAC_8_cat3_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,3,3,No work/no school,No work/no school,N/A,3,No work/no school,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8,PAC_8_cat3_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8,PAC_8_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8,PAC_8_cat3_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8],cat,NA::b,3,missing,missing,N/A,else,else,Bicycled to work or school / last 3 mo.,[Other than the ( X ) times you already reported bicycling was there any other time / Was there any other time] in the past 3 months when you bicycled to and from work or school?, +PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,copy,N/A,No. of times/3 mo./biking work/school,No. of times biking work/school,times/3 mos.,"[1,270]",No. of times biking work/school,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school, +PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::a,N/A,not applicable,not applicable,times/3 mos.,996,not applicable,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school, +PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::b,N/A,missing,missing,times/3 mos.,"[997,999]",don't know (997); refusal (998); not stated (999),No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school, +PAC_8A,N/A,cont,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A],cont,NA::b,N/A,missing,missing,times/3 mos.,else,else,No. of times/3 mo./bicycl. work/school,No. of times/3 mo./bicycl. work/school, +PAC_8B,PAC_8B_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,1,4,1 to 15 minutes,1 to 15 minutes,mins,1,1 to 15 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,2,4,16 to 30 minutes,16 to 30 minutes,mins,2,16 to 30 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,3,4,31 to 60 minutes,31 to 60 minutes,mins,3,31 to 60 minutes,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,4,4,More than 1 hour,More than 1 hour,mins,4,More than 1 hour,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::a,4,not applicable,not applicable,mins,6,not applicable,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::b,4,missing,missing,mins,"[7,9]",don't know (7); refusal (8); not stated (9),Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PAC_8B,PAC_8B_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B],cat,NA::b,4,missing,missing,mins,else,else,Time spent - bicycl. to go work/school,About how much time did you spend on each occasion?, +PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,copy,N/A,Physical Activity,Average daily leisure time energy expenditure in METs,METS,"[0,43.5]",Daily energy expenditure - (D),Physical Activity,Daily energy expenditure - (D),Refer to energy_exp for PACDEE all cycles +PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::a,N/A,not applicable,not applicable,METS,99.6,Not applicable,Physical Activity,Daily energy expenditure - (D), +PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,METS,"[99.7,99.9]",don't know (99.7); refusal (99.8); not stated (99.9),Physical Activity,Daily energy expenditure - (D),Don't know (99.7) and refusal (99.8) not included in 2001 CCHS +PACDEE,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,N/A,missing,missing,METS,else,else,Physical Activity,Daily energy expenditure - (D), +PACDEE_cat3,PACDEE_cat3_1,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,1,3,Inactive,Inactive - leisure activity,METS,"[0,1.5)",Inactive - leisure activity,Categorical physical activity,Categorical daily energy expenditure, +PACDEE_cat3,PACDEE_cat3_2,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,2,3,Moderately active,Moderately active - leisure activity,METS,"[1.5,3)",Moderately active - leisure activity,Categorical physical activity,Categorical daily energy expenditure, +PACDEE_cat3,PACDEE_cat3_3,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,3,3,Active,Active - leisure activity,METS,"[3,43.5]",Active - leisure activity,Categorical physical activity,Categorical daily energy expenditure, +PACDEE_cat3,PACDEE_cat3_NA::a,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::a,3,not applicable,not applicable,METS,99.6,Not applicable,Categorical physical activity,Categorical daily energy expenditure, +PACDEE_cat3,PACDEE_cat3_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,3,missing,missing,METS,"[99.7,99.9]",don't know (99.7); refusal (99.8); not stated (99.9),Categorical physical activity,Categorical daily energy expenditure, +PACDEE_cat3,PACDEE_cat3_NA::b,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]",cont,NA::b,3,missing,missing,METS,else,else,Categorical physical activity,Categorical daily energy expenditure, +pack_years_der,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY_A, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]",N/A,Func::pack_years_fun,N/A,N/A,N/A,Years,N/A,N/A,Smoking pack-years,Smoking pack-years,PackYears variable derived from various harmonized smoking variables +pack_years_der,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY_A, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]",N/A,NA::b,N/A,missing,missing,Years,N/A,N/A,Smoking pack-years,Smoking pack-years, +pack_years_cat,pack_years_catN/A_Func::pack_years_fun_cat,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,Func::pack_years_fun_cat,N/A,N/A,N/A,N/A,N/A,N/A,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,1,8,0,0 pack-years,pack-years,1,0 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,2,8,0 to 0.01,0 to 0.01 pack-years,pack-years,2,0 to 0.01 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,3,8,0.01 to 3.0,0.01 to 3.0 pack-years,pack-years,3,0.01 to 3.0 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,4,8,3.0 to 9.0,3.0 to 9.0 pack-years,pack-years,4,3.0 to 9.0 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,5,8,9.0 to 16.2,9.0 to 16.2 pack-years,pack-years,5,9.0 to 16.2 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_6,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,6,8,16.2 to 25.7,16.2 to 25.7 pack-years,pack-years,6,16.2 to 25.7 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_7,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,7,8,25.7 to 40.0,25.7 to 40.0 pack-years,pack-years,7,25.7 to 40.0 pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_8,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,8,8,40.0+,40.0+ pack-years,pack-years,8,40.0+ pack-years,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,NA::a,8,not applicable,not applicable,pack-years,NA::a,not applicable,Categorical smoking pack-years,Categorical smoking pack-years, +pack_years_cat,pack_years_cat_cat8_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],N/A,NA::b,8,missing,missing,pack-years,NA::b,missing,Categorical smoking pack-years,Categorical smoking pack-years, +PAYDVTOA,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVTOA],cont,copy,N/A,No. minutes of other activities,No. minutes of other activities,minutes/week,"[0,4980]",No. minutes of other activities,Total minutes of other activities - 7 d,Total minutes of other activities - 7 d - (D), +PAYDVTOA,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVTOA],cont,NA::a,N/A,not applicable,not applicable,minutes/week,99996,not applicable,Total minutes of other activities - 7 d,Total minutes of other activities - 7 d - (D), +PAYDVTOA,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVTOA],cont,NA::b,N/A,missing,missing,minutes/week,"[99997,99999]",don't know (99997); refusal (99998); not stated (99999),Total minutes of other activities - 7 d,Total minutes of other activities - 7 d - (D), +PAYDVTOA,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVTOA],cont,NA::b,N/A,missing,missing,minutes/week,else,else,Total minutes of other activities - 7 d,Total minutes of other activities - 7 d - (D), +PAYDVADL,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVADL],cont,copy,N/A,No. minutes of leisure activities,No. minutes of leisure activities,minutes/week,"[0,4140]",No. minutes of leisure activities,Total minutes of physical activities during leisure over a week,Total minutes - physical activities during leisure - 7 d - (D), +PAYDVADL,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVADL],cont,NA::a,N/A,not applicable,not applicable,minutes/week,99996,not applicable,Total minutes of physical activities during leisure over a week,Total minutes - physical activities during leisure - 7 d - (D), +PAYDVADL,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVADL],cont,NA::b,N/A,missing,missing,minutes/week,"[99997,99999]",don't know (99997); refusal (99998); not stated (99999),Total minutes of physical activities during leisure over a week,Total minutes - physical activities during leisure - 7 d - (D), +PAYDVADL,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVADL],cont,NA::b,N/A,missing,missing,minutes/week,else,else,Total minutes of physical activities during leisure over a week,Total minutes - physical activities during leisure - 7 d - (D), +PAYDVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVVIG],cont,copy,N/A,No. minutes of vigorous activities,No. minutes of vigorous activities,minutes/week,"[0,2880]",No. minutes of vigorous activities,Total minutes of vigorous physical activity over a week,Total minutes - vigorous physical activity - 7 d - (D), +PAYDVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVVIG],cont,NA::a,N/A,not applicable,not applicable,minutes/week,99996,not applicable,Total minutes of vigorous physical activity over a week,Total minutes - vigorous physical activity - 7 d - (D), +PAYDVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVVIG],cont,NA::b,N/A,missing,missing,minutes/week,"[99997,99999]",don't know (99997); refusal (99998); not stated (99999),Total minutes of vigorous physical activity over a week,Total minutes - vigorous physical activity - 7 d - (D), +PAYDVVIG,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVVIG],cont,NA::b,N/A,missing,missing,minutes/week,else,else,Total minutes of vigorous physical activity over a week,, +PAYDVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVDYS],cont,copy,N/A,No. physically active days,No. physically active days,days,"[0,7]",No. physically active days,Number of days - physically active over a week,, +PAYDVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVDYS],cont,NA::a,N/A,not applicable,not applicable,days,96,not applicable,Number of days - physically active over a week,Number of days - physically active - 7 d - (D), +PAYDVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVDYS],cont,NA::b,N/A,missing,missing,days,"[97,99]",don't know (97); refusal (98); not stated (99),Number of days - physically active over a week,Number of days - physically active - 7 d - (D), +PAYDVDYS,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVDYS],cont,NA::b,N/A,missing,missing,days,else,else,Number of days - physically active over a week,Number of days - physically active - 7 d - (D), +pct_time_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]",N/A,Func::pct_time_fun,N/A,N/A,N/A,%,N/A,N/A,Percent time in Canada,Percentage of time in Canada,"Percent time in Canada derived from Age, immigration status, and time in Canada variables" +pct_time_der,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]",N/A,NA::b,N/A,missing,missing,%,N/A,N/A,Percent time in Canada,Percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10N/A_Func::pct_time_fun_cat,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,Func::pct_time_fun_cat,N/A,N/A,N/A,N/A,N/A,N/A,Categorical percent time in Canada,Categorical percentage of time in Canada,Categorical percent time in Canada derived from pct_time_der +pct_time_der_cat10,pct_time_der_cat10_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,1,10,10%,10% time in Canada,%,1,10% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,2,10,20%,20% time in Canada,%,2,20% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,3,10,30%,30% time in Canada,%,3,30% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,4,10,40%,40% time in Canada,%,4,40% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,5,10,50%,50% time in Canada,%,5,50% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,6,10,60%,60% time in Canada,%,6,60% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_7,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,7,10,70%,70% time in Canada,%,7,70% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_8,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,8,10,80%,80% time in Canada,%,8,80% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_9,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,9,10,90%,90% time in Canada,%,9,90% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_10,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,10,10,100%,100% time in Canada,%,10,100% time in Canada,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,NA::a,10,not applicable,not applicable,%,NA::a,not applicable,Categorical percent time in Canada,Categorical percentage of time in Canada, +pct_time_der_cat10,pct_time_der_cat10_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der],N/A,NA::b,10,missing,missing,%,NA::b,missing,Categorical percent time in Canada,Categorical percentage of time in Canada, +RAC_1,RAC_1_cat3_1,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_2,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,2,3,Often,Often,N/A,2,Often,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_3,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]",cat,3,3,Never,Never,N/A,3,Never,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_NA::a,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_NA::b,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_NA::b,cat,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2005_p::RACE_1, [RAC_1]",cat,NA::b,3,missing,missing,N/A,else,else,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_NA::a,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::a,3,not applicable,not applicable,N/A,96,not applicable,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?",CCHS 2003 codes N/A as 96 and missing as 97-99 +RAC_1,RAC_1_cat3_NA::b,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::b,3,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_1,RAC_1_cat3_NA::b,cat,cchs2003_p,cchs2003_p::RACC_1,cat,NA::b,3,missing,missing,N/A,else,else,Has difficulty with activities,"Do you have any difficulty hearing, seeing, communicating, walking, climbing stairs, bending, learning or doing any similar activities?", +RAC_2A,RAC_2A_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2A,RAC_2A_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,2,3,Often,Often,N/A,2,Often,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2A,RAC_2A_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,3,3,Never,Never,N/A,3,Never,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2A,RAC_2A_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2A,RAC_2A_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2A,RAC_2A_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]",cat,NA::b,3,missing,missing,N/A,else,else,Reduction - activities at home,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at home?, +RAC_2B,RAC_2B_cat3_1,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?,"In CCHS 2001, work and school reduction were combined into one variable. From CCHS 2003 onwards they were split into 2 variables (RAC_2B1 & RAC_2B2)" +RAC_2B,RAC_2B_cat3_2,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,2,3,Often,Often,N/A,2,Often,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?, +RAC_2B,RAC_2B_cat3_3,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,3,3,Never,Never,N/A,3,Never,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?, +RAC_2B,RAC_2B_cat3_NA::a,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::a,3,not applicable,not applicable,N/A,4,not applicable,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?, +RAC_2B,RAC_2B_cat3_NA::b,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?, +RAC_2B,RAC_2B_cat3_NA::b,cat,cchs2001_p,cchs2001_p::RACA_2B,cat,NA::b,3,missing,missing,N/A,else,else,Reduction - activities at work or school,Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do at work or at school?, +RAC_2B1,RAC_2B1_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,1,4,Sometimes,Sometimes,N/A,1,Sometimes,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,2,4,Often,Often,N/A,2,Often,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,3,4,Never,Never,N/A,3,Never,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,4,4,Not attend school,Not attend school,N/A,4,Not attend school,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B1,RAC_2B1_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B1, cchs2005_p::RACE_2B1, [RAC_2B1]",cat,NA::b,4,missing,missing,N/A,else,else,Long-term cond. reduces act. - school,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at school?", +RAC_2B2,RAC_2B2_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,1,4,Sometimes,missing,N/A,1,Sometimes,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,2,4,Often,Often,N/A,2,Often,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,3,4,Never,Never,N/A,3,Never,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,4,4,Has no job,Has no job,N/A,4,Has no job,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2B2,RAC_2B2_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_2B2, cchs2005_p::RACE_2B2, [RAC_2B2]",cat,NA::b,4,missing,missing,N/A,else,else,Reduction kind/amount act. - at work,"Does a long-term physical condition or mental condition or health problem, reduce the amount or the kind of activity you can do at work?", +RAC_2C,RAC_2C_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RAC_2C,RAC_2C_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,2,3,Often,Often,N/A,2,Often,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RAC_2C,RAC_2C_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,3,3,Never,Never,N/A,3,Never,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RAC_2C,RAC_2C_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RAC_2C,RAC_2C_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RAC_2C,RAC_2C_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2C, cchs2003_p::RACC_2C, cchs2005_p::RACE_2C, [RAC_2C]",cat,NA::b,3,missing,missing,N/A,else,else,Reduction - other activities,"Does a long-term physical condition or mental condition or health problem reduce the amount or the kind of activity you can do in other activities, for example, transportation or leisure?", +RACAG5,RACAG5_cat4_1,cat,cchs2001_p,cchs2001_p::RACAG5,cat,1,4,Injury,Injury,N/A,1,Injury,Cause of health problem - (G),Cause of health problem - (G),"CCHS 2001 has different categories from other cycles, hence a new variable created" +RACAG5,RACAG5_cat4_2,cat,cchs2001_p,cchs2001_p::RACAG5,cat,2,4,Disease/illness,Disease/illness,N/A,2,Disease/illness,Cause of health problem - (G),Cause of health problem - (G), +RACAG5,RACAG5_cat4_3,cat,cchs2001_p,cchs2001_p::RACAG5,cat,3,4,Aging,Aging,N/A,3,Aging,Cause of health problem - (G),Cause of health problem - (G), +RACAG5,RACAG5_cat4_4,cat,cchs2001_p,cchs2001_p::RACAG5,cat,4,4,Other,Other,N/A,4,Other,Cause of health problem - (G),Cause of health problem - (G), +RACAG5,RACAG5_cat4_NA::a,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Cause of health problem - (G),Cause of health problem - (G), +RACAG5,RACAG5_cat4_NA::b,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Cause of health problem - (G),Cause of health problem - (G), +RACAG5,RACAG5_cat4_NA::b,cat,cchs2001_p,cchs2001_p::RACAG5,cat,NA::b,4,missing,missing,N/A,else,else,Cause of health problem - (G),Cause of health problem - (G), +RACDIMP,RACDIMP_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Impact of health problems,Impact of health problems, +RACDIMP,RACDIMP_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,2,3,Often,Often,N/A,2,Often,Impact of health problems,Impact of health problems, +RACDIMP,RACDIMP_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,3,3,Never,Never,N/A,3,Never,Impact of health problems,Impact of health problems, +RACDIMP,RACDIMP_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Impact of health problems,Impact of health problems, +RACDIMP,RACDIMP_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Impact of health problems,Impact of health problems, +RACDIMP,RACDIMP_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACADIMP, cchs2003_p::RACCDIMP, cchs2005_p::RACEDIMP, [RACDIMP]",cat,NA::b,3,missing,missing,N/A,else,else,Impact of health problems,Impact of health problems, +RACDPAL,RACDPAL_catN/A_Func::RACDPAL_fun,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,Func::RACDPAL_fun,N/A,N/A,N/A,N/A,N/A,N/A,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_1,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,1,3,Sometimes,Sometimes,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_2,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,2,3,Often,Often,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_3,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,3,3,Never,Never,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_NA::b,cat,cchs2001_p,"DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]",N/A,NA::b,3,missing,missing,N/A,N/A,Participation and activity limitation,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,1,3,Sometimes,Sometimes,N/A,1,Sometimes,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,2,3,Often,Often,N/A,2,Often,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,3,3,Never,Never,N/A,3,Never,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Participation and activity limitation,Participation and activity limitation, +RACDPAL,RACDPAL_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]",cat,NA::b,3,missing,missing,N/A,else,else,Participation and activity limitation,Participation and activity limitation, +RACG5,RACG5_cat6_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,1,6,Injury,Injury,N/A,1,Injury,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,2,6,Disease/illness,Disease/illness,N/A,2,Disease/illness,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,3,6,Aging,Aging,N/A,3,Aging,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,4,6,Existed at birth,Existed at birth,N/A,4,Existed at birth,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_5,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,5,6,Work conditions,Work conditions,N/A,5,Work conditions,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_6,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,6,6,Other,Other,N/A,6,Other,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Cause of health problem,Cause of health problem, +RACG5,RACG5_cat6_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]",cat,NA::b,6,missing,missing,N/A,else,else,Cause of health problem,Cause of health problem, +resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun1,cat,"cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_031]",N/A,Func::resp_condition_fun1,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables" +resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun2,cat,"cchs2005_p, cchs2007_2008_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,Func::resp_condition_fun2,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables" +resp_condition_der,resp_condition_der_catN/A_Func::resp_condition_fun3,cat,"cchs2001_p, cchs2003_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91A, CCC_031]",N/A,Func::resp_condition_fun3,N/A,N/A,N/A,N/A,N/A,N/A,Respiratory Condition,Respiratory Condition,"Derived from Bronchitis, COPD and Emphysema variables" +resp_condition_der,resp_condition_der_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,1,3,Over 35 years with condition,Age over 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +resp_condition_der,resp_condition_der_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,2,3,Under 35 years with condition,Age under 35 years with condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +resp_condition_der,resp_condition_der_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,3,3,No condition,No condition,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +resp_condition_der,resp_condition_der_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91E, CCC_91F, CCC_91A, CCC_031]",N/A,NA::b,3,missing,missing,N/A,N/A,Respiratory Condition,Respiratory Condition,Respiratory Condition, +SDC_5A_1,SDC_5A_1_cat4_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,1,4,English ,English only,N/A,1,English ,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,2,4,French,French only,N/A,2,French,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,3,4,English & French,English & French,N/A,3,English & French,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,4,4,Neither,Neither English nor French,N/A,4,Neither,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDC_5A_1,SDC_5A_1_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]",cat,NA::b,4,missing,missing,N/A,else,else,Knowledge of official languages,"Of English or French, which language(s) do you speak well enough to conduct a conversation?", +SDCDFOLS,SDCDFOLS_cat4_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,1,4,English ,English only,N/A,1,English ,First official language spoken,First official language spoken, +SDCDFOLS,SDCDFOLS_cat4_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,2,4,French,French only,N/A,2,French,First official language spoken,First official language spoken, +SDCDFOLS,SDCDFOLS_cat4_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,3,4,English & French,English & French,N/A,3,English & French,First official language spoken,First official language spoken, +SDCDFOLS,SDCDFOLS_cat4_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,4,4,Neither,Neither English nor French,N/A,4,Neither,First official language spoken,First official language spoken, +SDCDFOLS,SDCDFOLS_cat4_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,First official language spoken,First official language spoken,"CCHS2015_2016 and CCHS2017_2018 does not have not applicable (6), don't know (7) or refusal (8)" +SDCDFOLS,SDCDFOLS_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),First official language spoken,First official language spoken,"CCHS2015_2016 and CCHS2017_2018 does not have not applicable (6), don't know (7) or refusal (8)" +SDCDFOLS,SDCDFOLS_cat4_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]",cat,NA::b,4,missing,missing,N/A,else,else,First official language spoken,First official language spoken, +SDCFIMM,SDCFIMM_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]",cat,1,2,Yes,Yes,N/A,1,Yes,Immigrant status (D),Are you an immigrant?, +SDCFIMM,SDCFIMM_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]",cat,2,2,No,No,N/A,2,No,Immigrant status (D),Are you an immigrant?, +SDCFIMM,SDCFIMM_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Immigrant status (D),Are you an immigrant?, +SDCFIMM,SDCFIMM_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Immigrant status (D),Are you an immigrant?, +SDCFIMM,SDCFIMM_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]",cat,NA::b,2,missing,missing,N/A,else,else,Immigrant status (D),Are you an immigrant?, +SDCGCBG,SDCGCBG_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]",cat,1,2,Canada,Canada,N/A,1,Canada,Country of birth - (G),Country of birth - (G), +SDCGCBG,SDCGCBG_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]",cat,2,2,Other,Other,N/A,2,Other,Country of birth - (G),Country of birth - (G), +SDCGCBG,SDCGCBG_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Country of birth - (G),Country of birth - (G), +SDCGCBG,SDCGCBG_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Country of birth - (G),Country of birth - (G),CCHS 2001 does not have don't know (7) or refusal (8) +SDCGCBG,SDCGCBG_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]",cat,NA::b,2,missing,missing,N/A,else,else,Country of birth - (G),Country of birth - (G), +SDCGCGT,SDCGCGT_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]",cat,1,2,White,White,N/A,1,White,Ethnicity,"Cultural or racial origin - (D, G)", +SDCGCGT,SDCGCGT_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]",cat,2,2,Non-white,Non-white,N/A,2,Visible minority,Ethnicity,"Cultural or racial origin - (D, G)", +SDCGCGT,SDCGCGT_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Ethnicity,"Cultural or racial origin - (D, G)", +SDCGCGT,SDCGCGT_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Ethnicity,"Cultural or racial origin - (D, G)","CCHS 2001 missing don't know (7), refusal (8)" +SDCGCGT,SDCGCGT_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]",cat,NA::b,2,missing,missing,N/A,else,else,Ethnicity,"Cultural or racial origin - (D, G)", +SDCGLHM,SDCGLHM_cat4_1,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,1,4,English w/ or w/o other,English with or without other language,N/A,1,English with or without other language,Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_2,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,2,4,French w/ or w/o other,French with or without other language,N/A,2,French with or without other language,Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_3,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,3,4,English & French w/ or w/o other,English & French with or without other language,N/A,3,English & French with or without other language,Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_4,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,4,4,Neither,Neither English nor French (other),N/A,4,Neither English nor French (other),Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_NA::a,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Language(s) spoken at home,Language(s) spoken at home, +SDCGLHM,SDCGLHM_cat4_NA::b,cat,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]",cat,NA::b,4,missing,missing,N/A,else,else,Language(s) spoken at home,Language(s) spoken at home, +SDCGLNG,SDCGLNG_cat4_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,1,4,English w/ or w/o other,English with or without other language,N/A,1,English with or without other language,Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,2,4,French w/ or w/o other,French with or without other language,N/A,2,French with or without other language,Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,3,4,English & French w/ or w/o other,English & French with or without other language,N/A,3,English & French with or without other language,Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,4,4,Neither,Neither English nor French (other),N/A,4,Neither English nor French (other),Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::a,4,not applicable,not applicable,N/A,6,not applicable,Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::b,4,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Languages - can converse in,Languages - can converse in, +SDCGLNG,SDCGLNG_cat4_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]",cat,NA::b,4,missing,missing,N/A,else,else,Languages - can converse in,Languages - can converse in, +SDCGRES,SDCGRES_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]",cat,1,2,0 to 9 years,0 to 9 years,N/A,1,0 to 9 years,Length in Canada,"Length/time in Canada since imm. (D, G)", +SDCGRES,SDCGRES_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]",cat,2,2,10 years or more,10 years or more,N/A,2,10 years or more,Length in Canada,"Length/time in Canada since imm. (D, G)", +SDCGRES,SDCGRES_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,Length in Canada,"Length/time in Canada since imm. (D, G)", +SDCGRES,SDCGRES_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Length in Canada,"Length/time in Canada since imm. (D, G)","CCHS 2001 missing don't know (7), refusal (8)" +SDCGRES,SDCGRES_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]",cat,NA::b,2,missing,missing,N/A,else,else,Length in Canada,"Length/time in Canada since imm. (D, G)", +SLP_02,SLP_02_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,1,5,None of the time,None of the time,N/A,1,None of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,5,5,All the time,All the time,N/A,5,All the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02,SLP_02_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]",cat,NA::b,5,missing,missing,N/A,else,else,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02_A,SLP_02_A_cat3_1,cat,cchs2001_p,[GENA_04],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?,CCHS 2001 has different categories from other cycles +SLP_02_A,SLP_02_A_cat3_2,cat,cchs2001_p,[GENA_04],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02_A,SLP_02_A_cat3_3,cat,cchs2001_p,[GENA_04],cat,3,3,Never,Never,N/A,3,Never,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02_A,SLP_02_A_cat3_NA::a,cat,cchs2001_p,[GENA_04],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02_A,SLP_02_A_cat3_NA::b,cat,cchs2001_p,[GENA_04],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_02_A,SLP_02_A_cat3_NA::b,cat,cchs2001_p,[GENA_04],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - trouble sleeping,How often do you have trouble going to sleep or staying asleep?, +SLP_03,SLP_03_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,1,5,None of the time,None of the time,N/A,1,None of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,5,5,All the time,All the time,N/A,5,All the time,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat3_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat3_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03,SLP_03_cat3_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]",cat,NA::b,3,missing,missing,N/A,else,else,Frequency - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03_A,SLP_03_A_cat3_1,cat,cchs2001_p,[GENA_05],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - find sleep refreshing,How often do you find your sleep refreshing?,CCHS 2001 has different categories from other cycles +SLP_03_A,SLP_03_A_cat3_2,cat,cchs2001_p,[GENA_05],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03_A,SLP_03_A_cat3_3,cat,cchs2001_p,[GENA_05],cat,3,3,Never,Never,N/A,3,Never,Freq. - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03_A,SLP_03_A_cat3_NA::a,cat,cchs2001_p,[GENA_05],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03_A,SLP_03_A_cat3_NA::b,cat,cchs2001_p,[GENA_05],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_03_A,SLP_03_A_cat3_NA::b,cat,cchs2001_p,[GENA_05],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - find sleep refreshing,How often do you find your sleep refreshing?, +SLP_04,SLP_04_cat5_1,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,1,5,None of the time,None of the time,N/A,1,None of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_2,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,2,5,Little of the time,Little of the time,N/A,2,Little of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_3,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,3,5,Some of the time,Some of the time,N/A,3,Some of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_4,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,4,5,Most of the time,Most of the time,N/A,4,Most of the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_5,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,5,5,All the time,All the time,N/A,5,All the time,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_NA::a,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,NA::a,5,not applicable,not applicable,N/A,6,not applicable,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,NA::b,5,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04,SLP_04_cat5_NA::b,cat,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]",cat,NA::b,5,missing,missing,N/A,else,else,Frequency - difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04_A,SLP_04_A_cat3_1,cat,cchs2001_p,[GENA_06],cat,1,3,Most of the time,Most of the time,N/A,1,Most of the time,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?,CCHS 2001 has different categories from other cycles +SLP_04_A,SLP_04_A_cat3_2,cat,cchs2001_p,[GENA_06],cat,2,3,Sometimes,Sometimes,N/A,2,Sometimes,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04_A,SLP_04_A_cat3_3,cat,cchs2001_p,[GENA_06],cat,3,3,Never,Never,N/A,3,Never,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04_A,SLP_04_A_cat3_NA::a,cat,cchs2001_p,[GENA_06],cat,NA::a,3,not applicable,not applicable,N/A,6,not applicable,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04_A,SLP_04_A_cat3_NA::b,cat,cchs2001_p,[GENA_06],cat,NA::b,3,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLP_04_A,SLP_04_A_cat3_NA::b,cat,cchs2001_p,[GENA_06],cat,NA::b,3,missing,missing,N/A,else,else,Freq. - find it difficult to stay awake,How often do you find it difficult to stay awake when you want to?, +SLPG01,SLPG01_cat11_1,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,1,11,<3 hours,<3 hours,Hours,1,<3 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?,CCHS 2011-2012 onwards omitted 2-<3 hours category +SLPG01,SLPG01_cat11_2,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,2,11,3-<4 hours,3-<4 hours,Hours,2,3-<4 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_3,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,3,11,4-<5 hours,4-<5 hours,Hours,3,4-<5 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_4,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,4,11,5-<6 hours,5-<6 hours,Hours,4,5-<6 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_5,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,5,11,6-<7 hours,6-<7 hours,Hours,5,6-<7 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_6,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,6,11,7-<8 hours,7-<8 hours,Hours,6,7-<8 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_7,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,7,11,8-<9 hours,8-<9 hours,Hours,7,8-<9 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_8,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,8,11,9-<10 hours,9-<10 hours,Hours,8,9-<10 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_9,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,9,11,10-<11 hours,10-<11 hours,Hours,9,10-<11 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_10,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,10,11,11-<12 hours,11-<12 hours,Hours,10,11-<12 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_11,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,11,11,>= 12 hours,>= 12 hours,Hours,11,>= 12 hours,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_NA::a,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::a,11,not applicable,not applicable,Hours,96,not applicable,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::b,11,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01,SLPG01_cat11_NA::b,cat,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::b,11,missing,missing,Hours,else,else,Number of hours spent sleeping per night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_1,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,1,12,<2 hours,<2 hours,Hours,1,<2 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_2,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,2,12,2-<3 hours,2-<3 hours,Hours,2,2-<3 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_3,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,3,12,3-<4 hours,3-<4 hours,Hours,3,3-<4 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_4,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,4,12,4-<5 hours,4-<5 hours,Hours,4,4-<5 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_5,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,5,12,5-<6 hours,5-<6 hours,Hours,5,5-<6 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_6,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,6,12,6-<7 hours,6-<7 hours,Hours,6,6-<7 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_7,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,7,12,7-<8 hours,7-<8 hours,Hours,7,7-<8 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_8,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,8,12,8-<9 hours,8-<9 hours,Hours,8,8-<9 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_9,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,9,12,9-<10 hours,9-<10 hours,Hours,9,9-<10 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_10,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,10,12,10-<11 hours,10-<11 hours,Hours,10,10-<11 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_11,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,11,12,11-<12 hours,11-<12 hours,Hours,11,11-<12 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_12,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,12,12,>= 12 hours,>= 12 hours,Hours,12,>= 12 hours,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_NA::a,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::a,12,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_NA::b,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,12,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_A,SLPG01_A_cat12_NA::b,cat,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,12,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,1,N/A,Hours,converted hours (<2 hours),Hours,1,converted hours (<2 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,2.5,N/A,Hours,convereted hours (2-<3 hours),Hours,2,convereted hours (2-<3 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,3.5,N/A,Hours,converted hours (3-<4 hours),Hours,3,converted hours (3-<4 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,4.5,N/A,Hours,converted hours (4-<5 hours),Hours,4,converted hours (4-<5 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,5.5,N/A,Hours,converted hours (5-<6 hours),Hours,5,converted hours (5-<6 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,6.5,N/A,Hours,converted hours (6-<7 hours),Hours,6,converted hours (6-<7 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,7.5,N/A,Hours,converted hours (7-<8 hours),Hours,7,converted hours (7-<8 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,8.5,N/A,Hours,converted hours (8-<9 hours),Hours,8,converted hours (8-<9 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,9.5,N/A,Hours,converted hours (9-<10 hours),Hours,9,converted hours (9-<10 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,10.5,N/A,Hours,converted hours (10-<11 hours),Hours,10,converted hours (10-<11 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,11.5,N/A,Hours,converted hours (11-<12 hours),Hours,11,converted hours (11-<12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,13,N/A,Hours,converted hours (>= 12 hours),Hours,12,converted hours (>= 12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::a,N/A,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,N/A,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01",cat,NA::b,N/A,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,1.5,11,<3 hours,converted hours (<2 hours),Hours,1,converted hours (<2 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,3.5,11,3-<4 hours,converted hours (3-<4 hours),Hours,2,converted hours (3-<4 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,4.5,11,4-<5 hours,converted hours (4-<5 hours),Hours,3,converted hours (4-<5 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,5.5,11,5-<6 hours,converted hours (5-<6 hours),Hours,4,converted hours (5-<6 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,6.5,11,6-<7 hours,converted hours (6-<7 hours),Hours,5,converted hours (6-<7 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,7.5,11,7-<8 hours,converted hours (7-<8 hours),Hours,6,converted hours (7-<8 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,8.5,11,8-<9 hours,converted hours (8-<9 hours),Hours,7,converted hours (8-<9 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,9.5,11,9-<10 hours,converted hours (9-<10 hours),Hours,8,converted hours (9-<10 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,10.5,11,10-<11 hours,converted hours (10-<11 hours),Hours,9,converted hours (10-<11 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,11.5,11,11-<12 hours,converted hours (11-<12 hours),Hours,10,converted hours (11-<12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,13,11,>= 12 hours,converted hours (>= 12 hours),Hours,11,converted hours (>= 12 hours),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::a,11,not applicable,not applicable,Hours,96,not applicable,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::b,11,missing,missing,Hours,"[97,99]",don't know (97); refusal (98); not stated (99),No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SLPG01_cont,N/A,cont,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]",cat,NA::b,11,missing,missing,Hours,else,else,No./hours spent sleeping each night,How long do you usually spend sleeping each night?, +SMK_01A,SMK_01A_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]",cat,1,2,yes,yes,N/A,1,Yes,s100,"In lifetime, smoked 100 or more cigarettes", +SMK_01A,SMK_01A_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]",cat,2,2,no,no,N/A,2,No,s100,"In lifetime, smoked 100 or more cigarettes", +SMK_01A,SMK_01A_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,s100,"In lifetime, smoked 100 or more cigarettes", +SMK_01A,SMK_01A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),s100,"In lifetime, smoked 100 or more cigarettes", +SMK_01A,SMK_01A_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]",cat,NA::b,2,missing,missing,N/A,else,else,s100,"In lifetime, smoked 100 or more cigarettes", +SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, cchs2015_2016_p::SMK_050, cchs2017_2018_p::SMK_050, [SMK_05B]",cont,copy,N/A,Cigarettes/day - occasional,# of cigarettes smoked daily - daily smoker,cigarettes,"[1,99]",# of cigarettes smoked daily - occasional smoker,cigdayo,# of cigarettes smoked daily - occasional smoker, +SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, cchs2015_2016_p::SMK_050, cchs2017_2018_p::SMK_050, [SMK_05B]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,cigdayo,# of cigarettes smoked daily - occasional smoker, +SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, cchs2015_2016_p::SMK_050, cchs2017_2018_p::SMK_050, [SMK_05B]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),cigdayo,# of cigarettes smoked daily - occasional smoker, +SMK_05B,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, cchs2015_2016_p::SMK_050, cchs2017_2018_p::SMK_050, [SMK_05B]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,cigdayo,# of cigarettes smoked daily - occasional smoker, +SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, cchs2015_2016_p::SMK_055, cchs2017_2018_p::SMK_055, [SMK_05C]",cont,copy,N/A,# days smoked at least 1 cigarette,# days smoked at least 1 cigarette,days,"[0,31]",# days smoked at least 1 cigarette,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?", +SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, cchs2015_2016_p::SMK_055, cchs2017_2018_p::SMK_055, [SMK_05C]",cont,NA::a,N/A,not applicable,not applicable,days,96,not applicable,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?", +SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, cchs2015_2016_p::SMK_055, cchs2017_2018_p::SMK_055, [SMK_05C]",cont,NA::b,N/A,missing,missing,days,"[97,99]",don't know (97); refusal (98); not stated (99),Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?", +SMK_05C,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, cchs2015_2016_p::SMK_055, cchs2017_2018_p::SMK_055, [SMK_05C]",cont,NA::b,N/A,missing,missing,days,else,else,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?", +SMK_05D,SMK_05D_cat2_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]",cat,1,2,yes,Occasional smoker who previously smoked daily,N/A,1,Yes,evd,Ever smoked cigarettes daily - occasional smoker,2015 onward looks at occasional/former smokers +SMK_05D,SMK_05D_cat2_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]",cat,2,2,no,Occasional smoker never daily,N/A,2,No,evd,Ever smoked cigarettes daily - occasional smoker, +SMK_05D,SMK_05D_cat2_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]",cat,NA::a,2,not applicable,not applicable,N/A,6,not applicable,evd,Ever smoked cigarettes daily - occasional smoker, +SMK_05D,SMK_05D_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]",cat,NA::b,2,missing,missing,N/A,"[7,9]",don't know (7); refusal (8); not stated (9),evd,Ever smoked cigarettes daily - occasional smoker, +SMK_05D,SMK_05D_cat2_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]",cat,NA::b,2,missing,missing,N/A,else,else,evd,Ever smoked cigarettes daily - occasional smoker, +SMK_06A_A,SMK_06A_A_cat4_1,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,1,4,<1 year,Less than one year ago,years,1,Less than one year ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_2,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,2,4,1 to 2 years,1 year to 2 years ago,years,2,1 year to 2 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_3,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,3,4,3 to 5 years,3 years to 5 years ago,years,3,3 years to 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_4,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,4,4,>5 years,More than 5 years ago,years,4,More than 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_NA::a,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::a,4,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_A,SMK_06A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,4,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,1,4,<1 year,Less than one year ago,years,1,Less than one year,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,2,4,1 to 2 years,1 year to less than 2 years ago,years,2,1 year to < 2 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,3,4,2 to 3 years,2 years to less than 3 years ago,years,3,2 years to < 3 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,4,4,>= 3 years,3 or more years ago,years,4,3 or more years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::a,4,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_B,SMK_06A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::b,4,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,0.5,N/A,stpn,converted age - Less than one year ago,years,1,Less than one year ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,1.5,N/A,stpn,converted age - 1 year to 2 years ago,years,2,1 year to 2 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,4,N/A,stpn,converted age - 3 years to 5 years ago,years,3,3 years to 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,6,N/A,stpn,converted age - More than 5 years ago,years,4,More than 5 years ago,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_06A,cat,NA::b,N/A,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,0.5,N/A,stpn,converted age - Less than one year ago,years,1,Less than one year,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,1.5,N/A,stpn,converted age - 1 year to less than 2 years ago,years,2,1 year to < 2 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,2.5,N/A,stpn,converted age - 2 years to less than 3 years ago,years,3,2 years to < 3 years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,4,N/A,stpn,converted age - 3 or more years ago,years,4,3 or more years,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_06A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]",cat,NA::b,N/A,missing,missing,years,else,else,Stopped smoking - when (was never a daily smoker),"When did you stop smoking? Was it: (less than one year ago, 1 year to less than 2 years ago, 2 years to less than 3 years ago, 3 or more years ago)?", +SMK_09A_A,SMK_09A_A_cat4_1,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,1,4,<1 year,Less than one year ago,years,1,Less than one year ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_2,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,2,4,1 to 2 years,1 year to 2 years ago,years,2,1 year to 2 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_3,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,3,4,3 to 5 years,3 years to 5 years ago,years,3,3 years to 5 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_4,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,4,4,>5 years,More than 5 years ago,years,4,More than 5 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_NA::a,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::a,4,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_A,SMK_09A_A_cat4_NA::b,cat,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,4,missing,missing,years,else,else,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,1,4,<1 year,Less than one year ago,years,1,Less than 1 year,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,2,4,1 to <2 years,1 year to less than 2 years ago,years,2,1 to <2 years,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,3,4,2 to <3 years,2 years to less than 3 years ago,years,3,2 to <3 years,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,4,4,>= 3 years,3 or more years ago,years,4,3 years or more,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::a,4,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::b,4,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_B,SMK_09A_B_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::b,4,missing,missing,years,else,else,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,0.5,N/A,stpo,converted age - Less than one year ago,years,1,Less than one year ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,1.5,N/A,stpo,converted age - 1 year to 2 years ago,years,2,1 year to 2 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,4,N/A,stpo,converted age - 3 years to 5 years ago,years,3,3 years to 5 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,6,N/A,stpo,converted age - More than 5 years ago,years,4,More than 5 years ago,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,cchs2001_p,cchs2001_p::SMKA_09A,cat,NA::b,N/A,missing,missing,years,else,else,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,0.5,N/A,stpo,converted age - Less than one year ago,years,1,Less than 1 year,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,1.5,N/A,stpo,converted age - 1 year to less than 2 years ago,years,2,1 to <2 years,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,2.5,N/A,stpo,converted age - 2 years to less than 3 years ago,years,3,2 to <3 years,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,4,N/A,stpo,converted age - 3 or more years ago,years,4,3 years or more,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::a,N/A,not applicable,not applicable,years,6,not applicable,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::b,N/A,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_09A_cont,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]",cat,NA::b,N/A,missing,missing,years,else,else,stpd,When did you stop smoking daily - former daily smoker - (G), +SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, cchs2015_2016_p::SMK_045, cchs2017_2018_p::SMK_045, [SMK_204]",cont,copy,N/A,Cigarettes/day - daily,# of cigarettes smoked daily - daily smoker,cigarettes,"[1,99]",# of cigarettes smoked daily - daily smoker,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?, +SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, cchs2015_2016_p::SMK_045, cchs2017_2018_p::SMK_045, [SMK_204]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?, +SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, cchs2015_2016_p::SMK_045, cchs2017_2018_p::SMK_045, [SMK_204]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?, +SMK_204,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, cchs2015_2016_p::SMK_045, cchs2017_2018_p::SMK_045, [SMK_204]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,# of cigarettes smoked daily - daily smoker,How many cigarettes did you usually smoke each day?, +SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,copy,N/A,Cigarettes/day - former daily,Cigarettes/day - former daily,cigarettes,"[1,80]",# of cigarettes smoke each day - former daily,# of cigarettes smoked daily - former daily smoker,How many cigarettes did you usually smoke each day?, +SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::a,N/A,not applicable,not applicable,cigarettes,996,not applicable,# of cigarettes smoked daily - former daily smoker,How many cigarettes did you usually smoke each day?, +SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::b,N/A,missing,missing,cigarettes,"[997,999]",don't know (997); refusal (998); not stated (999),# of cigarettes smoked daily - former daily smoker,How many cigarettes did you usually smoke each day?, +SMK_208,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]",cont,NA::b,N/A,missing,missing,cigarettes,else,else,# of cigarettes smoked daily - former daily smoker,How many cigarettes did you usually smoke each day?, +SMKDSTY_A,SMKDSTY_A_cat6_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,1,6,Daily,Daily smoker,N/A,1,Daily,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,2,6,Occasional (former daily),Former daily current occasional smoker,N/A,2,Occasional,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,3,6,Always occasional,Never daily current occasional smoker,N/A,3,Always occasional,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,4,6,Former daily,Former daily current nonsmoker,N/A,4,Former daily,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,5,6,Former occasional,Never daily current nonsmoker (former occasional),N/A,5,Former occasional,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_6,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,6,6,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_A,SMKDSTY_A_cat6_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,6,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,1,3,Current,Current smoker,N/A,"[1,3]",Daily (1); Occasional (2); Always occasional (3),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,2,3,Former,Former smoker,N/A,"[4,5]",Former daily(4); Former occasional (5),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,3,3,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::a,3,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,3,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,3,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_1,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,1,3,Current,Current smoker,N/A,"[1,2]",Daily (1); Occasional (2),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_2,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,2,3,Former,Former smoker,N/A,"[3,5]",Former daily (3); Former occasional (4); Experimental (5),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_3,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,3,3,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::a,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::a,3,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,3,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_cat3,SMKDSTY_cat3_NA::b,cat,"ccsh2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,3,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,1,6,Daily,Current daily smoker,N/A,1,Daily,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,2,6,Occasional,Current occasional smoker,N/A,2,Occasional,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_3,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,3,6,Former daily,Former daily smoker (non-smoker now),N/A,3,Former daily,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_4,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,4,6,Former occasional,Former occasional (non-smoker now),N/A,4,Former occasional,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_5,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,5,6,Experimental,"Experimental smoker (at least 1 cig, non-smoker now)",N/A,5,Experimental,Smoke status,Type of smoker - (D),"2015 onwards for smoke status still has 6 categories, but removed 'always occasional' (Never daily current occasional smoker) and added 'experimental' (at least 1 cig, non-smoker now)" +SMKDSTY_B,SMKDSTY_B_cat6_6,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,6,6,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::a,6,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,6,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_B,SMKDSTY_B_cat6_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,6,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_1,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,1,5,Daily,Current daily smoker,N/A,1,Daily,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_2,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,2,5,Occasional,Current occasional smoker,N/A,"[2,3]",Occasional,Smoke status,Type of smoker - (D),"SMKDSTY_cat5 is a 5 category variable for smoking status for cycles up to 2018. Prior to 2015, 'occasional' and 'always occasional' are combined to form the current 'occasional' category. 2015 onwards, 'former occasional' and 'experimental' are combined to form the current 'former occasional' category" +SMKDSTY_cat5,SMKDSTY_cat5_3,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,3,5,Former daily,Former daily smoker,N/A,4,Former daily,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_4,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,4,5,Former occasional,Former occasional,N/A,5,Former occasional,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_5,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,5,5,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::a,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::a,5,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,5,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::b,cat,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",cat,NA::b,5,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_1,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,1,5,Daily,Current daily smoker,N/A,1,Daily,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_2,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,2,5,Occasional,Current occasional smoker,N/A,2,Occasional,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_3,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,3,5,Former daily,Former daily smoker,N/A,3,Former daily,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_4,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,4,5,Former occasional,Former occasional,N/A,"[4,5]",Former occasional,Smoke status,Type of smoker - (D),"SMKDSTY_cat5 is a 5 category variable for smoking status for cycles up to 2018. Prior to 2015, 'occasional' and 'always occasional' are combined to form the current 'occasional' category. 2015 onwards, 'former occasional' and 'experimental' are combined to form the current 'former occasional' category" +SMKDSTY_cat5,SMKDSTY_cat5_5,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,5,5,Never smoked,Never smoked,N/A,6,Never smoked,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::a,5,not applicable,not applicable,N/A,96,not applicable,Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,5,missing,missing,N/A,"[97,99]",don't know (97); refusal (98); not stated (99),Smoke status,Type of smoker - (D), +SMKDSTY_cat5,SMKDSTY_cat5_NA::b,cat,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY",cat,NA::b,5,missing,missing,N/A,else,else,Smoke status,Type of smoker - (D), +SMKG01C_A,SMKG01C_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,1,10,5 To 11 Years,age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,2,10,12 To 14 Years,age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,3,10,15 To 19 Years,age smoked first whole cigarette (18 to 19),years,3,15 To 19 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,4,10,20 To 24 Years,age smoked first whole cigarette (20 to 24),years,4,20 To 24 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,5,10,25 To 29 Years,age smoked first whole cigarette (25 to 29),years,5,25 To 29 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,6,10,30 To 34 Years,age smoked first whole cigarette (30 to 34),years,6,30 To 34 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,7,10,35 To 39 Years,age smoked first whole cigarette (35 to 39),years,7,35 To 39 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,8,10,40 To 44 Years,age smoked first whole cigarette (40 to 44),years,8,40 To 44 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,9,10,45 To 49 Years,age smoked first whole cigarette (45 to 49),years,9,45 To 49 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,10,10,50 Years or more,age smoked first whole cigarette (50 plus),years,10,50 Years or more,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G), +SMKG01C_A,SMKG01C_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,10,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,1,11,5 To 11 Years,age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,2,11,12 To 14 Years,age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,3,11,15 To 17 Years,age smoked first whole cigarette (15 to 17),years,3,15 To 17 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,4,11,18 To 19 Years,age smoked first whole cigarette (18 to 19),years,4,18 To 19 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,5,11,20 To 24 Years,age smoked first whole cigarette (20 to 24),years,5,20 To 24 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,6,11,25 To 29 Years,age smoked first whole cigarette (25 to 29),years,6,25 To 29 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,7,11,30 To 34 Years,age smoked first whole cigarette (30 to 34),years,7,30 To 34 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,8,11,35 To 39 Years,age smoked first whole cigarette (35 to 39),years,8,35 To 39 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,9,11,40 To 44 Years,age smoked first whole cigarette (40 to 44),years,9,40 To 44 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,10,11,45 To 49 Years,age smoked first whole cigarette (45 to 49),years,10,45 To 49 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,11,11,50 Years or more,age smoked first whole cigarette (50 plus),years,11,50 Years or more,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat10_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat10_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G), +SMKG01C_B,SMKG01C_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::b,11,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,8,N/A,agec1,converted categorical age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,13,N/A,agec1,converted categorical age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,17,N/A,agec1,converted categorical age smoked first whole cigarette (18 to 19),years,3,15 To 19 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,22,N/A,agec1,converted categorical age smoked first whole cigarette (20 to 24),years,4,20 To 24 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,27,N/A,agec1,converted categorical age smoked first whole cigarette (25 to 29),years,5,25 To 29 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,32,N/A,agec1,converted categorical age smoked first whole cigarette (30 to 34),years,6,30 To 34 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,37,N/A,agec1,converted categorical age smoked first whole cigarette (35 to 39),years,7,35 To 39 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,42,N/A,agec1,converted categorical age smoked first whole cigarette (40 to 44),years,8,40 To 44 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,47,N/A,agec1,converted categorical age smoked first whole cigarette (45 to 49),years,9,45 To 49 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,55,N/A,agec1,converted categorical age smoked first whole cigarette (50 plus),years,10,50 Years or more,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C",cat,NA::b,N/A,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,8,N/A,agec1,converted categorical age smoked first whole cigarette (5 to 11),years,1,5 To 11 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,13,N/A,agec1,converted categorical age smoked first whole cigarette (12 to 14),years,2,12 To 14 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,16,N/A,agec1,converted categorical age smoked first whole cigarette (15 to 17),years,3,15 To 17 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,18.5,N/A,agec1,converted categorical age smoked first whole cigarette (18 to 19),years,4,18 To 19 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,22,N/A,agec1,converted categorical age smoked first whole cigarette (20 to 24),years,5,20 To 24 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,27,N/A,agec1,converted categorical age smoked first whole cigarette (25 to 29),years,6,25 To 29 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,32,N/A,agec1,converted categorical age smoked first whole cigarette (30 to 34),years,7,30 To 34 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,37,N/A,agec1,converted categorical age smoked first whole cigarette (35 to 39),years,8,35 To 39 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,42,N/A,agec1,converted categorical age smoked first whole cigarette (40 to 44),years,9,40 To 44 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,47,N/A,agec1,converted categorical age smoked first whole cigarette (45 to 49),years,10,45 To 49 Years,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,55,N/A,agec1,converted categorical age smoked first whole cigarette (50 plus),years,11,50 Years or more,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agec1,Age smoked first whole cigarette - (G), +SMKG01C_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]",cat,NA::b,N/A,missing,missing,years,else,else,agec1,Age smoked first whole cigarette - (G), +SMKG06C,SMKG06C_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,1,3,3 to 5 years,3 to 5 years,years,1,3 to 5 years,stpny,Years since stopped smoking daily - never daily, +SMKG06C,SMKG06C_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,2,3,6 to 10 years,6 to 10 years,years,2,6 to 10 years,stpny,Years since stopped smoking daily - never daily, +SMKG06C,SMKG06C_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,3,3,11+ years,11 or more years,years,3,11 or more years,stpny,Years since stopped smoking daily - never daily, +SMKG06C,SMKG06C_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::a,3,not applicable,not applicable,years,6,not applicable,stpny,Years since stopped smoking daily - never daily, +SMKG06C,SMKG06C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::b,3,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpny,Years since stopped smoking daily - never daily, +SMKG06C,SMKG06C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]",cat,NA::b,3,missing,missing,years,else,else,stpny,Years since stopped smoking daily - never daily, +SMKG09C,SMKG09C_cat3_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,1,3,3 to 5 years,3 to 5 years,years,1,3 to 5 years,stpdy,Years since stopped smoking daily - former daily, +SMKG09C,SMKG09C_cat3_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,2,3,6 to 10 years,6 to 10 years,years,2,6 to 10 years,stpdy,Years since stopped smoking daily - former daily, +SMKG09C,SMKG09C_cat3_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,3,3,11+ years,11 or more years,years,3,11 or more years,stpdy,Years since stopped smoking daily - former daily, +SMKG09C,SMKG09C_cat3_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,NA::a,3,not applicable,not applicable,years,6,not applicable,stpdy,Years since stopped smoking daily - former daily, +SMKG09C,SMKG09C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,NA::b,3,missing,missing,years,"[7,9]",don't know (7); refusal (8); not stated (9),stpdy,Years since stopped smoking daily - former daily,Don't know (7) and refusal (8) not included in CCHS 2015-2016 and CCHS 2017-2018 +SMKG09C,SMKG09C_cat3_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]",cat,NA::b,3,missing,missing,years,else,else,stpdy,Years since stopped smoking daily - former daily, +SMKG203_A,SMKG203_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,1,10,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,2,10,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,3,10,15 to 19 Years,age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,4,10,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,5,10,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,6,10,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,7,10,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,8,10,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,9,10,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,10,10,50 Years or more,age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_A,SMKG203_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,10,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,1,11,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,2,11,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,3,11,15 To 17 Years,age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,4,11,18 To 19 Years,age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,5,11,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,6,11,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,7,11,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,8,11,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,9,11,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,10,11,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,11,11,50 Years or more,age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::a,11,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_B,SMKG203_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,11,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G),Don't know (97) and refusal (98) not included in CCHS 2015-2016 and CCHS 2017-2018 +SMKG203_B,SMKG203_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,11,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,17,N/A,agecigd,converted categorical age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,55,N/A,agecigd,converted categorical age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203",cat,NA::b,N/A,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,16,N/A,agecigd,converted categorical age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,18.5,N/A,agecigd,converted categorical age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,55,N/A,agecigd,converted categorical age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),agecigd,Age started to smoke daily - daily smoker (G), +SMKG203_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]",cat,NA::b,N/A,missing,missing,years,else,else,agecigd,Age started to smoke daily - daily smoker (G), +SMKG207_A,SMKG207_A_cat10_1,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,1,10,5 To 11 Years,age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_2,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,2,10,12 To 14 Years,age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_3,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,3,10,15 to 19 Years,age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_4,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,4,10,20 To 24 Years,age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_5,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,5,10,25 To 29 Years,age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_6,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,6,10,30 To 34 Years,age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_7,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,7,10,35 To 39 Years,age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_8,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,8,10,40 To 44 Years,age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_9,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,9,10,45 To 49 Years,age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_10,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,10,10,50 Years or more,age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_NA::a,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::a,10,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,10,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_A,SMKG207_A_cat10_NA::b,cat,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,10,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_1,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,1,11,5 To 11 Years,age (5 to 11) started smoking daily - former daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_2,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,2,11,12 To 14 Years,age (12 to 14) started smoking daily - former daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_3,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,3,11,15 To 17 Years,age (15 to 17) started smoking daily - former daily smoker,years,3,15 To 17 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_4,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,4,11,18 To 19 Years,age (18 to 19) started smoking daily - former daily smoker,years,4,18 To 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_5,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,5,11,20 To 24 Years,age (20 to 24) started smoking daily - former daily smoker,years,5,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_6,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,6,11,25 To 29 Years,age (25 to 29) started smoking daily - former daily smoker,years,6,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_7,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,7,11,30 To 34 Years,age (30 to 34) started smoking daily - former daily smoker,years,7,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_8,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,8,11,35 To 39 Years,age (35 to 39) started smoking daily - former daily smoker,years,8,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_9,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,9,11,40 To 44 Years,age (40 to 44) started smoking daily - former daily smoker,years,9,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_10,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,10,11,45 To 49 Years,age (45 to 49) started smoking daily - former daily smoker,years,10,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_11,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,11,11,50 Years or more,age (50 plus) started smoking daily - former daily smoker,years,11,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_NA::a,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::a,11,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,11,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_B,SMKG207_B_cat11_NA::b,cat,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,11,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,17,N/A,agecigd,converted categorical age (15 to 19) started smoking daily - daily smoker,years,3,15 to 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,4,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,5,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,6,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,7,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,8,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,9,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,55,N/A,agecigd,converted categorical age (50 or more) started smoking daily - daily smoker,years,10,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207",cat,NA::b,N/A,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,8,N/A,agecigd,converted categorical age (5 to 11) started smoking daily - daily smoker,years,1,5 To 11 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,13,N/A,agecigd,converted categorical age (12 to 14) started smoking daily - daily smoker,years,2,12 To 14 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,16,N/A,agecigd,converted categorical age (15 to 17) started smoking daily - daily smoker,years,3,15 To 17 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,18.5,N/A,agecigd,converted categorical age (18 to 19) started smoking daily - daily smoker,years,4,18 To 19 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,22,N/A,agecigd,converted categorical age (20 to 24) started smoking daily - daily smoker,years,5,20 To 24 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,27,N/A,agecigd,converted categorical age (25 to 29) started smoking daily - daily smoker,years,6,25 To 29 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,32,N/A,agecigd,converted categorical age (30 to 34) started smoking daily - daily smoker,years,7,30 To 34 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,37,N/A,agecigd,converted categorical age (35 to 39) started smoking daily - daily smoker,years,8,35 To 39 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,Missing 2001 Data +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,42,N/A,agecigd,converted categorical age (40 to 44) started smoking daily - daily smoker,years,9,40 To 44 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,Missing 2001 Data +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,47,N/A,agecigd,converted categorical age (45 to 49) started smoking daily - daily smoker,years,10,45 To 49 Years,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,Missing 2001 Data +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,55,N/A,agecigd,converted categorical age (50 plus) started smoking daily - daily smoker,years,11,50 Years or more,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,Missing 2001 Data +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?,Missing 2001 Data +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG207_cont,N/A,cont,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]",cat,NA::b,N/A,missing,missing,years,else,else,Age started to smoke daily - former daily (G),At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_1,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,1,11,5 To 11 Years,age (5 to 11) started smoking daily - daily/former daily smoker,years,1,5 To 11 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_2,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,2,11,12 To 14 Years,age (12 to 14) started smoking daily - daily/former daily smoker,years,2,12 To 14 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_3,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,3,11,15 To 17 Years,age (15 to 17) started smoking daily - daily/former daily smoker,years,3,15 To 17 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_4,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,4,11,18 To 19 Years,age (18 to 19) started smoking daily - daily/former daily smoker,years,4,18 To 19 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_5,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,5,11,20 To 24 Years,age (20 to 24) started smoking daily - daily/former daily smoker,years,5,20 To 24 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_6,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,6,11,25 To 29 Years,age (25 to 29) started smoking daily - daily/former daily smoker,years,6,25 To 29 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_7,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,7,11,30 To 34 Years,age (30 to 34) started smoking daily - daily/former daily smoker,years,7,30 To 34 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_8,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,8,11,35 To 39 Years,age (35 to 39) started smoking daily - daily/former daily smoker,years,8,35 To 39 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_9,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,9,11,40 To 44 Years,age (40 to 44) started smoking daily - daily/former daily smoker,years,9,40 To 44 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_10,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,10,11,45 To 49 Years,age (45 to 49) started smoking daily - daily/former daily smoker,years,10,45 To 49 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_11,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,11,11,50 Years or more,age (50 or more) started smoking daily - daily/former daily smoker,years,11,50 Years or more,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::a,11,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040,SMKG040_cat11_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::b,11,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?,Don't know (97) and refusal (98) not included in CCHS 2015-2016 and CCHS 2017-2018 +SMKG040,SMKG040_cat11_NA::a,cat,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::b,11,missing,missing,years,else,else,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKG203_cont, SMKG207_cont]",N/A,Func::SMKG040_fun,N/A,N/A,N/A,years,N/A,N/A,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKG203_cont, SMKG207_cont]",N/A,NA::b,N/A,missing,missing,years,N/A,N/A,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,8,N/A,agecigdfd,converted categorical age (5 to 11) started smoking daily - daily/former daily smoker,years,1,5 To 11 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,13,N/A,agecigdfd,converted categorical age (12 to 14) started smoking daily - daily/former daily smoker,years,2,12 To 14 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,16,N/A,agecigdfd,converted categorical age (15 to 17) started smoking daily - daily/former daily smoker,years,3,15 To 17 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,18.5,N/A,agecigdfd,converted categorical age (18 to 19) started smoking daily - daily/former daily smoker,years,4,18 To 19 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,22,N/A,agecigdfd,converted categorical age (20 to 24) started smoking daily - daily/former daily smoker,years,5,20 To 24 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,27,N/A,agecigdfd,converted categorical age (25 to 29) started smoking daily - daily/former daily smoker,years,6,25 To 29 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,32,N/A,agecigdfd,converted categorical age (30 to 34) started smoking daily - daily/former daily smoker,years,7,30 To 34 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,37,N/A,agecigdfd,converted categorical age (35 to 39) started smoking daily - daily/former daily smoker,years,8,35 To 39 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,42,N/A,agecigdfd,converted categorical age (40 to 44) started smoking daily - daily/former daily smoker,years,9,40 To 44 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,47,N/A,agecigdfd,converted categorical age (45 to 49) started smoking daily - daily/former daily smoker,years,10,45 To 49 Years,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,55,N/A,agecigdfd,converted categorical age (50 or more) started smoking daily - daily/former daily smoker,years,11,50 Years or more,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::a,N/A,not applicable,not applicable,years,96,not applicable,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::b,N/A,missing,missing,years,"[97,99]",don't know (97); refusal (98); not stated (99),Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?,Don't know (97) and refusal (98) not included in CCHS 2015-2016 and CCHS 2017-2018 +SMKG040_cont,N/A,cont,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040],cat,NA::b,N/A,missing,missing,years,else,else,Age started to smoke daily - daily/former daily,At what age did you begin to smoke cigarettes daily?, +smoke_simple,smoke_simple_catN/A_Func::smoke_simple_fun,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,Func::smoke_simple_fun,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_1,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,1,4,Non-smoker (never smoked),Non-smoker (never smoked),N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_2,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,2,4,Current smoker (daily and occasional),Current smoker (daily and occasional),N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_3,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,3,4,Former daily smoker quit less than 5 years or former occasional smoker ,Former daily smoker quit less than 5 years or former occasional smoker ,N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_4,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,4,4,Former daily smoker quit >5 years,Former daily smoker quit >5 years,N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_NA::a,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,NA::a,4,not applicable,not applicable,N/A,N/A,N/A,N/A,N/A, +smoke_simple,smoke_simple_cat4_NA::b,cat,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]",N/A,NA::b,4,missing,missing,N/A,N/A,N/A,N/A,N/A, +time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,Func::time_quit_smoking_fun,N/A,N/A,N/A,Years,N/A,N/A,Time since quit,Time since quit smoking,Variable derived from various harmonized smoking variables +time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,NA::a,N/A,not applicable,not applicable,Years,N/A,N/A,Time since quit,Time since quit smoking, +time_quit_smoking,N/A,cont,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMK_09A_B, SMKG09C]",N/A,NA::b,N/A,missing,missing,Years,N/A,N/A,Time since quit,Time since quit smoking, +WTS_M,N/A,cont,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::WTSAM, cchs2003_p::WTSC_M, cchs2005_p::WTSE_M, [WTS_M]",N/A,copy,N/A,N/A,N/A,N/A,"[1.07,26332.62]",N/A,Weights,Weights - Master, \ No newline at end of file diff --git a/inst/extdata/variables.csv b/inst/extdata/variables.csv index dc28c23a..95e7faa8 100644 --- a/inst/extdata/variables.csv +++ b/inst/extdata/variables.csv @@ -1,65 +1,76 @@ variable,label,labelLong,section,subject,variableType,units,databaseStart,variableStart,description -ADL_01,Help preparing meals,Needs help - preparing meals,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, [ADL_01]", -ADL_02,Help appointments/errands,Needs help - getting to appointments/errands,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, [ADL_02]", -ADL_03,Help housework,Needs help - doing housework,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, [ADL_03]", -ADL_04,Help personal care,Needs help - personal care,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, [ADL_04]", -ADL_05,Help move inside house,Needs help - moving about inside house,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, [ADL_05]", -ADL_06,Help personal finances,Needs help - looking after finances,Health status,ADL,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, [ADL_06]", +ADL_01,Help preparing meals,Needs help - preparing meals,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::RACA_6A, cchs2003_p::RACC_6A, cchs2005_p::RACE_6A, cchs2007_2008_p::RAC_6A, cchs2015_2016_p::ADL_005, cchs2017_2018_p::ADL_005, [ADL_01]", +ADL_01_A,Help preparing meals,Needs help - preparing meals,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_005],"For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with preparing meals?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_02,Help appointments/errands,Needs help - getting to appointments/errands,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::RACA_6B, cchs2003_p::RACC_6B1, cchs2005_p::RACE_6B1, cchs2007_2008_p::RAC_6B1, cchs2015_2016_p::ADL_010, cchs2017_2018_p::ADL_010, [ADL_02]", +ADL_02_A,Help appointments/errands,Needs help - getting to appointments/errands,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_010],"For 2015 onwards, question was reword to 'Because of any physical condition, mental condition or health problem, do you have any difficulty with running errands such as shopping for groceries?' If they needed help from another person, it is indicated in the answer categories (Yes need help or Yes no help). In the universe, respondents must said yes to ""Activities of daily living"" before answering this question, therefore the sample size is small." +ADL_03,Help housework,Needs help - doing housework,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::RACA_6C, cchs2003_p::RACC_6C, cchs2005_p::RACE_6C, cchs2007_2008_p::RAC_6C, cchs2015_2016_p::ADL_015, cchs2017_2018_p::ADL_015, [ADL_03]", +ADL_03_A,Help housework,Needs help - doing housework,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_015], +ADL_04,Help personal care,Needs help - personal care,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::RACA_6E, cchs2003_p::RACC_6E, cchs2005_p::RACE_6E, cchs2007_2008_p::RAC_6E, cchs2015_2016_p::ADL_020, cchs2017_2018_p::ADL_020[ADL_04]", +ADL_04_A,Help personal care,Needs help - personal care,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_020], +ADL_05,Help move inside house,Needs help - moving about inside house,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::RACA_6F, cchs2003_p::RACC_6F, cchs2005_p::RACE_6F, cchs2007_2008_p::RAC_6F, cchs2015_2016_p::ADL_025, cchs2017_2018_p::ADL_025, [ADL_05]", +ADL_05_A,Help move inside house,Needs help - moving about inside house,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_025], +ADL_06,Help personal finances,Needs help - looking after finances,Health status,ADL,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::RACC_6G, cchs2005_p::RACE_6G, cchs2007_2008_p::RAC_6G, cchs2015_2016_p::ADL_030, cchs2017_2018_p::ADL_030, [ADL_06]", +ADL_06_A,Help personal finances,Needs help - looking after finances,Health status,ADL,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[ADL_030], ADL_07,Help heavy household chores,Needs help - heavy household chores,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::RACA_6D, cchs2003_p::RACC_6D, cchs2005_p::RACE_6D", -ADL_der,Derived help tasks,Derived needs help with tasks,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]", -ADL_score_5,ADL score ,"Derived using the ADL variables common to all cycles from 2001 to 2014 (ADL_01, ADL_02, ADL_03, ADL_04, ADL_05) to represent the number of tasks that an individual needs help with.",Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]", +ADL_der,Derived help tasks,Derived needs help with tasks,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]", +ADL_score_5,ADL score ,"Derived using the ADL variables common to all cycles from 2001 to 2014 (ADL_01, ADL_02, ADL_03, ADL_04, ADL_05) to represent the number of tasks that an individual needs help with.",Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[ADL_01, ADL_02, ADL_03, ADL_04, ADL_05]", ADLF6R,Help tasks,Needs help with at least one task - (F),Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACAF6, cchs2003_p::RACCF6R, cchs2005_p::RACEF6R, cchs2007_2008_p::RACF6R, [ADLF6R]", -ADM_RNO,Sequential record number,Sequential record number,N/A,N/A,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ADMA_RNO, cchs2003_p::ADMC_RNO, cchs2005_p::ADME_RNO, [ADM_RNO]", -ALC_1,Alcohol past year,"Past year, have you drank alcohol",Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, [ALC_1]", -ALCDTTM,Drinker type (last 12 months),Type of drinker (12 months),Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALCDTTM]", +ADM_RNO,Sequential record number,Sequential record number,N/A,N/A,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ADMA_RNO, cchs2003_p::ADMC_RNO, cchs2005_p::ADME_RNO, [ADM_RNO]", +ALC_1,Alcohol past year,"Past year, have you drank alcohol",Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_1, cchs2003_p::ALCC_1, cchs2005_p::ALCE_1, cchs2015_2016_p::ALC_010, cchs2017_2018_p::ALC_010, [ALC_1]", +ALC_005,Alcohol in lifetime,"In lifetime, ever drank alcohol?",Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5B, cchs2003_p::ALCC_5B, cchs2005_p::ALCE_5B, cchs2007_2008_p::ALN_1, [ALC_005]", +ALCDTTM,Drinker type (last 12 months),Type of drinker (12 months),Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, cchs2015_2016_p::ALCDVTTM, cchs2017_2018_p::ALCDVTTM, [ALCDTTM]", ALCDTYP,Drinker type,Type of drinker - (D),Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::ALCADTYP, cchs2003_p::ALCCDTYP, cchs2005_p::ALCEDTYP, [ALNDTYP]", -ALW_1,Any alcohol past week,"Past week, had any alcohol",Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, [ALW_1]", -ALW_2A1,# of drinks - Sunday,Number of drinks on Sunday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, [ALW_2A1]", -ALW_2A2,# of drinks - Monday,Number of drinks on Monday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, [ALW_2A2]", -ALW_2A3,# of drinks - Tuesday,Number of drinks on Tuesday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, [ALW_2A3]", -ALW_2A4,# of drinks - Wednesday,Number of drinks on Wednesday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, [ALW_2A4]", -ALW_2A5,# of drinks - Thursday,Number of drinks on Thursday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, [ALW_2A5]", -ALW_2A6,# of drinks - Friday,Number of drinks on Friday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, [ALW_2A6]", -ALW_2A7,# of drinks - Saturday,Number of drinks on Saturday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, [ALW_2A7]", -ALWDDLY,Average daily consumption,Average daily alcohol consumption,Health behaviour,Alcohol,Continuous,drinks/day,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY , [ALWDDLY]", -ALWDWKY,Drinks last week,Weekly consumption of alcohol,Health behaviour,Alcohol,Continuous,drinks/week,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, [ALWDWKY]", -binge_drinker,Binge Drinker,Binge Drinker,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]", -CCC_031,Asthma,Do you have asthma?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, [CCC_031]", -CCC_041,Fibromyalgia,Do you have Fibromyalgia?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, [CCC_041]", -CCC_051,Arthritis/Rheumatism,Do you have arthritis or rheumatism?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, [CCC_051]", -CCC_061,Back problems,Do you have back problems?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, [CCC_061]", -CCC_071,Hypertension,Do you have high blood pressure,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, [CCC_071]", +ALW_1,Any alcohol past week,"Past week, had any alcohol",Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5, cchs2003_p::ALCC_5, cchs2005_p::ALCE_5, cchs2015_2016_p::ALW_005, cchs2017_2018_p::ALW_005, [ALW_1]", +ALW_2A1,# of drinks - Sunday,Number of drinks on Sunday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A1, cchs2003_p::ALCC_5A1, cchs2005_p::ALCE_5A1, cchs2015_2016_p::ALW_010, cchs2017_2018_p::ALW_010, [ALW_2A1]", +ALW_2A2,# of drinks - Monday,Number of drinks on Monday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A2, cchs2003_p::ALCC_5A2, cchs2005_p::ALCE_5A2, cchs2015_2016_p::ALW_015, cchs2017_2018_p::ALW_015, [ALW_2A2]", +ALW_2A3,# of drinks - Tuesday,Number of drinks on Tuesday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A3, cchs2003_p::ALCC_5A3, cchs2005_p::ALCE_5A3, cchs2015_2016_p::ALW_020, cchs2017_2018_p::ALW_020, [ALW_2A3]", +ALW_2A4,# of drinks - Wednesday,Number of drinks on Wednesday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A4, cchs2003_p::ALCC_5A4, cchs2005_p::ALCE_5A4, cchs2015_2016_p::ALW_025, cchs2017_2018_p::ALW_025, [ALW_2A4]", +ALW_2A5,# of drinks - Thursday,Number of drinks on Thursday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A5, cchs2003_p::ALCC_5A5, cchs2005_p::ALCE_5A5, cchs2015_2016_p::ALW_030, cchs2017_2018_p::ALW_030, [ALW_2A5]", +ALW_2A6,# of drinks - Friday,Number of drinks on Friday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A6, cchs2003_p::ALCC_5A6, cchs2005_p::ALCE_5A6, cchs2015_2016_p::ALW_035, cchs2017_2018_p::ALW_035, [ALW_2A6]", +ALW_2A7,# of drinks - Saturday,Number of drinks on Saturday,Health behaviour,Alcohol,Continuous,drinks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCA_5A7, cchs2003_p::ALCC_5A7, cchs2005_p::ALCE_5A7, cchs2015_2016_p::ALW_040, cchs2017_2018_p::ALW_040, [ALW_2A7]", +ALWDDLY,Average daily consumption,Average daily alcohol consumption,Health behaviour,Alcohol,Continuous,drinks/day,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADDLY , cchs2003_p::ALCCDDLY , cchs2005_p::ALCEDDLY, cchs2015_2016_p::ALWDVDLY, cchs2017_2018_p::ALWDVDLY, [ALWDDLY]", +ALWDWKY,Drinks last week,Weekly consumption of alcohol,Health behaviour,Alcohol,Continuous,drinks/week,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::ALCADWKY, cchs2003_p::ALCCDWKY, cchs2005_p::ALCEDWKY, cchs2015_2016_p::ALWDVWKY, cchs2017_2018_p::ALWDVWKY, [ALWDWKY]", +ALWDVSTR_der,Short Term Drinking Risk,Low drinking - Increased short term risks due to drinking,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/ykau5/ . +ALWDVLTR_der,Long Term Drinking Risk,Low drinking - Increased long term risks due to drinking,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_1, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]",Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/ykau5/ . +binge_drinker,Binge Drinker,Binge Drinker,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALW_1, ALW_2A1, ALW_2A2, ALW_2A3, ALW_2A4, ALW_2A5, ALW_2A6, ALW_2A7]", +CCC_031,Asthma,Do you have asthma?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_031, cchs2003_p::CCCC_031, cchs2005_p::CCCE_031, cchs2015_2016_p::CCC_015, cchs2017_2018_p::CCC_015, [CCC_031]", +CCC_041,Fibromyalgia,Do you have Fibromyalgia?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_041, cchs2003_p::CCCC_041, cchs2005_p::CCCE_041, cchs2015_2016_p::CCC_045, cchs2017_2018_p::CCC_045, [CCC_041]", +CCC_051,Arthritis/Rheumatism,Do you have arthritis or rheumatism?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_051, cchs2003_p::CCCC_051, cchs2005_p::CCCE_051, cchs2015_2016_p::CCC_050, cchs2017_2018_p::CCC_050, [CCC_051]", +CCC_061,Back problems,Do you have back problems?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_061, cchs2003_p::CCCC_061, cchs2005_p::CCCE_061, cchs2015_2016_p::CCC_055, cchs2017_2018_p::CCC_055, [CCC_061]", +CCC_071,Hypertension,Do you have high blood pressure?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_071, cchs2003_p::CCCC_071, cchs2005_p::CCCE_071, cchs2015_2016_p::CCC_065, cchs2017_2018_p::CCC_065, [CCC_071]", CCC_072,Hypertension diagnosis,Have you ever been diagnosed with high blood pressure?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_072, [CCC_072]", -CCC_073,Hypertension medication,In the past month have you taken any medicine for high blood pressure?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_073, [CCC_073]", -CCC_081,Migraine Headache,Do you have migraine headaches?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, [CCC_081]", -CCC_091,COPD/Emphysema,"Do you have COPD (eg bronchitis, emphysema)",Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, [CCC_091]", -CCC_101,Diabetes,Do you have diabetes,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, [CCC_101]", +CCC_073,Hypertension medication,In the past month have you taken any medicine for high blood pressure?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_073, cchs2015_2016_p::CCC_070, cchs2017_2018_p::CCC_070, [CCC_073]", +CCC_081,Migraine Headache,Do you have migraine headaches?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_081, cchs2003_p::CCCC_081, cchs2005_p::CCCE_081, cchs2015_2016_p::CCC_140, cchs2017_2018_p::CCC_140, [CCC_081]", +CCC_091,COPD/Emphysema/Bronchitis,"Do you have COPD (eg bronchitis, emphysema)?",Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_91B, cchs2003_p::CCCC_91B, cchs2015_2016_p::CCC_030, cchs2017_2018_p::CCC_030, [CCC_091]", +CCC_101,Diabetes,Do you have diabetes?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_101, cchs2003_p::CCCC_101, cchs2005_p::CCCE_101, cchs2015_2016_p::CCC_095, cchs2017_2018_p::CCC_095, [CCC_101]", CCC_111,Epilepsy,Do you have epilepsy?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::CCCA_111, cchs2003_p::CCCC_111, cchs2005_p::CCCE_111", -CCC_121,Heart Disease,Do you have heart disease,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, [CCC_121]", -CCC_131,Active Cancer,Do you have cancer,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, [CCC_131]", -CCC_151,Stroke,Do you suffer from effects of stroke,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, [CCC_151]", +CCC_121,Heart Disease,Do you have heart disease?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_121, cchs2003_p::CCCC_121, cchs2005_p::CCCE_121, cchs2015_2016_p::CCC_085, cchs2017_2018_p::CCC_085, [CCC_121]", +CCC_131,Active Cancer,Do you have cancer?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_131, cchs2003_p::CCCC_131, cchs2005_p::CCCE_131, cchs2015_2016_p::CCC_130, cchs2017_2018_p::CCC_130, [CCC_131]", +CCC_151,Stroke,Do you suffer from effects of stroke?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::CCCA_151, cchs2003_p::CCCC_151, cchs2005_p::CCCE_151, cchs2015_2016_p::CCC_090, cchs2017_2018_p::CCC_090, [CCC_151]", CCC_171,Bowel disorder,Do you have a bowel disorder such as Crohn's disease or colitis?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::CCCA_171, cchs2003_p::CCCC_171, cchs2005_p::CCCE_171, [CCC_171]", CCC_251,Chronic fatigue,Do you have chronic fatigue syndrome?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2010_p, cchs2014_p","cchs2001_p::CCCA_251, cchs2003_p::CCCC_251, cchs2005_p::CCCE_251, [CCC_251]", -CCC_280,Mood disorder,Do you have a mood disorder,Health status,Chronic condition,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, [CCC_280]", -CCC_290,Anxiety Disorder,Do you have an anxiety disorder,Health status,Chronic condition,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, [CCC_290]", -CCC_31A,Cancer diagnosis,Have you ever been diagnosed with cancer?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::CCCE_31A, [CCC_31A]", +CCC_280,Mood disorder,Do you have a mood disorder?,Health status,Chronic condition,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_280, cchs2005_p::CCCE_280, cchs2015_2016_p::CCC_195, cchs2017_2018_p::CCC_195, [CCC_280]", +CCC_290,Anxiety Disorder,Do you have an anxiety disorder?,Health status,Chronic condition,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::CCCC_290, cchs2005_p::CCCE_290, cchs2015_2016_p::CCC_200, cchs2017_2018_p::CCC_200, [CCC_290]", +CCC_31A,Cancer diagnosis,Have you ever been diagnosed with cancer?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::CCCE_31A, cchs2015_2016_p::CCC_135, cchs2017_2018_p::CCC_135, [CCC_31A]", CCC_91A,Bronchitis,Do you have chronic bronchitis?,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2001_p::CCCA_91A, cchs2003_p::CCCC_91A, cchs2005_p::CCCE_91A, [CCC_91A]", CCC_91E,Emphysema,Do you have emphysema?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91E, cchs2007_2008_p::CCC_91E", CCC_91F,COPD,Do you have COPD?,Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p","cchs2005_p::CCCE_91F, cchs2007_2008_p::CCC_91F", -COPD_Emph_der,COPD/Emphysema,COPD/Emphysema,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F], DerivedVar::[DHHGAGE_cont, CCC_091]", -DHH_OWN,Home ownership,Dwelling - owned by a member of hsld,Sociodemographics,Home ownership,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]", -DHH_SEX,Sex,Sex,Demographics,Sex,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]", -DHHGAGE_5,Age,Age (20-year age groups),Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005, cchs2007_2008, cchs2009_2010, cchs2010, cchs2011_2012, cchs2012, cchs2013_2014, cchs2014","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]","5 age groups: <20, 20 to 39, 40 to 59, 60 to 79, 80+ years" +CCC_075,Blood cholesterol,Do you have high blood cholesterol or lipids?,Health status,Chronic condition,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[CCC_075], +COPD_Emph_der,COPD/Emphysema,COPD/Emphysema,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F], DerivedVar::[DHHGAGE_cont, CCC_091]", +DHH_OWN,Home ownership,Dwelling - owned by a member of hsld,Sociodemographics,Home ownership,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_OWN, cchs2003_p::DHHC_OWN, cchs2005_p::DHHE_OWN, [DHH_OWN]", +DHH_SEX,Sex,Sex,Demographics,Sex,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHA_SEX, cchs2003_p::DHHC_SEX, cchs2005_p::DHHE_SEX, [DHH_SEX]", +DHHGAGE_5,Age,Age (20-year age groups),Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]","5 age groups: <20, 20 to 39, 40 to 59, 60 to 79, 80+ years" DHHGAGE_A,Age,Age,Demographics,Age,Categorical,Years,"cchs2001_p, cchs2003_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE", -DHHGAGE_B,Age,Age,Demographics,Age,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DHHEGAGE, [DHHGAGE]", -DHHGAGE_C,Age,Categorical age,Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[DHHGAGE_cont],Derived categorical age variable using DHHGAGE_cont -DHHGAGE_cont,Age,Converted categorical age,Demographics,Age,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]",Continuous age variable -DHHGAGE_D,Age,Age (10-year age groups),Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]","8 age groups: 12 to 19, 20 to 29, 30 to 39, 40 to 49, 50 to 59, 60 to 69, 70 to 79, 80+ years" -DHHGHSZ,Household size,Household size,Sociodemographics,Household Characteristics,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, [DHHGHSZ]", -DHHGMS,Marital status,Marital status - (G),Sociodemographics,Marital Status,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]", -diet_score,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice",Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, SFVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]","A derived diet variable based on daily consumption of ""fruit, salad, potatoes, carrots, other vegetables, and juice"". Two baseline points plus summation of total points for diet attributes with penalty for high potato intake, no carrot intake and high juice consumption (negative overall scores are recoded to 0, resulting in a range from 0 to 10)." -DIS_10G,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10G, [DIS_10G]", -DIS_10H,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::DISE_10H, [DIS_10H]", +DHHGAGE_B,Age,Age,Demographics,Age,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::DHHEGAGE, [DHHGAGE]", +DHHGAGE_C,Age,Categorical age,Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[DHHGAGE_cont],Derived categorical age variable using DHHGAGE_cont +DHHGAGE_cont,Age,Converted categorical age,Demographics,Age,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]",Continuous age variable +DHHGAGE_D,Age,Age (10-year age groups),Demographics,Age,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGAGE, cchs2003_p::DHHCGAGE, cchs2005_p::DHHEGAGE, [DHHGAGE]","8 age groups: 12 to 19, 20 to 29, 30 to 39, 40 to 49, 50 to 59, 60 to 69, 70 to 79, 80+ years" +DHHGHSZ,Household size,Household size,Sociodemographics,Household Characteristics,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::DHHCGHSZ, cchs2005_p::DHHEGHSZ, cchs2015_2016_p::DHHDGHSZ, cchs2017_2018_p::DHHDGHSZ, [DHHGHSZ]", +DHHGMS,Marital status,Marital status - (G),Sociodemographics,Marital Status,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::DHHAGMS, cchs2003_p::DHHCGMS, cchs2005_p::DHHEGMS, [DHHGMS]", +diet_score,Diet score ,"Diet score (0 to 10) based on daily consumption of fruit, vegetables and fruit juice",Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[FVCDFRU, FVCDSAL, FVCDPOT, FVCDCAR, FVCDVEG, FVCDJUI, DHH_SEX]","A derived diet variable based on daily consumption of ""fruit, salad, potatoes, carrots, other vegetables, and juice"". Two baseline points plus summation of total points for diet attributes with penalty for high potato intake, no carrot intake and high juice consumption (negative overall scores are recoded to 0, resulting in a range from 0 to 10)." +diet_score_cat3,Categorical diet score,Categorical diet score,Health behaviour,Diet,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[diet_score],Derived categorical diet score using diet_score +DIS_10G,Frequency - distress: felt sad / depressed - past month,"(During the past month, about how often did you feel) sad or depressed?",Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10G, cchs2017_2018_p::DIS_035, [DIS_10G]", +DIS_10H,Frequency - distress: depressed/nothing cheers - past month,"(During the past month, about how often did you feel) so depressed that nothing could cheer you up?",Health status,Chronic condition,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2017_2018_p","cchs2005_p::DISE_10H, cchs2017_2018_p::DIS_040, [DIS_10H]", DPS_02,Felt sad/blue/depressed - 2 weeks or more - 12 mo,"During the past 12 months, was there ever a time when you felt sad, blue, or depressed for 2 weeks or more in a row?",Health status,Chronic condition,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_02], DPS_03,Sad/depressed - length feelings lasted - 2 wk,"Think of the 2-week period during the past 12 months when these feelings were the worst. During that time, how long did these feelings usually last: (all day long, most of the day, about half of the day, or less than half of a day)?",Health status,Chronic condition,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_03], DPS_04,Sad/depressed - frequency - 2 wk,"How often did you feel this way during those 2 weeks: (every day, almost every day, or less often)?",Health status,Chronic condition,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p",[DPS_04], @@ -78,59 +89,77 @@ DPSDMT,Specific month when felt depressed,Specific month felt depressed - 2 week DPSDPP,Depression Scale - Predicted Probability,Depression Scale - Predicted Probability,Health status,Chronic condition,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADPP, cchs2003_p::DPSCDPP, cchs2005_p::DPSEDPP, [DPSDPP]", DPSDSF,Depression Scale - Short Form Score,Depression Scale - Short Form Score,Health status,Chronic condition,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADSF, cchs2003_p::DPSCDSF, cchs2005_p::DPSEDSF, [DPSDSF]", DPSDWK,Number of weeks felt depressed - (D),Number of weeks felt depressed - (D),Health status,Chronic condition,Continuous,weeks,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::DPSADWK, cchs2003_p::DPSCDWK, cchs2005_p::DPSEDWK, [DPSDWK]", -EDUDR04,Highest education,Highest level/education,Sociodemographics,Education,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]", +DEPDVSEV,Depression scale - severity of depression,Depression scale - severity of depression,Health status,Chronic condition,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p",[DEPDVPHQ],This module is a validated instrument to measure self-reported depression. It is called PHQ-9 and was developed by Spitzer et al (1999). It was first introduced in the CCHS in 2015. +EDUDR04,Highest education,Highest level/education - 4 categories,Sociodemographics,Education,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, [EDUDR04]", +EDUDR03,Highest education,Highest level/education - 3 categories,Sociodemographics,Education,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::EDUADR04, cchs2003_p::EDUCDR04, cchs2005_p::EDUEDR04, cchs2015_2016_p::EHG2DVR3, cchs2017_2018_p::EHG2DVR3, [EDUDR04]", +energy_exp,Daily energy expenditure,Daily energy expenditure,Health behaviour,Exercise,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE], DerivedVar::[DHHGAGE_cont, PAA_045, PAA_050, PAA_075, PAA_080, PAADVDYS, PAADVVIG, PAYDVTOA, PAYDVADL, PAY_105, PAYDVDYS]", FINF1,Food insecurity 12M,Some food insecurity in past 12 months,Sociodemographics,Food security,Categorical,N/A,"cchs2001_p, cchs2003_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1", -FLU_160,Ever had a flu shot,Have you ever had a flu shot?,Health care use,Vaccination,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, [FLU_160]", -FLU_162,Last time had flu shot,When did you have your last flu shot?,Health care use,Vaccination,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, [FLU_162]", -food_insecurity_der,Food insecurity 12M,Derived food insecurity,Sociodemographics,Food security,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1, [FSCEDHFS], [FSCDHFS2]", +FLU_160,Ever had a flu shot,Have you ever had a flu shot?,Health care use,Vaccination,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_160, cchs2003_p::FLUC_160, cchs2005_p::FLUE_160, cchs2015_2016_p::FLU_005, cchs2017_2018_p::FLU_005, [FLU_160]", +FLU_162,Last time had flu shot,When did you have your last flu shot?,Health care use,Vaccination,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FLUA_162, cchs2003_p::FLUC_162, cchs2005_p::FLUE_162, cchs2015_2016_p::FLU_010, cchs2017_2018_p::FLU_010, [FLU_162]", +food_insecurity_der,Food insecurity 12M,Derived food insecurity,Sociodemographics,Food security,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FINAF1, cchs2003_p::FINCF1, [FSCEDHFS], cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]", FSCDHFS,Food security,Household food security status - (D),Sociodemographics,Food security,Categorical,N/A,cchs2005_p,[FSCEDHFS], -FSCDHFS2,HC food security,Household food security status - (HC),Sociodemographics,Food security,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[FSCDHFS2], -FVCDCAR,Carrot consumption,Daily consumption - carrots (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, [FVCDCAR]", -FVCDFRU,Fruit consumption,Daily consumption - fruit - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, [FVCDFRU]", -FVCDJUI,Juice consumption,Daily consumption - fruit juice (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, [FVCDJUI]", -FVCDPOT,Potato consumption,Daily consumption - potatoes (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, [FVCDPOT]", -FVCDSAL,Salad consumption,Daily consumption - green salad - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, [FVCDSAL]", -FVCDTOT,Total fruit/veg consumption,Daily consumptoin - total fruits and veg. - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, [FVCDTOT]", -FVCDVEG,Other veg consumption,Daily consumption other vegetables - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, [FVCDVEG]", -GEN_01,Self-perceived health,Self-perceived health,Health status,Self-perceived health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, [GEN_01]", +FSCDHFS2,HC food security,Household food security status - (HC),Sociodemographics,Food security,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::FSCDVHFS, cchs2017_2018_p::FSCDVHFS, [FSCDHFS2]", +FVCDCAR,Carrot consumption,Daily consumption - carrots (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADCAR, cchs2003_p::FVCCDCAR, cchs2005_p::FVCEDCAR, cchs2015_2016_p::FVCDVORA, cchs2017_2018_p::FVCDVORA, [FVCDCAR]", +FVCDFRU,Fruit consumption,Daily consumption - fruit - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADFRU, cchs2003_p::FVCCDFRU, cchs2005_p::FVCEDFRU, cchs2015_2016_p::FVCDVFRU, cchs2017_2018_p::FVCDVFRU, [FVCDFRU]", +FVCDJUI,Juice consumption,Daily consumption - fruit juice (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADJUI, cchs2003_p::FVCCDJUI, cchs2005_p::FVCEDJUI, cchs2015_2016_p::FVCDVJUI, cchs2017_2018_p::FVCDVJUI, [FVCDJUI]", +FVCDPOT,Potato consumption,Daily consumption - potatoes (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADPOT, cchs2003_p::FVCCDPOT, cchs2005_p::FVCEDPOT, cchs2015_2016_p::FVCDVPOT, cchs2017_2018_p::FVCDVPOT, [FVCDPOT]", +FVCDSAL,Salad consumption,Daily consumption - green salad - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADSAL, cchs2003_p::FVCCDSAL, cchs2005_p::FVCEDSAL, cchs2015_2016_p::FVCDVGRN, cchs2017_2018_p::FVCDVGRN, [FVCDSAL]", +FVCDTOT,Total fruit/veg consumption,Daily consumptoin - total fruits and veg. - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADTOT, cchs2003_p::FVCCDTOT, cchs2005_p::FVCEDTOT, cchs2015_2016_p::FVCDVTOT, cchs2017_2018_p::FVCDVTOT, [FVCDTOT]", +FVCDVEG,Other veg consumption,Daily consumption other vegetables - (D),Health behaviour,Diet,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::FVCADVEG, cchs2003_p::FVCCDVEG, cchs2005_p::FVCEDVEG, cchs2015_2016_p::FVCDVVEG, cchs2017_2018_p::FVCDVVEG, [FVCDVEG]", +GEN_01,Self-perceived health,Self-perceived health,Health status,Self-perceived health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_01, cchs2003_p::GENC_01, cchs2005_p::GENE_01, cchs2015_2016_p::GEN_005, cchs2017_2018_p::GEN_005, [GEN_01]", GEN_02A,Life satisfaction_cat,Satisfaction with life,Health status,Satisfaction with life,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, [GEN_02A]", -GEN_02A2,Life satisfaction_cont,Satisfaction with life in general,Health status,Satisfaction with life,Continuous,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A, [GEN_02A2]", -GEN_02B,Self-perceived mental health,Self-perceived mental health,Health status,Mental health,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, [GEN_02B]", -GEN_07,Self-perceived life stress,Self-perceived life stress,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, [GEN_07]", -GEN_09,Self-perceived work stress,Self-perceived work stress,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, [GEN_09]", -GEN_10,Sense of belonging,Sense of belonging in the community,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, [GEN_10]", +GEN_02A2,Life satisfaction_cont,Satisfaction with life in general,Health status,Satisfaction with life,Continuous,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02A, cchs2005_p::GENE_02A, cchs2007_2008_p::GEN_02A, cchs2015_2016_p::GEN_010, cchs2017_2018_p::GEN_010, [GEN_02A2]", +GEN_02B,Self-perceived mental health,Self-perceived mental health,Health status,Mental health,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::GENC_02B, cchs2005_p::GENE_02B, cchs2015_2016_p::GEN_015, cchs2017_2018_p::GEN_015, [GEN_02B]", +GEN_07,Self-perceived life stress,Self-perceived life stress,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_07, cchs2003_p::GENC_07, cchs2005_p::GENE_07, cchs2015_2016_p::GEN_020, cchs2017_2018_p:: GEN_020, [GEN_07]", +GEN_09,Self-perceived work stress,Self-perceived work stress,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_09, cchs2003_p::GENC_09, cchs2005_p::GENE_09, cchs2015_2016_p::GEN_025, cchs2017_2018_p::GEN_025, [GEN_09]", +GEN_10,Sense of belonging,Sense of belonging in the community,Health status,Mental health,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_10, cchs2003_p::GENC_10, cchs2005_p::GENE_10, cchs2015_2016_p::GEN_030, cchs2017_2018_p::GEN_030, [GEN_10]", GEODPMF,Health Region - (G),Health Region - (G),Demographics,Health region,Categorical,N/A,"cchs2013_2014_p, cchs2014_p",[GEODPMF], -GEOGPRV,Province,Province of residence of respondent (G),Demographics,Province,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, [GEOGPRV]", -HCU_1AA,Has regular medical doctor,Do you have a regular medical doctor?,Health care use,Medical care,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, [HCU_1AA]", -HUIDCOG,HUI Cognition,Cognition prob. - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, [HUIDCOG]", -HUIDEMO,HUI Emotion,Emotional problems - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, [HUIDEMO]", -HUIDHSI,Overall HUI,Health Utility Index (HUI3) - (D),Health status,Health utility index,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, [HUIDHSI]", -HUIGDEX,HUI Dexterity,"Dexterity trouble - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, [HUIGDEX]", -HUIGHER,HUI Hearing,"Hearing problems - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, [HUIGHER]", -HUIGMOB,HUI Mobility,"Mobility trouble - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, [HUIGMOB]", -HUIGSPE,HUI Speech,"Speech trouble - function code - (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, [HUIGSPE]", -HUIGVIS,HUI Vision,"Vision trouble - function code - (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, [HUIGVIS]", -HUPDPAD,HUI Pain,Act. prevent/pain - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, [HUPDPAD]", -HWTGBMI,BMI,"BMI / self-report - (D,G)",Health status,BMI,Continuous,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, [HWTGBMI]", -HWTGBMI_der,Derived BMI,Derived Body Mass Index,Health status,BMI,Continuous,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[HWTGHTM, HWTGWTK]", -HWTGHTM,Height,"Height (metres)/self-reported - (D,G)",Health status,Height,Continuous,meters,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT, cchs2005_p::HWTEGHTM, [HWTGHTM]", -HWTGWTK,Weight,"Weight - kilograms (D, G)",Health status,Weight,Continuous,kg,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, [HWTGWTK]", -id_year,Unique ID,Unique ID,N/A,N/A,N/A,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[data_name, ADM_RNO]", -INCDRCA,Household income distribution,Household income distribution - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRCA, [INCDRCA]", -INCDRPR,Household income distribution provincial level,Hhld inc. distribution-prov. level - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRPR, [INCDRPR]", -INCDRRS,Household income distribution health region level,Hhld inc. distribution- hr level - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::INCEDRRS, [INCDRRS]", +GEOGPRV,Province,Province of residence of respondent (G),Demographics,Province,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GEOAGPRV, cchs2003_p::GEOCGPRV, cchs2005_p::GEOEGPRV, cchs2015_2016_p::GEO_PRV, cchs2017_2018_p::GEO_PRV, [GEOGPRV]", +HCU_1AA,Has regular medical doctor,Do you have a regular medical doctor?,Health care use,Medical care,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::TWDA_5, cchs2003_p::HCUC_1AA, cchs2005_p::HCUE_1AA, cchs2015_2016_p::PHC_020, cchs2017_2018_p::PHC_020, [HCU_1AA]", +HUIDCOG,HUI Cognition,Cognition prob. - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADCOG, cchs2003_p::HUICDCOG, cchs2005_p::HUIEDCOG, cchs2015_2016_p::HUIDVCOG, [HUIDCOG]", +HUIDEMO,HUI Emotion,Emotional problems - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADEMO, cchs2003_p::HUICDEMO, cchs2005_p::HUIEDEMO, cchs2015_2016_p::HUIDVEMO, [HUIDEMO]", +HUIDHSI,Overall HUI,Categorical Health Utility Index (HUI3),Health status,Health utility index,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]", +HUIDHSI_cat10,Overall HUI,Categorical Health Utility Index (HUI3),Health status,Health utility index,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]", +HUIDHSI_cat20,Overall HUI,Categorical Health Utility Index (HUI3),Health status,Health utility index,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]", +HUIDHSI_cat50,Overall HUI,Categorical Health Utility Index (HUI3),Health status,Health utility index,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADHSI, cchs2003_p::HUICDHSI, cchs2005_p::HUIEDHSI, cchs2015_2016_p::HUIDVHSI, [HUIDHSI]", +HUIGDEX,HUI Dexterity,"Dexterity trouble - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGDEX, cchs2003_p::HUICGDEX, cchs2005_p::HUIEGDEX, cchs2015_2016_p::HUIDGDEX, [HUIGDEX]", +HUIGHER,HUI Hearing,"Hearing problems - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGHER, cchs2003_p::HUICGHER, cchs2005_p::HUIEGHER, cchs2015_2016_p::HUIDGHER, [HUIGHER]", +HUIGMOB,HUI Mobility,"Mobility trouble - function code (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGMOB, cchs2003_p::HUICGMOB, cchs2005_p::HUIEGMOB, cchs2015_2016_p::HUIDGMOB, [HUIGMOB]", +HUIGSPE,HUI Speech,"Speech trouble - function code - (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGSPE, cchs2003_p::HUICGSPE, cchs2005_p::HUIEGSPE, cchs2015_2016_p::HUIDGSPE, [HUIGSPE]", +HUIGVIS,HUI Vision,"Vision trouble - function code - (D, G)",Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIAGVIS, cchs2003_p::HUICGVIS, cchs2005_p::HUIEGVIS, cchs2015_2016_p::HUIDGVIS, [HUIGVIS]", +HUPDPAD,HUI Pain,Act. prevent/pain - function code - (D),Health status,Health utility index,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p","cchs2001_p::HUIADPAD, cchs2003_p::HUICDPAD, cchs2005_p::HUIEDPAD, cchs2015_2016_p::HUIDVPAD, [HUPDPAD]", +HWTGBMI,BMI,"BMI / self-report - (D,G)",Health status,BMI,Continuous,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGBMI, cchs2003_p::HWTCGBMI, cchs2005_p::HWTEGBMI, cchs2015_2016_p::HWTDGBMI, cchs2017_2018_p::HWTDGBMI, [HWTGBMI]", +HWTGBMI_der,Derived BMI,Derived Body Mass Index,Health status,BMI,Continuous,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[HWTGHTM, HWTGWTK]", +HWTGBMI_der_cat4,Categorical BMI,Categorical body mass index,Health status,BMI,Categorical,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[HWTGBMI_der],Derived categorical variable using HWTGBMI +HWTGCOR,Adjusted BMI,Adjusted BMI,Health status,BMI,Continuous,kg/m2,"cchs2015_2016_p, cchs2017_2018_p",[HWTDGCOR], +HWTGCOR_der,Derived adjusted BMI,Derived adjusted BMI,Health status,BMI,Continuous,kg/m2,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, HWTGHTM, HWTGWTK]", +HWTGHTM,Height,"Height (metres)/self-reported - (D,G)",Health status,Height,Continuous,meters,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGHT, cchs2003_p::HWTCGHT, cchs2005_p::HWTEGHTM, cchs2015_2016_p::HWTDGHTM, cchs2017_2018_p::HWTDGHTM, [HWTGHTM]", +HWTGWTK,Weight,"Weight - kilograms (D, G)",Health status,Weight,Continuous,kg,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::HWTAGWTK, cchs2003_p::HWTCGWTK, cchs2005_p::HWTEGWTK, cchs2015_2016_p::HWTDGWTK, cchs2017_2018_p::HWTDGWTK, [HWTGWTK]", +id_year,Unique ID,Unique ID,N/A,N/A,N/A,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[data_name, ADM_RNO]", +immigration_der,Immigration category,Immigration category,Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES]", +INCDRCA,Household income distribution,Household income distribution - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRCA, cchs2015_2016_p::INCDVRCA, cchs2017_2018_p::INCDVRCA, [INCDRCA]", +INCDRPR,Household income distribution provincial level,Hhld inc. distribution-prov. level - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRPR, cchs2015_2016_p::INCDVRPR, cchs2017_2018_p::INCDVRPR, [INCDRPR]", +INCDRRS,Household income distribution health region level,Hhld inc. distribution- hr level - (D),Sociodemographics,Income,Categorical,N/A,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::INCEDRRS, cchs2015_2016_p::INCDVRRS, cchs2017_2018_p::INCDVRRS, [INCDRRS]", INCGHH_A,Household income,"Total household income from all sources (D, G)",Sociodemographics,Household Characteristics,Categorical,$/year,cchs2001_p,cchs2001_p::INCAGHH, INCGHH_B,Household income,"Total household income from all sources (D, G)",Sociodemographics,Household Characteristics,Categorical,$/year,"cchs2003_p, cchs2005_p","cchs2003_p::INCCGHH, cchs2005_p::INCEGHH", -INCGHH_C,Household income,"Total household income from all sources (D, G)",Sociodemographics,Household Characteristics,Categorical,$/year,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGHH], -INCGHH_cont,Household income,Total household income from all sources - continuous,Sociodemographics,Household Characteristics,Continuous,$/year,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::INCAGHH, cchs2003_p::INCCGHH, cchs2005_p::INCEGHH, [INCGHH]", +INCGHH_C,Household income,"Total household income from all sources (D, G)",Sociodemographics,Household Characteristics,Categorical,$/year,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]", +INCGHH_cont,Household income,Total household income from all sources - continuous,Sociodemographics,Household Characteristics,Continuous,$/year,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::INCAGHH, cchs2003_p::INCCGHH, cchs2005_p::INCEGHH, cchs2015_2016_p::INCDGHH, cchs2017_2018_p::INCDGHH, [INCGHH]", INCGPER_A,Personal Income,"Total pers. inc. from all sources (D, G)",Sociodemographics,Income,Categorical,$/year,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER", -INCGPER_B,Personal Income,"Total pers. inc. from all sources (D, G)",Sociodemographics,Income,Categorical,$/year,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[INCGPER], -INCGPER_cont,Personal Income,"Total pers. inc. from all sources (D, G)",Sociodemographics,Income,Continuous,$/year,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER, [INCGPER]", +INCGPER_B,Personal Income,"Total pers. inc. from all sources (D, G)",Sociodemographics,Income,Categorical,$/year,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]", +INCGPER_cont,Personal Income,"Total pers. inc. from all sources (D, G)",Sociodemographics,Income,Continuous,$/year,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::INCAGPER, cchs2003_p::INCCGPER, cchs2005_p::INCEGPER, cchs2015_2016_p::INCDGPER, cchs2017_2018_p::INCDGPER, [INCGPER]", LBFA_31A,Occupation group,Main job or business,Sociodemographics,Occupation,Categorical,N/A,cchs2001_p,[LBFA_31A], -LBFA_31A_a,Occupation group,Occupation Group,Sociodemographics,Occupation,Categorical,N/A,"cchs2001_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::LBFA_31A, [LBSGSOC]","See Norwrouzi-Kia, et al. (2019) Int J Crit Illn Inj Sci. 2019 Jan-Mar; 9(1): 29:35. doi: 10.4103/IJCIIS.IJCIIS_43_18 and Nowrouzi-Kia, B., et al. (2018). Heart Disease and Occupational Risk Factors in the Canadian Population: An Exploratory Study Using the Canadian Community Health Survey."" Safety and Health at Work 9(2): 144-148. https://doi.org/10.1016/j.shaw.2017.07.008""" -LBFA_31A_b,Occupation group,Occupation Group,Sociodemographics,Occupation,Categorical,N/A,"cchs2001_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::LBFA_31A, [LBSGSOC]","The exact same recoding as LBFA_31A_a except that the ""Other"" category in cchs2001_p was recoded to a new category ""Other"" rather than missing" +LBFA_31A_a,Occupation group,Occupation Group,Sociodemographics,Occupation,Categorical,N/A,"cchs2001_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::LBFA_31A, cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]","See Norwrouzi-Kia, et al. (2019) Int J Crit Illn Inj Sci. 2019 Jan-Mar; 9(1): 29:35. doi: 10.4103/IJCIIS.IJCIIS_43_18 and Nowrouzi-Kia, B., et al. (2018). Heart Disease and Occupational Risk Factors in the Canadian Population: An Exploratory Study Using the Canadian Community Health Survey."" Safety and Health at Work 9(2): 144-148. https://doi.org/10.1016/j.shaw.2017.07.008""" +LBFA_31A_b,Occupation group,Occupation Group,Sociodemographics,Occupation,Categorical,N/A,"cchs2001_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::LBFA_31A, cchs2015_2016_p::LBFDGOCG, cchs2017_2018_p::LBFDGOCG, [LBSGSOC]","The exact same recoding as LBFA_31A_a except that the ""Other"" category in cchs2001_p was recoded to a new category ""Other"" rather than missing" +low_drink_score,Low risk drinking score,Low risk drinking score,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY]","Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/eprg7/ . Derived from DHH_SEX, ALWDWKY." +low_drink_score1,Low risk drinking score - former/never drinking categories,Low risk drinking score - former/never drinking categories,Health behaviour,Alcohol,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHH_SEX, ALWDWKY, ALC_005, ALC_1]","Risk based on Canada's Low Risk Alcohol Drinking Guidelines. Refer to https://osf.io/eprg7/ . Derived from DHH_SEX, ALWDWKY, ALC_005, ALC_1." MED_1P,Sleeping pills,"In the past month, did you take sleeping pills",Health behaviour,Sleep,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2011_2012_p, cchs2012_p","cchs2001_p::DRGA_1P, cchs2003_p::MEDC_1P, cchs2005_p::MEDE_1P, [MED_1P]", number_conditions,Number of conditions,Number of chronic conditions,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, resp_condition_der, CCC_051], DerivedVar::[CCC_121, CCC_131, CCC_151, CCC_171, CCC_280, resp_condition_der, CCC_051]", +PAA_045,Sweat/breathe harder exercises - hours - 7d (18+ years old),"(18+ years old) In the last 7 days, how much time inhours did you spend doing these activities that made you sweat at least a little and breathe harder?",Health behaviour,Exercise,Continuous,hours/week,"cchs2015_2016_p, cchs2017_2018_p",[PAA_045], +PAA_050,Sweat/breathe harder exercises - minutes - 7d (18+ years old),"(18+ years old) In the last 7 days, how much time in minutes did you spend doing these activities that made you sweat at least a little and breathe harder?",Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAA_050], +PAA_075,Other physical activities - hours - 7d (18+ years old),"(18+ years old) In the last 7 days, how much time in hours did you spend doing these activities that made you sweat at least a little and breathe harder?",Health behaviour,Exercise,Continuous,hours/week,"cchs2015_2016_p, cchs2017_2018_p",[PAA_075], +PAA_080,Other physical activities - minutes - 7d (18+ years old),"(18+ years old) In the last 7 days, how much time in minutes did you spend doing these activities that made you sweat at least a little and breathe harder?",Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAA_080], +PAADVVIG,Vigorous activity over a week (18+ years old),(18+ years old) Total minutes of vigorous activity - 7 d,Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAADVVIG], +PAADVDYS,Active days - 7d (18+ years old),(18+ years old) Number of active days - 7 d,Health behaviour,Exercise,Continuous,days,"cchs2015_2016_p, cchs2017_2018_p",[PAADVDYS], PAC_4A,Time walk work/school in week,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands",Health behaviour,Exercise,Categorical,hours/week,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4A, cchs2003_p::PACC_4A, cchs2005_p::PACE_4A", PAC_4B,Time bike work/school in week,"In a typical week in the past 3 months, how many hours did you usually spend walking to work or to school or while doing errands",Health behaviour,Exercise,Categorical,hours/week,"cchs2001_p, cchs2003_p, cchs2005_p","cchs2001_p::PACA_4B, cchs2003_p::PACC_4B, cchs2005_p::PACE_4B", PAC_7,Walk to work/school,Walked to work or school / last 3 mo.,Health behaviour,Exercise,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_7], @@ -140,8 +169,15 @@ PAC_8,Bike to work/school,Bicycled to work or school / last 3 mo.,Health behavio PAC_8A,Number times bike work/school,No. of times/3 mo./bicycl. work/school,Health behaviour,Exercise,Continuous,times/3 mos.,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8A], PAC_8B,Time bike work/school,Time spent - biking to go work/school,Health behaviour,Exercise,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[PAC_8B], PACDEE,Physical activity,Daily energy expenditure - (D),Health behaviour,Exercise,Continuous,METS,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]", -pack_years_der,PackYears,Smoking pack-years,Health behaviour,Smoking,Continuous,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]", -pct_time_der,Percent time in Canada,Percentage of time in Canada,Sociodemographics,Migration,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","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]", +PACDEE_cat3,Categorical physical activity,Categorical daily energy expenditure,Health behaviour,Exercise,Continuous,METS,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::PACADEE, cchs2003_p::PACCDEE, cchs2005_p::PACEDEE, [PACDEE]", +pack_years_der,PackYears,Smoking pack-years,Health behaviour,Smoking,Continuous,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY_A, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, SMKG207_cont, SMK_204, SMK_05B, SMK_208, SMK_05C, SMKG01C_cont, SMK_01A]", +pack_years_cat,Categorical PackYears,Categorical smoking pack-years,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",DerivedVar::[pack_years_der],Derived categorical variable using pack_years_der +PAYDVTOA,Other physical activities - minutes - 7d (12-17 years old),Total minutes of other activities - 7 d - (D),Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVTOA], +PAYDVADL,Leisure activities - minutes - 7d (12-17 years old),Total minutes - physical activities during leisure - 7 d - (D),Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVADL], +PAYDVVIG,Vigorous activities - minutes - 7d (12-17 years old),Total minutes - vigorous physical activity - 7 d - (D),Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVVIG], +PAYDVDYS,Active days - 7d (12-17 years old),Number of days - physically active - 7 d - (D),Health behaviour,Exercise,Continuous,minutes/week,"cchs2015_2016_p, cchs2017_2018_p",[PAYDVDYS], +pct_time_der,Percent time in Canada,Percentage of time in Canada,Sociodemographics,Migration,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, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[DHHGAGE_cont, SDCGCBG, SDCGRES]", +pct_time_der_cat10,Categorical percent time in Canada,Categorical percentage of time in Canada,Sociodemographics,Migration,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, cchs2015_2016_p, cchs2017_2018_p",DerivedVar::[pct_time_der], RAC_1,Difficulty activities,Has difficulty with activities,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_1, cchs2003_p::RACC_1, cchs2005_p::RACE_1, [RAC_1]", RAC_2A,Reduction activities at home,Reduction - activities at home,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::RACA_2A, cchs2003_p::RACC_2A, cchs2005_p::RACE_2A, [RAC_2A]", RAC_2B,Reduction activities at school or work,Long-term cond. reduces act. - school or work,Health status,ADL,Categorical,N/A,cchs2001_p,cchs2001_p::RACA_2B, @@ -153,48 +189,52 @@ RACDIMP,Impact health problem,Impact of health problems,Health status,Health pro RACDPAL,Particpation/activity limitation,Participation and activity limitation,Health status,ADL,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::[DerivedVar::[RAC_1, RAC_2A, RAC_2B, RAC_2C]], cchs2003_p::RACCDPAL, cchs2005_p::RACEDPAL, [RACDPAL]", RACG5,Cause health problem,Cause of Health problem,Health status,Health problems,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::RACCG5, cchs2005_p::RACEG5, [RACG5]", resp_condition_der,Respiratory condition,Respiratory condition,Health status,Chronic condition,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[DHHGAGE_cont, CCC_091, CCC_031], DerivedVar::[DHHGAGE_cont, CCC_91E, CCC_91F, CCC_91A, CCC_031], DerivedVar::[DHHGAGE_cont, CCC_091, CCC_91A, CCC_031]", -SDC_5A_1,Knowledge of official languages,Knowledge of official languages,Sociodemographics,Language,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDC_5A_1], -SDCDFOLS,First official language spoken,First official language spoken,Sociodemographics,Language,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCDFOLS], -SDCFIMM,Immigrant status,Immigrant Status (D),Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, [SDCFIMM]", -SDCGCBG,Country of birth,Country of birth - (G),Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12::SDCGCB12, cchs2013_2014_p::SDCGCB13::SDCGCB13, [SDCGCBG]", -SDCGCGT,Ethnicity,"Cultural or racial origin - (D, G)",Sociodemographics,Ethnicity,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, [SDCGCGT]", -SDCGLHM,Language(s) spoken at home,Language(s) spoken at home,Sociodemographics,Language,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SDCGLHM], +SDC_5A_1,Knowledge of official languages,Knowledge of official languages,Sociodemographics,Language,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDC_025, cchs2017_2018_p::SDC_025, [SDC_5A_1]", +SDCDFOLS,First official language spoken,First official language spoken,Sociodemographics,Language,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDVFLS, cchs2017_2018_p::SDCDVFLS, [SDCDFOLS]", +SDCFIMM,Immigrant status,Immigrant Status (D),Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAFIMM, cchs2003_p::SDCCFIMM, cchs2005_p::SDCEFIMM, cchs2015_2016_p::SDCDVIMM, cchs2017_2018_p::SDCDVIMM, [SDCFIMM]", +SDCGCBG,Country of birth,Country of birth - (G),Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGCBG, cchs2003_p::SDCCGCBG, cchs2005_p::SDCEGCBG, cchs2011_2012_p::SDCGCB12, cchs2013_2014_p::SDCGCB13, cchs2014_p::SDCGCB13, cchs2015_2016_p::SDCDGCB, cchs2017_2018_p::SDCDGCB, [SDCGCBG]", +SDCGCGT,Ethnicity,"Cultural or racial origin - (D, G)",Sociodemographics,Ethnicity,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRAC, cchs2003_p::SDCCGRAC, cchs2005_p::SDCEGCGT, cchs2015_2016_p::SDCDGCGT, cchs2017_2018_p::SDCDGCGT, [SDCGCGT]", +SDCGLHM,Language(s) spoken at home,Language(s) spoken at home,Sociodemographics,Language,Categorical,N/A,"cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SDCDGLHM, cchs2017_2018_p::SDCDGLHM, [SDCGLHM]", SDCGLNG,Languages - can converse in,Languages - can converse in,Sociodemographics,Language,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p","cchs2001_p::SDCAGLNG, cchs2003_p::SDCCGLNG, cchs2005_p::SDCEGLNG, [SDCGLNG]", -SDCGRES,Time in Canada,"Length/time in Canada since imm. (D, G)",Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, [SDCGRES]", -SLP_02,Trouble sleeping,Freq. - trouble sleeping,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_02], +SDCGRES,Time in Canada,"Length/time in Canada since imm. (D, G)",Sociodemographics,Migration,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SDCAGRES, cchs2003_p::SDCCGRES, cchs2005_p::SDCEGRES, cchs2015_2016_p::SDCDGRES, cchs2017_2018_p::SDCDGRES, [SDCGRES]", +SLP_02,Trouble sleeping,Freq. - trouble sleeping,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_010, cchs2017_2018_p::SLP_010, [SLP_02]", SLP_02_A,Trouble sleeping,Freq. - trouble sleeping,Health behaviour,Sleep,Categorical,N/A,cchs2001_p,[GENA_04], -SLP_03,Sleep refreshing,Freq. - find sleep refreshing,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_03], +SLP_03,Sleep refreshing,Freq. - find sleep refreshing,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_015, cchs2017_2018_p::SLP_015, [SLP_03]", SLP_03_A,Sleep refreshing,Freq. - find sleep refreshing,Health behaviour,Sleep,Categorical,N/A,cchs2001_p,[GENA_05], -SLP_04,Difficulty awake,Freq. - diffficult to stay awake,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLP_04], +SLP_04,Difficulty awake,Freq. - diffficult to stay awake,Health behaviour,Sleep,Categorical,N/A,"cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLP_020, cchs2017_2018_p::SLP_020, [SLP_04]", SLP_04_A,Difficulty awake,Freq. - diffficult to stay awake,Health behaviour,Sleep,Categorical,N/A,cchs2001_p,[GENA_06], -SLPG01,Hours sleep,No./hours spent sleeping each night,Health behaviour,Sleep,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p",[SLPG01], +SLPG01,Hours sleep,No./hours spent sleeping each night,Health behaviour,Sleep,Categorical,N/A,"cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]", SLPG01_A,Hours sleep,No./hours spent sleeping each night,Health behaviour,Sleep,Categorical,N/A,"cchs2001_p, cchs2007_2008_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01", -SLPG01_cont,Hours sleep,No./hours spent sleeping each night,Health behaviour,Sleep,Continuous,N/A,"cchs2001_p, cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01, [SLPG01]", -SMK_01A,s100,"In lifetime, smoked 100 or more cigarettes",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, [SMK_01A]", -SMK_05B,cigdayo,# of cigarettes smoked daily - occasional smoker,Health behaviour,Smoking,Continuous,cigarettes,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, [SMK_05B]", -SMK_05C,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",Health behaviour,Smoking,Continuous,days,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, [SMK_05C]", -SMK_05D,evd,Ever smoked cigarettes daily - occasional smoker,Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, [SMK_05D]", +SLPG01_cont,Hours sleep,No./hours spent sleeping each night,Health behaviour,Sleep,Continuous,N/A,"cchs2001_p, cchs2007_2008_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::GENA_03, cchs2007_2008_p::SLP_01, cchs2015_2016_p::SLPG005, cchs2017_2018_p::SLPG005, [SLPG01]", +SMK_01A,s100,"In lifetime, smoked 100 or more cigarettes",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_01A, cchs2003_p::SMKC_01A, cchs2005_p::SMKE_01A, cchs2015_2016_p::SMK_020, cchs2017_2018_p::SMK_020, [SMK_01A]", +SMK_05B,cigdayo,# of cigarettes smoked daily - occasional smoker,Health behaviour,Smoking,Continuous,cigarettes,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05B, cchs2003_p::SMKC_05B, cchs2005_p::SMKE_05B, cchs2015_2016_p::SMK_050, cchs2017_2018_p::SMK_050, [SMK_05B]", +SMK_05C,Number of days - smoked 1 cigarette or more (occ. smoker),"In the past month, on how many days have you smoked 1 or more cigarettes?",Health behaviour,Smoking,Continuous,days,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05C, cchs2003_p::SMKC_05C, cchs2005_p::SMKE_05C, cchs2015_2016_p::SMK_055, cchs2017_2018_p::SMK_055, [SMK_05C]", +SMK_05D,evd,Ever smoked cigarettes daily - occasional smoker,Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_05D, cchs2003_p::SMKC_05D, cchs2005_p::SMKE_05D, cchs2015_2016_p::SMK_030, cchs2017_2018_p::SMK_030, [SMK_05D]", SMK_06A_A,stpn,When did you stop smoking daily - never daily,Health behaviour,Smoking,Categorical,Years,cchs2001_p,cchs2001_p::SMKA_06A, -SMK_06A_B,stpn,When did you stop smoking daily - occasional,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]", -SMK_06A_cont,stpn,When did you stop smoking daily - occasional,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_06A, cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, [SMK_06A]", +SMK_06A_B,stpn,When did you stop smoking daily - occasional,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]", +SMK_06A_cont,stpn,When did you stop smoking daily - occasional,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_06A, cchs2003_p::SMKC_06A, cchs2005_p::SMKE_06A, cchs2015_2016_p::SMK_100, cchs2017_2018_p::SMK_100, [SMK_06A]", SMK_09A_A,stpd,When did you stop smoking daily - former daily,Health behaviour,Smoking,Categorical,Years,cchs2001_p,cchs2001_p::SMKA_09A, -SMK_09A_B,stpd,When did you stop smoking daily - former daily,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]", -SMK_09A_cont,stpd,When did you stop smoking daily - former daily,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_09A, cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, [SMK_09A]", -SMK_204,cigdayd,# of cigarettes smoked daily - daily smoker,Health behaviour,Smoking,Continuous,cigarettes,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, [SMK_204]", +SMK_09A_B,stpd,When did you stop smoking daily - former daily,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]", +SMK_09A_cont,stpd,When did you stop smoking daily - former daily,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_09A, cchs2003_p::SMKC_09A, cchs2005_p::SMKE_09A, cchs2015_2016_p::SMK_080, cchs2017_2018_p::SMK_080, [SMK_09A]", +SMK_204,cigdayd,# of cigarettes smoked daily - daily smoker,Health behaviour,Smoking,Continuous,cigarettes,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKA_204, cchs2003_p::SMKC_204, cchs2005_p::SMKE_204, cchs2015_2016_p::SMK_045, cchs2017_2018_p::SMK_045, [SMK_204]", SMK_208,# of cigarettes smoke each day - former daily,# of cigarettes smoked each day - former daily smoker,Health behaviour,Smoking,Continuous,cigarettes,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKA_208, cchs2003_p::SMKC_208, cchs2005_p::SMKE_208, [SMK_208]", -SMKDSTY,Smoking status,Type of smoker,Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]", -SMKDSTY_cat3,Smoking status,"Type of smoker: current, former, never",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]",Re-categorization of SMKDSTY to be used for smoking imputation +SMKDSTY_A,Smoking status,"Type of smoker: daily, occasional, always occasional, former daily, former occasional, never",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, [SMKDSTY]","2015 onwards for smoke status still has 6 categories, but removed 'always occasional' (Never daily current occasional smoker) and added 'experimental' (at least 1 cig, non-smoker now)" +SMKDSTY_cat3,Smoking status,"Type of smoker: current, former, never",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY, [SMKDSTY]",Re-categorization of SMKDSTY to be used for smoking imputation +SMKDSTY_B,Smoking status,"Type of smoker: daily, occasional, former daily, former occasional, experimental, never",Health behaviour,Smoking,Categorical,N/A,"cchs2015_2016_p, cchs2017_2018_p","cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY", +SMKDSTY_cat5,Smoking status,"Type of smoker: daily, occasional, former daily, former occasional, never",Health behaviour,Smoking,Categorical,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKADSTY, cchs2003_p::SMKCDSTY, cchs2005_p::SMKEDSTY, cchs2015_2016_p::SMKDVSTY, cchs2017_2018_p::SMKDVSTY, [SMKDSTY]","Re-categorization of SMKDSTY to be used for smoking imputation. SMKDSTY_cat5 is a 5 category variable for smoking status for cycles up to 2018. Prior to 2015, 'occasional' and 'always occasional' are combined to form the current 'occasional' category. 2015 onwards, 'former occasional' and 'experimental' are combined to form the current 'former occasional' category" SMKG01C_A,agec1,Age smoked first cigarette,Health behaviour,Smoking,Categorical,Years,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C", -SMKG01C_B,agec1,Age smoked first cigarette,Health behaviour,Smoking,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG01C, [SMKG01C]", -SMKG01C_cont,agec1,Age smoked first cigarette,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C, cchs2005_p::SMKEG01C, [SMKG01C]", +SMKG01C_B,agec1,Age smoked first cigarette,Health behaviour,Smoking,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]", +SMKG01C_cont,agec1,Age smoked first cigarette,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::SMKAG01C, cchs2003_p::SMKCG01C, cchs2005_p::SMKEG01C, cchs2015_2016_p::SMKG035, cchs2017_2018_p::SMKG035, [SMKG01C]", SMKG06C,stpny,Years since stopped smoking daily - never daily,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG06C, cchs2005_p::SMKEG06C, [SMKG06C]", -SMKG09C,stpdy,Years since stopped smoking daily - former daily,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, [SMKG09C]", +SMKG09C,stpdy,Years since stopped smoking daily - former daily,Health behaviour,Smoking,Categorical,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2003_p::SMKCG09C, cchs2005_p::SMKEG09C, cchs2015_2016_p::SMKG090, cchs2017_2018_p::SMKG090, [SMKG09C]", SMKG203_A,agecigd,Age started to smoke daily - daily smoker (G),Health behaviour,Smoking,Categorical,Years,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203", SMKG203_B,agecigd,Age started to smoke daily - daily smoker (G),Health behaviour,Smoking,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG203, [SMKG203]", SMKG203_cont,agecigd,Age started to smoke daily - daily smoker (G),Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKAG203, cchs2003_p::SMKCG203, cchs2005_p::SMKEG203, [SMKG203]", SMKG207_A,agecigfd,Age started to smoke daily - former daily smoker,Health behaviour,Smoking,Categorical,Years,"cchs2001_p, cchs2003_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207", SMKG207_B,agecigfd,Age started to smoke daily - former daily smoker,Health behaviour,Smoking,Categorical,Years,"cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2005_p::SMKEG207, [SMKG207]", SMKG207_cont,agecigfd,Age started to smoke daily - former daily smoker,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::SMKAG207, cchs2003_p::SMKCG207, cchs2005_p::SMKEG207, [SMKG207]", -smoke_simple,Simple smoking status,Simple smoking status,Health behaviour,Smoking,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMKDSTY, time_quit_smoking]", -time_quit_smoking,Time since quit,Time since quit smoking,Health behaviour,Smoking,Continuous,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","DerivedVar::[SMK_09A_B, SMKG09C]", -WTS_M,Weight,Weights,N/A,N/A,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p","cchs2001_p::WTSAM, cchs2003_p::WTSC_M, cchs2005_p::WTSE_M, [WTS_M]", \ No newline at end of file +SMKG040,agecigdfd,Age started to smoke daily - daily/former daily smoker,Health behaviour,Smoking,Categorical,Years,"cchs2015_2016_p, cchs2017_2018_p",[SMKG040], +SMKG040_cont,agecigdfd,Age started to smoke daily - daily/former daily smoker,Health behaviour,Smoking,Continuous,Years,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKG203_cont, SMKG207_cont], [SMKG040]", +smoke_simple,Simple smoking status,Simple smoking status,Health behaviour,Smoking,Categorical,N/A,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMKDSTY_cat5, time_quit_smoking]", +time_quit_smoking,Time since quit,Time since quit smoking,Health behaviour,Smoking,Continuous,Years,"cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","DerivedVar::[SMK_09A_B, SMKG09C]", +WTS_M,Weight,Weights,N/A,N/A,Continuous,N/A,"cchs2001_p, cchs2003_p, cchs2005_p, cchs2007_2008_p, cchs2009_2010_p, cchs2010_p, cchs2011_2012_p, cchs2012_p, cchs2013_2014_p, cchs2014_p, cchs2015_2016_p, cchs2017_2018_p","cchs2001_p::WTSAM, cchs2003_p::WTSC_M, cchs2005_p::WTSE_M, [WTS_M]", diff --git a/man/SMKG040_fun.Rd b/man/SMKG040_fun.Rd new file mode 100644 index 00000000..989a45d2 --- /dev/null +++ b/man/SMKG040_fun.Rd @@ -0,0 +1,70 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/smoking.R +\name{SMKG040_fun} +\alias{SMKG040_fun} +\title{Age started smoking daily - daily/former daily smokers} +\usage{ +SMKG040_fun(SMKG203_cont, SMKG207_cont) +} +\arguments{ +\item{SMKG203_cont}{age started smoking daily. Variable asked to daily +smokers.} + +\item{SMKG207_cont}{age started smoking daily. Variable asked to former +daily smokers.} +} +\value{ +value for age started smoking daily for daily/former daily smokers in +the SMKG040_cont +} +\description{ +This function creates a continuous derived variable +(SMKG040_fun) that calculates the approximate age that a daily or former +daily smoker began smoking daily. +} +\details{ +SMKG203 (daily smoker) and SMKG207 (former daily) are present in +CCHS 2001-2014, and are separate variables. For CCHS 2015 and onward, SMKG040 +(daily/former daily) combines the two previous variables. SMKG040_fun takes +the continuous functions (SMKG203_cont and SMKG207_cont) to create SMKG040 +for 2001-2014. +} +\note{ +In previous cycles, both SMKG203 and SMKG207 included respondents who +did not state their smoking status. From CCHS 2015 and onward, SMKG040 only +included respondents who specified daily smoker or former daily smoker. As +a result, SMKG040 has a large number of missing respondents for CCHS 2015 +survey cycles and onward. +} +\examples{ + +# Using SMKG040_fun() to create age values across CCHS cycles +# SMKG040_fun() is specified in variable_details.csv under SMKG040_cont. + +# To create a continuous harmonized variable for SMKG040, use rec_with_table() +# for each CCHS cycle and specify SMKG040_cont. + +library(cchsflow) + +age_smoke_dfd_2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "SMKG203_cont", "SMKG207_cont","SMKG040_cont" + ) +) + +head(age_smoke_dfd_2009_2010) + +age_smoke_dfd_2011_2012 <- rec_with_table( + cchs2011_2012_p,c( + "SMKG203_cont", "SMKG207_cont","SMKG040_cont" + ) +) + +tail(age_smoke_dfd_2011_2012) + +combined_age_smoke_dfd <- suppressWarnings(merge_rec_data +(age_smoke_dfd_2009_2010,age_smoke_dfd_2011_2012)) + +head(combined_age_smoke_dfd) +tail(combined_age_smoke_dfd) +} diff --git a/man/adjusted_bmi_fun.Rd b/man/adjusted_bmi_fun.Rd new file mode 100644 index 00000000..d2f4cdb6 --- /dev/null +++ b/man/adjusted_bmi_fun.Rd @@ -0,0 +1,99 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmi.R +\name{adjusted_bmi_fun} +\alias{adjusted_bmi_fun} +\title{Adjusted Body Mass Index (BMI) derived variable} +\usage{ +adjusted_bmi_fun(DHH_SEX, HWTGHTM, HWTGWTK) +} +\arguments{ +\item{DHH_SEX}{CCHS variable for sex; 1 = male, 2 = female} + +\item{HWTGHTM}{CCHS variable for height (in meters)} + +\item{HWTGWTK}{CCHS variable for weight (in kilograms)} +} +\value{ +numeric value for adjusted BMI in the HWTGCOR_der variable +} +\description{ +This function creates a harmonized adjusted BMI variable. +A systematic review of the literature concluded that the use of +self-reported data among adults underestimates weight and overestimates +height, resulting in lower estimates of obesity than those obtained from +measured data. Using data from the 2005 Canadian Community Health Survey +(CCHS) subsample, where both measured and self-reported values were +collected, correction equations have been developed +(Connor Gorber et al. 2008). Differences between corrected estimates of +obesity from the CCHS and measured estimates from the Canadian Health +Measures Survey is monitored over time to determine if the bias in +self-reported values is changing and if new correction equations need to be +developed. Adjusted BMI variable is first introduced in the CCHS 2015 cycle. + + adjusted_bmi_fun() creates a derived variable (HWTGCOR_der) that is + harmonized across all CCHS cycles. This function takes the BMI by dividing + weight by the square of height, and adds a correction value based on sex. +} +\details{ +For HWTGCOR_der, there are no restrictions to age, height, weight, + or pregnancy status. While pregnancy was consistent across all CCHS cycles, + its variable (MAM_037) was not available in the PUMF CCHS datasets so it + could not be harmonized and included into the function. + + HWTGCOR_der uses the CCHS variables for sex, height and weight that have been + transformed by cchsflow. In order to generate a value for adjusted BMI + across CCHS cycles, sex, height and weight must be transformed and + harmonized. +} +\note{ +In earlier CCHS cycles (2001 and 2003), height was collected in inches; + while in later CCHS cycles (2005+) it was collected in meters. To harmonize + values across cycles, height was converted to meters (to 3 decimal points). + Weight was collected in kilograms across all CCHS cycles, so no + transformations were required in the harmonization process. +} +\examples{ +# Using adjusted_bmi_fun() to create adjusted BMI values between cycles +# adjusted_bmi_fun() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform the derived BMI variable, use rec_with_table() for each cycle +# and specify HWTGCOR_der, along with sex (DHH_SEX), height (HWTGHTM) and +# weight (HWTGWTK).Then by using merge_rec_data(), you can combined +# HWTGBMI_der across cycles. + +library(cchsflow) +adjustedbmi2001 <- rec_with_table( + cchs2001_p, c( + "HWTGHTM", + "HWTGWTK", + "DHH_SEX", + "HWTGCOR_der" + ) +) + +head(adjustedbmi2001) + +adjustedbmi2011_2012 <- rec_with_table( + cchs2011_2012_p, c( + "HWTGHTM", + "HWTGWTK", + "DHH_SEX", + "HWTGCOR_der" + ) +) + +tail(adjustedbmi2011_2012) + +combined_bmi <- merge_rec_data(adjustedbmi2001, adjustedbmi2011_2012) +head(combined_bmi) +tail(combined_bmi) + +# adjusted_bmi_fun() can also generate a value for BMI if you input your sex, +# and a value for height and weight. Let's say your sex is male, height is +# 170cm (1.7m) and your weight is 50kg, your BMI can be calculated as follows: + +library(cchsflow) +adjusted_BMI <- adjusted_bmi_fun(DHH_SEX = 1, HWTGHTM = 1.7, HWTGWTK = 50) +print(adjusted_BMI) +} diff --git a/man/bmi_fun_cat.Rd b/man/bmi_fun_cat.Rd new file mode 100644 index 00000000..5dbdb765 --- /dev/null +++ b/man/bmi_fun_cat.Rd @@ -0,0 +1,72 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmi.R +\name{bmi_fun_cat} +\alias{bmi_fun_cat} +\title{Categorical BMI (international standard)} +\usage{ +bmi_fun_cat(HWTGBMI_der) +} +\arguments{ +\item{HWTGBMI_der}{derived variable that calculates numeric value for BMI. +See \code{\link{bmi_fun}} for documentation on how variable +was derived.} +} +\value{ +value for BMI categories in the HWTGBMI_der_cat4 variable. +} +\description{ +This function creates a categorical derived variable +(HWTGBMI_der_cat4) that categorizes derived BMI (HWTGBMI_der). +} +\details{ +The categories were based on international standards and are divided +into four categories: underweight for BMI < 18.5 (1), normal weight for BMI +between 18.5 to 25 (2), overweight for BMI between 25 to 30 (3), and obese +for BMI over 30 (4). + +HWTGBMI_der_cat4 uses the derived variable HWTGBMI_der. HWTGBMI_der uses +height and weight that have been transformed by cchsflow. In order to +categorize BMI across CCHS cycles, height and weight variables must be +transformed and harmonized. +} +\examples{ + +# Using bmi_fun_cat() to categorize BMI across CCHS cycles +# bmi_fun_cat() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform HWTGBMI_der_cat4 across all cycles, use rec_with_table() for +# each CCHS cycle. +# Since HWTGBMI_der is also a derived variable, you will have to specify +# the variables that are derived from it. + +library(cchsflow) + +bmi_cat_2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "HWTGHTM", + "HWTGWTK", + "HWTGBMI_der", + "HWTGBMI_der_cat4" + ) +) + +head(bmi_cat_2009_2010) + +bmi_cat_2011_2012 <- rec_with_table( + cchs2011_2012_p,c( + "HWTGHTM", + "HWTGWTK", + "HWTGBMI_der", + "HWTGBMI_der_cat4" + ) +) + +tail(bmi_cat_2011_2012) + +combined_bmi_cat <- suppressWarnings(merge_rec_data +(bmi_cat_2009_2010,bmi_cat_2011_2012)) + +head(combined_bmi_cat) +tail(combined_bmi_cat) +} diff --git a/man/cchs2001_p.Rd b/man/cchs2001_p.Rd index 8cfb5453..abeea202 100644 --- a/man/cchs2001_p.Rd +++ b/man/cchs2001_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2003_p.Rd b/man/cchs2003_p.Rd index a8ae7fea..0c306869 100644 --- a/man/cchs2003_p.Rd +++ b/man/cchs2003_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2005_p.Rd b/man/cchs2005_p.Rd index 96f169ff..a7c03489 100644 --- a/man/cchs2005_p.Rd +++ b/man/cchs2005_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2007_2008_p.Rd b/man/cchs2007_2008_p.Rd index 9cdb52a6..25523e5f 100644 --- a/man/cchs2007_2008_p.Rd +++ b/man/cchs2007_2008_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2009_2010_p.Rd b/man/cchs2009_2010_p.Rd index 1a465ba7..6a3cf2f6 100644 --- a/man/cchs2009_2010_p.Rd +++ b/man/cchs2009_2010_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2010_p.Rd b/man/cchs2010_p.Rd index 888a144d..06bb52f5 100644 --- a/man/cchs2010_p.Rd +++ b/man/cchs2010_p.Rd @@ -20,7 +20,7 @@ The CCHS survey is conducted by Statistics Canada. subset. Please see the "CCHS datasets that overlap each other" article to see how the two datasets contain overlap. -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2011_2012_p.Rd b/man/cchs2011_2012_p.Rd index c0d71ba9..75c20763 100644 --- a/man/cchs2011_2012_p.Rd +++ b/man/cchs2011_2012_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2012_p.Rd b/man/cchs2012_p.Rd index e7141d5e..f979b758 100644 --- a/man/cchs2012_p.Rd +++ b/man/cchs2012_p.Rd @@ -20,7 +20,7 @@ The CCHS survey is conducted by Statistics Canada. subset. Please see the "CCHS datasets that overlap each other" article to see how the two datasets contain overlap. -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2013_2014_p.Rd b/man/cchs2013_2014_p.Rd index 3cb746d1..d6ba4bf4 100644 --- a/man/cchs2013_2014_p.Rd +++ b/man/cchs2013_2014_p.Rd @@ -16,7 +16,7 @@ Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. The CCHS survey is conducted by Statistics Canada. } \details{ -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2014_p.Rd b/man/cchs2014_p.Rd index 96bfe5ed..48b4ce84 100644 --- a/man/cchs2014_p.Rd +++ b/man/cchs2014_p.Rd @@ -20,7 +20,7 @@ The CCHS survey is conducted by Statistics Canada. subset. Please see the "CCHS datasets that overlap each other" article to see how the two datasets contain overlap. -See \href{https://www.statcan.gc.ca/eng/reference/licence}{here} for the open +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open license. Source from Statistics Canada, Canadian Community Health Survey PUMF, accessed Jan 2020. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. diff --git a/man/cchs2015_2016_p.Rd b/man/cchs2015_2016_p.Rd new file mode 100644 index 00000000..1c97e7fa --- /dev/null +++ b/man/cchs2015_2016_p.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{cchs2015_2016_p} +\alias{cchs2015_2016_p} +\title{2015-2016 CCHS PUMF subset data (200 respondents)} +\source{ +\url{https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=238854} +} +\value{ +\item{cchs2015_2016_p}{a data frame} +} +\description{ +This is a subset of 200 observations from the 2015-2016 cycle of the Canadian +Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +The CCHS survey is conducted by Statistics Canada. +} +\details{ +\strong{NOTE:} this subset of respondents may also be in the 2015-2016 PUMF +subset. Please see the "CCHS datasets that overlap each other" article to see +how the two datasets contain overlap. + +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open +license. Source from Statistics Canada, Canadian Community Health Survey +PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +the permission of Statistics Canada. + +Long name: cchs-82M0013-E-2015-2016-Annual-component + +DDI: \url{https://osf.io/m948q/} + +Additional documentation (PDFs): \url{https://osf.io/hkuy3/} +} +\examples{ +data(cchs2015_2016_p) +str(cchs2015_2016_p) +} +\keyword{datasets} diff --git a/man/cchs2017_2018_p.Rd b/man/cchs2017_2018_p.Rd new file mode 100644 index 00000000..1dc129ce --- /dev/null +++ b/man/cchs2017_2018_p.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{cchs2017_2018_p} +\alias{cchs2017_2018_p} +\title{2017-2018 CCHS PUMF subset data (200 respondents)} +\source{ +\url{https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&Id=329241} +} +\value{ +\item{cchs2017_2018_p}{a data frame} +} +\description{ +This is a subset of 200 observations from the 2017-2018 cycle of the Canadian +Community Health Survey (CCHS) Public Use Microdata file (PUMF) dataset. +The CCHS survey is conducted by Statistics Canada. +} +\details{ +\strong{NOTE:} this subset of respondents may also be in the 2017-2018 PUMF +subset. Please see the "CCHS datasets that overlap each other" article to see +how the two datasets contain overlap. + +See \href{https://www.statcan.gc.ca/en/reference/licence}{here} for the open +license. Source from Statistics Canada, Canadian Community Health Survey +PUMF, accessed Oct 2021. Reproduced and distributed on an "as is" basis with +the permission of Statistics Canada. + +Long name: cchs-82M0013-E-2017-2018-Annual-component + +DDI: \url{https://osf.io/q8g7y/} + +Additional documentation (PDFs): \url{https://osf.io/hkuy3/} +} +\examples{ +data(cchs2017_2018_p) +str(cchs2017_2018_p) +} +\keyword{datasets} diff --git a/man/diet_score_fun.Rd b/man/diet_score_fun.Rd index c6b0fcd2..5b1cbc77 100644 --- a/man/diet_score_fun.Rd +++ b/man/diet_score_fun.Rd @@ -48,21 +48,21 @@ While diet score can be calculated for all survey respondents, in cycle. } \examples{ -# Using the 'diet_score_fun' function to create the derived diet variable +# Using the diet_score_fun function to create the derived diet variable # across CCHS cycles. -# diet_score_fun() is specified in the variable_details.csv +# diet_score_fun() is specified in the variable_details.csv. # To create a harmonized diet_score variable across CCHS cycles, use # rec_with_table() for each CCHS cycle and specify diet_score_fun and the # required base variables. -# Using merge_rec_data(), you can combine smoke_simple across cycles +# Using merge_rec_data(), you can combine diet_score across cycles. library(cchsflow) diet_score2009_2010 <- rec_with_table( cchs2009_2010_p, c( "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", - "DHH_SEX", "diet_score_fun" + "DHH_SEX", "diet_score" ) ) @@ -71,7 +71,7 @@ head(diet_score2009_2010) diet_score2011_2012 <- rec_with_table( cchs2011_2012_p,c( "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", - "DHH_SEX", "diet_score_fun" + "DHH_SEX", "diet_score" ) ) diff --git a/man/diet_score_fun_cat.Rd b/man/diet_score_fun_cat.Rd new file mode 100644 index 00000000..f6365ec4 --- /dev/null +++ b/man/diet_score_fun_cat.Rd @@ -0,0 +1,70 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/diet.R +\name{diet_score_fun_cat} +\alias{diet_score_fun_cat} +\title{Categorized diet score} +\usage{ +diet_score_fun_cat(diet_score) +} +\arguments{ +\item{diet_score}{derived variable that calculates diet score. +See \code{\link{diet_score_fun}} for documentation on how variable +was derived.} +} +\value{ +value for diet score categories using diet_score_cat3 variable. +} +\description{ +This function creates a categorical derived diet variable +(diet_score_cat3) that categorizes derived diet score (diet_score). +} +\details{ +The diet score is based on consumption of fruit, salad, potatoes, +carrots, other vegetables and juice. 2 baseline points plus summation of +total points for diet attributes. Negative overall scores are recoded to 0, +resulting in a range from 0 to 10.The categories were based on the +Mortality Population Risk Tool (Douglas Manuel et al. 2016). + +diet_score_cat3 uses the derived variable diet_score. diet_score uses +sex, and fruit and vegetable variables that have been transformed by +cchsflow (see documentation on diet_score). In order to categorize diet +across CCHS cycles, sex, and fruit and vegetable variables must be +transformed and harmonized. +} +\examples{ +# Using the diet_score_fun_cat function to categorize the derived diet +# variable across CCHS cycles. +# diet_score_fun_cat() is specified in the variable_details.csv. + +# To create a harmonized diet_score_cat3 variable across CCHS cycles, use +# rec_with_table() for each CCHS cycle. +# Since diet_score is also a derived variable, you will have to specify +# the variables that are derived from it. +# Using merge_rec_data(), you can combine diet_score_cat3 across cycles. + +library(cchsflow) + +diet_score_cat2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", + "DHH_SEX", "diet_score", "diet_score_cat3" + ) +) + +head(diet_score_cat2009_2010) + +diet_score_cat2011_2012 <- rec_with_table( + cchs2011_2012_p,c( + "FVCDFRU", "FVCDSAL", "FVCDPOT", "FVCDCAR", "FVCDVEG", "FVCDJUI", + "DHH_SEX", "diet_score", "diet_score_cat3" + ) +) + +tail(diet_score_cat2011_2012) + +combined_diet_score_cat <- suppressWarnings(merge_rec_data( +diet_score_cat2009_2010, diet_score_cat2011_2012)) + +head(combined_diet_score_cat) +tail(combined_diet_score_cat) +} diff --git a/man/energy_exp_fun.Rd b/man/energy_exp_fun.Rd new file mode 100644 index 00000000..38c98dbd --- /dev/null +++ b/man/energy_exp_fun.Rd @@ -0,0 +1,119 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/physical-activity.R +\name{energy_exp_fun} +\alias{energy_exp_fun} +\title{Daily energy expenditure in leisure activity} +\usage{ +energy_exp_fun( + DHHGAGE_cont, + PAA_045, + PAA_050, + PAA_075, + PAA_080, + PAADVDYS, + PAADVVIG, + PAYDVTOA, + PAYDVADL, + PAYDVVIG, + PAYDVDYS +) +} +\arguments{ +\item{DHHGAGE_cont}{continuous age variable.} + +\item{PAA_045}{number of hours of sports, fitness, or recreational activity +that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old.} + +\item{PAA_050}{number of minutes of sports, fitness, or recreational activity +that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old.} + +\item{PAA_075}{number of hours of other physical activity while at work, +home or volunteering for CCHS 2015-2018 for 18+ years old.} + +\item{PAA_080}{number of minutes of other physical activity while at work, +home or volunteering for CCHS 2015-2018 for 18+ years old.} + +\item{PAADVDYS}{number of active days - 7 day for CCHS 2015-2018 for 18+ +years old.} + +\item{PAADVVIG}{number of minutes of vigorous activity over 7 days or CCHS +2015-2018 for 18+ years old.} + +\item{PAYDVTOA}{total minutes of other activities - 7 day for CCHS 2015-2018 +for 12-17 years old.} + +\item{PAYDVADL}{total minutes of physical activity - leisure - 7 day for +CCHS 2015-2018 for 12-17 years old.} + +\item{PAYDVVIG}{total minutes - vigorous physical activity - 7 d for CCHS +2015-2018 for 12-17 years old.} + +\item{PAYDVDYS}{total days physically active - 7 day for CCHS 2015-2018 for +12-17 years old.} +} +\value{ +Continuous variable for energy expenditure (energy_exp) +} +\description{ +This function creates a derived variable for +A MET is a conceptual value that represents energy expended during physical activity. +The volume of activity is calculated by multiplying the amount of minutes of +activity (by level of intensity) by the MET value associated with that +intensity. A MET (metabolic equivalent) is the energy cost of activity +expressed as kilocalories expended per kilogram of body +weight per hour of activity. + +In CCHS 2001-2014, PACDEE is the variable used to determine the daily +expenditure of leisure activity for all ages. In CCHS 2015-2018, ages 12-17 +and 18+ years old have separate activity variables, where 12-17 year olds +use PAY_XXX and 18+ year olds use PAA_XXX. Leisure activity is not directly +measured. We used the derived variable, PAADVVOL, and removed active +transportation in the new function. With this function, we combined leisure +activity for ages 12+. We calculate the daily energy expenditure which uses +the frequency and duration per session of the physical activity as well as +the MET value (3 METS for leisure and 6 METS for vigorous activity). + +EE (Daily Energy Expenditure) = ((N X D X METvalue) / 60)/7 +Where: +N = the number of times a respondent engaged in an activity over a 7 day period +D = the average duration in minutes of the activity +MET value = the energy cost of the activity expressed as kilocalories +expended per kilogram of body +weight per hour of activity (kcal/kg per hour) +} +\examples{ +# Using energy_exp_fun() to create energy expenditure values across CCHS +# cycles +# energy_exp_fun() is specified in variable_details.csv along with the CCHS +# variables and cycles included. + +# To transform energy_exp across cycles, use rec_with_table() for each +# CCHS cycle and specify energy_exp, along with each activity variable. +# Then by using merge_rec_data(), you can combine energy_exp across +# cycles + +library(cchsflow) +energy_exp2015_2016 <- rec_with_table( + cchs2015_2016_p, c( + "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", + "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" + ) +) + +head(energy_exp2015_2016) + +energy_exp2017_2018 <- rec_with_table( + cchs2017_2018_p, c( + "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", + "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" + ) +) + +tail(energy_exp2015_2016) + +combined_energy_exp <- suppressWarnings(merge_rec_data(energy_exp2015_2016, + energy_exp2017_2018)) + +head(combined_energy_exp) +tail(combined_energy_exp) +} diff --git a/man/immigration_fun.Rd b/man/immigration_fun.Rd new file mode 100644 index 00000000..b10bc19d --- /dev/null +++ b/man/immigration_fun.Rd @@ -0,0 +1,73 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/immigration.R +\name{immigration_fun} +\alias{immigration_fun} +\title{Immigration by ethnicity and settlement} +\usage{ +immigration_fun(SDCFIMM, SDCGCBG, SDCGCGT, SDCGRES) +} +\arguments{ +\item{SDCFIMM}{Immigrant status (1-immigrant, 2-non-immigrant)} + +\item{SDCGCBG}{Country of birth (1-Canada, 2-Outside of Canada)} + +\item{SDCGCGT}{Cultural or racial origin (1-white, 2-visible minority)} + +\item{SDCGRES}{Length/time in Canada since immigration (1- 0-9 years, 2- 10+ +years)} +} +\value{ +Categorical variable (immigration_der) with six categories: + + \itemize{ + \item 1 - White Canada-born + \item 2 - Non-white Canadian born + \item 3 - White immigrant born outside of Canada (0-9 years in Canada) + \item 4 - Non-white immigrant born outside of Canada (0-9 years in Canada) + \item 5 - White immigrant born outside of Canada (10+ years in Canada) + \item 6 - Non-white immigrant born outside of Canada (10+ years in Canada) +} +} +\description{ +This function creates a categorical variable based on +immigrant status (SDCFIMM), country of birth (SDCGCBG), ethnicity (SDCGCGT), +and time in Canada (SDCGRES). +} +\details{ +immigration_der uses the CCHS variables that have been transformed by +cchsflow. In order to generate a value for BMI across CCHS cycles, +the following SDC variables must be transformed and harmonized. +} +\examples{ +# Using immigration_fun() to create immigration_der values across CCHS cycles +# immigration_fun() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform immigration_der, use rec_with_table() for each CCHS cycle +# and specify immigration_der, along with the various SDC variables. +# Then by using merge_rec_data() you can combine immigration_der across cycles. + +library(cchsflow) +immigration2001 <- rec_with_table( + cchs2001_p, c( + "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der" + ) +) + +head(immigration2001) + +immigration2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "SDCFIMM", "SDCGCBG", "SDCGCGT", "SDCGRES", "immigration_der" + ) +) + +tail(immigration2009_2010) + +combined_immigration <- merge_rec_data(immigration2001, immigration2009_2010) + +head(combined_immigration) + +tail(combined_immigration) + +} diff --git a/man/low_drink_long_fun.Rd b/man/low_drink_long_fun.Rd new file mode 100644 index 00000000..7c8cdd68 --- /dev/null +++ b/man/low_drink_long_fun.Rd @@ -0,0 +1,125 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/alcohol.R +\name{low_drink_long_fun} +\alias{low_drink_long_fun} +\title{Long term risks due to drinking} +\usage{ +low_drink_long_fun( + DHH_SEX, + ALWDWKY, + ALC_1, + ALW_1, + ALW_2A1, + ALW_2A2, + ALW_2A3, + ALW_2A4, + ALW_2A5, + ALW_2A6, + ALW_2A7 +) +} +\arguments{ +\item{DHH_SEX}{Sex of respondent (1 - male, 2 - female)} + +\item{ALWDWKY}{Number of drinks consumed in the past week} + +\item{ALC_1}{Drinks in the past year (1 - yes, 2 - no)} + +\item{ALW_1}{Drinks in the last week (1 - yes, 2 - no)} + +\item{ALW_2A1}{Number of drinks on Sunday} + +\item{ALW_2A2}{Number of drinks on Monday} + +\item{ALW_2A3}{Number of drinks on Tuesday} + +\item{ALW_2A4}{Number of drinks on Wednesday} + +\item{ALW_2A5}{Number of drinks on Thursday} + +\item{ALW_2A6}{Number of drinks on Friday} + +\item{ALW_2A7}{Number of drinks on Saturday} +} +\value{ +Categorical variable (ALWDVLTR_der) with two categories: + + \itemize{ + \item 1 - Increased long term health risk + \item 2 - No increased long term health risk + } +} +\description{ +This function creates a categorical variable that + flags for increased long term health risks due to their drinking habits, + according to Canada's Low-Risk Alcohol Drinking Guideline. +} +\details{ +The classification of drinkers according to their long term health +risks comes from guidelines in Alcohol and Health in Canada: A Summary of +Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +consumption reported over the past week. Short-term or acute risks include +injury and overdose. + +Categories are based on CCHS 2015-2016's variable (ALWDVLTR) where long +term health risk are increased when drinking more than 10 drinks a week for +women, with no more than 2 drinks a day most days, and more than 15 drinks a +week for men, with no more than 3 drinks a day most days. + +See \url{https://osf.io/ykau5/} for more details on the guideline. +See \url{https://osf.io/ycxaq/} for more details on the derivation of the +function on page 8. +} +\examples{ + +# Using low_drink_long_fun() to create ALWDVLTR_der values across CCHS cycles +# low_drink_long_fun() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform ALWDVLTR_der, use rec_with_table() for each CCHS cycle +# and specify ALWDVLTR_der, along with the various alcohol and sex +# variables. +# Using merge_rec_data(), you can combine ALWDVLTR_der across cycles. + +library(cchsflow) +long_low_drink2001 <- rec_with_table( + cchs2001_p, c( + "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", + "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der" + ) +) + +head(long_low_drink2001) + +long_low_drink2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", + "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVLTR_der" + ) +) + +tail(long_low_drink2009_2010) + +combined_long_low_drink <- bind_rows(long_low_drink2001, +long_low_drink2009_2010) + +head(combined_long_low_drink) + +tail(combined_long_low_drink) + +# Using low_drink_long_fun() to generate ALWDVLTR_der with user-inputted +# values. +# +# Let's say you are a male, you had drinks in the last week and in the last +# year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on +# Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, +# and 2 drinks on Saturday with a total of 30 drinks in a week. +# Using low_drink_long_fun(), we can check if you would be classified as +# having an increased long term health risk due to drinking. + +long_term_drink <- low_drink_long_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1, + ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, + ALW_2A6 = 8, ALW_2A7 = 2) + +print(long_term_drink) +} diff --git a/man/low_drink_score_fun.Rd b/man/low_drink_score_fun.Rd new file mode 100644 index 00000000..be397086 --- /dev/null +++ b/man/low_drink_score_fun.Rd @@ -0,0 +1,78 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/alcohol.R +\name{low_drink_score_fun} +\alias{low_drink_score_fun} +\title{Low drinking score (all cycles)} +\usage{ +low_drink_score_fun(DHH_SEX, ALWDWKY) +} +\arguments{ +\item{DHH_SEX}{Sex of respondent (1 - male, 2 - female)} + +\item{ALWDWKY}{Number of drinks consumed in the past week} +} +\value{ +Low risk drinking score (low_drink_score) with four categories: +\itemize{ + \item 1 - Low risk (0 points) + \item 2 - Marginal risk (1-2 points) + \item 3 - Medium risk (3-4 points) + \item 4 - High risk (5-9 points) + } +} +\description{ +This function creates a derived variable based on their drinking +habits and flags for health and social problems from their pattern of +alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline. +} +\details{ +The low risk drinking score is based on the scoring system in +Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +steps. Step 1 allocates points based on sex and the number of drinks +that you usually have each week. In step 2, one point will be awarded for +each item that is true related to drinking habits. The total score is +obtained from adding the points in step 1 and step 2. +} +\note{ +Step 2 is not included in this function because the questions in +step 2 are not asked in any of the CCHS cycles. The score is only based on +step 1. + +See \url{https://osf.io/eprg7/} for more details on the guideline and score. +} +\examples{ + +# Using low_drink_score_fun() to create low_drink_score values across +# CCHS cycles low_drink_score_fun() is specified in variable_details.csv +# along with the CCHS variables and cycles included. + +# To transform low_drink_score, use rec_with_table() for each CCHS cycle +# and specify low_drink_score, along with the various alcohol and sex +# variables. +# Using merge_rec_data(), you can combine low_drink_score across cycles. + +library(cchsflow) +low_drink2001 <- rec_with_table( + cchs2001_p, c( + "DHH_SEX", "ALWDWKY", "low_risk_score" + ) +) + +head(low_drink2001) + +low_drink2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "DHH_SEX", "ALWDWKY", "low_risk_score" + ) +) + +tail(low_drink2009_2010) + +combined_low_drink <- bind_rows(low_drink2001, +low_drink2009_2010) + +head(combined_low_drink) + +tail(combined_low_drink) + +} diff --git a/man/low_drink_score_fun1.Rd b/man/low_drink_score_fun1.Rd new file mode 100644 index 00000000..f14c6426 --- /dev/null +++ b/man/low_drink_score_fun1.Rd @@ -0,0 +1,88 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/alcohol.R +\name{low_drink_score_fun1} +\alias{low_drink_score_fun1} +\title{Low drinking score (select cycles)} +\usage{ +low_drink_score_fun1(DHH_SEX, ALWDWKY, ALC_005, ALC_1) +} +\arguments{ +\item{DHH_SEX}{Sex of respondent (1 - male, 2 - female)} + +\item{ALWDWKY}{Number of drinks consumed in the past week} + +\item{ALC_005}{In lifetime, ever had a drink? (1 - yes, 2 - no)} + +\item{ALC_1}{Past year, have you drank alcohol? (1 - yes, 2 - no)} +} +\value{ +Low risk drinking score (low_drink_score1) with four categories: +\itemize{ + \item 1 - Low risk - never drank (0 points) + \item 2 - Low risk - former drinker (0 points) + \item 3 - Marginal risk (1-2 points) + \item 4 - Medium risk (3-4 points) + \item 5 - High risk (5-9 points) + } +} +\description{ +This function creates a derived variable based on their drinking +habits and flags for health and social problems from their pattern of +alcohol use according to Canada's Low-Risk Alcohol Drinking Guideline. +} +\details{ +The low risk drinking score is based on the scoring system in +Canada's Low-Risk Alcohol Drinking Guideline. The score is divided into two +steps. Step 1 allocates points based on sex and the number of drinks +that you usually have each week. In step 2, one point will be awarded for +each item that is true related to drinking habits. The total score is +obtained from adding the points in step 1 and step 2. + +This score has two 0 point categories: low risk (never drank) and low risk +(former drinker). The two drinking groups are derived from 'ever had a drink +in lifetime'. 'Ever had a drink in lifetime' is only available in CCHS +2001-2008 and 2015-2018. +} +\note{ +Step 2 is not included in this function because the questions in +step 2 are not asked in any of the CCHS cycles. The score is only based on +step 1. + +See \url{https://osf.io/eprg7/} for more details on the guideline and score. +} +\examples{ + +# Using low_drink_score_fun1() to create low_drink_score values across +# CCHS cycles low_drink_score_fun1() is specified in variable_details.csv +# along with the CCHS variables and cycles included. + +# To transform low_drink_score1, use rec_with_table() for each CCHS cycle +# and specify low_drink_score1, along with the various alcohol and sex +# variables. +# Using merge_rec_data(), you can combine low_drink_score1 across cycles. + +library(cchsflow) +low_drink2001 <- rec_with_table( + cchs2001_p, c( + "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score" + ) +) + +head(low_drink2001) + +low_drink2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "DHH_SEX", "ALWDWKY", "ALC_005", "ALC_1", "low_risk_score" + ) +) + +tail(low_drink2009_2010) + +combined_low_drink1 <- bind_rows(low_drink2001, +low_drink2009_2010) + +head(combined_low_drink1) + +tail(combined_low_drink1) + +} diff --git a/man/low_drink_short_fun.Rd b/man/low_drink_short_fun.Rd new file mode 100644 index 00000000..e34705e3 --- /dev/null +++ b/man/low_drink_short_fun.Rd @@ -0,0 +1,124 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/alcohol.R +\name{low_drink_short_fun} +\alias{low_drink_short_fun} +\title{Short term risks due to drinking} +\usage{ +low_drink_short_fun( + DHH_SEX, + ALWDWKY, + ALC_1, + ALW_1, + ALW_2A1, + ALW_2A2, + ALW_2A3, + ALW_2A4, + ALW_2A5, + ALW_2A6, + ALW_2A7 +) +} +\arguments{ +\item{DHH_SEX}{Sex of respondent (1 - male, 2 - female)} + +\item{ALWDWKY}{Number of drinks consumed in the past week} + +\item{ALC_1}{Drinks in the past year (1 - yes, 2 - no)} + +\item{ALW_1}{Drinks in the last week (1 - yes, 2 - no)} + +\item{ALW_2A1}{Number of drinks on Sunday} + +\item{ALW_2A2}{Number of drinks on Monday} + +\item{ALW_2A3}{Number of drinks on Tuesday} + +\item{ALW_2A4}{Number of drinks on Wednesday} + +\item{ALW_2A5}{Number of drinks on Thursday} + +\item{ALW_2A6}{Number of drinks on Friday} + +\item{ALW_2A7}{Number of drinks on Saturday} +} +\value{ +Categorical variable (ALWDVSTR_der) with two categories: + + \itemize{ + \item 1 - Increased short term health risk + \item 2 - No increased short term health risk + } +} +\description{ +This function creates a categorical variable that + flags for increased short term health risks due to their drinking habits, + according to Canada's Low-Risk Alcohol Drinking Guideline. +} +\details{ +The classification of drinkers according to their short term health +risks comes from guidelines in Alcohol and Health in Canada: A Summary of +Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol +consumption reported over the past week. Short-term or acute risks include +injury and overdose. + +Categories are based on CCHS 2015-2016's variable (ALWDVSTR) where short +term health risk are increased when drinking more than 3 drinks (for women) +or 4 drinks (for men) on any single occasion. + +See \url{https://osf.io/ykau5/} for more details on the guideline. +See \url{https://osf.io/ycxaq/} for more details on derivation of the +function on page 9. +} +\examples{ + +# Using low_drink_short_fun() to create ALWDVSTR_der values across CCHS cycles +# low_drink_short_fun() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform ALWDVSTR_der, use rec_with_table() for each CCHS cycle +# and specify ALWDVSTR_der, along with the various alcohol and sex +# variables. +# Using merge_rec_data(), you can combine ALWDVSTR_der across cycles. + +library(cchsflow) +short_low_drink2001 <- rec_with_table( + cchs2001_p, c( + "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", + "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der" + ) +) + +head(short_low_drink2001) + +short_low_drink2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4", + "ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der" + ) +) + +tail(short_low_drink2009_2010) + +combined_short_low_drink <- bind_rows(short_low_drink2001, +short_low_drink2009_2010) + +head(combined_short_low_drink) + +tail(combined_short_low_drink) + +# Using low_drink_short_fun() to generate ALWDVSTR_der with user-inputted +# values. +# +# Let's say you are a male, you had drinks in the last week and in the last +# year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on +# Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday, +# and 2 drinks on Saturday with a total of 30 drinks in a week. +# Using low_drink_short_fun(), we can check if you would be classified as +# having an increased short term health risk due to drinking. + +short_term_drink <- low_drink_short_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1, + ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4, + ALW_2A6 = 8, ALW_2A7 = 2) + +print(short_term_drink) +} diff --git a/man/pack_years_fun.Rd b/man/pack_years_fun.Rd index b64c2a76..6bd248fb 100644 --- a/man/pack_years_fun.Rd +++ b/man/pack_years_fun.Rd @@ -5,7 +5,7 @@ \title{Smoking pack-years} \usage{ pack_years_fun( - SMKDSTY, + SMKDSTY_A, DHHGAGE_cont, time_quit_smoking, SMKG203_cont, @@ -19,8 +19,8 @@ pack_years_fun( ) } \arguments{ -\item{SMKDSTY}{derived variable that classifies an individual's smoking -status.} +\item{SMKDSTY_A}{variable used in CCHS cycles 2001-2014 that classifies an +individual's smoking status.} \item{DHHGAGE_cont}{continuous age variable.} @@ -84,7 +84,7 @@ library(cchsflow) pack_years2009_2010 <- rec_with_table( cchs2009_2010_p, c( - "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", + "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" ) @@ -94,7 +94,7 @@ head(pack_years2009_2010) pack_years2011_2012 <- rec_with_table( cchs2011_2012_p,c( - "SMKDSTY", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", + "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der" ) diff --git a/man/pack_years_fun_cat.Rd b/man/pack_years_fun_cat.Rd new file mode 100644 index 00000000..e33e585f --- /dev/null +++ b/man/pack_years_fun_cat.Rd @@ -0,0 +1,74 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/smoking.R +\name{pack_years_fun_cat} +\alias{pack_years_fun_cat} +\title{Categorical smoking pack-years} +\usage{ +pack_years_fun_cat(pack_years_der) +} +\arguments{ +\item{pack_years_der}{derived variable that calculates smoking pack-years +See \code{\link{pack_years_fun}} for documentation on how variable +was derived.} +} +\value{ +value for pack year categories in the pack_years_cat variable. +} +\description{ +This function creates a categorical derived variable +(pack_years_cat) that categorizes smoking pack-years (pack_years_der). +} +\details{ +pack-years is calculated by multiplying the number of cigarette +packs per day (20 cigarettes per pack) by the number of years.The categories +were based on the Cardiovascular Disease Population Risk Tool +(Douglas Manuel et al. 2018). + +pack_years_cat uses the derived variable pack_years_der. Pack_years_der uses +age and various smoking variables that have been transformed by cchsflow (see +documentation on pack_year_der). In order to categorize pack years across CCHS +cycles, age and smoking variables must be transformed and harmonized. +} +\examples{ + +# Using pack_years_fun_cat() to categorize pack year values across CCHS cycles +# pack_years_fun_cat() is specified in variable_details.csv along with the +# CCHS variables and cycles included. + +# To transform pack_years_cat across cycles, use rec_with_table() for each +# CCHS cycle and specify pack_years_cat. +# Since pack_year_der is also also derived variable, you will have to specify +# the variables that are derived from it. +# Since time_quit_smoking_der is also a derived variable in pack_year_der, +# you will have to specify the variables that are derived from it. +# Then by using merge_rec_data(), you can combine pack_years_cat across +# cycles. + +library(cchsflow) + +pack_years_cat_2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", + "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", + "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat" + ) +) + +head(pack_years_cat_2009_2010) + +pack_years_cat_2011_2012 <- rec_with_table( + cchs2011_2012_p,c( + "SMKDSTY_A", "DHHGAGE_cont", "SMK_09A_B", "SMKG09C", "time_quit_smoking", + "SMKG203_cont", "SMKG207_cont", "SMK_204", "SMK_05B", "SMK_208", + "SMK_05C", "SMK_01A", "SMKG01C_cont", "pack_years_der", "pack_years_cat" + ) +) + +tail(pack_years_cat_2011_2012) + +combined_pack_years_cat <- suppressWarnings(merge_rec_data +(pack_years_cat_2009_2010,pack_years_cat_2011_2012)) + +head(combined_pack_years_cat) +tail(combined_pack_years_cat) +} diff --git a/man/pct_time_fun_cat.Rd b/man/pct_time_fun_cat.Rd new file mode 100644 index 00000000..43d6e17b --- /dev/null +++ b/man/pct_time_fun_cat.Rd @@ -0,0 +1,67 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/percent-time-canada.R +\name{pct_time_fun_cat} +\alias{pct_time_fun_cat} +\title{Categorical percent time in Canada} +\usage{ +pct_time_fun_cat(pct_time_der) +} +\arguments{ +\item{pct_time_der}{derived continuous percent time in Canada. +See \code{\link{pct_time_fun}} for documentation on how variable was derived.} +} +\value{ +value for categorical percent time in Canada using pct_time_der +variable. +} +\description{ +This function creates a categorical derived variable +(pct_time_der_cat10) that categorizes the derived percent time in Canada +variable (pct_time_der). +} +\details{ +The percent time in Canada provides an estimated percentage of the +time a person's life was spent in Canada.The categorical percent time in +Canada divides the continuous value into 10 percent intervals. + +pct_time_der_cat10 uses the derived variable pct_time_der. pct_time_der uses +various variables that have been transformed by cchsflow (see documentation +on pct_time_der). In order to categorize percent time in Canada across CCHS +cycles, the variables must be transformed and harmonized. +} +\examples{ +# Using pct_time_fun_cat() to create categorical percent time values +# between CCHS cycles. +# pct_time_fun_cat() is specified in variable_details.csv along with the CCHS +# variables and cycles included. + +# To transform pct_time_der_cat10 across cycles, use rec_with_table() for +# each CCHS cycle. +# Since pct_time_der is a derived variable, you will have to specify the +# variables that are derived from it. +# Then by using merge_rec_data(), you can combine pct_time_der_cat10 across +# cycles. + +library(cchsflow) +pct_time_cat2009_2010 <- rec_with_table( + cchs2009_2010_p, c( + "DHHGAGE_cont", "SDCGCBG", + "SDCGRES", "pct_time_der", "pct_time_der_cat10" + ) +) +head(pct_time_cat2009_2010) + +pct_time_cat2011_2012 <- rec_with_table( + cchs2011_2012_p, c( + "DHHGAGE_cont", "SDCGCBG", + "SDCGRES", "pct_time_der", "pct_time_der_cat10" + ) +) +tail(pct_time_cat2011_2012) + +combined_pct_time_cat <- merge_rec_data(pct_time_cat2009_2010, +pct_time_cat2011_2012) +head(combined_pct_time_cat) +tail(combined_pct_time_cat) + +} diff --git a/man/smoke_simple_fun.Rd b/man/smoke_simple_fun.Rd index 725a2ad7..742eca3d 100644 --- a/man/smoke_simple_fun.Rd +++ b/man/smoke_simple_fun.Rd @@ -4,11 +4,11 @@ \alias{smoke_simple_fun} \title{Simple smoking status} \usage{ -smoke_simple_fun(SMKDSTY, time_quit_smoking) +smoke_simple_fun(SMKDSTY_cat5, time_quit_smoking) } \arguments{ -\item{SMKDSTY}{derived variable that classifies an individual's smoking -status.} +\item{SMKDSTY_cat5}{derived variable that classifies an individual's smoking +status. This variable captures cycles 2001-2018.} \item{time_quit_smoking}{derived variable that calculates the approximate time a former smoker has quit smoking. diff --git a/tests/testdata/rec_with_table_test_data.RData b/tests/testdata/rec_with_table_test_data.RData index 25d5e24b..b8b727e3 100644 Binary files a/tests/testdata/rec_with_table_test_data.RData and b/tests/testdata/rec_with_table_test_data.RData differ diff --git a/tests/testthat/test-alcohol.R b/tests/testthat/test-alcohol.R new file mode 100644 index 00000000..bb834e38 --- /dev/null +++ b/tests/testthat/test-alcohol.R @@ -0,0 +1,200 @@ +# Binge drinker + +test_that("binge_drinker_fun has expected output when sex is out of range", { + expect_equal(binge_drinker_fun(-1, 1, 1, 1, 1, 1, 1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_1 is out of range", { + expect_equal(binge_drinker_fun(1, -1, 1, 1, 1, 1, 1, 1, 1), "NA(a)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A1 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, -1, 1, 1, 1, 1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A2 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, -1, 1, 1, 1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A3 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, -1, 1, 1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A4 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, -1, 1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A5 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, -1, 1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A6 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, -1, 1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when ALW_2A7 is + out of range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, 1, -1), "NA(b)") +}) + +test_that("binge_drinker_fun has expected output when all values are + in range", { + expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, 1, 1), 2) +}) + +# low_drink_short_fun + +test_that("low_drink_short_fun has expected output when sex is out of range", { + expect_equal(low_drink_short_fun(-1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALWDWKY is out of + range", { + expect_equal(low_drink_short_fun(1, -1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALC_1 is out of + range", { + expect_equal(low_drink_short_fun(1, 1, -1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A1 is out of + range", { + expect_equal(low_drink_short_fun(1, 1, 1, -1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A2 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, -1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A3 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, -1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A4 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, 1, -1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A5 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, 1, 1, -1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A6 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when ALW_2A7 is + out of range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, -1), "NA(b)") +}) + +test_that("low_drink_short_fun has expected output when all values are + in range", { + expect_equal(low_drink_short_fun(1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), 2) +}) + +# low_drink_long_fun + +test_that("low_drink_long_fun has expected output when sex is out of range", { + expect_equal(low_drink_long_fun(-1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALWDWKY is out of + range", { + expect_equal(low_drink_long_fun(1, -1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALC_1 is out of range", { + expect_equal(low_drink_long_fun(1, 1, -1, 1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A1 is out of + range", { + expect_equal(low_drink_long_fun(1, 1, 1, -1, 1, 1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A2 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, -1, 1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A3 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, -1, 1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A4 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, 1, -1, 1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A5 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, 1, 1, -1 ,1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A6 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when ALW_2A7 is + out of range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, -1), "NA(b)") +}) + +test_that("low_drink_long_fun has expected output when all values are + in range", { + expect_equal(low_drink_long_fun(1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1), 2) +}) + +# low_drink_score_fun +test_that("low_drink_score_fun has expected output when sex is out of range", { + expect_equal(low_drink_score_fun(-1, 1), tagged_na("b")) +}) + +test_that("low_drink_score_fun has expected output when ALWDWKY is out of + range", { + expect_equal(low_drink_score_fun(1, -1), tagged_na("b")) +}) + +test_that("low_drink_score_fun has expected output when all values are + in range", { + expect_equal(low_drink_score_fun(1, 1), 1) +}) + +# low_drink_score_fun1 +test_that("low_drink_score_fun1 has expected output when sex is out of range", { + expect_equal(low_drink_score_fun1(-1, 1, 1, 2), tagged_na("b")) +}) + +test_that("low_drink_score_fun1 has expected output when ALWDWKY is out of + range", { + expect_equal(low_drink_score_fun1(1, -1, 1 ,2), tagged_na("b")) +}) + +test_that("low_drink_score_fun1 has expected output when ALC_005 is out of + range", { + expect_equal(low_drink_score_fun1(1, 1, -1, 2), tagged_na("b")) +}) + +test_that("low_drink_score_fun1 has expected output when ALC_1 is out of + range", { + expect_equal(low_drink_score_fun1(1, 1, 1 ,-2), tagged_na("b")) +}) + +test_that("low_drink_score_fun1 has expected output when all values are + in range", { + expect_equal(low_drink_score_fun1(1, 1, 1 ,2), 2) +}) \ No newline at end of file diff --git a/tests/testthat/test-binge-drinker.R b/tests/testthat/test-binge-drinker.R deleted file mode 100644 index 2abc3836..00000000 --- a/tests/testthat/test-binge-drinker.R +++ /dev/null @@ -1,47 +0,0 @@ -test_that("binge_drinker_fun has expected output when sex is out of range", { - expect_equal(binge_drinker_fun(-1, 1, 1, 1, 1, 1, 1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_1 is out of range", { - expect_equal(binge_drinker_fun(1, -1, 1, 1, 1, 1, 1, 1, 1), "NA(a)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A1 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, -1, 1, 1, 1, 1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A2 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, -1, 1, 1, 1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A3 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, -1, 1, 1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A4 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, -1, 1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A5 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, -1, 1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A6 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, -1, 1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when ALW_2A7 is - out of range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, 1, -1), "NA(b)") -}) - -test_that("binge_drinker_fun has expected output when all values are - in range", { - expect_equal(binge_drinker_fun(1, 1, 1, 1, 1, 1, 1, 1, 1), 2) -}) \ No newline at end of file diff --git a/tests/testthat/test-bmi.R b/tests/testthat/test-bmi.R index 54e05582..f5ae6582 100644 --- a/tests/testthat/test-bmi.R +++ b/tests/testthat/test-bmi.R @@ -7,3 +7,24 @@ test_that("bmi_fun() handles one or more NA arguments properly", { test_that("bmi_fun() generates a bmi when appropriate parameters are passed", { expect_equal(bmi_fun(3, 18), 2) }) + +test_that("adjusted_bmi_fun() handles one or more NA arguments properly",{ + expect_equal(adjusted_bmi_fun(NA, 1, 1), tagged_na("b")) + expect_equal(adjusted_bmi_fun(1, NA, 1), tagged_na("b")) + expect_equal(adjusted_bmi_fun(1, 1, NA), tagged_na("b")) + expect_equal(adjusted_bmi_fun(NA, NA, NA), tagged_na("b")) +}) + +test_that("adjusted_bmi_fun() generates a bmi when appropriate parameters + are passed", { + expect_equal(adjusted_bmi_fun(1, 1, 1), 0.00017) +}) + +test_that("bmi_fun_cat() handles an NA argument properly", { + expect_equal(bmi_fun_cat(NA), "NA(b)") +}) + +test_that("bmi_fun_cat() generates a categorical bmi when an appropriate value + is passed", { + expect_equal(bmi_fun_cat(25), 3) + }) \ No newline at end of file diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R index f7217b8e..1e72064b 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -42,7 +42,7 @@ test_that("variable_details included with cchsflow is not empty", { expect_true(nrow(variable_details) > 0) }) -# Testing cchs2001 +# Testing cchs2001_p test_that("cchs2001_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2001_p, "data.frame", exact = TRUE) @@ -52,7 +52,7 @@ test_that("cchs2001_p dataset included with cchsflow contains expect_true(nrow(cchs2001_p) == 200) }) -# Testing cchs2003 +# Testing cchs2003_p test_that("cchs2003_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2003_p, "data.frame", exact = TRUE) @@ -62,7 +62,7 @@ test_that("cchs2003_p dataset included with cchsflow contains expect_true(nrow(cchs2003_p) == 200) }) -# Testing cchs2005 +# Testing cchs2005_p test_that("cchs2005_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2005_p, "data.frame", exact = TRUE) @@ -72,7 +72,7 @@ test_that("cchs2005_p dataset included with cchsflow contains expect_true(nrow(cchs2005_p) == 200) }) -# Testing cchs2007_2008 +# Testing cchs2007_2008_p test_that("cchs2007_2008_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2007_2008_p, "data.frame", exact = TRUE) @@ -82,7 +82,7 @@ test_that("cchs2007_2008_p dataset included with cchsflow expect_true(nrow(cchs2007_2008_p) == 200) }) -# Testing cchs2009_2010 +# Testing cchs2009_2010_p test_that("cchs2009_2010_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2009_2010_p, "data.frame", exact = TRUE) @@ -92,7 +92,7 @@ test_that("cchs2009_2010_p dataset included with cchsflow expect_true(nrow(cchs2009_2010_p) == 200) }) -# Testing cchs2011_2012 +# Testing cchs2011_2012_p test_that("cchs2011_2012_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2011_2012_p, "data.frame", exact = TRUE) @@ -102,7 +102,7 @@ test_that("cchs2011_2012_p dataset included with cchsflow expect_true(nrow(cchs2011_2012_p) == 200) }) -# Testing cchs2013_2014 +# Testing cchs2013_2014_p test_that("cchs2013_2014_p dataset included with cchsflow is saved in correct format", { expect_s3_class(cchs2013_2014_p, "data.frame", exact = TRUE) @@ -110,4 +110,34 @@ test_that("cchs2013_2014_p dataset included with cchsflow test_that("cchs2013_2014_p dataset included with cchsflow contains only the 200 sample rows", { expect_true(nrow(cchs2013_2014_p) == 200) + }) + +# Testing cchs2014_p +test_that("cchs2013_2014_p dataset included with cchsflow + is saved in correct format", { + expect_s3_class(cchs2014_p, "data.frame", exact = TRUE) + }) +test_that("cchs2013_2014_p dataset included with cchsflow + contains only the 200 sample rows", { + expect_true(nrow(cchs2014_p) == 200) + }) + +# Testing cchs2015_2016_p +test_that("cchs2015_2016_p dataset included with cchsflow + is saved in correct format", { + expect_s3_class(cchs2015_2016_p, "data.frame", exact = TRUE) + }) +test_that("cchs2015_2016_p dataset included with cchsflow + contains only the 200 sample rows", { + expect_true(nrow(cchs2015_2016_p) == 200) + }) + +# Testing cchs2017_2018_p +test_that("cchs2017_2018_p dataset included with cchsflow + is saved in correct format", { + expect_s3_class(cchs2017_2018_p, "data.frame", exact = TRUE) + }) +test_that("cchs2017_2018_p dataset included with cchsflow + contains only the 200 sample rows", { + expect_true(nrow(cchs2017_2018_p) == 200) }) \ No newline at end of file diff --git a/tests/testthat/test-diet.R b/tests/testthat/test-diet.R new file mode 100644 index 00000000..fa4ff2ea --- /dev/null +++ b/tests/testthat/test-diet.R @@ -0,0 +1,25 @@ +# diet_score_fun +test_that("diet_score_fun has expected output when all inputs are out of + range",{ + expect_equal(diet_score_fun(NA, NA, NA, NA, NA, NA, NA), + tagged_na("b")) +}) + +test_that("diet_score_fun has expected output when all inputs are in + range",{ + expect_equal(diet_score_fun(1, 1, 1, 1, 1, 1, 1), + 5) + }) + +# diet_score_fun_cat +test_that("diet_score_fun_cat has expected output when input is out of + range",{ + expect_equal(diet_score_fun_cat(NA), + "NA(b)") + }) + +test_that("diet_score_fun_cat has expected output when input is in + range",{ + expect_equal(diet_score_fun_cat(1), + 1) + }) \ No newline at end of file diff --git a/tests/testthat/test-percent-time-canada.R b/tests/testthat/test-immigration.R similarity index 52% rename from tests/testthat/test-percent-time-canada.R rename to tests/testthat/test-immigration.R index 6a080013..70ff315f 100644 --- a/tests/testthat/test-percent-time-canada.R +++ b/tests/testthat/test-immigration.R @@ -1,3 +1,5 @@ +# pct_time_fun + test_that("pct_time_fun has expected output when age is out of range", { expect_equal(pct_time_fun(-1, 2, 1), tagged_na("b")) }) @@ -31,3 +33,33 @@ test_that("pct_time_fun has expected output when time in Canada is NA", { test_that("pct_time_fun has expected output when all arguments are NA", { expect_equal(pct_time_fun(NA, NA, NA), tagged_na("b")) }) + +# pct_time_fun_cat +test_that("pct_time_fun_cat has expected output when input is out of range", { + expect_equal(pct_time_fun_cat(-1), "NA(b)") +}) + +test_that("pct_time_fun_cat has expected output when input is in range", { + expect_equal(pct_time_fun_cat(1), 1) +}) + +# immigration_fun +test_that("immigration_fun has expected output when SDCFIMM is out of range", { + expect_equal(immigration_fun(-1,2, 2, 1), "NA(b)") +}) + +test_that("immigration_fun has expected output when SDCGCBG is out of range", { + expect_equal(immigration_fun(1,-2, 2, 1), "NA(b)") +}) + +test_that("immigration_fun has expected output when SDCGCGT is out of range", { + expect_equal(immigration_fun(1,2, -2, 1), "NA(b)") +}) + +test_that("immigration_fun has expected output when SDCGRES is out of range", { + expect_equal(immigration_fun(1,2, 2, -1), "NA(b)") +}) + +test_that("immigration_fun has expected output when all values are in range", { + expect_equal(immigration_fun(1,2, 2, 1), 4) +}) \ No newline at end of file diff --git a/tests/testthat/test-physical-activity.R b/tests/testthat/test-physical-activity.R new file mode 100644 index 00000000..134f4b4f --- /dev/null +++ b/tests/testthat/test-physical-activity.R @@ -0,0 +1,11 @@ +test_that("energy_exp_fun has expected outputs when all inputs are out of + range", { + expect_equal(energy_exp_fun(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), + tagged_na("b")) + }) + +test_that("energy_exp_fun has expected outputs when all inputs are in + range", { + expect_equal(energy_exp_fun(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + 0.02142857) + }) \ No newline at end of file diff --git a/tests/testthat/test-smoking.R b/tests/testthat/test-smoking.R index 59aa817a..ac424c27 100644 --- a/tests/testthat/test-smoking.R +++ b/tests/testthat/test-smoking.R @@ -41,3 +41,27 @@ test_that("pack_years_fun() has expected outputs when expect_equal(pack_years_fun(1, 40, 96, 16, 96, 10, 5, 996, 996, 96, 96), 12) }) + +test_that("pack_years_fun_cat() has expected outputs when + pack_years_der is out of range", { + expect_equal(pack_years_fun_cat(-1), + "NA(b)") + }) + +test_that("pack_years_fun_cat() has expected outputs when + pack_years_der is in range", { + expect_equal(pack_years_fun_cat(1), + 3) + }) + +test_that("SMKG040_fun() has expected outputs when + both inputs are out of range", { + expect_equal(SMKG040_fun(NA, NA), + tagged_na("b")) + }) + +test_that("SMKG040_fun() has expected outputs when + both inputs are in range", { + expect_equal(SMKG040_fun(1, 1), + 1) + }) diff --git a/vignettes/duplicate_datasets.Rmd b/vignettes/duplicate_datasets.Rmd index 3fb10549..2a0f19be 100644 --- a/vignettes/duplicate_datasets.Rmd +++ b/vignettes/duplicate_datasets.Rmd @@ -25,6 +25,8 @@ The following datasets are currently supported by cchsflow: * CCHS PUMF 2012 * CCHS PUMF 2013-2014 * CCHS PUMF 2014 +* CCHS PUMF 2015-2016 +* CCHS PUMF 2017-2018 ## Datasets in cchsflow with overlap diff --git a/vignettes/get_started.Rmd b/vignettes/get_started.Rmd index 3166f1ef..83af03da 100644 --- a/vignettes/get_started.Rmd +++ b/vignettes/get_started.Rmd @@ -274,7 +274,7 @@ therefore it is not possible to have the same `age` categories across all CCHS cycles. `DHHGAGE_A` is the age variable for CCHS cycles 2001-2003, and `DHHGAGE_B` is -the age variable for CCHS cycles 2005-2014. +the age variable for CCHS cycles 2005-2018. ```{r, warning=FALSE} age2001 <- rec_with_table(cchs2001_p, "DHHGAGE_A") diff --git a/vignettes/how_to_add_variables.Rmd b/vignettes/how_to_add_variables.Rmd index 8825ceef..9cbd8b93 100644 --- a/vignettes/how_to_add_variables.Rmd +++ b/vignettes/how_to_add_variables.Rmd @@ -63,7 +63,7 @@ kable(variable_details[1:6, 1:2]) kable(variable_details[1:6, 1:3]) ``` -4. **databaseStart:** BMI was captured in all CCHS surveys between 2001 and 2014, so in the first row with the continuous "category" and the else row, the CCHS identifiers will be listed this column: +4. **databaseStart:** BMI was captured in all CCHS surveys between 2001 and 2018, so in the first row with the continuous "category" and the else row, the CCHS identifiers will be listed this column: ```{r, echo=FALSE, warning=FALSE} kable(variable_details[c(1, 6), 1:4]) @@ -81,7 +81,7 @@ kable(variable_details[2:3, 1:4]) kable(variable_details[4:5, 1:4]) ``` -5. **variableStart:** In the 2001, 2003, and 2005 CCHS surveys the BMI variable differs from the common name, while in the CCHS surveys from 2007-2014, the BMI variable is the same as the common name. However, the values for not applicable and missing categories changes after 2003. Therefore for the first & else rows, the variableStart column will look like this: +5. **variableStart:** In the 2001, 2003, and 2005 CCHS surveys the BMI variable differs from the common name, while in the CCHS surveys from 2007-2018, the BMI variable is the same as the common name. However, the values for not applicable and missing categories changes after 2003. Therefore for the first & else rows, the variableStart column will look like this: ```{r, echo=FALSE, warning=FALSE} kable(variable_details[c(1, 6), 1:5]) @@ -135,7 +135,7 @@ kable(variable_details[1:6, 1:10]) kable(variable_details[1:6, 1:11]) ``` -12. **recFrom:** Going through the CCHS data documentation from 2001 to 2014, it was found that the lowest BMI value was 11.91 and the highest BMI value was 57.9. Therefore the recFrom for the first row is written as `[11.91,57.9]`. In the 2001 and 2003 CCHS surveys not applicable was coded as 999.6 so the recFrom for this row would be `[999.6,999.6]`. Similarly, in the 2001 and 2003 CCHS surveys don't know was coded as 999.7, refusal was coded as 999.8, and not stated was coded as 999.9. Therefore the recFrom for the missing row for CCHS 2001 and 2003 would be `[999.7,999.9]`. In the not applicable row for the 2005 CCHS survey onwards, the recFrom is `[999.96,999.96]`. In the missing row for CCHS 2005 onwards, the recFrom is `[999.97,999.99]`. For the else row, just write `else`. +12. **recFrom:** Going through the CCHS data documentation from 2001 to 2018, it was found that the lowest BMI value was 11.91 and the highest BMI value was 57.9. Therefore the recFrom for the first row is written as `[11.91,57.9]`. In the 2001 and 2003 CCHS surveys not applicable was coded as 999.6 so the recFrom for this row would be `[999.6,999.6]`. Similarly, in the 2001 and 2003 CCHS surveys don't know was coded as 999.7, refusal was coded as 999.8, and not stated was coded as 999.9. Therefore the recFrom for the missing row for CCHS 2001 and 2003 would be `[999.7,999.9]`. In the not applicable row for the 2005 CCHS survey onwards, the recFrom is `[999.96,999.96]`. In the missing row for CCHS 2005 onwards, the recFrom is `[999.97,999.99]`. For the else row, just write `else`. ```{r, echo=FALSE, warning=FALSE} kable(variable_details[1:6, 1:12]) @@ -266,7 +266,7 @@ kable(variables[4,]) ### Creating a derived variable that exists in other CCHS cycles -In order to harmonize a variable across all cycles, you may need to create a derived variable for the years in which the variable is not present. An example of this is RACDPAL, a variable that was derived from 2003 to 2014. To create and specify RACDPAL for 2001, the same derived variable conventions apply with a few slight differences. In `variables.csv`, the DerivedVar is enclosed with the database in which it is derived. +In order to harmonize a variable across all cycles, you may need to create a derived variable for the years in which the variable is not present. An example of this is RACDPAL, a variable that was derived from 2003 to 2018. To create and specify RACDPAL for 2001, the same derived variable conventions apply with a few slight differences. In `variables.csv`, the DerivedVar is enclosed with the database in which it is derived. ```{r, echo=FALSE, warning=FALSE} kable(variables[5, 9], col.names = 'variableStart') diff --git a/vignettes/variable_details.Rmd b/vignettes/variable_details.Rmd index 99a16f39..4f093faa 100644 --- a/vignettes/variable_details.Rmd +++ b/vignettes/variable_details.Rmd @@ -51,7 +51,7 @@ If a categorical variable has 4 distinct categories, along with a "not applicabl ### Columns The following are the columns that are listed in `variable_details.csv`. Many of these columns need to be specified in order for `rec_with_table()` to be functional. We will use the `sex` variable to illustrate how each column is specified: -1. **variable:** the name of the final transformed variable. In `variable_details.csv`, we have designated the variable names used in CCHS cycles from 2007 to 2014 as the final transformed variable name. +1. **variable:** the name of the final transformed variable. In `variable_details.csv`, we have designated the variable names used in CCHS cycles from 2007 to 2018 as the final transformed variable name. ```{r, echo=FALSE, warning=FALSE} kable(variable_details[variable_details$variable == "DHH_SEX", 1], col.names = 'variable') @@ -83,7 +83,7 @@ kable(variable_details[variable_details$variable == "DHH_SEX", c(1:5)]) + The categorical `sex` variable in the 2001 CCHS survey is `DHHA_SEX`. If the final variable name for categorical age in the **variable** column is `DHH_SEX`, you would write the following in this column: `cchs2001::DHH_SEX` -+ The categorical age variable in the CCHS surveys from 2007 to 2014 is `DHH_SEX`. Since it is the same as the final variable name, you would write in this column `[DHH_SEX]` **once**. The variable name that is denoted within the square brackets is the default variable name. ++ The categorical age variable in the CCHS surveys from 2007 to 2018 is `DHH_SEX`. Since it is the same as the final variable name, you would write in this column `[DHH_SEX]` **once**. The variable name that is denoted within the square brackets is the default variable name. 6. **fromType:** the variable type as indicated in the CCHS surveys. As indicated in the **toType** column, categorical variables are denoted as `cat` and continuous variables are denoted as `cont`. diff --git a/vignettes/variables_sheet.Rmd b/vignettes/variables_sheet.Rmd index fa311ef6..bd9f22ea 100644 --- a/vignettes/variables_sheet.Rmd +++ b/vignettes/variables_sheet.Rmd @@ -26,7 +26,7 @@ variables <- read.csv(file.path(getwd(), '../inst/extdata/variables.csv')) cat("There are", nrow(variables), "variables, grouped in", sum(!duplicated(variables$subject)), "subjects and", sum(!duplicated(variables$section)), "sections that are available for - transformation in CCHS cycles from 2001 to 2014.", "\n\n") + transformation in CCHS cycles from 2001 to 2018.", "\n\n") ```