Skip to content

Instantly share code, notes, and snippets.

@darobin
Created April 20, 2020 18:20
Show Gist options
  • Save darobin/07324754f0db7f090d737b9d2616536c to your computer and use it in GitHub Desktop.
Save darobin/07324754f0db7f090d737b9d2616536c to your computer and use it in GitHub Desktop.
A quick and dirty JSON-LD of COVID reporting with schema.org (marked as being JS so the comments work)
{
"@context": "http://schema.org/",
"@type": "SpecialAnnouncement",
"about": "https://en.wikipedia.org/wiki/Coronavirus_disease_2019",
"datePosted": "2020-04-20T13:45:00.000Z",
"diseaseSpreadStatistics": [
// deaths in France on the 19th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#deathCount",
"measuredValue": 915,
"observationDate": "2020-04-19",
"geographicArea": {
"@type": "Country",
"name": "France"
}
},
// cases in France on the 19th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#casesCount",
"measuredValue": 21053,
"observationDate": "2020-04-19",
"geographicArea": {
"@type": "Country",
"name": "France"
}
},
// recovered in France on the 19th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#recoveredCount",
"measuredValue": 6538,
"observationDate": "2020-04-19",
"geographicArea": {
"@type": "Country",
"name": "France"
}
},
// deaths in France on the 18th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#deathCount",
"measuredValue": 901,
"observationDate": "2020-04-18",
"geographicArea": {
"@type": "Country",
"name": "France"
}
},
// deaths in New York State on the 19th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#deathCount",
"measuredValue": 10002,
"observationDate": "2020-04-19",
"geographicArea": {
"@type": "State",
"name": "New York",
"containedInPlace": { "@type": "Country", "USA" }
}
},
// deaths in Suffolk County on the 19th
{
"@type": "Observation",
"measuredProperty": "https://ns.nytimes.com/#deathCount",
"measuredValue": 362,
"observationDate": "2020-04-19",
"geographicArea": {
"@type": "County",
"name": "Suffolk",
"containedInPlace": {
"@type": "State",
"name": "New York",
"containedInPlace": { "@type": "Country", "USA" }
}
}
}
]
}
@darobin
Copy link
Author

darobin commented Apr 20, 2020

Things that aren't in schema.org or that aren't clear (or are arbitrary):

  • I'm not sure that the about of the SpecialAnnouncement makes sense.
  • The set of measuredProperties is probably wrong.
  • There might be an easier way to specify geographicArea.
  • I invented the type County.
  • I added geographicArea to Observation.

@darobin
Copy link
Author

darobin commented Apr 24, 2020

This probably needs to support range values, and the ability to distinguish between confirmed cases and non-confirmed.

@chrisspradling1980
Copy link

How about instead of looking for death tolls, dig into GSA and GIS for energy situation differences. For example, total number of human presence at a location swarming into a collective funnel of aggressive need to generate into the combination of vehicular precedence representing motor compulsary drive by torque expressed momentum and the human interest of movement and acknowledgement of a physical "cyber type" enablement as a configuration guardianship, such as BOOLEAN_AS_A_FUNCTION module.

I don't participate in enabling Schema however, when the time comes, I'll put it.

@chrisspradling1980
Copy link

GIS @0318

Identity of Phenom Enthrophy Observer as a Human is needed.

:^)

@dr-shorthair
Copy link

Left a more detailed comment regarding potential alignment with SOSA vocabulary over at schemaorg/schemaorg#2564 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment