By Ryan Whitcomb Version 1, created 6/1/2016 Tags: politics, election, votes, counties, candidate
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.
Additionally, some of the functions can return a sample of the Big Data using an extra argument. If you use this sampled Big Data, it may be much faster. When you are sure your code is correct, you can remove the argument to use the full dataset.
importelection# These may be slow!list_of_result=election.get_results(test=True)
Returns the result of each primary for every county from the dataset.
Optional argument to control whether ALL or SOME of the data is returned for this function. This makes it much easier to develop and test your code, only using a large (slow) amount of data when you are ready.