Skip to content

This is an interactive electoral map of the USA with the ability to click on each state to change the electoral vote totals for each candidate.

Notifications You must be signed in to change notification settings

pursuitofleisure/usa-electoral-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive USA Electoral Map for the 2024 Presidential Election

This is an interactive (SVG) map of USA states with the ability to click on each state to change the electoral vote totals for each candidate. The states/votes for each candidate are stored in an array with the ability to view each state won by each candidate.

Best viewed on larger screens

View Map Online

Built With

  • HTML
  • CSS
  • JavaScript (ES6)

JavaScript topics covered:

  • DOM manipulation
  • Event handlers
  • Arrays
  • Objects
  • Adding / removing items to / from array
  • Sorting
  • Local storage
  • <dialog>

CSS Layouts used:

  • Grid
  • Flexbox

Credits

Electoral vote values retrieved from: https://www.archives.gov/electoral-college/allocation

SVG map from: https://simplemaps.com/resources/customize-us-svg

About

This is an interactive electoral map of the USA with the ability to click on each state to change the electoral vote totals for each candidate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published