Skip to content

Commit

Permalink
Issue schemaorg#137: Implemented a proposal to allow authors to mark …
Browse files Browse the repository at this point in the history
…up aggregate statistics of user interactions.
  • Loading branch information
vholland committed May 19, 2015
1 parent 3bdc464 commit a8c3e6c
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 1 deletion.
76 changes: 75 additions & 1 deletion data/schema.rdfa
Original file line number Diff line number Diff line change
Expand Up @@ -3152,14 +3152,16 @@
<a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/Event">Event</a></span>
</div>
<span property="http://schema.org/supersededBy" href="http://schema.org/InteractionCounter"/>
</div>

<div typeof="rdfs:Class" resource="http://schema.org/UserBlocks">
<span class="h" property="rdfs:label">UserBlocks</span>
<span property="rdfs:comment">UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
<span property="http://schema.org/supersededBy" href="http://schema.org/InteractionCounter"/>
</div>

<div typeof="rdfs:Class" resource="http://schema.org/UserCheckins">
Expand All @@ -3168,6 +3170,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
<span property="http://schema.org/supersededBy" href="http://schema.org/InteractionCounter"/>
</div>

<div typeof="rdfs:Class" resource="http://schema.org/UserComments">
Expand All @@ -3178,6 +3181,7 @@
</span>

<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
<span property="http://schema.org/supersededBy" href="http://schema.org/CommentCounter"/>
<span>Source: <a property="dc:source" href="http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews">rNews</a></span></div>

<div typeof="rdfs:Class" resource="http://schema.org/UserDownloads">
Expand All @@ -3187,6 +3191,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/DownloadCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand All @@ -3197,6 +3202,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/UpVoteCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand All @@ -3207,6 +3213,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/PageVisitCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand All @@ -3217,6 +3224,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/ViewCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand All @@ -3227,6 +3235,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/UpVoteCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand All @@ -3237,6 +3246,7 @@
&lt;a href="/Action"&gt;Action&lt;/a&gt;-based vocabulary, alongside types such as &lt;a href="/Comment"&gt;Comment&lt;/a&gt;.
</span>

<span property="http://schema.org/supersededBy" href="http://schema.org/ShareCounter"/>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/UserInteraction">UserInteraction</a></span>
</div>

Expand Down Expand Up @@ -6947,6 +6957,7 @@ Note that Event uses startDate/endDate instead of startTime/endTime, even when d
<div typeof="rdf:Property" resource="http://schema.org/interactionCount">
<span class="h" property="rdfs:label">interactionCount</span>
<span property="rdfs:comment">This property is deprecated, alongside the UserInteraction types on which it depended.</span>
<span property="http://schema.org/supersededBy" href="http://schema.org/interactionStatistic"/>
<!-- <span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/CreativeWork">CreativeWork</a></span>
<span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/Organization">Organization</a></span>
<span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/Place">Place</a></span>
Expand Down Expand Up @@ -12219,6 +12230,69 @@ Typical unit code(s): C62 for persons </span>
<span>Source: <a property="dc:source" href="http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group">GAO</a></span>
</div>

<h1>InteractionCounter</h1>

<div typeof="rdfs:Class" resource="InteractionCounter">
<span class="h" property="rdfs:label">InteractionCounter</span>
<span property="rdfs:comment">A summary of how users have interacted with this CreativeWork. In most cases, authors will use a subtype to specify the specific type of interaction.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/StructuredValue">StructuredValue</a></span>
</div>

<div typeof="rdf:Property" resource="http://schema.org/interactionService">
<span class="h" property="rdfs:label">interactionService</span>
<span property="rdfs:comment">The WebSite or SoftwareApplication where the interactions took place.</span>
<span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/InteractionCounter">InteractionCount</a></span>
<span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/SoftwareApplication">SoftwareApplication</a></span>
<span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/WebSite">WebSite</a></span>
</div>
<div typeof="rdf:Property" resource="http://schema.org/interactionStatistic">
<span class="h" property="rdfs:label">interactionStatistic</span>
<span property="rdfs:comment">The number of interactions for the CreativeWork using the WebSite or SoftwareApplication. The most specific child type of InteractionCounter should be used.</span>
<span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/CreativeWork">CreativeWork</a></span>
<span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdf:Property" resource="http://schema.org/userInteractionCount">
<span class="h" property="rdfs:label">userInteractionCount</span>
<span property="rdfs:comment">The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.</span>
<span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/InteractionCounter">InteractionCount</a></span>
<span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/Integer">Integer</a></span>
</div>

<div typeof="rdfs:Class" resource="CommentCounter">
<span class="h" property="rdfs:label">CommentCounter</span>
<span property="rdfs:comment">A summary of the number of user comments for this CreativeWork.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="DownloadCounter">
<span class="h" property="rdfs:label">DownloadCounter</span>
<span property="rdfs:comment">A summary of the number of user downloads of this CreativeWork.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="DownVoteCounter">
<span class="h" property="rdfs:label">DownVoteCounter</span>
<span property="rdfs:comment">A summary of the number of times users have voted against a CreativeWork on a particular site or software application. Down votes are any negative, countable interaction including but not limited to Youtube down votes or Reddit dislikes.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="PageVisitCounter">
<span class="h" property="rdfs:label">PageViewCounter</span>
<span property="rdfs:comment">A summary of the number of times users have viewed a particular WebPage.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="ShareCounter">
<span class="h" property="rdfs:label">ShareCounter</span>
<span property="rdfs:comment">A summary of the number of times users have shared a CreativeWork on a particular site or software application, including, but not limited to Facebook shares, Twitter retweets, and Pinterest pins.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="UpVoteCounter">
<span class="h" property="rdfs:label">UpVoteCounter</span>
<span property="rdfs:comment">A summary of the number of times users have voted for a CreativeWork on a particular site or software application. Up votes are any positive, countable interaction including but not limited to Facebook likes, Google Plus +1s, and Youtube up votes.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>
<div typeof="rdfs:Class" resource="ViewCounter">
<span class="h" property="rdfs:label">UpVoteCounter</span>
<span property="rdfs:comment">A summary of the number of times users have viewed a CreativeWork on a particular site or software application.</span>
<span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/InteractionCounter">InteractionCounter</a></span>
</div>



Expand Down
75 changes: 75 additions & 0 deletions data/sdo-userinteraction-examples.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
TYPES: UpVoteCounter,ShareCounter,ViewCounter,VideoObject

PRE-MARKUP:
A video has the following interactions:
Youtube: 512 up votes
Twitter: 1,024 up votes
Twitter: 2,345 tweets
Facebook: 1,024 likes
4,356 views


MICRODATA:
TBD

RDFA:
TBD

JSON:
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "VideoObject",
"name": "Light at the End of the Tunnel",
"url": "http://videolectures.net/iswc2013_guha_tunnel/",
"datePublished": "2013-11-28",
"author": {
"@type": "Person",
"name": "Ramanathan V. Guha"
},
"interactionStatistic": [
{
"@type": "UpVoteCounter",
"interactionService": {
"@type": "Website",
"name": "Youtube",
"url": "http://www.youtube.com"
},
"userInteractionCount": "512"
},
{
"@type": "UpVoteCounter",
"interactionService": {
"@type": "SoftwareApplication",
"name": "Twitter",
"url": "http://www.twitter.com"
},
"userInteractionCount": "1024"
},
{
"@type": "ShareCounter",
"interactionService": {
"@type": "SoftwareApplication",
"name": "Twitter",
"url": "http://www.twitter.com"
},
"userInteractionCount": "2345"
},
{
"@type": "UpVoteCounter",
"interactionService": {
"@type": "Website",
"name": "Facebook",
"url": "http://www.facebook.com"
},
"userInteractionCount": "1024"
},
{
"@type": "ViewCounter",
"userInteractionCount": "4356"
},
]
}



0 comments on commit a8c3e6c

Please sign in to comment.