Scores for head to head events

I've been thinking about how we get outcomes of sporting events into Schema.org.

I've been considering Football match reports as an example use and I've come up with a couple of different approaches.

1) In the published SportsEvent we've already got properties for awayTeam and homeTeam. The simplest way to model results for these kinds of events might by using awayScore and homeScore properties, e.g.:

<script type="application/ld+json">
{
  "@context":"http://schema.org",
  "@type":"SportsEvent",
  "name": "Barclays Premier League Liverpool v Crystal Palace",
  "homeTeam":
    {
      "@type": "SportsTeam",
      "name": "Liverpool"
    },
  "awayTeam":
    {
      "@type": "SportsTeam",
      "name": "Crystal Palace"
    },
  "homeScore": 1,
  "awayScore": 2
}
</script>

2) We model the score objects and link them back to competitor. This is more complex but could support an unlimited number of competitors: e.g.:
<script type="application/ld+json">
{
  "@context":"http://schema.org",
  "@type":"SportsEvent",
  "name": "Barclays Premier League Liverpool v Crystal Palace",
  "homeTeam":
    {
      "@type": "SportsTeam",
      "@id": "https://en.wikipedia.org/wiki/Liverpool_F.C.",
      "name": "Liverpool"
    },
  "awayTeam":
    {
      "@type": "SportsTeam",
      "@id": "https://en.wikipedia.org/wiki/Crystal_Palace_F.C.",
      "name": "Crystal Palace"
    },
  "scores":
    [
      {
        "@type": "SportsScore",
        "competitor": "https://en.wikipedia.org/wiki/Liverpool_F.C.",
        "value": 1
      },
      {
        "@type": "SportsScore",
        "competitor": "https://en.wikipedia.org/wiki/Crystal_Palace_F.C.",
        "value": 2
      }
    ]
}
</script>

Any thoughts on either of these approaches? Would they work for your use cases?

Jonnie

Received on Thursday, 19 November 2015 16:20:06 UTC