Download - R, twitteR and igraph - Pegasus Data Project
![Page 1: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/1.jpg)
R, twitteR and igraphJust-In Time Sociology @EPFL
Yannick Rochat1,2,3,Martin Grandjean2,3,Vincent Barbay3,4
1DHLab, EPFL,2 UNIL,3 Pegasus Data Project,4OZWE, Lausanne
December 4, 2012
![Page 2: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/2.jpg)
Examples
R & twitteR
Just-in time #JITSO12
Conclusion
![Page 3: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/3.jpg)
Examples
ContentTweets containing hashtag #EnLD (= En Ligne Directe)
3 / 29
![Page 4: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/4.jpg)
Examples
Timestamp0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
sam 6 oct
ven 5 octRubik
jeu 4 octvente terrain
mer 3 octvaccins
mar 2 octMörgeli
lun 1 octalcool
dim 30 sep
sam 29 sep
ven 28 sep
4 / 29
![Page 5: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/5.jpg)
Examples
Predictions (?)
5 / 29
![Page 6: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/6.jpg)
Examples
Mentions (network)
6 / 29
![Page 7: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/7.jpg)
Examples
R & twitteR
Just-in time #JITSO12
Conclusion
![Page 8: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/8.jpg)
Twitter 3rd-party appsA few examples. . .
• TweetBackup
• Tweet Archivist
• Topsy
• Yahoo pipes (RSS)• IFTTT.com
• i.e. online scripts that can send archives toevernote, dropbox, etc.
8 / 29
![Page 9: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/9.jpg)
API
• API = Application Programming Interface
• dev.twitter.com• good coding skills needed
• REST API• Streaming API• OAuth• JSON
9 / 29
![Page 10: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/10.jpg)
APIA sample of PHP code used by the Pegasus Data Project
10 / 29
![Page 11: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/11.jpg)
APIJSON (output format)
11 / 29
![Page 12: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/12.jpg)
Examples
R & twitteR
Just-in time #JITSO12
Conclusion
![Page 13: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/13.jpg)
R & twitteR
Installhttp://r-project.org
13 / 29
![Page 14: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/14.jpg)
R & twitteR
As Quora says...
I R is a data analysis software.
I R is a programming language.
I R is an environment for statistical analysis.
I R is an open-source software project.
I R is a worldwide community of statisticians,
data analysts and data scientists.
http://www.quora.com/R-software/What-is-R/
answer/David-Smith-3114 / 29
![Page 15: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/15.jpg)
R & twitteR
Strong community
I Developers
I Users
I Forums, mailing-lists
I #rstats
I quora, stackoverflow
15 / 29
![Page 16: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/16.jpg)
R & twitteR
InstalltwitteR
Installing is necessary only once.
Loading1 has to be done every session, or once for all via package options.
1library()16 / 29
![Page 17: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/17.jpg)
R & twitteR
searchTwitter
17 / 29
![Page 18: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/18.jpg)
R & twitteR
searchTwitter
18 / 29
![Page 19: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/19.jpg)
R & twitteR
searchTwitter
19 / 29
![Page 20: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/20.jpg)
R & twitteR
searchTwitterMore generally. . .
20 / 29
![Page 21: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/21.jpg)
R & twitteR
list → data frames
21 / 29
![Page 22: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/22.jpg)
Examples
R & twitteR
Just-in time #JITSO12
Conclusion
![Page 23: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/23.jpg)
Just-in time #JITSO12
ContentWord cloud
23 / 29
![Page 24: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/24.jpg)
Just-in time #JITSO12
Timestamp
24 / 29
![Page 25: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/25.jpg)
Just-in time #JITSO12
NetworkWho mentions whom ?
25 / 29
![Page 26: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/26.jpg)
Just-in time #JITSO12
Others directions
I Cascades / trends / diffusion
I Text mining
I Dynamics
I Prediction
I Geolocation
I . . .
26 / 29
![Page 27: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/27.jpg)
Examples
R & twitteR
Just-in time #JITSO12
Conclusion
![Page 28: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/28.jpg)
Conclusion
References
I Csardi G, Nepusz T, The igraph software packagefor complex network research, InterJournal,Complex Systems 1695. 2006.http://igraph.sf.net
I Gentry J, twitteR: R based Twitter client. Rpackage version 0.99.19. 2012.http://CRAN.R-project.org/package=twitteR
I Grandjean M, Rochat Y, Barbay V, The PegasusData Project. 2012. http://pegasusdata.com
28 / 29
![Page 29: R, twitteR and igraph - Pegasus Data Project](https://reader031.vdocument.in/reader031/viewer/2022021008/6203a21fda24ad121e4babc3/html5/thumbnails/29.jpg)