More on Linked Open Data and Schema.org

In a recent post I gave some examples of how to use Getty AAT Linked Open Data with the new schema.org/VisualArtwork.

After some advice from Dan Brickley and Richard Wallis in a comment thread on Github about the difference between the “keywords” and “about” properties I found out that there’s even more you can do with schema.org Linked Open Data, and it’s not just for artwork…

The schema.org/CreativeWork type has an “about” property which is defined as “The subject matter of the content.” CreativeWork is the parent of many other schema.org Types such as VisualArtwork, Movie, Book, Article, TVSeries, BlogPosting, and many more, so the methods in this post can be used on more than just visual artwork.

As with all schema.org properties, you can use the “about” property multiple times within a single Type, so it can be used as a subject tag/classification, of the type commonly used on blog posts etc. I want to use it on artwork, so that’s what my example will use, but as mentioned above, it can be used on any of the many schema.org types that are built on CreativeWork.

I’ll be using the Getty Vocabularies for my Linked Open Data because they’re a set of specialist vocabularies for art, but other vocabularies available as Linked Open Data could be used such as Wikidata, DBPedia, Library of Congress Subject Headings, and many more generalist or specialist vocabularies can be used for films, books, articles, TV shows, blog posts, and any other sub-Types of CreativeWork.

Here’s my basic HTML:

<article>
  <h1>Mona Lisa</li>
  <p>By Leonardo da Vinci</p>
  <dl>
    <dt>Artform</dt>
    <dd>Oil Painting</dd>
    <dt>Material(s):</dt>
    <dd>Oil Paint</dd>
    <dt>Surface:</dt>
    <dd>Panel</dd>
    <dt>Dimensions</dt>
    <dd>770 <abbr title="millimetres">mm</abbr> × 530 <abbr title="millimetres">mm</abbr></dd>
  </dl>
  <p>Tagged as:</p>
  <ul>
    <li>Portraits</li>
    <li>Late Renaissance</li>
    <li>Italian</li>
  </ul>
</article>

First I’m going to add the schema.org/VisualArtwork markup without any linked data. I’m using RDFa, but it could easily be done with Microdata or JSON-LD:

<article vocab="http://schema.org/" typeof="VisualArtwork">
  <h1 property="name">Mona Lisa</li>
  <p property="creator" typeof="Person">
    By <span property="givenName">Leonardo</span> <span property="familyName">da Vinci</span>
  </p>
  <dl>
    <dt>Artform</dt>
    <dd property="artform">Oil Painting</dd>
    <dt>Material(s):</dt>
    <dd property="material">Oil Paint</dd>
    <dt>Surface:</dt>
    <dd property="surface">Panel</dd>
    <dt>Dimensions</dt>
    <dd>
      <span property="height" typeof="QuantitativeValue">
        <span property="value">770</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span> ×
      <span property="width" typeof="QuantitativeValue">
        <span property="value">530</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span>
    </dd>
  </dl>
  <p>Tagged as:</p>
  <ul>
    <li>Portraits</li>
    <li>Late Renaissance</li>
    <li>Italian</li>
  </ul>
</article>

So far, so good. Now let’s add in the Getty AAT Linked Open Data for the artform, materials, and surface properties that I explained in my previous blog post. I’ll also add Linked Open Data for da Vinci himself, since he’s in the Getty Union List of Artist Names (ULAN) vocabulary, and while that isn’t quite set up for Linked Open Data yet, the URIs are set up ready for use:

<article vocab="http://schema.org/" typeof="VisualArtwork">
  <h1 property="name">Mona Lisa</li>
  <p property="creator" typeof="Person" resource="http://vocab.getty.edu/ulan/500010879">
    By <span property="givenName">Leonardo</span> <span property="familyName">da Vinci</span>
  </p>
  <dl>
    <dt>Artform</dt>
    <dd property="artform" resource="http://vocab.getty.edu/aat/300033799">Oil Painting</dd>
    <dt>Material(s):</dt>
    <dd property="material" resource="http://vocab.getty.edu/aat/300015050">Oil Paint</dd>
    <dt>Surface:</dt>
    <dd property="surface" resource="http://vocab.getty.edu/aat/300014657">Panel</dd>
    <dt>Dimensions</dt>
    <dd>
      <span property="height" typeof="QuantitativeValue">
        <span property="value">770</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span> ×
      <span property="width" typeof="QuantitativeValue">
        <span property="value">530</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span>
    </dd>
  </dl>
  <p>Tagged as:</p>
  <ul>
    <li>Portraits</li>
    <li>Late Renaissance</li>
    <li>Italian</li>
  </ul>
</article>

Now we move on to the final bit at the bottom: the “Tagged as” subject classifications: Portraits, Late Renaissance, and Italian.

The “about” property takes an instance of schema.org/Thing rather than text or a URL, but—as Richard Wallis explained—that’s OK because everything’s a thing.

Here’s how to mark them up (firstly without linked data):

  <p>Tagged as:</p>
  <ul>
    <li property="about" typeof="Thing">Portraits</li>
    <li property="about" typeof="Thing">Late Renaissance</li>
    <li property="about" typeof="Thing">Italian</li>
  </ul>

…and now we add in the Linked Data URIs using the resource property:

  <p>Tagged as:</p>
  <ul>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300015637">Portraits</li>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300021143">Late Renaissance</li>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300111198">Italian</li>
  </ul>

Alternatively I could have used another vocabulary such as Wikidata. Here’s the same thing using Wikidata:

  <p>Tagged as:</p>
  <ul>
    <li property="about" typeof="Thing" resource="https://www.wikidata.org/entity/Q134307">Portraits</li>
    <li property="about" typeof="Thing" resource="https://www.wikidata.org/entity/Q4692">Late Renaissance</li>
    <li property="about" typeof="Thing" resource="https://www.wikidata.org/entity/Q38">Italian</li>
  </ul>

In one case the terms are not as specific as Getty’s for artwork (The URI for “Late Renaissance” actually goes to the page for “Renaissance” which is broader), but Wikidata might be better for general blog posts, especially if you’re not blogging about art.

Here’s the finished markup:

<article vocab="http://schema.org/" typeof="VisualArtwork">
  <h1 property="name">Mona Lisa</li>
  <p property="creator" typeof="Person" resource="http://vocab.getty.edu/ulan/500010879">
    By <span property="givenName">Leonardo</span> <span property="familyName">da Vinci</span>
  </p>
  <dl>
    <dt>Artform</dt>
    <dd property="artform" resource="http://vocab.getty.edu/aat/300033799">Oil Painting</dd>
    <dt>Material(s):</dt>
    <dd property="material" resource="http://vocab.getty.edu/aat/300015050">Oil Paint</dd>
    <dt>Surface:</dt>
    <dd property="surface" resource="http://vocab.getty.edu/aat/300014657">Panel</dd>
    <dt>Dimensions</dt>
    <dd>
      <span property="height" typeof="QuantitativeValue">
        <span property="value">770</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span> ×
      <span property="width" typeof="QuantitativeValue">
        <span property="value">530</span>
        <abbr property="unitCode" content="MMT" title="millimetres">mm</abbr>
      </span>
    </dd>
  </dl>
  <p>Tagged as:</p>
  <ul>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300015637">Portraits</li>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300021143">Late Renaissance</li>
    <li property="about" typeof="Thing" resource="http://vocab.getty.edu/aat/300111198">Italian</li>
  </ul>
</article>

Many thanks again to Dan Brickley and Richard Wallis for explaining how the “about” property can be used for these purposes, and for pointing to the example usage on the www.worldcat.org website.

I haven’t implemented it on this website yet. It’s on my list of things to do (not just for the pages of artwork but also for blog posts such as this one, and for articles), but I really should get back to creating some new artwork first!