petermr / openVirus

aggregation of scholarly publications and extracted knowledge on viruses and epidemics.
The Unlicense
67 stars 17 forks source link

Gather publications from Wikidata item info #20

Open TS404 opened 4 years ago

TS404 commented 4 years ago

To ensure full coverage, also gather list of dois to crosscheck against other import datasets using Wikidata queries (e.g. 'MESH' P486 and 'main property' P921).

link in Wikidata WikiProject COVID-19

serenasignorelli commented 4 years ago

I adapted the queries from the suggested link to get also the DOIs. Here they are:

SELECT DISTINCT ?item ?itemLabel ?pdate ?DOI { VALUES ?topics { wd:Q82069695 wd:Q84263196 wd:Q81068910 } ?item wdt:P31 wd:Q13442814. ?item wdt:P921 ?topics. OPTIONAL { ?item wdt:P577 ?pdate } OPTIONAL { ?item wdt:P356 ?DOI } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . }

SELECT ?item ?title ?topicLabel ?taxonLabel ?DOI { VALUES ?topic { wd:Q908902 wd:Q7202 } ?item p:P921 [ ps:P921 ?topic; pq:P642 ?taxon ]. ?taxon wdt:P171 wd:Q278567. ?item wdt:P1476 ?title. ?item wdt:P356 ?DOI. SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . }

(sorry I've never worked on wikidata project, so I was not sure whether I may modify the project or not..)

TS404 commented 4 years ago

Thanks @serenasignorelli. I only just saw this response. Very useful queries. I'll add them into the [R] script as I refactor it up as a package and tidier functions over the coming week.