Skip to content

andreas-andersen/us_election

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(shiny) Interactive map of US Presidential Election results and economic data

https://andreasandersen.shinyapps.io/US_election/ Map Preview

This is my github repository for my shiny app.

The map displays election results and economic data (median income and unemployment) in the period 2000 - 2020 (2019 for economic data). The income- and density plots are an attempt at visualizing the distribution of "rich" and "poor" counties across the two major political parties.

The app is coded in R. Map is created with leaflet and graphs with plotly.

Scripts and functions:

  • update.R
    • Imports spatial data, simplifies polygons, and exports spatial data including values used for colouring the counties in leaflet.
    • Imports, wrangles and exports unemployment, income and population data
    • Generates static plotly plots (income quantile plots and density plots)
  • app/app.R
    • Main shiny app

About

US election and economic map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published