InvasionBiologyHypotheses / Documentation

Documentation related to building an open, zoomable atlas for invasion science and beyond
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Write Wikidata query to provide bibliographic metadata in Dublin Core format #39

Open Daniel-Mietchen opened 2 years ago

Daniel-Mietchen commented 2 years ago

This builds on

Daniel-Mietchen commented 2 years ago

The main idea here is to query Wikidata for the information pertaining to all the Dublin Core fields we need, and then to do the file conversion via an external script. We could, however, look into doing it all in SPARQL.

Daniel-Mietchen commented 2 years ago

A first version of that query now exists%20wd%3AQ30939938.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20schema%3AdateModified%20%3FentryUpdatedDate%20%3B%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%2Cen%22.%20%7D%0A%7D%0AGROUP%20BY%20%3Fitem%20%3FitemLabel%20%3Flicense%20%3FlicenseLabel%20%3FentryUpdatedDate%0AORDER%20BY%20(%3Fitem)) in https://github.com/InvasionBiologyHypotheses/enKORE-corpus-processor/blob/main/.github/workflows/flat.yml :

SELECT DISTINCT ?item ?itemLabel ?license ?licenseLabel ?entryUpdatedDate WHERE {
  ?item wdt:P5008 wd:Q56241615;
    wdt:P275 ?license.
  ?license ((wdt:P31*)/(wdt:P279*)) wd:Q30939938.
  OPTIONAL { ?item schema:dateModified ?entryUpdatedDate ; }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
GROUP BY ?item ?itemLabel ?license ?licenseLabel ?entryUpdatedDate
ORDER BY (?item)