pursuitofleisure / usa-electoral-map

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.

Home Page:https://pursuitofleisure.github.io/usa-electoral-map/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

https://pursuitofleisure.github.io/usa-electoral-map/


Languages

Language:HTML 81.0%Language:JavaScript 11.6%Language:CSS 7.4%