View plotInitialData.R
# Ages are more relevant when we bucket them | |
ds$AgeRanges <- cut(ds$Age,breaks=c(0,30,50,70,90),labels=c("11-30","31-50","51-70","71+")) | |
# Income ranges are also more interesting when we bin them | |
ds$IncomeCategories <- cut(x=ds$YearlyIncome,breaks=c(0,20000,50000,70000,100000,250000),labels=c("Low","Lower","Middle","Upper","Wealthy")) | |
# Helps with building the plots | |
ds$Count <- 1 | |
features <- c("AgeRanges","MaritalStatus","Gender", | |
"IncomeCategories","TotalChildren","NumberChildrenAtHome", |