Permalink
Browse files

airline names miraculously match in ACSI now, so include in

final merge() & remake graphs
  • Loading branch information...
Jeffrey Breen
Jeffrey Breen committed Jul 12, 2011
1 parent fa9e69a commit cd68c9883ec43c9ac2b683114a03eddb66b268ae
View
@@ -81,13 +81,13 @@ twitter.df$score = round( 100 * twitter.df$very.pos.count /
require(doBy)
orderBy(~-score, twitter.df)
-compare.df = merge(twitter.df, acsi.df, by='code',
+compare.df = merge(twitter.df, acsi.df, by=c('code', 'airline'),
suffixes=c('.twitter', '.acsi'))
# build scatter plot
g.scatter = ggplot( compare.df, aes(x=score.twitter, y=score.acsi) ) +
- geom_point( aes(color=airline.twitter), size=5 ) +
+ geom_point( aes(color=airline), size=5 ) +
theme_bw() + opts( legend.position=c(0.2, 0.85) )
# have ggplot2 fit and plot a linear model with R's lm() function
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit cd68c98

Please sign in to comment.