iptc/sport-schema

Add G/S/B totals to Oly Medals query

pauljkelly opened this issue · 5 comments

Currently we only have ranking in the data for the medals table query and use case. Would be nice (and important) to display medal totals and breakdown by gold, silver and bronze. Here's the current output:


| compName | teamName | rank |

| "2020 Tokyo Summer Olympics" | "People's Republic of China" | 1 |
| "2020 Tokyo Summer Olympics" | "Japan" | 2 |
| "2020 Tokyo Summer Olympics" | "Republic of Korea" | 3 |
| "2020 Tokyo Summer Olympics" | "Ecuador" | 4 |
| "2020 Tokyo Summer Olympics" | "Hungary" | 4 |
| "2020 Tokyo Summer Olympics" | "Islamic Republic of Iran" | 4 |

I thought this would be simple @bquinn but I'm out of practice here and can't figure out how to represent gold, silver and bronze medal totals in the schema based on this:

              <award award-type="vend:medal" place="1" total="3"/>
              <award award-type="vend:medal" place="2" total="0"/>
              <award award-type="vend:medal" place="3" total="1"/>
              <award award-type="vend:medal" place="all" total="4"/>

This is a nice-to-have, albeit a significant one. Not a showstopper for the data because it could be queried from the individual medal events rather than this aggregate report. So we could leave it for later unless you see some obvious solution. CC: @awanczowski @silveroliver

Thinking of a few synonyms for awards. Perhaps keepsake or prize works.

<https://example.com/Award/123>
        rdf:type                       sport:Award ;
        rdfs:label                     "2020 Olympic Shotput 1st place, gold" ;
        sport:awardType                vend:medal ;
        sport:awardKeepsake            vend:gold-medal ;
        sport:place                    "1" ;
        sport:total                    "1" .

<https://example.com/Award/123>
        rdf:type                       sport:Award ;
        rdfs:label                     "2023 Stanley Cup" ;
        sport:awardType                vend:trophy ;
        sport:awardKeepsake            vend:stanley-cup ;
        sport:place                    "1" ;
        sport:total                    "1" .

<https://example.com/Award/123>
        rdf:type                       sport:Award ;
        rdfs:label                     "100 Meter Dash, Blue Ribbon" ;
        sport:awardType                vend:ribbon;
        sport:awardKeepsake            vend:blue-ribbon ;
        sport:place                    "1" ;
        sport:total                    "1" .

Thanks.

This means we'd need a new property like hasAward.

How can anyone have a total of four 2023 Stanley Cups? Do you mean all time for a team? And how do show the total gold medals for, say, the 2022 Olympics for USA?

I think I misunderstood the use of total. I corrected the example. Originally, I had the number of wins in the final to get the trophy. But, that shouldn't be attached to the award. So, the Award would have these properties and then a relationship to the Participation would be needed. hasAward sounds good to me.

bquinn commented

I guess to represent the overall performance of the US Olympic Team at the 2020 Olympics, we need something to go in the TeamParticipation object (actually CompetitorParticipation would make the most sense because we might be talking about teams or individual athletes).

BQ option 1 for aggregate medals

Isn't it kind of like home games and away games in a football standings table? For those we use a ParticipationSplit.

So we could have

2020TokyoSummerOlympics rdf:type Competition .
"People'sRepublicOfChina" rdf:type Team .

ChinaAt2020TokyoOlympics rdf:type TeamParticipation ;
    hasParticipationSplit ChinaAt2020TokyoOlympicsGolds

ChinaAt2020TokyoOlympicsGolds rdf:type ParticipationSplit ;
    score: 2
    scoreUnits: "gold-medals"

BQ option 2 for aggregate medals

or we could say that's equivalent to "wins", "losses" and "ties" in a league table, and we define stats properties for them...

2020TokyoSummerOlympics rdf:type Competition .
"People'sRepublicOfChina" rdf:type Team .

ChinaAt2020TokyoOlympics rdf:type TeamParticipation ;
    olystat:goldMedalCount "3" ;
    olystat:silverMedalCount "2" ;
    olystat:bronzeMedalCount "1" .