SARS-CoV-2-Queries

[ en ja es pt ]

The pandemic

The total number of cases of the pandemic found with this query:

SPARQL sparql/earthAllCasesToday.rq (run, edit)

SELECT ?numberOfCases  WHERE {
  wd:Q81068910 wdt:P1603 ?numberOfCases .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY DESC(?numberOfCases)

Which gives us:

numberOfCases
130459184

Virus transmission

The spread of the virus happens because the virus is too easily transmitted from one human to another. Everyone should know about keeping a distance, because small droplets due to, for example, coughing will contain the virus [citation needed].

But SARS-CoV-2 is also found to survive a certain amount of time after that, for example, on surfaces [citation needed]. We can do the following query to list which articles link human coronaviruses to survival on flat surfaces:

SPARQL sparql/surfacesCounts.rq (run, edit)

SELECT ?virus ?virusLabel ?count WITH {
  SELECT ?virus (COUNT(DISTINCT ?work) AS ?count) WHERE {
    VALUES ?virus {
      wd:Q82069695 # SARS-CoV-2
      wd:Q16983360 # HKU1
      wd:Q16991954 # OC43
      wd:Q8351095  # NL63 
      wd:Q16983356 # 229E 
      wd:Q4902157  # MERS-CoV
      wd:Q278567   # SARS-CoV
    }
    ?work wdt:P921 ?virus ;
          wdt:P921 wd:Q484298 .
  } GROUP BY ?virus
} AS %ARTICLES WHERE {
  INCLUDE %ARTICLES
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count)

This shows us:

virus count
Human coronavirus 229E (edit) 4
SARS-CoV-2 (edit) 3
Human coronavirus OC43 (edit) 2
Middle East respiratory syndrome coronavirus (edit) 1

The query to actually list the articles about survival on surfaces of the viruses, use the following query:

SPARQL sparql/surfaces.rq (run, edit)

SELECT ?virus ?virusLabel ?work ?workLabel WITH {
  SELECT ?virus ?work WHERE {
    VALUES ?virus {
      wd:Q82069695 # SARS-CoV-2
      wd:Q16983360 # HKU1
      wd:Q16991954 # OC43
      wd:Q8351095  # NL63 
      wd:Q16983356 # 229E 
      wd:Q4902157  # MERS-CoV
      wd:Q278567   # SARS-CoV
    }
    ?work wdt:P921 ?virus ;
          wdt:P921 wd:Q484298 .
  }
} AS %ARTICLES WHERE {
  INCLUDE %ARTICLES
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY ?virusLabel ?workLabel

Which shows us for the human coronaviruses these articles:

virus work
Human coronavirus 229E (edit) Exaggerated risk of transmission of COVID-19 by fomites (edit)
Human coronavirus 229E (edit) Human Coronavirus 229E Remains Infectious on Common Touch Surface Materials. (edit)
Human coronavirus 229E (edit) Isolation and identification of human coronavirus 229E from frequently touched environmental surfaces of a university classroom that is cleaned daily. (edit)
Human coronavirus 229E (edit) Survival of human coronaviruses 229E and OC43 in suspension and after drying on surfaces: a possible source of hospital-acquired infections (edit)
Human coronavirus OC43 (edit) Exaggerated risk of transmission of COVID-19 by fomites (edit)
Human coronavirus OC43 (edit) Survival of human coronaviruses 229E and OC43 in suspension and after drying on surfaces: a possible source of hospital-acquired infections (edit)
Middle East respiratory syndrome coronavirus (edit) Middle East respiratory syndrome coronavirus on inanimate surfaces: A risk for health care transmission. (edit)
SARS-CoV-2 (edit) Aerosol and Surface Stability of SARS-CoV-2 as Compared with SARS-CoV-1 (edit)
SARS-CoV-2 (edit) Aerosol and surface stability of HCoV-19 (SARS-CoV-2) compared to SARS-CoV-1 (edit)
SARS-CoV-2 (edit) Exaggerated risk of transmission of COVID-19 by fomites (edit)

Progression

However, we may be more interested in the number of cases over time. Then we need a more complex query suitable for statement qualifiers:

SPARQL sparql/earthAllCases.rq (run, edit)

SELECT ?date ?numberOfCases WHERE {
  wd:Q81068910 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY ASC(?date)

If we want to make a line plot of the progression, we have to slightly change the query:

SPARQL sparql/earthAllCasesLinePlot.rq (run, edit)

#defaultView:LineChart
SELECT ?date ?numberOfCases WHERE {
  wd:Q81068910 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY ASC(?date)

This gives us this time series:

Regional progression

Like Wikipedia, Wikidata has pages about pandemic for specific regions as well. We can list them with this query:

SPARQL sparql/facets.rq (run, edit)

SELECT ?facet ?facetLabel WHERE {
  ?facet wdt:P1269 wd:Q81068910 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}

The list is very long, and to show it, you can open the above SPARQL page.

Progression in The Netherlands

These facets can be used to look at just the progression on one region, for example, just The Netherlands:

SPARQL sparql/progressionNL.rq (run, edit)

SELECT ?date ?numberOfCases WHERE {
  wd:Q86756826 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY DESC(?date)

As the pandemic continues, the table has gotten long and a line plot may be more useful;

SPARQL sparql/progressionNLlineplot.rq (run, edit)

#defaultView:LineChart
SELECT ?date ?numberOfCases WHERE {
  wd:Q86756826 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}

Which shows:

Progression in Italy

Of course, for Europeans the situation in Italy is burned into our memory. We just change the Q-identifier for The Netherlands into that of Italy:

SPARQL sparql/progressionIT.rq (run, edit)

SELECT ?date ?numberOfCases WHERE {
  wd:Q84104992 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY DESC(?date)

Progression in the U.S.A.

Currently, the total number of infected people is highest in the United States of America:

SPARQL sparql/progressionUS.rq (run, edit)

#defaultView:LineChart
SELECT ?date ?numberOfCases WHERE {
  wd:Q83873577 p:P1603 ?numberOfCasesStat .
  ?numberOfCasesStat ps:P1603 ?numberOfCases ;
                     pq:P585 ?date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY DESC(?date)

Which shows:

Graphed Regional progression

Cases

SPARQL sparql/graphCases.rq (run, edit)

#defaultView:LineChart
SELECT
?date ?cases
?country ?countryLabel
WHERE {
  ?item wdt:P31 wd:Q3241045.
  ?item wdt:P17 ?country.
  ?item p:P1603 ?casesStatement.
  ?casesStatement ps:P1603 ?cases.
  FILTER(?cases > 0)
  ?casesStatement pq:P585 ?date .
  { ?item wdt:P1269 wd:Q81068910. } UNION
  { ?item wdt:P361 wd:Q83741704. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY ASC(?countryLabel) DESC(?date) DESC(?cases)

This shows us:

Deaths

SPARQL sparql/graphDeaths.rq (run, edit)

#defaultView:LineChart
SELECT
?date ?deaths
?country ?countryLabel
WHERE {
  ?item wdt:P31 wd:Q3241045.
  ?item wdt:P17 ?country.
  ?item p:P1120 ?deathsStatement.
  ?deathsStatement ps:P1120 ?deaths.
  FILTER(?deaths > 0)
  ?deathsStatement pq:P585 ?date .
  { ?item wdt:P1269 wd:Q81068910. } UNION
  { ?item wdt:P361 wd:Q83741704. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY ASC(?countryLabel) DESC(?date) DESC(?deaths)