Last active
April 1, 2016 23:16
-
-
Save awhstin/c425e20c2870bb91217e3dc68f7d366a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(plotly) | |
p<-plot_ly(Words, x =outlet, y =Mean,text = rownames(Words), type="bar", showlegend = FALSE, marker=list(color="rgb(55, 83, 109)")) %>% | |
add_trace(Words,x=Words$outlet, y = Words$X4.13.am,mode="markers" ,name = "Hillary for President", | |
showlegend = TRUE, marker=list(color="rgb(234, 153, 153)"))%>% | |
add_trace(Words,x=Words$outlet, y = Words$X26.Apr, mode="markers", name = "Baltimore Riots/Nepal Earthquake", | |
showlegend = TRUE, marker=list(color="rgb(106, 168, 79)"))%>% | |
layout(legend = list(x = 0.5, y = 0.90), title = "Mean Sentiment of News Outlets in April 2015") | |
plotly_POST(p, filename = "News_Sentiment") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment