Skip to content

A project that displays a map of the US with areas shaded in red or blue calculated on the number of republican or democratic votes.

Notifications You must be signed in to change notification settings

smobregon/PurpleAmerica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purple America

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.

  1. Clone the repo and cd into PurpleAmerica
  2. Unzip the purple.zip file
  3. Compile java files by running the following commands in the terminal:
  • javac StdDraw.java
  • javac White.java
  • javac RedBlue.java
  • javac Purple.java
  1. Experiment! Run the following commands to draw your map:
  • java White USA: Blank map of the US states
  • java White USA-county: Blank map of the US counties
  • java 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.

About

A project that displays a map of the US with areas shaded in red or blue calculated on the number of republican or democratic votes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages