WDscholia / scholia

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

Update event_co-authors.sparql #2380

Closed LibrErli closed 3 months ago

LibrErli commented 8 months ago

Especially for events we should extend the co-author graph with people detected from presentation-items realted to the event. The German library conference #vbib is traditionally fully catalogued in Wikidata. If we extend the SPARQL query as proposed in this commit it will not be further necessary to add also all speakers directyl in the event item.

Current scholia-page of #vBIB23: https://scholia.toolforge.org/event/Q120378280

Co-Graph with my commit for #vBIB23: https://query.wikidata.org/#%23%20tool%3A%20scholia%0A%23defaultView%3AGraph%0A%0APREFIX%20target%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ120378280%3E%0A%0ASELECT%20%0A%20%20%3Fauthor1%20%3Fauthor1Label%20%28SAMPLE%28%3Fimage1_%29%20AS%20%3Fimage1%29%20%3Frgb%0A%20%20%3Fauthor2%20%3Fauthor2Label%20%28SAMPLE%28%3Fimage2_%29%20AS%20%3Fimage2%29%0AWITH%20%7B%0A%20%20SELECT%0A%20%20%20%20%3Fauthor1%0A%20%20%20%20%28SAMPLE%28%3Fdark_rgb_%29%20AS%20%3Fdark_rgb%29%0A%20%20%20%20%28SAMPLE%28%3Flight_rgb_%29%20AS%20%3Flight_rgb%29%0A%20%20WHERE%20%7B%0A%20%20%20%20%23%20Find%20people%20at%20the%20event%0A%20%20%20%20%7B%20%0A%20%20%20%20%20%20target%3A%20%28wdt%3AP823%20%7C%20wdt%3AP664%20%7C%20%5Ewdt%3AP1344%20%7C%20wdt%3AP710%29%20%3Fauthor1%20.%0A%20%20%20%20%20%20BIND%20%28%22EEEEEE%22%20AS%20%3Fdark_rgb_%29%0A%20%20%20%20%7D%0A%20%20%20%20UNION%20%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%23%20author%20of%20article%20in%20proceedings%2C%20or%20program%20committee%20member%0A%20%20%20%20%20%20target%3A%20%20%28%5Ewdt%3AP4745%20%2F%20%5Ewdt%3AP1433%20%2F%20wdt%3AP50%29%20%7C%20wdt%3AP5804%20%3Fauthor1%20.%0A%20%20%20%20%20%20BIND%20%28%22FFFFFF%22%20AS%20%3Flight_rgb_%29%0A%20%20%20%20%7D%0A%20%20%20%20UNION%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%23%20author%20of%20article%20in%20proceedings%2C%20or%20program%20committee%20member%0A%20%20%20%20%20%20%3Fpresentation%20wdt%3AP823%20%3Fauthor1%3B%0A%20%20%20%20%20%20wdt%3AP5072%20target%3A%0A%20%20%20%20%20%20BIND%20%28%22FFFFFF%22%20AS%20%3Flight_rgb_%29%0A%20%20%20%7D%0A%20%20%7D%0A%20%20GROUP%20BY%20%3Fauthor1%0A%7D%20AS%20%25authors%0AWITH%20%7B%0A%20%20SELECT%20DISTINCT%20%3Fauthor1%20%3Fauthor2%20%3Frgb%20WHERE%20%7B%0A%20%20%20%20INCLUDE%20%25authors%0A%20%20%20%20%7B%20%20%20%20%20%20%20%20%0A%20%20%20%20target%3A%20%28wdt%3AP823%20%7C%20wdt%3AP664%20%7C%20%5Ewdt%3AP1344%20%7C%20wdt%3AP710%20%7C%20%5Ewdt%3AP4745%20%2F%20%5Ewdt%3AP1433%20%2F%20wdt%3AP50%29%20%20%3Fauthor2%20.%7D%0A%20%20%20%20UNION%0A%20%20%20%20%7B%20%3Fpresentation%20wdt%3AP823%20%3Fauthor2%3B%20wdt%3AP5072%20target%3A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%23%20Find%20co-authors%0A%20%20%20%20%3Fwork%20wdt%3AP50%20%3Fauthor1%20%2C%20%3Fauthor2%20.%0A%20%20%20%20FILTER%20%28%3Fauthor1%20%21%3D%20%3Fauthor2%29%0A%0A%20%20%20%20BIND%28COALESCE%28%3Fdark_rgb%2C%20%3Flight_rgb%29%20AS%20%3Frgb%29%0A%20%20%7D%0A%7D%20AS%20%25result%0AWHERE%20%7B%0A%20%20INCLUDE%20%25result%0A%20%20%20%20%0A%20%20OPTIONAL%20%7B%20%3Fauthor1%20wdt%3AP18%20%3Fimage1_%20.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fauthor2%20wdt%3AP18%20%3Fimage2_%20.%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%2Cda%2Cde%2Ces%2Cfr%2Cjp%2Cnl%2Cno%2Csv%2Cru%2Czh%22.%0A%20%20%7D%0A%7D%0AGROUP%20BY%20%3Fauthor1%20%3Fauthor1Label%20%3Frgb%20%3Fauthor2%20%3Fauthor2Label%20%20

Fixes # (issue number, if applicable)

Description

Please include a summary of the change, relevant motivation and context. If possible and applicable, include before and after screenshots and a URL where the changes can be seen.

Caveats

Please list anything which has been left out of this PR or which should be considered before this PR is accepted Check any of the following which apply:

If you make changes to the Python code

Testing

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. Please also list any relevant details for your test configuration.

Checklist