|
|
|
|
@ -178,6 +178,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
.on('click', (event, datum)=>{
|
|
|
|
|
datum.checked = !datum.checked
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
d3.select('#metros ul')
|
|
|
|
|
@ -194,6 +195,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
.on('click', (event, datum)=>{
|
|
|
|
|
datum.checked = !datum.checked
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
d3.select('#courses button:nth-child(2)')
|
|
|
|
|
@ -202,6 +204,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
course.checked = true
|
|
|
|
|
}
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
populateMetrosCoursesCheckboxes()
|
|
|
|
|
})
|
|
|
|
|
d3.select('#courses button:nth-child(3)')
|
|
|
|
|
@ -210,6 +213,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
course.checked = false
|
|
|
|
|
}
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
populateMetrosCoursesCheckboxes()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
@ -219,6 +223,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
metro.checked = true
|
|
|
|
|
}
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
populateMetrosCoursesCheckboxes()
|
|
|
|
|
})
|
|
|
|
|
d3.select('#metros button:nth-child(3)')
|
|
|
|
|
@ -227,6 +232,7 @@ const populateMetrosCoursesCheckboxes = ()=>{
|
|
|
|
|
metro.checked = false
|
|
|
|
|
}
|
|
|
|
|
renderPoints()
|
|
|
|
|
displayMeanStandardDeviation()
|
|
|
|
|
populateMetrosCoursesCheckboxes()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -281,6 +287,18 @@ const getAverage = (start, end) => {
|
|
|
|
|
|
|
|
|
|
const displayMeanStandardDeviation = () => {
|
|
|
|
|
sortedInstances = instances.sort((a,b) => Date.parse(a.graduation_date) - Date.parse(b.graduation_date))
|
|
|
|
|
sortedInstances = sortedInstances.filter(datum=> {
|
|
|
|
|
const instanceMetro = datum.course.split('-')[0]
|
|
|
|
|
const instanceCourse = datum.course.split('-')[1]
|
|
|
|
|
const metro = metros.find(m => m.metro === instanceMetro)
|
|
|
|
|
const course = courses.find(c => c.course === instanceCourse)
|
|
|
|
|
if(metro.checked && course.checked){
|
|
|
|
|
return true
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
averageOutcomes = []
|
|
|
|
|
for(let i = 0; i < sortedInstances.length-10; i += 10){
|
|
|
|
|
getAverage(i,i+10)
|
|
|
|
|
|