Skip to content

hjyeon/CS760project

 
 

Repository files navigation

CS760project: Climate Change and Partisan Politics

Initial Data from

Mildenberger, M., Marlon, J.R., Howe, P.D., & Leiserowitz, A. (2017) “The spatial distribution of Republican and Democratic climate opinions at state and local scales,” Climatic Change. https://doi.org/10.1007/s10584-017-2103-0.

County data: https://github.com/favstats/USElection2020-NYT-Results/tree/master/data/2020-11-07%2014-15-14?fbclid=IwAR0fo2FIUvczObmzUaNmnwNOnnuuCnnqfqxejy1dFlQP5sNmnd1ppcI0rKE

Description of Files

  1. KNN
    kNN_2020.py: Python code for the distance weighted k-Nearest Neighbors predictor, along with the local linear regression prediction for the margins of victory.
  2. Decision Trees
    DataParser.java: Java code for processing data to construct decision trees.
    DecTree.java: Java code for building decision trees and performing n-fold cross-validation.
    DecTreeNode.java: Java code to represent a single node in a tree.
    Project.java: Java code to run various methods in DecTree.java.
  3. Naive Bayes
    NaiveBayes2019.py: Python code using the naive bayes classifier to predict party affiliation for the 2019 data.
    NaiveBayes2020.py: Python code using the naive bayes classifier to make predictions for the 2020 US election.

Final Results Used for Analysis using Boxer

Boxer (Interactive Comparison of Classification Results): https://graphics.cs.wisc.edu/Vis/Boxer/
States (Presidential): https://www.math.wisc.edu/~jenny/States/
Congressional Districts (House): https://www.math.wisc.edu/~jenny/CD
Counties (Presidential): https://www.math.wisc.edu/~jenny/County

Final Write up is now available as a file, see " Final_Writeup.pdf "

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 57.8%
  • Python 42.2%