Scala code for modeling/predicting general elections