SlideShare uma empresa Scribd logo
1 de 38
Case Study: American Politics
Data Driven Decision Making (D3M)
Vishal Singh
Stern School of Business
New York University
D3M
Table of Content
I. American Politics as a Marketing Campaign
II. County Level Analysis of 2012 Presidential Election
III. Survey Analysis of Politics (1948 to 2012)
IV. Analysis of Political Advertising
V. Zip Code Analysis of Political Donations (OpenSectret)
VI. Text Mining Presidential Nomination Speeches (1856 to
2012)
American Politics as a Marketing Campaign
Data Driven Decision Making (D3M)
Vishal Singh
Stern School of Business
New York University
D3M
Political Marketing
o What are the similarities and differences
between political marketing and product
marketing?
 American Politics as a Marketing Campaign
 What are the 4 P’s?
 Segmentation/Targeting/Positioning
 CRM (dynamics?)
Learn it from the Guru
'How's That Hopey, Changey Stuff?' Palin Asks
6
Product
Price
http://www.fec.gov/disclosure.shtml
http://www.opensecrets.org/index.php
Promotion (Advertising)
http://www.livingroomcandidate.org/
Place (Geography)
Products versus Politics: Similarities
Vishal Singh, Stern School of Business, NYU 7
Segmentation & Targeting
Watch Segment 6
What do firms know about U
(Even if you have never purchased anything from them)
Aboutthedata.com, at least in its initial incarnation, leaves out many data elements that Acxiom markets to its
corporate clients -- intimate details like whether a person is a "potential inheritor" or an "adult with senior parent," or
whether a household has a "diabetic focus" or "senior needs." Without a more complete picture of industry practices,
privacy advocates say, consumers cannot make informed decisions about whether to share personal information with
companies. NY Times, Sept 4, 2013
10
Positioning
Neuroscience & Politics?
(Caution Recommended)
12
Neuromarketing: Pepsi Challenge
(citation)
For an ad campaign that started a revolution in marketing, the Pepsi
Challenge TV spots of the 1970s and '80s were almost absurdly simple. But
30 years after the commercials debuted, neuroscientist Read Montague was
still thinking about them. Something didn't make sense. If
people preferred the taste of Pepsi, the drink should have dominated the
market. It didn't. So in the summer of 2003, Montague gave himself a 'Pepsi
Challenge' of a different sort: to figure out why people would buy a product
they didn't particularly like. What he found was the first data from an
entirely new field: neuromarketing, the study of the brain's responses to ads,
brands, and the rest of the messages littering the cultural landscape.
Montague had his subjects take the Pepsi Challenge while he watched their
neural activity with a functional MRI machine, which tracks blood flow to
different regions of the brain. Without knowing what they were drinking,
about half of them said they preferred Pepsi. But once Montague told them
which samples were Coke, three-fourths said that drink tasted better, and
their brain activity changed too. Coke "lit up" the medial prefrontal cortex --
a part of the brain that controls higher thinking. Montague's hunch was that
the brain was recalling images and ideas from commercials, and the brand
was overriding the actual quality of the product. Montague published his
findings in the October 2004 issue of Neuron, and a cottage industry was
born.
13
Political vs. Product Marketing
Differences
 Limited Choice Set
o Reason for limited participation?
 Collective action
o Not one-to-one mapping on cost and returns
 Why do we have more negative ads in politics?
o Zero-sum game
o Finite Horizon
Analysis 1
County Analysis of 2012 Presidential Elections
D3M
Variables in our File (County_2012.csv)
Load Data in R
######################################################################################################################
# Analysis of 2012 Presidential Election: County Data (Part 1)
# Summary Statistics
# D3M, NYU Stern
#####################################################################################################################
# Set Your working directory and load data
setwd("C:/Users/vsingh.NYC-STERN/Dropbox/teaching/2014/Fall/Data")
# Read data and give a temp name "election"
election <- read.csv("county_election_2012.csv")
# Quick check on what variables have missing values
check1<-colSums(is.na(election))
print(check1)
# So some health variables have lot of missing values
# What happens if we remove ALL row with missing value??
# Create a new data that removes all rows with any missing values-- for any variable
election1<-na.omit(election)
# Check the size of our data sets
dim(election)
dim(election1)
# Why do we loose so many observations??? NOT a Good idea to drop all rows.
# This is important from a practical perspective.
# Get summary of % Voting
summary(election1$Per_Obama)
summary(election$Per_Romney)
How to Aggregate from County to State Level Results
###################################################################################################################
# INTRO TO "dplyr"
# Get votes by States. Use a new package called dplyr
# This is brand new by Rstudio. Works with blazing speed for large data sets.
###################################################################################################################
install.packages("dplyr")
library(dplyr)
state.votes<-election %>%
group_by(State) %>%
summarise(state_total=sum(Num_Total_Vote), state_obama=sum(Num_Obama_Total), Per_obama_state=(state_obama/state_total))
head(state.votes) # This displays the first few data points
# Suppose we want only Colorado (sub setting data, we often want to do this)
colorado<-filter(state.votes, State=='Colorado')
###################################################################################################################
# Plotting in R
# ggplot is the main package, has recently been extended to "ggvis" that allows you to get HTML plots
##################################################################################################################
#load necessary package
install.packages("ggplot2")
library(ggplot2)
# Histogram of Romney %
ggplot(election, aes(x=Per_Romney)) + geom_histogram()
# Histogram by Region
byregion<-ggplot(election, aes(x=Per_Romney, fill=census_region)) + geom_density(alpha=.4)
plot(byregion)
# Get seperate graphs for each Region
byregion+ facet_wrap(~census_region)
# Add a vertical line at Mean % Romney
byregion+ facet_wrap(~census_region)+geom_vline(aes(xintercept=mean(Per_Romney, na.rm=T)) ,
color="black", linetype="dashed", size=1)
Relationship with Other Variables (e.g. County Income)
# Correlations with other demographics, lets say Income
ggplot(election, aes(x=Per_Romney, y=Household_Income))+geom_point()+ stat_smooth(method=loess)
# Try Log Income
logincome<-log(election$Household_Income)
# Attach log income to data
election<-cbind(election, logincome)
# Try correlation with log income. Also switch x & y
ggplot(election, aes(x=logincome, y=Per_Romney))+geom_point()+ stat_smooth(method=loess)
# Try correlation with log income. Also switch x & y
tmp<-ggplot(election, aes(x=logincome, y=Per_Romney))+geom_point()
# See correlation by census region
tmp+ geom_smooth(aes(group=census_region), method="loess")+ facet_wrap(~census_region)
# See correlation by RED BLUE STATES
tmp+ geom_smooth(aes(group=Red_blue_state), method="loess")+ facet_wrap(~Red_blue_state)
Intuition of Andrew Gelman.
Does not show up as cleanly
in County data, we will
revisit this with survey data
Box Plot
##################################################################################################
###It is often useful to transform a continuous variable to discrete.
# For example, we can divide the counties into quintiles of income (Lowest 20%, ...Highest 20%)
##################################################################################################
# Try Quintiles of Income
election$IncQuint<-with(election, cut(election$Household_Income, quantile(election$Household_Income,(0:5)/5,na.rm=TRUE),include.lowest=TRUE))
# Add Labels to Quintile
election$IncQuint <- factor(election$IncQuint, labels = c ("Low Income" ,"Quint2", "Quint3" ,"Quint4" ,"High Income") )
# Check we have done this correctly
summarise(group_by(election, IncQuint),mean=mean(Household_Income))
# Box plot of % Romney along Income Quintiles
ggplot(election, aes(x=IncQuint, y=Per_Romney, fill=IncQuint))+geom_boxplot()+ facet_wrap(~Red_blue_state)
Correlation b/w Variables
###################################################################################################################
# Check Correlations between Voting & Some other Variables.
###################################################################################################################
# Select some variables .
list1<-c('Per_Obama', 'Per_Romney', 'Per_Young', 'Per_65_and_over', 'Per_African_American',
'Per_white','Rural', 'Percent_College_More', 'Income_capita', 'Household_Income')
# Remove na values .
short_elec<- na.omit(election[c(list1)])
#check correlations and store it in "cor1"
cor1<-cor(short_elec, use="pairwise.complete.obs")
# A good Package to visualize correlations
install.packages("corrplot")
library(corrplot)
corrplot(cor1, method="shade")
corrplot(cor1, method="circle")
# Order your correlations
corrplot(cor1, order = "AOE", method="square")
# Correlations based on 3 clusters
corrplot(cor1, order = "hclust", addrect = 3)
# Correlations based on 3 clusters, use Squares
corrplot(cor1, order = "hclust", addrect = 3, method="square")
# Google corrplot to get various other formats
Check Correlation in Variables
Check Correlation in Variables (Ordered)
Exercise 1: Replicate the Graph Below
Analysis 2:
Analysis of ANES Presidential Elections (1948-2012)
D3M
o American National Election Studies
Data1: ANES
ANES is a collaboration of Stanford University and the University of
Michigan, with funding by the National Science Foundation.
 Q1: Use variables “Voteparty” & “Income” to
analyze voting behavior by Income
 Q2: What is the Republican share of
“White” Vote (use variable “Voteparty2”)
o In RED/BLUE/SWING states
o In RED/BLUE/SWING states BEFORE & AFTER Clinton
ANES 1948 to 2008
Understand the Basics of your Data
Objective: Replicate the first two charts
NO Vote by Income
Source: American National Election Studies (ANES), 1972-2008
Income & Republican Vote
(Conditional on Voting)
Source: American National Election Studies (ANES), 1972-2008
Party Identification
% of Liberals (Conservative) that identify as Democrat (Republican)
81%
82%
49%
90%
45%
55%
65%
75%
85%
95%
Poor Low Middle Income High Rich
PartyIdentification
Party Identification
Liberal-Identify Democrat
Cons-Identify Republican
Source: American National Election Studies (ANES), 1972-2008
Shift in White Votes since Clinton
(Does not bounce back in Blue & Swing States)
Significant Drop in Republican Votes in Blue States
Income & Gender Gap

Mais conteúdo relacionado

Mais procurados

Who should be nominated to run in the 2012 U.S. Presidential Election?
Who should be nominated to run in the 2012 U.S. Presidential Election?Who should be nominated to run in the 2012 U.S. Presidential Election?
Who should be nominated to run in the 2012 U.S. Presidential Election?
agraefe
 
Visual Information
Visual InformationVisual Information
Visual Information
feueacmrq
 
JessupJamesPTRComprehensiveAssignment
JessupJamesPTRComprehensiveAssignmentJessupJamesPTRComprehensiveAssignment
JessupJamesPTRComprehensiveAssignment
James Jessup
 
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docxThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
Thomas Goodheart
 
Who should be nominated to run in the 2012 U.S. presidential election?
Who should be nominated to run in the 2012 U.S. presidential election?Who should be nominated to run in the 2012 U.S. presidential election?
Who should be nominated to run in the 2012 U.S. presidential election?
agraefe
 

Mais procurados (10)

Daeil Kim: Machine Learning at the New York Times
Daeil Kim: Machine Learning at the New York TimesDaeil Kim: Machine Learning at the New York Times
Daeil Kim: Machine Learning at the New York Times
 
Using Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York TimesUsing Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York Times
 
Who should be nominated to run in the 2012 U.S. Presidential Election?
Who should be nominated to run in the 2012 U.S. Presidential Election?Who should be nominated to run in the 2012 U.S. Presidential Election?
Who should be nominated to run in the 2012 U.S. Presidential Election?
 
Visual Information
Visual InformationVisual Information
Visual Information
 
Measuring Model Fairness - Stephen Hoover
Measuring Model Fairness - Stephen HooverMeasuring Model Fairness - Stephen Hoover
Measuring Model Fairness - Stephen Hoover
 
JessupJamesPTRComprehensiveAssignment
JessupJamesPTRComprehensiveAssignmentJessupJamesPTRComprehensiveAssignment
JessupJamesPTRComprehensiveAssignment
 
MLSEV. Association Discovery and Topic Modeling
MLSEV. Association Discovery and Topic ModelingMLSEV. Association Discovery and Topic Modeling
MLSEV. Association Discovery and Topic Modeling
 
data commentary
data  commentarydata  commentary
data commentary
 
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docxThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
ThesisDraftGarbageIn-GarbageOutSimulatingInternalConsistency.docx
 
Who should be nominated to run in the 2012 U.S. presidential election?
Who should be nominated to run in the 2012 U.S. presidential election?Who should be nominated to run in the 2012 U.S. presidential election?
Who should be nominated to run in the 2012 U.S. presidential election?
 

Destaque

Bryan Reece - Teaching with Technology in the Political Science Classroom
Bryan Reece - Teaching with Technology in the Political Science ClassroomBryan Reece - Teaching with Technology in the Political Science Classroom
Bryan Reece - Teaching with Technology in the Political Science Classroom
PearsonPoliticalScience
 
Comparative politics
Comparative politicsComparative politics
Comparative politics
ahosle
 
Impliccations for teachers
Impliccations for teachersImpliccations for teachers
Impliccations for teachers
Toni McMillian
 

Destaque (12)

Political cartoon
Political cartoonPolitical cartoon
Political cartoon
 
Social Media in the Classroom - Political
Social Media in the Classroom - PoliticalSocial Media in the Classroom - Political
Social Media in the Classroom - Political
 
Media and politics lse mpa talk 2017
Media and politics lse mpa talk 2017Media and politics lse mpa talk 2017
Media and politics lse mpa talk 2017
 
The role of politics in secondary school truancy today
The role of politics in secondary school truancy todayThe role of politics in secondary school truancy today
The role of politics in secondary school truancy today
 
TESTA, School of Politics & International Relations, University of Nottingham...
TESTA, School of Politics & International Relations, University of Nottingham...TESTA, School of Politics & International Relations, University of Nottingham...
TESTA, School of Politics & International Relations, University of Nottingham...
 
The Impact of Policy on the Class of 2027
The Impact of Policy on the Class of 2027The Impact of Policy on the Class of 2027
The Impact of Policy on the Class of 2027
 
Childhood Play
Childhood PlayChildhood Play
Childhood Play
 
Bryan Reece - Teaching with Technology in the Political Science Classroom
Bryan Reece - Teaching with Technology in the Political Science ClassroomBryan Reece - Teaching with Technology in the Political Science Classroom
Bryan Reece - Teaching with Technology in the Political Science Classroom
 
Measuring the social dimension of development corridors
Measuring the social dimension of development corridorsMeasuring the social dimension of development corridors
Measuring the social dimension of development corridors
 
Comparative politics
Comparative politicsComparative politics
Comparative politics
 
Political ideologies
Political ideologiesPolitical ideologies
Political ideologies
 
Impliccations for teachers
Impliccations for teachersImpliccations for teachers
Impliccations for teachers
 

Semelhante a D3M Politics

Final%20Analysis%20Code%20Displayed.html
Final%20Analysis%20Code%20Displayed.htmlFinal%20Analysis%20Code%20Displayed.html
Final%20Analysis%20Code%20Displayed.html
Ryan Haeri
 
Part 1 Individual Factors Affecting Voter Turnout Based on .docx
Part 1 Individual Factors Affecting Voter Turnout Based on .docxPart 1 Individual Factors Affecting Voter Turnout Based on .docx
Part 1 Individual Factors Affecting Voter Turnout Based on .docx
danhaley45372
 
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
odiliagilby
 
2012 data analysis
2012 data analysis2012 data analysis
2012 data analysis
cherylyap61
 
(A)My research questions is is to figure out what people in t.docx
(A)My research questions is is to figure out what people in t.docx(A)My research questions is is to figure out what people in t.docx
(A)My research questions is is to figure out what people in t.docx
mayank272369
 
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docxHomework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
pooleavelina
 
Graphic Representation Grading GuideCOMTM541 Version 22.docx
Graphic Representation Grading GuideCOMTM541 Version 22.docxGraphic Representation Grading GuideCOMTM541 Version 22.docx
Graphic Representation Grading GuideCOMTM541 Version 22.docx
whittemorelucilla
 
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docxBUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
curwenmichaela
 

Semelhante a D3M Politics (20)

Chapter 4 marketing research pace
Chapter 4 marketing research paceChapter 4 marketing research pace
Chapter 4 marketing research pace
 
Final%20Analysis%20Code%20Displayed.html
Final%20Analysis%20Code%20Displayed.htmlFinal%20Analysis%20Code%20Displayed.html
Final%20Analysis%20Code%20Displayed.html
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Counting
 
Digital business: "การปรับกลยุทธ์ของธุรกิจ โดยใช้การตลาดแบบดิจิตอล" โดยคุณสุร...
Digital business: "การปรับกลยุทธ์ของธุรกิจ โดยใช้การตลาดแบบดิจิตอล" โดยคุณสุร...Digital business: "การปรับกลยุทธ์ของธุรกิจ โดยใช้การตลาดแบบดิจิตอล" โดยคุณสุร...
Digital business: "การปรับกลยุทธ์ของธุรกิจ โดยใช้การตลาดแบบดิจิตอล" โดยคุณสุร...
 
Part 1 Individual Factors Affecting Voter Turnout Based on .docx
Part 1 Individual Factors Affecting Voter Turnout Based on .docxPart 1 Individual Factors Affecting Voter Turnout Based on .docx
Part 1 Individual Factors Affecting Voter Turnout Based on .docx
 
Research Data Management
Research  Data ManagementResearch  Data Management
Research Data Management
 
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
« PreviousHomeNext »Home » Measurement » Levels of Measure.docx
 
2012 data analysis
2012 data analysis2012 data analysis
2012 data analysis
 
bigDay1data
bigDay1databigDay1data
bigDay1data
 
Identification1
Identification1Identification1
Identification1
 
(A)My research questions is is to figure out what people in t.docx
(A)My research questions is is to figure out what people in t.docx(A)My research questions is is to figure out what people in t.docx
(A)My research questions is is to figure out what people in t.docx
 
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docxHomework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
Homework #1SOCY 3115Spring 20Read the Syllabus and FAQ on ho.docx
 
Facts, Figures & Fictions
Facts, Figures & Fictions Facts, Figures & Fictions
Facts, Figures & Fictions
 
Social Science-Conscious Analysis Case Study: The Cost of Public School
Social Science-Conscious Analysis Case Study: The Cost of Public SchoolSocial Science-Conscious Analysis Case Study: The Cost of Public School
Social Science-Conscious Analysis Case Study: The Cost of Public School
 
Fun with Text - Hacking Text Analytics
Fun with Text - Hacking Text AnalyticsFun with Text - Hacking Text Analytics
Fun with Text - Hacking Text Analytics
 
Graphic Representation Grading GuideCOMTM541 Version 22.docx
Graphic Representation Grading GuideCOMTM541 Version 22.docxGraphic Representation Grading GuideCOMTM541 Version 22.docx
Graphic Representation Grading GuideCOMTM541 Version 22.docx
 
Module 1.3 data exploratory
Module 1.3  data exploratoryModule 1.3  data exploratory
Module 1.3 data exploratory
 
Correlation and linear regression
Correlation and linear regression Correlation and linear regression
Correlation and linear regression
 
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docxBUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
BUS308 – Week 1 Lecture 2 Describing Data Expected Out.docx
 
6 years of my private G+ Spotfire community
6 years of my private G+ Spotfire community6 years of my private G+ Spotfire community
6 years of my private G+ Spotfire community
 

Mais de veesingh (10)

Slalom
SlalomSlalom
Slalom
 
Brand Analytics
Brand AnalyticsBrand Analytics
Brand Analytics
 
Store segmentation progresso
Store segmentation progressoStore segmentation progresso
Store segmentation progresso
 
Pricing strategy progresso
Pricing strategy progressoPricing strategy progresso
Pricing strategy progresso
 
Regressioin mini case
Regressioin mini caseRegressioin mini case
Regressioin mini case
 
Fat Tax Slideshow
Fat Tax SlideshowFat Tax Slideshow
Fat Tax Slideshow
 
Obesity
ObesityObesity
Obesity
 
Field experiments
Field experimentsField experiments
Field experiments
 
Brand mining
Brand miningBrand mining
Brand mining
 
D3M Commodity
D3M Commodity D3M Commodity
D3M Commodity
 

Último

Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
karishmasinghjnh
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
amitlee9823
 

Último (20)

Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 

D3M Politics

  • 1. Case Study: American Politics Data Driven Decision Making (D3M) Vishal Singh Stern School of Business New York University D3M
  • 2. Table of Content I. American Politics as a Marketing Campaign II. County Level Analysis of 2012 Presidential Election III. Survey Analysis of Politics (1948 to 2012) IV. Analysis of Political Advertising V. Zip Code Analysis of Political Donations (OpenSectret) VI. Text Mining Presidential Nomination Speeches (1856 to 2012)
  • 3. American Politics as a Marketing Campaign Data Driven Decision Making (D3M) Vishal Singh Stern School of Business New York University D3M
  • 4. Political Marketing o What are the similarities and differences between political marketing and product marketing?  American Politics as a Marketing Campaign  What are the 4 P’s?  Segmentation/Targeting/Positioning  CRM (dynamics?)
  • 5. Learn it from the Guru 'How's That Hopey, Changey Stuff?' Palin Asks
  • 7. Vishal Singh, Stern School of Business, NYU 7
  • 9. What do firms know about U (Even if you have never purchased anything from them) Aboutthedata.com, at least in its initial incarnation, leaves out many data elements that Acxiom markets to its corporate clients -- intimate details like whether a person is a "potential inheritor" or an "adult with senior parent," or whether a household has a "diabetic focus" or "senior needs." Without a more complete picture of industry practices, privacy advocates say, consumers cannot make informed decisions about whether to share personal information with companies. NY Times, Sept 4, 2013
  • 11.
  • 13. Neuromarketing: Pepsi Challenge (citation) For an ad campaign that started a revolution in marketing, the Pepsi Challenge TV spots of the 1970s and '80s were almost absurdly simple. But 30 years after the commercials debuted, neuroscientist Read Montague was still thinking about them. Something didn't make sense. If people preferred the taste of Pepsi, the drink should have dominated the market. It didn't. So in the summer of 2003, Montague gave himself a 'Pepsi Challenge' of a different sort: to figure out why people would buy a product they didn't particularly like. What he found was the first data from an entirely new field: neuromarketing, the study of the brain's responses to ads, brands, and the rest of the messages littering the cultural landscape. Montague had his subjects take the Pepsi Challenge while he watched their neural activity with a functional MRI machine, which tracks blood flow to different regions of the brain. Without knowing what they were drinking, about half of them said they preferred Pepsi. But once Montague told them which samples were Coke, three-fourths said that drink tasted better, and their brain activity changed too. Coke "lit up" the medial prefrontal cortex -- a part of the brain that controls higher thinking. Montague's hunch was that the brain was recalling images and ideas from commercials, and the brand was overriding the actual quality of the product. Montague published his findings in the October 2004 issue of Neuron, and a cottage industry was born. 13
  • 14.
  • 15. Political vs. Product Marketing Differences  Limited Choice Set o Reason for limited participation?  Collective action o Not one-to-one mapping on cost and returns  Why do we have more negative ads in politics? o Zero-sum game o Finite Horizon
  • 16. Analysis 1 County Analysis of 2012 Presidential Elections D3M
  • 17. Variables in our File (County_2012.csv)
  • 18. Load Data in R ###################################################################################################################### # Analysis of 2012 Presidential Election: County Data (Part 1) # Summary Statistics # D3M, NYU Stern ##################################################################################################################### # Set Your working directory and load data setwd("C:/Users/vsingh.NYC-STERN/Dropbox/teaching/2014/Fall/Data") # Read data and give a temp name "election" election <- read.csv("county_election_2012.csv") # Quick check on what variables have missing values check1<-colSums(is.na(election)) print(check1) # So some health variables have lot of missing values # What happens if we remove ALL row with missing value?? # Create a new data that removes all rows with any missing values-- for any variable election1<-na.omit(election) # Check the size of our data sets dim(election) dim(election1) # Why do we loose so many observations??? NOT a Good idea to drop all rows. # This is important from a practical perspective. # Get summary of % Voting summary(election1$Per_Obama) summary(election$Per_Romney)
  • 19. How to Aggregate from County to State Level Results ################################################################################################################### # INTRO TO "dplyr" # Get votes by States. Use a new package called dplyr # This is brand new by Rstudio. Works with blazing speed for large data sets. ################################################################################################################### install.packages("dplyr") library(dplyr) state.votes<-election %>% group_by(State) %>% summarise(state_total=sum(Num_Total_Vote), state_obama=sum(Num_Obama_Total), Per_obama_state=(state_obama/state_total)) head(state.votes) # This displays the first few data points # Suppose we want only Colorado (sub setting data, we often want to do this) colorado<-filter(state.votes, State=='Colorado')
  • 20. ################################################################################################################### # Plotting in R # ggplot is the main package, has recently been extended to "ggvis" that allows you to get HTML plots ################################################################################################################## #load necessary package install.packages("ggplot2") library(ggplot2) # Histogram of Romney % ggplot(election, aes(x=Per_Romney)) + geom_histogram() # Histogram by Region byregion<-ggplot(election, aes(x=Per_Romney, fill=census_region)) + geom_density(alpha=.4) plot(byregion) # Get seperate graphs for each Region byregion+ facet_wrap(~census_region) # Add a vertical line at Mean % Romney byregion+ facet_wrap(~census_region)+geom_vline(aes(xintercept=mean(Per_Romney, na.rm=T)) , color="black", linetype="dashed", size=1)
  • 21. Relationship with Other Variables (e.g. County Income) # Correlations with other demographics, lets say Income ggplot(election, aes(x=Per_Romney, y=Household_Income))+geom_point()+ stat_smooth(method=loess) # Try Log Income logincome<-log(election$Household_Income) # Attach log income to data election<-cbind(election, logincome) # Try correlation with log income. Also switch x & y ggplot(election, aes(x=logincome, y=Per_Romney))+geom_point()+ stat_smooth(method=loess) # Try correlation with log income. Also switch x & y tmp<-ggplot(election, aes(x=logincome, y=Per_Romney))+geom_point() # See correlation by census region tmp+ geom_smooth(aes(group=census_region), method="loess")+ facet_wrap(~census_region) # See correlation by RED BLUE STATES tmp+ geom_smooth(aes(group=Red_blue_state), method="loess")+ facet_wrap(~Red_blue_state) Intuition of Andrew Gelman. Does not show up as cleanly in County data, we will revisit this with survey data
  • 22. Box Plot ################################################################################################## ###It is often useful to transform a continuous variable to discrete. # For example, we can divide the counties into quintiles of income (Lowest 20%, ...Highest 20%) ################################################################################################## # Try Quintiles of Income election$IncQuint<-with(election, cut(election$Household_Income, quantile(election$Household_Income,(0:5)/5,na.rm=TRUE),include.lowest=TRUE)) # Add Labels to Quintile election$IncQuint <- factor(election$IncQuint, labels = c ("Low Income" ,"Quint2", "Quint3" ,"Quint4" ,"High Income") ) # Check we have done this correctly summarise(group_by(election, IncQuint),mean=mean(Household_Income)) # Box plot of % Romney along Income Quintiles ggplot(election, aes(x=IncQuint, y=Per_Romney, fill=IncQuint))+geom_boxplot()+ facet_wrap(~Red_blue_state)
  • 23. Correlation b/w Variables ################################################################################################################### # Check Correlations between Voting & Some other Variables. ################################################################################################################### # Select some variables . list1<-c('Per_Obama', 'Per_Romney', 'Per_Young', 'Per_65_and_over', 'Per_African_American', 'Per_white','Rural', 'Percent_College_More', 'Income_capita', 'Household_Income') # Remove na values . short_elec<- na.omit(election[c(list1)]) #check correlations and store it in "cor1" cor1<-cor(short_elec, use="pairwise.complete.obs") # A good Package to visualize correlations install.packages("corrplot") library(corrplot) corrplot(cor1, method="shade") corrplot(cor1, method="circle") # Order your correlations corrplot(cor1, order = "AOE", method="square") # Correlations based on 3 clusters corrplot(cor1, order = "hclust", addrect = 3) # Correlations based on 3 clusters, use Squares corrplot(cor1, order = "hclust", addrect = 3, method="square") # Google corrplot to get various other formats
  • 24. Check Correlation in Variables
  • 25. Check Correlation in Variables (Ordered)
  • 26. Exercise 1: Replicate the Graph Below
  • 27.
  • 28.
  • 29. Analysis 2: Analysis of ANES Presidential Elections (1948-2012) D3M
  • 30. o American National Election Studies Data1: ANES ANES is a collaboration of Stanford University and the University of Michigan, with funding by the National Science Foundation.
  • 31.  Q1: Use variables “Voteparty” & “Income” to analyze voting behavior by Income  Q2: What is the Republican share of “White” Vote (use variable “Voteparty2”) o In RED/BLUE/SWING states o In RED/BLUE/SWING states BEFORE & AFTER Clinton ANES 1948 to 2008 Understand the Basics of your Data Objective: Replicate the first two charts
  • 32.
  • 33.
  • 34. NO Vote by Income Source: American National Election Studies (ANES), 1972-2008
  • 35. Income & Republican Vote (Conditional on Voting) Source: American National Election Studies (ANES), 1972-2008
  • 36. Party Identification % of Liberals (Conservative) that identify as Democrat (Republican) 81% 82% 49% 90% 45% 55% 65% 75% 85% 95% Poor Low Middle Income High Rich PartyIdentification Party Identification Liberal-Identify Democrat Cons-Identify Republican Source: American National Election Studies (ANES), 1972-2008
  • 37. Shift in White Votes since Clinton (Does not bounce back in Blue & Swing States)
  • 38. Significant Drop in Republican Votes in Blue States Income & Gender Gap