Code Monkey home page Code Monkey logo

us-presidential-election-2016's Introduction

US-Presidential-Election-2016

This repository contains source code in R

Analysis Problem Statement

(a) Use R to make a map of state-by-state percentage vote share of President Trump in the 2016 US presidential election. The data are stored in a CSV file in Input folder. Be sure to include Alaska and Hawaii in your map. Get the color scheme in your map to look like the one shown at http://projects.fivethirtyeight.com/2016-election-forecast/?ex_cid=rrpromo (for an unrelated dataset). It uses shades of red for Donald Trump and shades of blue for Hillary Clinton.

(b) What does the map show? Justify your conclusions.

Analysis Solution

(a) The final output map is the file - Elections2016.jpg in Output folder.

(b) The following are the conclusions along with justifications:

  • The map essentially shows state-by-state percentage vote share of President Donald Trump in 2016 US Presidential election.

  • The states are colored according majority of vote share in the election. If the state is colored in RED shades, that means Donald Trump has more than 50% vote share than Hillary Clinton for that state. It means he is leading in those states.

    Similarly, if a state is colored in the shades of blue that means Hillary Clinton shares higher percentage of vote share than Donald Trump.

  • From map, we observe that the President Donald Trump has got maximum share of the votes from the central region of the United States of America, whereas Hillary Clinton has got maximum share of the votes from Eastern and Western region of the United States of America.

  • From the map, we can say that, states favoring President Donald Trump lie in the central region whereas his contender Hillary Clinton is been favored by the states that are located in bay areas (both eastern and western).

  • Donald Trump won 30 states whereas Hillary Clinton 20 states.

us-presidential-election-2016's People

Contributors

gauthamsaimr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.