Using data from election years 1960-2012 this program calculates the total red and blue votes in the US, draws a map and displays the colors of the states or counties.
- Clone the repo and cd into PurpleAmerica
- Unzip the purple.zip file
- Compile java files by running the following commands in the terminal:
- javac StdDraw.java
- javac White.java
- javac RedBlue.java
- javac Purple.java
- Experiment! Run the following commands to draw your map:
java White USA
: Blank map of the US statesjava White USA-county
: Blank map of the US countiesjava RedBlue USA 2012
: Map of the US states showing the winning party for that year- Edit the election year. Choose election years from 1960-2012.
java RedBlue USA-county 2012
: Map of the US counties showing the winning party for that year- Edit the election year. Choose election years from 1960-2012.
java Purple USA 2012
: Map of the US states showing winning party for that year- Edit the election year. Choose election years from 1960-2012.
java Purple USA-county 2012
: Map of the US counties showing winning party for that year:- Edit the election year. Choose election years from 1960-2012.