Published
Edited
Feb 28, 2020
1 fork
Insert cell
Insert cell
Insert cell
surveyPrecinct = "Clark - 2709"
Insert cell
Insert cell
Insert cell
caucusSize = results[surveyPrecinct].total_attendance * 1
Insert cell
Insert cell
allDelegates = FileAttachment("nuvoqukile.txt").text()
Insert cell
Insert cell
Insert cell
viabilityNumber = {
let num = 0;
switch(assignedDelegates) {
case 1:
num = Math.ceil(caucusSize / 2);
break;
case 2:
num = Math.ceil(caucusSize / 4);
break;
case 3:
num = Math.ceil(caucusSize / 6);
break;
default:
num = Math.ceil(caucusSize * 0.15)
}
return num;
}
Insert cell
Insert cell
firstAlignment = getVotes(surveyPrecinct, "first");
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
finalAlignment = getVotes(surveyPrecinct, "final");
Insert cell
viableCandidateReductions = viableCandidates.filter(candidate => {
return finalAlignment[candidate + "_final_alignment"] < firstAlignment[candidate + "_first_alignment"]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
delegateCount = getVotes(surveyPrecinct, "delegate")
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more