lecture 3: vocabularies & data formats on the social web (2014)

72
Social Web 2014, Lora Aroyo Lecture III: What DATA looks like on the Social Web? Lora Aroyo The Network Institute VU University Amsterdam Social Web 2014 1 Monday, February 17, 14

Upload: lora-aroyo

Post on 29-Oct-2014

6 views

Category:

Social Media


2 download

DESCRIPTION

This is the third lecture in the Social Web course (2014) at the VU University Amsterdam. Visit the website for more information: http://thesocialweb2014.wordpress.com/

TRANSCRIPT

Social Web 2014, Lora Aroyo!

Lecture III: What DATA looks like on the Social Web?

Lora AroyoThe Network Institute

VU University Amsterdam

Social Web2014

1Monday, February 17, 14

Provide analysis of privacy issues on the (Social) Web• three articles <--> three mind maps <--> main Social Web privacy issues • write for people who didn’t attend the course (max 3 pages)

Provide analysis of current privacy-related public initiatives• legal contexts for privacy and ownership • compare the intentions of both initiatives (advantages & disadvantages) • your own vision on how this impacts the future of the social web • your own advise to policy makers with regards to privacy on the web. • links to Net Neutrality

Link to Hands-on session: • what would change if SOPA/PIPA, ACTA, CISPA were active – would you still have access to the information

you pulled in for the assignments• illustrate your answer showing what changes could appear in the graph from exercise 4 (Hands-on session

2), explain why. (max 1 page)• all visuals, e.g. screenshots, diagrams, in appendix, use template

Deadline: 21 February 23:59

Social Web 2014, Lora Aroyo!

Questions on Assignment 1?

2Monday, February 17, 14

History of Blogs

• evolved from online diaries in 1980’s• ‘weblog’ Jorn Barger (1997) & ‘BLOG’ Peter Merholz (1999)• one of the first ways to contribute (unstructured user-

generated) content on the Web• Justin Hall recognized as pioneer blogger (1994)• Nature: political, technical, art, journalistic, cultural, personal• Software: WordPress, Blogger, LifeJournal

Social Web 2014, Lora Aroyo!

3Monday, February 17, 14

• single- or multi-authored• photo-blog, Video-blog, Audio-blog• life (b)log, now - microlifeblog (twitter)• lifecasting: in 2007 by Justin Kan: webcam on a cap• Gordon Bell MyLifeBits: Microsoft SenseCam

http://www.justin.tv/

http://research.microsoft.com/en-us/projects/mylifebits/

Social Web 2014, Lora Aroyo!

Types of Blogs

4Monday, February 17, 14

• Wiki in Hawaiian meaning fast/quick

• "the simplest online database that could possibly work" (Ward Cunningham)1995

• first wiki software: WikiWikiWeb (the QuickWeb)

• first example for a large scale collaborative editing = software + process

• commonly implemented software package is MediaWiki (known from Wikipedia)

• pages structure & formatting: simplified markup language - wikitext, or HTMLtags, WYSIWYG editing

Social Web 2014, Lora Aroyo!

Wikis

http://www.flickr.com/photos/kables/1220574200/

http://c2.com/cgi/wiki?WikiWikiWeb

5Monday, February 17, 14

http://en.wikipedia.org/wiki/List_of_wikis

http://www.wikimedia.org/

Social Web 2014, Lora Aroyo!

6Monday, February 17, 14

Exploiting the crowd

• in wiki applications crowd contributes with collective intelligence (primarily textual)

• later also other media & recourses emerged, e.g., photo, video, music

• crowdsourcing

Social Web 2014, Lora Aroyo!

7Monday, February 17, 14

Mechanical Turk

• 1760 Wolfgang von Kempelen: The Turk

• 2005 Amazon: Amazon Mechanical Turk

• marketplace for work; people perform tasks computers are lousy at, e.g. identifying items in a photo/video, writing product descriptions, transcribing podcasts

• HITs = human intelligence tasks

• require little time & offer little compensation

• workers & requesters

Social Web 2014, Lora Aroyo!

8Monday, February 17, 14

Crowdsourcing Science

Social Web 2014, Lora Aroyo!

9Monday, February 17, 14

Crowdsourcing Science

Social Web 2014, Lora Aroyo!

9Monday, February 17, 14

Crowdsourcing History

Social Web 2014, Lora Aroyo!

10Monday, February 17, 14

Crowdsourcing History

Social Web 2014, Lora Aroyo!

10Monday, February 17, 14

Social Web 2014, Lora Aroyo!

11Monday, February 17, 14

Social Web 2014, Lora Aroyo!

11Monday, February 17, 14

Social Web 2014, Lora Aroyo!

11Monday, February 17, 14

Social Web 2014, Lora Aroyo!

11Monday, February 17, 14

Was the $ million Netflix prize a victory for crowdsourcing?

Social Web 2014, Lora Aroyo!

12Monday, February 17, 14

Folksonomy

• On the social web the user-generated content is organized in light-weight ontologies, i.e., folksonomies

• Community-based semantics = a relationship between Users, Tags & Resources

• user-created, bottom-up classification/categorization of (domain) terms / user-labels, e.g., tags

• tagging = the social process where lay users attach labels to resources (as opposed to annotation by professional experts)

Social Web 2014, Lora Aroyo!

13Monday, February 17, 14

Folksonomy

• On the social web the user-generated content is organized in light-weight ontologies, i.e., folksonomies

• Community-based semantics = a relationship between Users, Tags & Resources

• user-created, bottom-up classification/categorization of (domain) terms / user-labels, e.g., tags

• tagging = the social process where lay users attach labels to resources (as opposed to annotation by professional experts)

Social Web 2014, Lora Aroyo!

13Monday, February 17, 14

Folksonomy

• On the social web the user-generated content is organized in light-weight ontologies, i.e., folksonomies

• Community-based semantics = a relationship between Users, Tags & Resources

• user-created, bottom-up classification/categorization of (domain) terms / user-labels, e.g., tags

• tagging = the social process where lay users attach labels to resources (as opposed to annotation by professional experts)

Social Web 2014, Lora Aroyo!

13Monday, February 17, 14

Social Web 2014, Lora Aroyo!

Folksonomy

14Monday, February 17, 14

Social Web 2014, Lora Aroyo!

Folksonomy

14Monday, February 17, 14

Social Web 2014, Lora Aroyo!

Folksonomy

15Monday, February 17, 14

Social Web 2014, Lora Aroyo!

16Monday, February 17, 14

Social Web 2014, Lora Aroyo!

16Monday, February 17, 14

• cleaning messy data• transforming data from one format to another• fetching missing data

Social Web 2014, Lora Aroyo!

16Monday, February 17, 14

• cleaning messy data• transforming data from one format to another• fetching missing data

Social Web 2014, Lora Aroyo!

16Monday, February 17, 14

Structure on the Web

• In the evolution of the Web, Semantic Web refers to an approach to add ‘semantics’ to the web, by naming terms in a domain

• A specification of such terms is called an ‘ontology’

• For software: ontologies help to effectively use content on the Web (like DB schemas)

Social Web 2014, Lora Aroyo!

17Monday, February 17, 14

Vocabularies on the (Social) Web

• to create interfaces or exchange data between applications the software needs to know the terms in the data

• vocabularies define set of terms in a certain domain, e.g., describing people, relationships, content of different type

Social Web 2014, Lora Aroyo!

18Monday, February 17, 14

Social Web 2014, Lora Aroyo!

19Monday, February 17, 14

FOAF• FOAF = Friend of a Friend, http://www.foaf-

project.org/,

• a machine-readable ontology describing persons, their activities & their relations to other people and objects

• an open, decentralized technology for connecting social Web sites, & the people they describe

• Since mid-2000

• Stable core of classes & properties

• New terms may be added at any time

• FOAF RDF namespace URI is fixed

• http://xmlns.com/foaf/spec/

• model for publishing simple factual data via a networked of linked RDF documents

• FOAF is an attempt to use the Web to:

• integrate factual information with information in human-oriented documents (e.g. videos, books, spreadsheets, 3d models)

• and info that is still in people's heads

• linking networks of information with networks of people

Linked Data & FOAF

Social Web 2014, Lora Aroyo!

20Monday, February 17, 14

FOAF Files• Documents, that adopt the conventions of RDF and may be written in XML,

RDFa or N3

• Contain FOAF vocabulary and other RDF vocabularies

• FOAF defines classes, e.g. foaf:Person, foaf:Document, foaf:Image

• FOAF defines properties of those things, e.g. foaf:name, foaf:homepage

• FOAF defines relationship that hold between members of these categories, e.g. foaf:depiction relates something (e.g. a foaf:Person) to a foaf:Image

Social Web 2014, Lora Aroyo!

21Monday, February 17, 14

FOAF Example

• there is a foaf:Person • with a foaf:name property of 'Dan Brickley'• in foaf:homepage and foaf:openid relationships to a thing called http://danbri.org/ • in foaf:img relationship to a thing referenced by a relative URI of /images/me.jpg

Create your own FOAF file: http://www.ldodds.com/foaf/foaf-a-matic

Social Web 2014, Lora Aroyo!

22Monday, February 17, 14

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/"><foaf:PersonalProfileDocument rdf:about=""> <foaf:maker rdf:resource="#me"/> <foaf:primaryTopic rdf:resource="#me"/> <admin:generatorAgent rdf:resource="http://www.ldodds.com/foaf/foaf-a-matic"/> <admin:errorReportsTo rdf:resource="mailto:[email protected]"/></foaf:PersonalProfileDocument>

<foaf:Person rdf:ID="me"><foaf:name>Lora Aroyo</foaf:name><foaf:title>Ms</foaf:title><foaf:givenname>Lora</foaf:givenname><foaf:family_name>Aroyo</foaf:family_name><foaf:nick>laroyo</foaf:nick><foaf:mbox_sha1sum>d21e8b414a0533e5b4b23411fd76aabbf63ad232</foaf:mbox_sha1sum><foaf:homepage rdf:resource="http://lora-aroyo.org"/><foaf:depiction rdf:resource="lora.jpg"/><foaf:phone rdf:resource="tel:123456789"/><foaf:workplaceHomepage rdf:resource="http://www.cs.vu.nl/~laroyo"/>

<foaf:knows><foaf:Person><foaf:name>Marieke van Erp</foaf:name><foaf:mbox_sha1sum>f4e16d18528b83fd8b91b603583cbfd8d15f30f2</foaf:mbox_sha1sum></foaf:Person></foaf:knows>

<foaf:knows><foaf:Person><foaf:name>Dan Brickley</foaf:name><foaf:mbox_sha1sum>748934f32135cfcf6f8c06e253c53442721e15e7</foaf:mbox_sha1sum><rdfs:seeAlso rdf:resource="http://danbri.org/foaf.rdf"/></foaf:Person></foaf:knows></foaf:Person></rdf:RDF>

Social Web 2014, Lora Aroyo!

23Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

foaf:depiction

Social Web 2014, Lora Aroyo!

24Monday, February 17, 14

FOAF Auto-Discovery

• If you publish a FOAF self-description (e.g. using foaf-a-matic) you can make it easier for tools to find your FOAF by putting markup in the head of your HTML homepage

• Common filename foaf.rdf is a common choice

Social Web 2014, Lora Aroyo!

25Monday, February 17, 14

SIOC• Semantically-Interlinked Online Communities

• ontology for representing rich data from Social Web in RDF

• a standard way for expressing user-generated content

• methods for interconnecting discussions, e.g., blogs, forums & mailing lists; and enable the integration of online community information

• used in conjunction with FOAF vocabulary for expressing personal profile & social networking information

• http://sioc-project.org/

Social Web 2014, Lora Aroyo!

26Monday, February 17, 14

SIOC Vocabulary

• http://rdfs.org/sioc/ns# - SIOC Core Ontology Namespace• http://rdfs.org/sioc/access# - SIOC Access Ontology Module Namespace• http://rdfs.org/sioc/types# - SIOC Types Ontology Module Namespace• http://rdfs.org/sioc/services# - SIOC Services Ontology Module Namespace

Social Web 2014, Lora Aroyo!

27Monday, February 17, 14

<sioc:Post rdf:about="http://jbreslin.com/blog/2006/09/07/creating-connections"> <dc:title>Creating connections between discussion clouds with SIOC</dc:title> <dcterms:created>2006-09-07T09:33:30Z</dcterms:created> <sioc:has_container rdf:resource="http://jbreslin.com/blog/index.php?sioc_type=site#weblog"/> <sioc:has_creator> <sioc:UserAccount rdf:about="http://jbreslin.com/blog/author/cloud/" rdfs:label="Cloud"> <rdfs:seeAlso rdf:resource="http://jbreslin.com/blog/index.php?sioc_type=user&sioc_id=1"/> </sioc:UserAccount> </sioc:has_creator> <foaf:maker rdf:resource="http://jbreslin.com/blog/author/cloud/#foaf"/> <sioc:content>SIOC provides a unified vocabulary for content and interaction description: a semantic layer that can co-exist with existing discussion platforms. </sioc:content> <sioc:topic rdfs:label="Semantic Web" rdf:resource="http://jbreslin.com/blog/category/semantic-web/"/> <sioc:topic rdfs:label="Blogs" rdf:resource="http://jbreslin.com/blog/category/blogs/"/> <sioc:has_reply> <sioc:Post rdf:about="http://jbreslin.com/blog/2006/09/07/creating-connections/#comment-123928"> <rdfs:seeAlso rdf:resource="http://johnbreslin.com/blog/index.php?sioc_type=comment&sioc_id=123928"/> </sioc:Post> </sioc:has_reply></sioc:Post>

• A post (1) titled "Creating connections between discussion clouds with SIOC" (2) created at 09:33:30 on 2006-09-07 (3) written by user "Cloud" (4) on topics "Blogs" and "Semantic Web" (5) with contents described in sioc:content.

• (6) More information about its author at http://johnbreslin.com/blog/index.php?sioc_type=user&sioc_id=1

• The post has (7) a reply and (8) detailed SIOC information about this reply can be found at http://johnbreslin.com/blog/index.php?sioc_type=comment&sioc_id=123928

1

2

3

4

5

6

8

7

Social Web 2014, Lora Aroyo!

28Monday, February 17, 14

Social Web 2014, Lora Aroyo!

29Monday, February 17, 14

Activity Streams

• A list of recent activities performed by someone on a website

• Example: Facebook News Feed

• Activity Streams project aims at an activity stream protocol to syndicate activities across social Web applications

• Major websites with activity stream implementations have already opened up their activity streams to developers to use, e.g., Facebook and MySpace

• http://activitystrea.ms/

Social Web 2014, Lora Aroyo!

30Monday, February 17, 14

Activity StreamsSpecification

• an actor, a verb, an object and a target

• person performing an action on/with an object

• Geraldine posted a photo to her album

• John shared a video

• activity metadata to present to a user in a rich human-friendly format, e.g. constructing readable sentences about the activity that occurred, visual representations of the activity, or combining similar activities for display

• Activities are serialized using the JSON format

• There is also an ATOM-oriented specification

Social Web 2014, Lora Aroyo!

31Monday, February 17, 14

Activity StreamsExample

http://activitystrea.ms/specs/json/1.0/

Social Web 2014, Lora Aroyo!

32Monday, February 17, 14

Activity StreamsExample

http://activitystrea.ms/specs/json/1.0/

Social Web 2014, Lora Aroyo!

32Monday, February 17, 14

Verbs, Objects, MappingVerbs Objects

http://wiki.activitystrea.ms/w/page/1359319/Verb%20Mapping

Social Web 2014, Lora Aroyo!

33Monday, February 17, 14

XFN• Xhtml Friends Network

• defining a small set of values that describe personal relationships

In HTML and XHTML, these are given as values for rel attribute on a hyperlink. XFN allows authors to indicate which weblogs belong to friends, whom they've physically met, and other personal relationships. XFN values allow to humanize blogrolls and link pages.

• using XFN can easily style all links of a particular type, e.g, friends could be boldfaced, co-workers italicized, etc.

• http://gmpg.org/xfn/

Social Web 2014, Lora Aroyo!

34Monday, February 17, 14

XFN Example

• Joe has a set of five links in his blogroll: his girlfriend Jane; his friends Dave and Darryl; industry expert James, who Joe briefly met once at a conference; and MetaFilter.

• MetaFilter gets no value since it is not an actual person

http://gmpg.org/xfn/introSocial Web 2014, Lora Aroyo!

35Monday, February 17, 14

5 people who’ve met

http://gmpg.org/xfn/intro

friends vs. acquaintances

love vs. familycolleagues vs. co-workers

Social Web 2014, Lora Aroyo!

36Monday, February 17, 14

Open Graph• protocol originally developed in Facebook, “Like” button

• enables web pages to become a rich object in a social graph, i.e. any web page to have the same functionality as any other object on Facebook

• prefix="og: http://ogp.me/ns#" specifies the OGP vocabulary

Social Web 2014, Lora Aroyo!

37Monday, February 17, 14

OGP Explained

1. import the Dublin Core & Open Graph Protocol vocabularies using the prefix attribute

2. associate a prefix, dc and og with the URL for each vocabulary

3. use dc:creator and og:title, which are short-hand for the full vocabulary term URLs http://purl.org/dc/creator/creator and http://ogp.me/ns#title, respectively

Social Web 2014, Lora Aroyo!

38Monday, February 17, 14

Social Web 2014, Lora Aroyo!

39Monday, February 17, 14

RDFa

• another syntax for RDF

• HTML5 extension for People, Places, Events, Recipes, Reviews markup

specify that a text is the name of a product, or person, or event = “adding semantic markup”.

• RDFa 1.1 = specified for XHTML and HTML5 (for any XML-based language, e.g., SVG)

• RDFa Lite = “a small subset of RDFa consisting of a few attributes that may be applied to most simple to moderate structured data markup tasks.”

• Publish your data as Linked Data through RDFa --> link to other URIs (others can link to your HTML+RDFa)

http://rdfa.info/play/

Social Web 2014, Lora Aroyo!

40Monday, February 17, 14

Microformats• simple, open data formats built upon existing widely adopted standards• Designed for humans first & machines second• Highly correlated with semantic XHTML (aka the real world semantics,

lowercase semantic web, lossless XHTML)• “An evolutionary revolution”, by ryan king

Social Web 2014, Lora Aroyo!

41Monday, February 17, 14

Your first microformat

• You can put a microformat on your website in less than 5 mins

• Example: putting an hCard (online business card) on your site

http://microformats.org/get-started

1. Find your name somewhere on your website2. Wrap your name in an fn (formatted name)

<span class="fn">Jamie Jones</span>

3. Wrap it all in a vcard (declares that everything inside is the hCard microformat):

<span class="vcard"><span class="fn">Jamie Jones</span></span><address class="vcard"><span class="fn">Jamie Jones</span></address>

The address element indicates that the person in the hCard is the contact for the page

<p class="vcard">My name is <span class="fn">Jamie Jones</span> I dig microformats!</p>

Social Web 2014, Lora Aroyo!

42Monday, February 17, 14

Further microformats

• Add more information to your hCard

• Link to your friends and contacts with XFN

• Add events to your site with hCalendar

• Review movies, books, and more with hReview

http://microformats.org/get-started

Social Web 2014, Lora Aroyo!

43Monday, February 17, 14

HTML Microdata• allows machine-readable data to be embedded in HTML documents in an easy-

to-write manner, with an unambiguous parsing model

• compatible with numerous data formats, including RDF and JSON

• consists of a group of name-value pairs.

the groups are called items, and each name-value pair is a property

• itemscope is used to create an item

• itemprop is used to add a property to an item

• Microdata DOM API

• http://www.w3.org/TR/microdata/

Social Web 2014, Lora Aroyo!

44Monday, February 17, 14

Microdata Example

properties

Social Web 2014, Lora Aroyo!

link

time

levels

45Monday, February 17, 14

Knowledge Graph

• graph that understands real-world entities and their relationships to one another: things, not strings

• more than 500 million things

• more than 3.5 billion facts about and relationships between these different things

• tuned based on what people search for

• http://www.google.com/insidesearch/features/search/knowledge.html

Social Web 2014, Lora Aroyo!

results in 2013

47Monday, February 17, 14

Knowledge Graph

Social Web 2014, Lora Aroyo!

results in 2014

48Monday, February 17, 14

Social Web 2014, Lora Aroyo!

Knowledge Graph results in 2014

49Monday, February 17, 14

Social Web 2014, Lora Aroyo!

results in 2013 results in 2014

50Monday, February 17, 14

Social Web 2014, Lora Aroyo!

results in 2013

51Monday, February 17, 14

Social Web 2014, Lora Aroyo!

results in 2013

51Monday, February 17, 14

Social Web 2014, Lora Aroyo!

results in 2014

52Monday, February 17, 14

Question?

For which things on the social web would more vocabularies for embedded semantics be needed

(besides what we have already seen)?

Social Web 2014, Lora Aroyo!

53Monday, February 17, 14

image source: http://www.flickr.com/photos/bionicteaching/1375254387/Social Web 2014, Lora Aroyo!

Hands-on Teaser

• mining data in various social web formats • see the differences in what each of the formats can

contain & what purpose they serve• start: simple search where we pull in some XFN data and

visualise a graph of people that we find on a website • check: software you will be working with on the website

54Monday, February 17, 14