WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
219 stars 78 forks source link

In work aspect, add query for Wikipedia articles citing the work #1092

Open Daniel-Mietchen opened 4 years ago

Daniel-Mietchen commented 4 years ago

Here is a prototype for Updated world map of the Köppen-Geiger climate classification (Q21030635):

SELECT 
  DISTINCT ?item ?itemLabel 
WHERE {
  {   
   SELECT ?item  WHERE {
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "search" .
      bd:serviceParam mwapi:gsrsearch "\"doi 10.5194/HESS-11-1633-2007\"" .
      bd:serviceParam mwapi:gsrlimit "max" .
      ?item wikibase:apiOutputItem mwapi:item .
    }
  } LIMIT 200
 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

The issue here is that the wikibase:mwapi service did not accept variables last time I checked (there is a Phabricator ticket for that somewhere, but I could not find it right now), so we would have to get the DOI (or perhaps other identifier) via Python or JavaScript and insert it into the query from there.

The same goes for changing the endpoint to another wiki.

Another test article: Age-specific mortality during the 1918 influenza pandemic: unravelling the mystery of high young adult mortality (Q30352787). More test data via Citations with identifiers in Wikipedia (Q51903355).

Daniel-Mietchen commented 4 years ago

Found the Phabricator ticket at https://phabricator.wikimedia.org/T171303 . At least for the endpoint, the issue has been solved.