Guest User

R Twitter patch

a guest
Apr 21st, 2013
336
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. commit 3460700d98c26b1e0e255a54e10be722489b9391
  2. Author: unknown <dwmcqueen@gmail.com>
  3. Date: Sun Apr 21 12:41:01 2013 -0500
  4.  
  5. Updated Twitter to use OAuth and fixed UTF conversion
  6.  
  7. diff --git a/R/2_run.R b/R/2_run.R
  8. index 164c0cf..0f7e3cc 100644
  9. --- a/R/2_run.R
  10. +++ b/R/2_run.R
  11. @@ -9,20 +9,18 @@ if (VERBOSE)
  12. # we do end up with lots of objects in memory to play with (it _is_
  13. # a tutorial, after all :)
  14.  
  15. -american.text = laply(american.tweets, function(t) t$getText() )
  16. -delta.text = laply(delta.tweets, function(t) t$getText() )
  17. -jetblue.text = laply(jetblue.tweets, function(t) t$getText() )
  18. -southwest.text = laply(southwest.tweets, function(t) t$getText() )
  19. -united.text = laply(united.tweets, function(t) t$getText() )
  20. -us.text = laply(us.tweets, function(t) t$getText() )
  21. -
  22. +american.text = laply(american.tweets, function(t) iconv(t$getText(), to="UTF8"))
  23. +delta.text = laply(delta.tweets, function(t) iconv(t$getText(), to="UTF8") )
  24. +jetblue.text = laply(jetblue.tweets, function(t) iconv(t$getText(), to="UTF8") )
  25. +southwest.text = laply(southwest.tweets, function(t) iconv(t$getText(), to="UTF8") )
  26. +united.text = laply(united.tweets, function(t) iconv(t$getText(), to="UTF8") )
  27. +us.text = laply(us.tweets, function(t) iconv(t$getText(), to="UTF8") )
  28. american.scores = score.sentiment(american.text, pos.words, neg.words, .progress='text')
  29. delta.scores = score.sentiment(delta.text, pos.words, neg.words, .progress='text')
  30. jetblue.scores = score.sentiment(jetblue.text, pos.words, neg.words, .progress='text')
  31. southwest.scores = score.sentiment(southwest.text, pos.words, neg.words, .progress='text')
  32. united.scores = score.sentiment(united.text, pos.words, neg.words, .progress='text')
  33. us.scores = score.sentiment(us.text, pos.words, neg.words, .progress='text')
  34. -
  35. american.scores$airline = 'American'
  36. american.scores$code = 'AA'
  37. delta.scores$airline = 'Delta'
  38. diff --git a/R/scrape.R b/R/scrape.R
  39. index 56dcf2b..a138e92 100644
  40. --- a/R/scrape.R
  41. +++ b/R/scrape.R
  42. @@ -9,23 +9,51 @@ if (VERBOSE)
  43. print("Searching Twitter for airline tweets and saving to disk")
  44.  
  45. require(twitteR)
  46. -
  47. -american.tweets = searchTwitter('@americanair', n=1500)
  48. +library(RCurl)
  49. +library(ROAuth)
  50. +
  51. +#Need to make sure we have a caert
  52. +
  53. +if (!file.exists("cacert.pem"))
  54. + download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
  55. +
  56. +if (file.exists("twitter authentication.Rdata")){
  57. + load("twitter authentication.Rdata")
  58. +} else
  59. +{
  60. + requestURL <- "https://api.twitter.com/oauth/request_token"
  61. + accessURL = "http://api.twitter.com/oauth/access_token"
  62. + authURL = "http://api.twitter.com/oauth/authorize"
  63. + consumerKey = "FILLINWITHCONSUMERKEY"
  64. + consumerSecret = "FILLINWITHCONSUMERSECRET"
  65. + Cred <- OAuthFactory$new(consumerKey=consumerKey,
  66. + consumerSecret=consumerSecret,
  67. + requestURL=requestURL,
  68. + accessURL=accessURL,
  69. + authURL=authURL)
  70. + #The next command provides a URL which you will need to copy and paste into your favourite browser
  71. + #Assuming you are logged into Twitter you will then be provided a PIN number to type into the R command line
  72. + Cred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl") )
  73. + # Checks that you are authorised
  74. + save(Cred, file="twitter authentication.Rdata")
  75. +}
  76. +registerTwitterOAuth(Cred)
  77. +american.tweets = searchTwitter('@americanair', n=1500, cainfo="cacert.pem")
  78. save(american.tweets, file=file.path(dataDir, 'american.tweets.RData' ), ascii=T)
  79.  
  80. -delta.tweets = searchTwitter('@delta', n=1500)
  81. +delta.tweets = searchTwitter('@delta', n=1500, cainfo="cacert.pem")
  82. save(delta.tweets, file=file.path(dataDir, 'delta.tweets.RData' ), ascii=T)
  83.  
  84. -jetblue.tweets = searchTwitter('@jetblue', n=1500)
  85. +jetblue.tweets = searchTwitter('@jetblue', n=1500, cainfo="cacert.pem")
  86. save(jetblue.tweets, file=file.path(dataDir, 'jetblue.tweets.RData' ), ascii=T)
  87.  
  88. -southwest.tweets = searchTwitter('@southwestair', n=1500)
  89. +southwest.tweets = searchTwitter('@southwestair', n=1500, cainfo="cacert.pem")
  90. save(southwest.tweets, file=file.path(dataDir, 'southwest.tweets.RData' ), ascii=T)
  91.  
  92. -united.tweets = searchTwitter('@united', n=1500)
  93. +united.tweets = searchTwitter('@united', n=1500, cainfo="cacert.pem")
  94. save(united.tweets, file=file.path(dataDir, 'united.tweets.RData' ), ascii=T)
  95.  
  96. -us.tweets = searchTwitter('@usairways', n=1500)
  97. +us.tweets = searchTwitter('@usairways', n=1500, cainfo="cacert.pem")
  98. save(us.tweets, file=file.path(dataDir, 'us.tweets.RData' ), ascii=T)
  99.  
  100.  
  101. @@ -45,7 +73,7 @@ acsi.df = acsi.raw.df[,c(1,19)]
  102. colnames(acsi.df) = c('airline', 'score')
  103.  
  104. # add codes for later matching, and make sure score is treated as a number (not a string)
  105. -acsi.df$code = c('WN', NA, NA, 'CO', 'AA', 'UA', 'US', 'DL', 'NW')
  106. +acsi.df$code = c('B6', 'WN', NA, NA, 'DL', 'US', 'AA', 'UA', NA, 'NW')
  107. acsi.df$score = as.numeric(acsi.df$score)
  108.  
  109. save(acsi.raw.df, file=file.path(dataDir, 'acsi.raw.df.RData'), ascii=T)
  110. diff --git a/R/sentiment.R b/R/sentiment.R
  111. index 4b2be84..f389fff 100644
  112. --- a/R/sentiment.R
  113. +++ b/R/sentiment.R
  114. @@ -14,7 +14,7 @@ score.sentiment = function(sentences, pos.words, neg.words, .progress='none')
  115. {
  116. require(plyr)
  117. require(stringr)
  118. -
  119. +
  120. # we got a vector of sentences. plyr will handle a list or a vector as an "l" for us
  121. # we want a simple array of scores back, so we use "l" + "a" + "ply" = laply:
  122. scores = laply(sentences, function(sentence, pos.words, neg.words) {
  123. diff --git a/data/acsi.df.RData b/data/acsi.df.RData
  124. index 97d6f46..8b7511a 100644
  125. --- a/data/acsi.df.RData
  126. +++ b/data/acsi.df.RData
  127. @@ -1,115 +1,121 @@
  128. RDA2
  129. A
  130. 2
  131. -134400
  132. +196608
  133. 131840
  134. 1026
  135. 1
  136. -9
  137. +262153
  138. 7
  139. acsi.df
  140. 787
  141. 3
  142. 16
  143. -9
  144. -9
  145. +10
  146. +262153
  147. +7
  148. +JetBlue
  149. +262153
  150. 9
  151. Southwest
  152. -9
  153. +262153
  154. 10
  155. All\040Others
  156. -9
  157. +262153
  158. 8
  159. Airlines
  160. -9
  161. -11
  162. -Continental
  163. -9
  164. +262153
  165. +5
  166. +Delta
  167. +262153
  168. +10
  169. +US\040Airways
  170. +262153
  171. 8
  172. American
  173. -9
  174. +262153
  175. 6
  176. United
  177. -9
  178. -10
  179. -US\040Airways
  180. -9
  181. -5
  182. -Delta
  183. -9
  184. +262153
  185. +11
  186. +Continental
  187. +262153
  188. 18
  189. Northwest\040Airlines
  190. 14
  191. -9
  192. +10
  193. +NA
  194. 81
  195. 76
  196. 65
  197. -64
  198. -63
  199. +56
  200. 61
  201. +63
  202. 61
  203. -56
  204. +64
  205. NA
  206. 16
  207. -9
  208. -9
  209. +10
  210. +262153
  211. +2
  212. +B6
  213. +262153
  214. 2
  215. WN
  216. 9
  217. -1
  218. 9
  219. -1
  220. -9
  221. +262153
  222. 2
  223. -CO
  224. -9
  225. +DL
  226. +262153
  227. +2
  228. +US
  229. +262153
  230. 2
  231. AA
  232. -9
  233. +262153
  234. 2
  235. UA
  236. 9
  237. -2
  238. -US
  239. -9
  240. -2
  241. -DL
  242. -9
  243. +-1
  244. +262153
  245. 2
  246. NW
  247. 1026
  248. 1
  249. -9
  250. +262153
  251. 5
  252. names
  253. 16
  254. 3
  255. -9
  256. +262153
  257. 7
  258. airline
  259. -9
  260. +262153
  261. 5
  262. score
  263. -9
  264. +262153
  265. 4
  266. code
  267. 1026
  268. 1
  269. -9
  270. +262153
  271. 9
  272. row.names
  273. 13
  274. 2
  275. NA
  276. --9
  277. +-10
  278. 1026
  279. 1
  280. -9
  281. +262153
  282. 5
  283. class
  284. 16
  285. 1
  286. -9
  287. +262153
  288. 10
  289. data.frame
  290. 254
  291. diff --git a/data/acsi.raw.df.RData b/data/acsi.raw.df.RData
  292. index 546910e..c9e98ff 100644
  293. --- a/data/acsi.raw.df.RData
  294. +++ b/data/acsi.raw.df.RData
  295. @@ -1,711 +1,844 @@
  296. RDA2
  297. A
  298. 2
  299. -134400
  300. +196608
  301. 131840
  302. 1026
  303. 1
  304. -9
  305. +262153
  306. 11
  307. acsi.raw.df
  308. 787
  309. -21
  310. +23
  311. 16
  312. -9
  313. -9
  314. +10
  315. +262153
  316. +7
  317. +JetBlue
  318. +262153
  319. 9
  320. Southwest
  321. -9
  322. +262153
  323. 10
  324. All\040Others
  325. -9
  326. +262153
  327. 8
  328. Airlines
  329. -9
  330. -11
  331. -Continental
  332. -9
  333. +262153
  334. +5
  335. +Delta
  336. +262153
  337. +10
  338. +US\040Airways
  339. +262153
  340. 8
  341. American
  342. -9
  343. +262153
  344. 6
  345. United
  346. -9
  347. -10
  348. -US\040Airways
  349. -9
  350. -5
  351. -Delta
  352. -9
  353. +262153
  354. +11
  355. +Continental
  356. +262153
  357. 18
  358. Northwest\040Airlines
  359. 16
  360. -9
  361. -9
  362. +10
  363. +262153
  364. +2
  365. +NM
  366. +262153
  367. 2
  368. 78
  369. -9
  370. +262153
  371. 2
  372. NM
  373. -9
  374. +262153
  375. 2
  376. 72
  377. -9
  378. +262153
  379. 2
  380. -67
  381. -9
  382. +77
  383. +262153
  384. +2
  385. +72
  386. +262153
  387. 2
  388. 70
  389. -9
  390. +262153
  391. 2
  392. 71
  393. -9
  394. -2
  395. -72
  396. -9
  397. +262153
  398. 2
  399. -77
  400. -9
  401. +67
  402. +262153
  403. 2
  404. 69
  405. 16
  406. -9
  407. -9
  408. +10
  409. +262153
  410. +2
  411. +NM
  412. +262153
  413. 2
  414. 76
  415. -9
  416. +262153
  417. 2
  418. 70
  419. -9
  420. +262153
  421. 2
  422. 69
  423. -9
  424. -2
  425. -64
  426. -9
  427. +262153
  428. 2
  429. -71
  430. -9
  431. +72
  432. +262153
  433. 2
  434. 67
  435. -9
  436. +262153
  437. +2
  438. +71
  439. +262153
  440. 2
  441. 67
  442. -9
  443. +262153
  444. 2
  445. -72
  446. -9
  447. +64
  448. +262153
  449. 2
  450. 71
  451. 16
  452. -9
  453. -9
  454. +10
  455. +262153
  456. +2
  457. +NM
  458. +262153
  459. 2
  460. 76
  461. -9
  462. +262153
  463. 2
  464. 74
  465. -9
  466. +262153
  467. 2
  468. 69
  469. -9
  470. +262153
  471. +2
  472. +67
  473. +262153
  474. 2
  475. 66
  476. -9
  477. +262153
  478. 2
  479. 71
  480. -9
  481. +262153
  482. 2
  483. 70
  484. -9
  485. +262153
  486. 2
  487. 66
  488. -9
  489. -2
  490. -67
  491. -9
  492. +262153
  493. 2
  494. 67
  495. 16
  496. -9
  497. -9
  498. +10
  499. +262153
  500. +2
  501. +NM
  502. +262153
  503. 2
  504. 76
  505. -9
  506. +262153
  507. 2
  508. 70
  509. -9
  510. +262153
  511. 2
  512. 67
  513. -9
  514. +262153
  515. 2
  516. -64
  517. -9
  518. -2
  519. -62
  520. -9
  521. +69
  522. +262153
  523. 2
  524. 68
  525. -9
  526. +262153
  527. +2
  528. +62
  529. +262153
  530. 2
  531. 68
  532. -9
  533. +262153
  534. 2
  535. -69
  536. -9
  537. +64
  538. +262153
  539. 2
  540. 64
  541. 16
  542. -9
  543. -9
  544. +10
  545. +262153
  546. +2
  547. +NM
  548. +262153
  549. 2
  550. 74
  551. -9
  552. +262153
  553. 2
  554. 62
  555. -9
  556. +262153
  557. 2
  558. 65
  559. -9
  560. -2
  561. -66
  562. -9
  563. -2
  564. -67
  565. -9
  566. +262153
  567. 2
  568. 65
  569. -9
  570. +262153
  571. 2
  572. 65
  573. -9
  574. +262153
  575. +2
  576. +67
  577. +262153
  578. 2
  579. 65
  580. -9
  581. +262153
  582. +2
  583. +66
  584. +262153
  585. 2
  586. 63
  587. 16
  588. -9
  589. -9
  590. +10
  591. +262153
  592. +2
  593. +NM
  594. +262153
  595. 2
  596. 72
  597. -9
  598. +262153
  599. 2
  600. 67
  601. -9
  602. +262153
  603. 2
  604. 63
  605. -9
  606. +262153
  607. 2
  608. -64
  609. -9
  610. +68
  611. +262153
  612. +2
  613. +61
  614. +262153
  615. 2
  616. 64
  617. -9
  618. +262153
  619. 2
  620. 62
  621. -9
  622. -2
  623. -61
  624. -9
  625. +262153
  626. 2
  627. -68
  628. -9
  629. +64
  630. +262153
  631. 2
  632. 53
  633. 16
  634. -9
  635. -9
  636. +10
  637. +262153
  638. +2
  639. +NM
  640. +262153
  641. 2
  642. 70
  643. -9
  644. +262153
  645. 2
  646. 63
  647. -9
  648. +262153
  649. 2
  650. 63
  651. -9
  652. +262153
  653. +2
  654. +66
  655. +262153
  656. 2
  657. 62
  658. -9
  659. +262153
  660. 2
  661. 63
  662. -9
  663. +262153
  664. 2
  665. 62
  666. -9
  667. +262153
  668. 2
  669. 62
  670. -9
  671. -2
  672. -66
  673. -9
  674. +262153
  675. 2
  676. 62
  677. 16
  678. -9
  679. -9
  680. +10
  681. +262153
  682. +2
  683. +NM
  684. +262153
  685. 2
  686. 70
  687. -9
  688. +262153
  689. 2
  690. 64
  691. -9
  692. +262153
  693. 2
  694. 61
  695. -9
  696. +262153
  697. 2
  698. -67
  699. -9
  700. +61
  701. +262153
  702. +2
  703. +60
  704. +262153
  705. 2
  706. 62
  707. -9
  708. +262153
  709. 2
  710. 59
  711. -9
  712. +262153
  713. 2
  714. -60
  715. -9
  716. -2
  717. -61
  718. -9
  719. +67
  720. +262153
  721. 2
  722. 56
  723. 16
  724. -9
  725. -9
  726. +10
  727. +262153
  728. +2
  729. +NM
  730. +262153
  731. 2
  732. 74
  733. -9
  734. +262153
  735. 2
  736. 72
  737. -9
  738. +262153
  739. 2
  740. 66
  741. -9
  742. +262153
  743. 2
  744. -68
  745. -9
  746. +66
  747. +262153
  748. 2
  749. 63
  750. -9
  751. -2
  752. -64
  753. -9
  754. +262153
  755. 2
  756. 63
  757. -9
  758. +262153
  759. 2
  760. -66
  761. -9
  762. +64
  763. +262153
  764. +2
  765. +68
  766. +262153
  767. 2
  768. 65
  769. 16
  770. -9
  771. -9
  772. +10
  773. +262153
  774. +2
  775. +NM
  776. +262153
  777. 2
  778. 75
  779. -9
  780. +262153
  781. 2
  782. 74
  783. -9
  784. +262153
  785. 2
  786. 67
  787. -9
  788. -2
  789. -68
  790. -9
  791. +262153
  792. 2
  793. 67
  794. -9
  795. -2
  796. -63
  797. -9
  798. +262153
  799. 2
  800. 64
  801. -9
  802. +262153
  803. 2
  804. 67
  805. -9
  806. +262153
  807. +2
  808. +63
  809. +262153
  810. +2
  811. +68
  812. +262153
  813. 2
  814. 64
  815. 16
  816. -9
  817. -9
  818. +10
  819. +262153
  820. +2
  821. +NM
  822. +262153
  823. 2
  824. 73
  825. -9
  826. +262153
  827. 2
  828. 73
  829. -9
  830. +262153
  831. 2
  832. 66
  833. -9
  834. +262153
  835. 2
  836. 67
  837. -9
  838. +262153
  839. +2
  840. +62
  841. +262153
  842. 2
  843. 66
  844. -9
  845. +262153
  846. 2
  847. 64
  848. -9
  849. -2
  850. -62
  851. -9
  852. +262153
  853. 2
  854. 67
  855. -9
  856. +262153
  857. 2
  858. 64
  859. 16
  860. -9
  861. -9
  862. +10
  863. +262153
  864. +2
  865. +NM
  866. +262153
  867. 2
  868. 74
  869. -9
  870. +262153
  871. 2
  872. 74
  873. -9
  874. +262153
  875. 2
  876. 66
  877. -9
  878. +262153
  879. 2
  880. -70
  881. -9
  882. +65
  883. +262153
  884. +2
  885. +57
  886. +262153
  887. 2
  888. 64
  889. -9
  890. +262153
  891. 2
  892. 61
  893. -9
  894. -2
  895. -57
  896. -9
  897. +262153
  898. 2
  899. -65
  900. -9
  901. +70
  902. +262153
  903. 2
  904. 64
  905. 16
  906. -9
  907. -9
  908. +10
  909. +262153
  910. +2
  911. +NM
  912. +262153
  913. 2
  914. 74
  915. -9
  916. +262153
  917. 2
  918. 74
  919. -9
  920. +262153
  921. 2
  922. 65
  923. -9
  924. +262153
  925. 2
  926. -67
  927. -9
  928. +64
  929. +262153
  930. 2
  931. 62
  932. -9
  933. -2
  934. -63
  935. -9
  936. +262153
  937. 2
  938. 62
  939. -9
  940. +262153
  941. 2
  942. -64
  943. -9
  944. +63
  945. +262153
  946. +2
  947. +67
  948. +262153
  949. 2
  950. 61
  951. 16
  952. -9
  953. -9
  954. +10
  955. +262153
  956. +2
  957. +NM
  958. +262153
  959. 2
  960. 76
  961. -9
  962. +262153
  963. 2
  964. 75
  965. -9
  966. +262153
  967. 2
  968. 63
  969. -9
  970. +262153
  971. 2
  972. -69
  973. -9
  974. +59
  975. +262153
  976. +2
  977. +61
  978. +262153
  979. 2
  980. 60
  981. -9
  982. +262153
  983. 2
  984. 56
  985. -9
  986. -2
  987. -61
  988. -9
  989. +262153
  990. 2
  991. -59
  992. -9
  993. +69
  994. +262153
  995. 2
  996. 61
  997. 16
  998. -9
  999. -9
  1000. +10
  1001. +262153
  1002. +2
  1003. +NM
  1004. +262153
  1005. 2
  1006. 79
  1007. -9
  1008. +262153
  1009. 2
  1010. 75
  1011. -9
  1012. +262153
  1013. 2
  1014. 62
  1015. -9
  1016. +262153
  1017. 2
  1018. -62
  1019. -9
  1020. +60
  1021. +262153
  1022. +2
  1023. +54
  1024. +262153
  1025. 2
  1026. 62
  1027. -9
  1028. +262153
  1029. 2
  1030. 56
  1031. -9
  1032. -2
  1033. -54
  1034. -9
  1035. +262153
  1036. 2
  1037. -60
  1038. -9
  1039. +62
  1040. +262153
  1041. 2
  1042. 57
  1043. 16
  1044. -9
  1045. -9
  1046. +10
  1047. +262153
  1048. +2
  1049. +NM
  1050. +262153
  1051. 2
  1052. 81
  1053. -9
  1054. +262153
  1055. 2
  1056. 77
  1057. -9
  1058. +262153
  1059. 2
  1060. 64
  1061. -9
  1062. +262153
  1063. 2
  1064. -68
  1065. -9
  1066. +64
  1067. +262153
  1068. +2
  1069. +59
  1070. +262153
  1071. 2
  1072. 60
  1073. -9
  1074. +262153
  1075. 2
  1076. 56
  1077. -9
  1078. -2
  1079. -59
  1080. -9
  1081. +262153
  1082. 2
  1083. -64
  1084. -9
  1085. +68
  1086. +262153
  1087. 2
  1088. 57
  1089. 16
  1090. -9
  1091. -9
  1092. +10
  1093. +262153
  1094. +2
  1095. +NM
  1096. +262153
  1097. 2
  1098. 79
  1099. -9
  1100. +262153
  1101. 2
  1102. 75
  1103. -9
  1104. +262153
  1105. 2
  1106. 66
  1107. -9
  1108. +262153
  1109. 2
  1110. -71
  1111. -9
  1112. +62
  1113. +262153
  1114. +2
  1115. +62
  1116. +262153
  1117. 2
  1118. 63
  1119. -9
  1120. +262153
  1121. 2
  1122. 60
  1123. -9
  1124. -2
  1125. -62
  1126. -9
  1127. +262153
  1128. 2
  1129. -62
  1130. -9
  1131. +71
  1132. +262153
  1133. 2
  1134. 61
  1135. 16
  1136. -9
  1137. -9
  1138. +10
  1139. +262153
  1140. +2
  1141. +NM
  1142. +262153
  1143. 2
  1144. 81
  1145. -9
  1146. +262153
  1147. 2
  1148. 76
  1149. -9
  1150. +262153
  1151. 2
  1152. 65
  1153. -9
  1154. +262153
  1155. 2
  1156. -64
  1157. -9
  1158. +56
  1159. +262153
  1160. +2
  1161. +61
  1162. +262153
  1163. 2
  1164. 63
  1165. -9
  1166. +262153
  1167. 2
  1168. 61
  1169. -9
  1170. +262153
  1171. 2
  1172. -61
  1173. -9
  1174. +64
  1175. +262153
  1176. +1
  1177. +#
  1178. +16
  1179. +10
  1180. +262153
  1181. 2
  1182. -56
  1183. -9
  1184. +81
  1185. +262153
  1186. +2
  1187. +77
  1188. +262153
  1189. +2
  1190. +74
  1191. +262153
  1192. +2
  1193. +67
  1194. +262153
  1195. +2
  1196. +65
  1197. +262153
  1198. +2
  1199. +65
  1200. +262153
  1201. +2
  1202. +64
  1203. +262153
  1204. +2
  1205. +62
  1206. +262153
  1207. 1
  1208. #
  1209. +262153
  1210. +0
  1211. +
  1212. 16
  1213. -9
  1214. -9
  1215. -3
  1216. -2.5
  1217. -9
  1218. +10
  1219. +262153
  1220. +0
  1221. +
  1222. +262153
  1223. +0
  1224. +
  1225. +262153
  1226. +0
  1227. +
  1228. +262153
  1229. +0
  1230. +
  1231. +262153
  1232. +0
  1233. +
  1234. +262153
  1235. +0
  1236. +
  1237. +262153
  1238. +0
  1239. +
  1240. +262153
  1241. +0
  1242. +
  1243. +262153
  1244. +0
  1245. +
  1246. +262153
  1247. +0
  1248. +
  1249. +16
  1250. +10
  1251. +262153
  1252. 3
  1253. -1.3
  1254. -9
  1255. +N/A
  1256. +262153
  1257. 4
  1258. --1.5
  1259. -9
  1260. +-4.9
  1261. +262153
  1262. 4
  1263. --9.9
  1264. -9
  1265. -3
  1266. -0.0
  1267. -9
  1268. +-2.6
  1269. +262153
  1270. 3
  1271. -1.7
  1272. -9
  1273. -4
  1274. --1.6
  1275. -9
  1276. +3.1
  1277. +262153
  1278. 4
  1279. --9.7
  1280. -9
  1281. +16.1
  1282. +262153
  1283. +3
  1284. +6.6
  1285. +262153
  1286. +3
  1287. +1.6
  1288. +262153
  1289. +3
  1290. +1.6
  1291. +262153
  1292. +3
  1293. +N/A
  1294. +262153
  1295. 3
  1296. N/A
  1297. 16
  1298. -9
  1299. -9
  1300. +10
  1301. +262153
  1302. 3
  1303. -3.8
  1304. -9
  1305. +N/A
  1306. +262153
  1307. +4
  1308. +-1.3
  1309. +262153
  1310. 3
  1311. -8.6
  1312. -9
  1313. +5.7
  1314. +262153
  1315. +4
  1316. +-6.9
  1317. +262153
  1318. +5
  1319. +-15.6
  1320. +262153
  1321. 4
  1322. -9.7
  1323. -9
  1324. +262153
  1325. 4
  1326. --4.5
  1327. -9
  1328. -5
  1329. --10.0
  1330. -9
  1331. -5
  1332. --14.1
  1333. -9
  1334. -5
  1335. --15.3
  1336. -9
  1337. +-8.6
  1338. +262153
  1339. 5
  1340. --27.3
  1341. -9
  1342. +-12.7
  1343. +262153
  1344. +3
  1345. +N/A
  1346. +262153
  1347. 3
  1348. N/A
  1349. 1026
  1350. 1
  1351. -9
  1352. +262153
  1353. 5
  1354. names
  1355. 16
  1356. -21
  1357. -9
  1358. +23
  1359. +262153
  1360. 0
  1361.  
  1362. -9
  1363. +262153
  1364. 9
  1365. Base-line
  1366. -9
  1367. +262153
  1368. 2
  1369. 95
  1370. -9
  1371. +262153
  1372. 2
  1373. 96
  1374. -9
  1375. +262153
  1376. 2
  1377. 97
  1378. -9
  1379. +262153
  1380. 2
  1381. 98
  1382. -9
  1383. +262153
  1384. 2
  1385. 99
  1386. -9
  1387. +262153
  1388. 2
  1389. 00
  1390. -9
  1391. +262153
  1392. 2
  1393. 01
  1394. -9
  1395. +262153
  1396. 2
  1397. 02
  1398. -9
  1399. +262153
  1400. 2
  1401. 03
  1402. -9
  1403. +262153
  1404. 2
  1405. 04
  1406. -9
  1407. +262153
  1408. 2
  1409. 05
  1410. -9
  1411. +262153
  1412. 2
  1413. 06
  1414. -9
  1415. +262153
  1416. 2
  1417. 07
  1418. -9
  1419. +262153
  1420. 2
  1421. 08
  1422. -9
  1423. +262153
  1424. 2
  1425. 09
  1426. -9
  1427. +262153
  1428. 2
  1429. 10
  1430. -9
  1431. +262153
  1432. 2
  1433. 11
  1434. -9
  1435. +262153
  1436. +2
  1437. +12
  1438. +262153
  1439. +2
  1440. +13
  1441. +262153
  1442. 19
  1443. PreviousYear%Change
  1444. -9
  1445. +262153
  1446. 16
  1447. FirstYear%Change
  1448. 1026
  1449. 1
  1450. -9
  1451. +262153
  1452. 9
  1453. row.names
  1454. 13
  1455. 2
  1456. NA
  1457. --9
  1458. +-10
  1459. 1026
  1460. 1
  1461. -9
  1462. +262153
  1463. 5
  1464. class
  1465. 16
  1466. 1
  1467. -9
  1468. +262153
  1469. 10
  1470. data.frame
  1471. 254
  1472. diff --git a/output/twitter_acsi_comparison.pdf b/output/twitter_acsi_comparison.pdf
  1473. index fc66b1d..73b4c04 100644
  1474. --- a/output/twitter_acsi_comparison.pdf
  1475. +++ b/output/twitter_acsi_comparison.pdf
  1476. @@ -1,11 +1,12 @@
  1477. - airline
  1478. - q
  1479. - 80 q American
  1480. - q Delta
  1481. - q Southwest
  1482. - q US Airways
  1483. - q United
  1484. - 75
  1485. + airline
  1486. + q
  1487. + 80
  1488. + q American
  1489. + q Delta
  1490. + q JetBlue
  1491. + q Southwest
  1492. + q United
  1493. + 75 q US Airways
  1494.  
  1495.  
  1496.  
  1497. @@ -19,16 +20,16 @@ score.acsi
  1498. 65
  1499.  
  1500.  
  1501. - q
  1502. + q
  1503.  
  1504. - q q
  1505. + q q
  1506. 60
  1507.  
  1508.  
  1509.  
  1510.  
  1511. - q
  1512. -
  1513. - 40 45 50 55 60 65 70
  1514. - score.twitter
  1515. + q
  1516. + 55
  1517. + 40 60 80 100
  1518. + score.twitter
  1519. \ No newline at end of file
  1520. diff --git a/output/twitter_acsi_comparison_with_fit.pdf b/output/twitter_acsi_comparison_with_fit.pdf
  1521. index 2905f0a..4a43e36 100644
  1522. --- a/output/twitter_acsi_comparison_with_fit.pdf
  1523. +++ b/output/twitter_acsi_comparison_with_fit.pdf
  1524. @@ -1,11 +1,12 @@
  1525. - airline
  1526. - q
  1527. - 80 q American
  1528. - q Delta
  1529. - q Southwest
  1530. - q US Airways
  1531. - q United
  1532. - 75
  1533. + airline
  1534. + q
  1535. + 80
  1536. + q American
  1537. + q Delta
  1538. + q JetBlue
  1539. + q Southwest
  1540. + q United
  1541. + 75 q US Airways
  1542.  
  1543.  
  1544.  
  1545. @@ -19,16 +20,16 @@ score.acsi
  1546. 65
  1547.  
  1548.  
  1549. - q
  1550. + q
  1551.  
  1552. - q q
  1553. + q q
  1554. 60
  1555.  
  1556.  
  1557.  
  1558.  
  1559. - q
  1560. -
  1561. - 40 45 50 55 60 65 70
  1562. - score.twitter
  1563. + q
  1564. + 55
  1565. + 40 60 80 100
  1566. + score.twitter
  1567. \ No newline at end of file
  1568. diff --git a/output/twitter_score_histograms.pdf b/output/twitter_score_histograms.pdf
  1569. index 55f4562..7ce1a1d 100644
  1570. --- a/output/twitter_score_histograms.pdf
  1571. +++ b/output/twitter_score_histograms.pdf
  1572. @@ -1,66 +1,52 @@
  1573. + American
  1574. + 1000
  1575. 500
  1576. + 0
  1577.  
  1578. + 1000
  1579.  
  1580.  
  1581.  
  1582. - American
  1583. - 400
  1584. - 300
  1585. - 200
  1586. - 100
  1587. - 0
  1588. +
  1589. + Delta
  1590. 500
  1591. - 400
  1592. + 0
  1593. + airline
  1594.  
  1595.  
  1596.  
  1597.  
  1598. - Delta
  1599. - 300
  1600. - 200
  1601. - 100
  1602. - 0
  1603. - 500 airline
  1604. + JetBlue
  1605. + 1000 American
  1606. + 500 Delta
  1607. +count
  1608.  
  1609.  
  1610.  
  1611.  
  1612. - JetBlue
  1613. - 400
  1614. - 300 American
  1615. - 200
  1616. - 100 Delta
  1617. - 0
  1618. -count
  1619. + 0 JetBlue
  1620.  
  1621.  
  1622.  
  1623.  
  1624. - JetBlue
  1625. + Southwest
  1626. + 1000 Southwest
  1627.  
  1628. + 500 United
  1629.  
  1630. + 0 US Airways
  1631.  
  1632.  
  1633. - Southwest US Airways
  1634. - 500
  1635. - 400 Southwest
  1636. - 300
  1637. - 200
  1638. - 100 US Airways
  1639. - 0
  1640. - United
  1641. +
  1642. +
  1643. + United
  1644. + 1000
  1645. 500
  1646. - 400
  1647. - 300
  1648. - 200
  1649. - 100
  1650. 0
  1651. + US Airways
  1652. + 1000
  1653. 500
  1654. - 400 United
  1655. - 300
  1656. - 200
  1657. - 100
  1658. 0
  1659. - −6 −4 −2 0 2 4 6
  1660. - score
  1661. + −5.0 −2.5 0.0 2.5 5.0 7.5
  1662. + score
  1663. \ No newline at end of file
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×