social computing, analysing social media: theory and hackathon

66
KIT – University of the State of Baden-Württemberg and National Research Center of the Helmholtz Association KARLSRUHE SERVICE RESEARCH INSTITUTE (KSRI) www.kit.edu Social Computing Analysing Social Media: Theory and Hackathon Dr. Simon Caton and Dr. Martin Chorley

Upload: karlsruheserviceresearchinstitute

Post on 30-Nov-2014

312 views

Category:

Technology


0 download

DESCRIPTION

In this course we will explore the methods that facilitate Social Media analysis, with a focus on Facebook, Twitter and Foursquare. The course will begin with short tutorials on the different platforms, methods to access public data and common analysis methods. Participants will then be split into teams of 4-6 and under the guidance of the supervisors, define and design a hackathon project based upon their interests and personal goals. Starting environments will be provided. The students will then have 6-8 hours to implement their project with the help of the supervisors and will present their projects to the summer school participants the following day.

TRANSCRIPT

  • 1. KIT University of the State of Baden-Wrttemberg and National Research Center of the Helmholtz Association KARLSRUHE SERVICE RESEARCH INSTITUTE (KSRI) www.kit.edu Social Computing Analysing Social Media: Theory and Hackathon Dr. Simon Caton and Dr. Martin Chorley
  • 2. Karlsruhe Service Research Institute www.ksri.kit.edu About us Simon PostDoc @KIT CS PhD @Cardiff University Working on / with: Martin PostDoc @Cardiff University CS PhD @Cardiff University Working on / with:
  • 3. Karlsruhe Service Research Institute www.ksri.kit.edu Agenda 1330 1500 Intro, Social Media Analysis, Team Formation 1530 1615: Project Brainstorming + Machine Setup 1615 1900: Implementation Session I 1900 2000: Dinner on the go 2000 2200: Implementation Session II 2200+: Debrief + Informal Get Together 1700 1730 (Tomorrow) Demos and Winner Selection 3
  • 4. KIT University of the State of Baden-Wrttemberg and National Research Center of the Helmholtz Association KARLSRUHE SERVICE RESEARCH INSTITUTE (KSRI) www.kit.edu Social Computing: Brief Overview
  • 5. Karlsruhe Service Research Institute www.ksri.kit.edu Social Computing? any type of computing application in which software serves as an intermediary or a focus for a social relation D. Schuler, Social Computing, CACM, 37(1) 1994. A social structure in which technology puts power in individuals and communities, not institutions C. Charron, J. Favier, and C. Li, Social Computing: How Networks Erode Institutional Power, and What to Do about It, Forrester Customer Report, 2006. Computational facilitation of social studies and human social dynamics as well as the design and use of ICT that consider social context F.-Y. Wang, D. Zeng, K. Carley, W. Mao, Social Computing: From Social Informatics to Social Intelligence, IEEE Intelligent Systems, 2, 2007. 5
  • 6. Karlsruhe Service Research Institute www.ksri.kit.edu Main Social Computing Domains 6 Giuseppe Lugano. Social Computing: A Classification of Existing Paradigms. IEEE Social Computing 2012
  • 7. Karlsruhe Service Research Institute www.ksri.kit.edu 7
  • 8. Karlsruhe Service Research Institute www.ksri.kit.edu 8
  • 9. Karlsruhe Service Research Institute www.ksri.kit.edu 9
  • 10. Karlsruhe Service Research Institute www.ksri.kit.edu What we are going to look at 10 Foundations Social Media Platforms
  • 11. Karlsruhe Service Research Institute www.ksri.kit.edu Learning Outcomes of the Session to learn the basics of analysing social media via a hands on session with Facebook, Twitter or Foursquare to gain hands on experience of accessing data, creating apps and running analysis methods to gain experience in team-based rapid prototyping 11
  • 12. Karlsruhe Service Research Institute www.ksri.kit.edu How this will work Choose Create teams: . 12
  • 13. KIT University of the State of Baden-Wrttemberg and National Research Center of the Helmholtz Association KARLSRUHE SERVICE RESEARCH INSTITUTE (KSRI) www.kit.edu Social Media Analysis Crash Course: JSON, Twitter, Foursquare, and Facebook 13
  • 14. Karlsruhe Service Research Institute www.ksri.kit.edu A P I pplication rogramming nterface
  • 15. Karlsruhe Service Research Institute www.ksri.kit.edu 15 Server Server Server Server http request json response REST API
  • 16. Karlsruhe Service Research Institute www.ksri.kit.edu 16 client-server stateless cacheable layered uniform interface
  • 17. Karlsruhe Service Research Institute www.ksri.kit.edu 17 GET PUT POST DELETE
  • 18. Karlsruhe Service Research Institute www.ksri.kit.edu 18 J S O N ava cript bject otation
  • 19. Karlsruhe Service Research Institute www.ksri.kit.edu 19
  • 20. Karlsruhe Service Research Institute www.ksri.kit.edu 20 }string{ value: , ][ value , objects: arrays:
  • 21. Karlsruhe Service Research Institute www.ksri.kit.edu 21 values:string number object array true false null
  • 22. Karlsruhe Service Research Institute www.ksri.kit.edu 22
  • 23. Karlsruhe Service Research Institute www.ksri.kit.edu 23
  • 24. Karlsruhe Service Research Institute www.ksri.kit.edu 24 How does the API know who we are?
  • 25. Karlsruhe Service Research Institute www.ksri.kit.edu 25 How do we know who the user is?
  • 26. Karlsruhe Service Research Institute www.ksri.kit.edu 26 How does the service know we can access data?
  • 27. Karlsruhe Service Research Institute www.ksri.kit.edu 27 OAuth 1. identication 2. authentication 3. access to data
  • 28. Karlsruhe Service Research Institute www.ksri.kit.edu 28 user app api provider user requests login redirectuser api provider conrms identity user grants permission accesskey
  • 29. Karlsruhe Service Research Institute www.ksri.kit.edu 29 Twitter
  • 30. Karlsruhe Service Research Institute www.ksri.kit.edu 30
  • 31. Karlsruhe Service Research Institute www.ksri.kit.edu 31
  • 32. Karlsruhe Service Research Institute www.ksri.kit.edu 32 Documentation dev.twitter.com
  • 33. Karlsruhe Service Research Institute www.ksri.kit.edu 33
  • 34. Karlsruhe Service Research Institute www.ksri.kit.edu 34 REST API Streaming API vs.
  • 35. Karlsruhe Service Research Institute www.ksri.kit.edu 35 Server http request json response REST API
  • 36. Karlsruhe Service Research Institute www.ksri.kit.edu 36 API Endpoints https://api.twitter.com/1.1 statuses/... users/... search/... lists/...
  • 37. Karlsruhe Service Research Institute www.ksri.kit.edu 37 Server http request tweet Streaming API tweet tweet ... connection closes
  • 38. Karlsruhe Service Research Institute www.ksri.kit.edu 38 Streaming API https://stream.twitter.com/1.1/ statuses/filter.json
  • 39. Karlsruhe Service Research Institute www.ksri.kit.edu 39 Demo!
  • 40. Karlsruhe Service Research Institute www.ksri.kit.edu 40
  • 41. Karlsruhe Service Research Institute www.ksri.kit.edu 41
  • 42. Karlsruhe Service Research Institute www.ksri.kit.edu 42
  • 43. Karlsruhe Service Research Institute www.ksri.kit.edu 43
  • 44. Karlsruhe Service Research Institute www.ksri.kit.edu 44
  • 45. Karlsruhe Service Research Institute www.ksri.kit.edu 45
  • 46. Karlsruhe Service Research Institute www.ksri.kit.edu 46
  • 47. Karlsruhe Service Research Institute www.ksri.kit.edu 47 http://www.cs.cf.ac.uk/recognition/foursqexp
  • 48. Karlsruhe Service Research Institute www.ksri.kit.edu 48 Documentation developer.foursquare.com
  • 49. Karlsruhe Service Research Institute www.ksri.kit.edu 49
  • 50. Karlsruhe Service Research Institute www.ksri.kit.edu 50 API Endpoints http://api.foursquare.com/v2/ users/... venues/... checkins/... lists/...
  • 51. Karlsruhe Service Research Institute www.ksri.kit.edu 51 Demo!
  • 52. Karlsruhe Service Research Institute www.ksri.kit.edu facebook 52
  • 53. Karlsruhe Service Research Institute www.ksri.kit.edu 53 http://developers.facebook.com
  • 54. Karlsruhe Service Research Institute www.ksri.kit.edu FB App Architecture 54
  • 55. Karlsruhe Service Research Institute www.ksri.kit.edu Data Access Permissions There are 79 data access permissions in FB in 3 categories: User Data Permissions Friend Data Permissions Extended Permissions They regulate what you can and cannot access 55
  • 56. Karlsruhe Service Research Institute www.ksri.kit.edu Permissions at glance 56
  • 57. Karlsruhe Service Research Institute www.ksri.kit.edu FB JSON Objects Everything in FB is accessed via an ID Users, Pages, Events, Comments, Posts, Shares, To view / access the JSON object for a FB entity: https://graph.facebook.com/?auth_token= Auth Token? Access Token An access token is an opaque string that identifies a user, app, or page and can be used by the app to make graph API calls. It is valid only for a predetermined period of time A log out action will automatically expire an access token Every time you log into FB, you create an access token More info: http://developers.facebook.com/docs/facebook-login/access-tokens/ 57
  • 58. Karlsruhe Service Research Institute www.ksri.kit.edu https://graph.facebook.com/761705087? auth_token= 58
  • 59. Karlsruhe Service Research Institute www.ksri.kit.edu and from php 59
  • 60. Karlsruhe Service Research Institute www.ksri.kit.edu Beyond Basic Data Add the fields argument, e.g. https://graph.facebook.com/761705087? fields=id,name,inbox&auth_token= $facebook->api("761705087?fields=id,name,inbox"); but, do something you dont have permission for, and: 60
  • 61. Karlsruhe Service Research Institute www.ksri.kit.edu 61 https://developers.facebook.com/ tools/explorer
  • 62. Karlsruhe Service Research Institute www.ksri.kit.edu 62 Demo!
  • 63. KIT University of the State of Baden-Wrttemberg and National Research Center of the Helmholtz Association KARLSRUHE SERVICE RESEARCH INSTITUTE (KSRI) www.kit.edu Some Project Ideas 63
  • 64. Karlsruhe Service Research Institute www.ksri.kit.edu Streaming API + Mapping Monitor Trending Topics & Influence Detection Linguistic Analysis of Venue Tips in Karlsruhe Heat Mapping of Venues Render and Analyse a Social Graph Linguistic Analysis of a Timeline / Page etc. Or A Combination Of The Lot
  • 65. Karlsruhe Service Research Institute www.ksri.kit.edu Some useful libraries / resources http://www.alchemyapi.com/ - Natural Language Processing https://gephi.org/ - interactive graph visualisation and exploration http://nodexl.codeplex.com/ - excel addon for graph analysis (Windows only) http://code.google.com/p/google-gson/ - JSON parser for Java http://leafletjs.com/ - nice mapping API https://github.com/pinzler/fsq-php-connectedapp - simple php 4sq app example https://developer.foursquare.com/resources/libraries - Other 4sq libraries http://140dev.com/free-twitter-api-source-code-library/ - twitter php server https://dev.twitter.com/docs/twitter-libraries - Other twitter libraries 65
  • 66. Karlsruhe Service Research Institute www.ksri.kit.edu