Overview

Data about the results was collected from CNN's 2016 election center. Each county has the breakdown of how many votes each candidate recieved in that county and what percentage of the total vote from that county that the candidate recieved. The candidate's political party is also represented.

http://www.cnn.com/election/primaries/counties/va/Dem

Downloads

Download all of the following files.

Usage

Begin by adding the above JAR file to your classpath. This library has 1 function you can use.
import corgis.election.ElectionLibrary;
import corgis.election.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        ElectionLibrary electionLibrary = new ElectionLibrary();
        // Access data inside the library
        ArrayList<Result> list_of_result = electionLibrary.getResults(false);
    }
}
Additionally, some of the functions can optionally return Big Data using the last argument (setting it to true). If you use this Big Data, it may be much slower. Wait until you are sure your code is correct before using these examples.
import corgis.election.ElectionLibrary;
import corgis.election.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        ElectionLibrary electionLibrary = new ElectionLibrary();
        // Access data inside the library
        ArrayList<Result> list_of_result = electionLibrary.getResults(true);
    }
}

Documentation

We provide full JavaDoc for this library. Alternatively, you may refer to the below:

 electionLibrary.getResults(test)

Returns the result of each primary for every county from the dataset.