Annotating a Hotel offering Rooms with the new schema.org version 3.1

With the version 3.1, schema.org brings a lot of new annotation power to hotels. Previously accommodation providers were able to annotate the core data of their business, like name, phone, address and more, but the newly released version 3.1 brings that to a new level and allows the annotation of rooms, features and services and even lets the accommodation owners annotate their room offers on the website. This article shows how this is done on a short JSON-LD example.

The example starts with the straight forward definition of the hotel with some properties like name, URL, address and others. The property makesOffer requires an Offer which comes with a property itemOffered, which has our special attention here.

The itemOffered requires, as stated in the documentation, either a Product or Service. The alleged problem: HotelRoom is neither. Here schema.org comes up with the concept of Multiple Typed Entities (MTE). One might think now “What is new about that, Hotel itself is an Organization and a Place”, but this is different. In the case of the HotelRoom we have to make a multi typing on the instance level instead of the vocabulary level.

This works simply by setting the @type of our annotated hotel room to HotelRoom AND Product – in the JSON-LD implementation we use an array for that. The rest of the example is straight forward: the room gets a bed, a description, a name and values for occupancy.

{
    "@context": "http://schema.org/",
    "@type": "Hotel",
    "name": "Landgasthof Adler",
    "openingHours": "We-Mo 10:00-20:00",
    "paymentAccepted": "Cash, credit card",
    "url": "http://www.landgasthof-adler.at/",
    "address": {
        "@type": "PostalAddress",
        "addressCountry": "Austria",
        "addressLocality": "Hinterhornbach",
        "addressRegion": "Tirol",
        "postalCode": "6642",
        "streetAddress": "Hinterhornbach 17"
    },
    "makesOffer": {
        "@type": "Offer",
        "availability": "InStock",
        "name": "Enzian Room",
        "itemOffered": {
            "@type": ["HotelRoom", "Product"],
            "bed": {
                "@type": "BedDetails",
                "numberOfBeds": 1
            },
            "description": "Double Room with Shower",
            "name": "Enzian Room",
            "numberOfRooms": 1,
            "occupancy": {
                "@type": "QuantitativeValue",
                "maxValue": 3,
                "minValue": 1
            }
        }
    }
}

For further information about schema.org, follow their blog and brows their GitHub issues.

Annotating ski resorts, lifts and slopes with schema.org

Schema.org is awesome. It provides useful terms to annotate a great variety of entities on the web. Events, articles, products, people, hotels… for almost every item the modern webmaster wants to annotate, there’s a schema.org class for it. But since the initiative, driven by Bing, Google, Yahoo! and Yandex , is reatively young (2011), it’s pretty easy to hit the wall. That is what happens if one tries to annotate the ski lifts and slopes of a ski resort. The class schema.org/SkiResort is a subclass of schema.org/SportsActivitieLocation but does not introduce any new attributes. This article describes the approach to extend the schema.org vocabulary by two new classes and some new attributes to meet the requirements for the proper annotation of ski resorts.

This article describes a schema.org extension which is currently under review by the schema.org steering committee and not yet part of schema.org!

What’s new

Ski resort

To properly annotate a ski resort, apart from the properties inherited from LocalBusiness, Place, Organization and Thing, we need two new properties to add lifts and slopes. So we introduced hasSkiLift which expects the newly introduced type SkiLift and hasSkiSlope which expects the newly introduced type SkiSlope.

Ski lift

The type SkiLift is, like the ski resort itself, inherited from SportsActivityLocation. The new attributes describe the length, the elevation at the start (elevationStart) and the elevation at the end (elevationEnd) of the lift, the type (liftType: T-Bar lift, chair lift or cable car), the number of stops (numberOfStops) and the transport capacity (transportCapacity).

Ski slope

The newly introduced SkiSlope is inherited from SportsActivityLocation as well. The newly introduced attributes identify the ski slope by a number (slopeNumber), describe the difficulty and the length.

Example

The following example uses Microdata and describes a ski resort with two ski lifts and three ski slopes.

<div itemtype="http://schema.org/SkiResort" itemid="http://www.stanzach.at/familienskilifte.html" itemscope>
  <meta itemprop="name" content="Familienskilifte Stanzach" />
  <link itemprop="sameAs" href="http://www.naturpark-lechtal.at/winter/ski-und-snowboard/ski-und-snowboard.html?aid=55" />
  <link itemprop="sameAs" href="http://www.lechtal.at/winter/winter-aktiv-lechtal/skifahrenimlechtal/skigebiete/familienskigebiet-stanzach.html" />
  <link itemprop="image" href="http://www.naturpark-lechtal.at/index.php?rex_resize=990c__300h__p1230074.jpg" />
  <div itemprop="hasSkiLift" itemtype="http://schema.org/SkiLift" itemscope>
    <meta itemprop="length" content="550" />
    <meta itemprop="transportCapacity" content="2" />
    <meta itemprop="numberOfStops" content="2" />
    <meta itemprop="elevationEnd" content="1190" />
    <meta itemprop="elevationStart" content="940" />
    <meta itemprop="name" content="Stoamandllift" />
    <meta itemprop="liftType" content="T-bar lift" />
  </div>
  <div itemprop="hasSkiSlope" itemtype="http://schema.org/SkiSlope" itemscope>
    <meta itemprop="length" content="1330" />
    <meta itemprop="name" content="Familienabfahrt" />
    <meta itemprop="difficulty" content="blue" />
    <meta itemprop="slopeNumber" content="1a" />
  </div>
  <div itemprop="hasSkiSlope" itemtype="http://schema.org/SkiSlope" itemscope>
    <meta itemprop="length" content="1820" />
    <meta itemprop="name" content="Rennstrecke" />
    <meta itemprop="difficulty" content="red" />
    <meta itemprop="slopeNumber" content="1b" />
  </div>
  <div itemprop="hasSkiSlope" itemtype="http://schema.org/SkiSlope" itemscope>
    <meta itemprop="length" content="2575" />
    <meta itemprop="name" content="Wald Verbindungslift" />
    <meta itemprop="difficulty" content="Skiroute" />
    <meta itemprop="slopeNumber" content="2" />
  </div>
</div>

The same example in JSON-LD looks like this:

<script type="application/ld+json">
   {
       "@context": "http://schema.org",
       "@type": "SkiResort",
       "@id": "http://www.stanzach.at/familienskilifte.html",
       "name": "Familienskilifte Stanzach",
       "sameAs": [
           "http://www.naturpark-lechtal.at/winter/ski-und-snowboard/ski-und-snowboard.html?aid=55",
           "http://www.lechtal.at/winter/winter-aktiv-lechtal/skifahrenimlechtal/skigebiete/familienskigebiet-stanzach.html"
       ],
       "image": "http://www.naturpark-lechtal.at/index.php?rex_resize=990c__300h__p1230074.jpg",
       "hasSkiLift": {
           "@type": "SkiLift",
           "name": "Stoamandllift",
           "liftType": "T-bar lift",
           "transportCapacity": "2",
           "elevationStart": "940",
           "elevationEnd": "1190",
           "length": "550",
           "numberOfStops": "2"
       },
       "hasSkiSlope": [{
           "@type": "SkiSlope",
           "name": "Familienabfahrt",
           "slopeNumber": "1a",
           "length": "1330",
           "difficulty": "blue"
       },{
           "@type": "SkiSlope",
           "name": "Rennstrecke",
           "slopeNumber": "1b",
           "length": "1820",
           "difficulty": "red"
       },{
           "@type": "SkiSlope",
           "name": "Wald Verbindungslift",
           "slopeNumber": "2",
           "length": "2575",
           "difficulty": "Skiroute"
       }]
   }
</script>

Documentation and Discussion

The full documentation (in progress) can be found at: sdo-skiresort.appspot.com/docs/skiresort.html and the discussion , on the extension as well as on the integration progress in schema.org can be found on Github in the pull request: github.com/schemaorg/schemaorg/pull/1259

Bibtex Style for Rinton Press’ Journal of Mobile Multimedia (JMM)

Rinton Press requires a bibliography style for it’s “Journal of Mobile Multimedia” which is not compatible with any of the latex bibliography styles mentioned in [1]. In the JMM latex template available on the website [2], there is no .bst file and the bibliography is created by begin{thebibliography}… and then filled with bibitem.

To be independent from fixed bibliography styles and to use a .bib file, I created a repository on GitHub which provides the necessary .bst file to style the bibliography according to the Rinton Press JMM requirements and the .dbj file to change stylings and rebuilt the .bst file.

For further information about the usage of the mentioned files visit the Github page of the project: https://github.com/eliaskaerle/bibtex-style-rinton-press-jmm.

[1] https://www.sharelatex.com/learn/Bibtex_bibliography_styles
[2] http://www.rintonpress.com/style/index.html

Becoming An Entity In The Google Knowledge Graph

This website was created for no other purpose than to drive an experiment towards the target of becoming an entity in the google knowledge graph. After an interesting talk an discussion with Andrea Volpini from Redlink and further reading about the topic of becoming an entity in the graph (and here), I decided to do a hands-on myself and try to become an entity.

Two simple steps:

Despite the efforts described in the two articles linked above, I wanted to do as little work as possible, and so I reduced the procedure to just two simple steps:

Creating an entry in freebase

I went to freebase.com, created an account for my person and started to add properties like /common/topic/alias/common/topic/official_website/common/topic/social_media_presence/people/person/date_of_birth and some more.

Creating a simple website and annotating it with schema.org in JSON-LD

I set up a simple wordpress page, consisting of more or less only one static page and a blog, and entered some very basic schema.org annotations in json-ld format.

Extract of my schema.org annotation in json-ld format:

{
  "@context": "http://schema.org/",
  "@type": "Person",
  "name": "Elias Kärle",
  "workLocation": "Innsbruck",
  "url": "http://elias.kaerle.com",
  "image": "elias.jpg",
  "sameAs": [ "https://www.freebase.com/user/eliaska",
    "https://www.facebook.com/elias.kaerle",
    "https://www.twitter.com/eliaska",
    "https://www.instagram.com/eliaskaerle",
    "https://plus.google.com/+EliasKaerle"]
}

As you can see I used the schema.org/Person concept and made excessive use of the “sameAs” property to link all my social channels.

So far, so good, now I will wait to see what happens. Will google really recognize me as an entity after so little “SEO”? I will keep posting here about the progress.