User:Daniel/Queries/Federated: Difference between revisions

From MaRDI portal
Line 27: Line 27:
* [https://query.portal.mardi4nfdi.de/#PREFIX%20osmnode%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F%3E%0APREFIX%20osmway%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fway%2F%3E%0APREFIX%20osmrel%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Frelation%2F%3E%0APREFIX%20osmt%3A%20%3Chttps%3A%2F%2Fwiki.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20osmm%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fmeta%2F%3E%0APREFIX%20pageviews%3A%20%3Chttps%3A%2F%2Fdumps.wikimedia.org%2Fother%2Fpageviews%2F%3E%0APREFIX%20osmd%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fentity%2F%3E%0APREFIX%20osmdt%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20osmp%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2F%3E%0APREFIX%20osmps%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20osmpq%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fqualifier%2F%3E%0A%0ASELECT%20%2a%20WHERE%20%7B%0A%23%20%20%20wd%3AQ72365%20wdt%3AP12%20%3Fwd%20.%0A%23%20%20%20BIND%28wd%3AQ72365%20as%20%3Fwd%29%0A%20%20SERVICE%20%3Chttps%3A%2F%2Fsophox.org%2Fsparql%3E%20%7B%0A%23%20A%20sample%20query%20to%20list%20all%20OSM%20objects%20with%20a%20place%20tag.%0A%23%20The%20%2a%20will%20show%20all%20variables%20that%20are%20used%20in%20the%20WHERE%20clause%0Aselect%20%2a%20where%20%7B%0A%20%20%23%20The%20first%20expression%20matches%20the%20three%20columns%20of%20the%20Triple%20Store%20with%3A%0A%20%20%23%20%20%20%22find%20any%20subject%20that%20has%20an%20OSM%20%27place%27%20tag%2C%20and%20any%20value%20of%20that%20tag%22%0A%20%20%23%0A%20%20%23%20Question%20mark%20represents%20a%20variable.%20%3Fosm%20becomes%20a%20URI%20for%20an%20OSM%20object%2C%20e.g.%0A%20%20%23%20%20%20%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F2681940767%3E%20%20%28Everest%29%0A%20%20%23%20The%20same%20URI%20may%20also%20be%20written%20with%20a%20prefix%20-%20osmnode%3A2681940767%0A%20%20%23%20All%20OSM%20tags%20use%20osmt%3A%20prefix.%20Using%20osmt%3Aplace%20constant%20only%0A%20%20%23%20matches%20OSM%20object%20with%20a%20place%20tag.%20The%20%3Fplace%20variable%20will%0A%20%20%23%20become%20the%20value%20of%20the%20place%20tag.%20You%20can%20use%20a%20constant%20instead%20of%20a%20variable%2C%0A%20%20%23%20e.g.%20substitute%20%3Fplace%20with%20a%20constant%20string%20%27city%27.%0A%0A%20%20%3Fosm%20osmt%3Aplace%20%3Fplace.%0A%0A%20%20%23%20osmm%3A%20prefix%20means%20%22meta%20values%22%2C%20e.g.%20OSM%20object%20type%2C%20location%20%28loc%29%2C%20version%2C%20...%0A%20%20%23%20Uncomment%20to%20limit%20to%20a%20specific%20type%20of%20an%20OSM%20object%20%28%27n%27%2C%20%27r%27%2C%20%27w%27%29.%0A%20%20%23%20%20%20%3Fosm%20osmm%3Atype%20%27r%27.%0A%0A%20%20%23%20osmm%3Aloc%20is%20a%20centroid%20point%20for%20most%20OSM%20objects.%20If%20included%2C%20the%20results%0A%20%20%23%20can%20be%20shown%20on%20a%20map%20by%20switching%20to%20the%20map%20view%20%28right%20under%20the%20query%29%0A%20%20%23%20%20%20%3Fosm%20osmm%3Aloc%20%3Fcoordinates.%0A%0A%20%20%23%20The%20FILTER%20expressions%20allow%20complex%20filtering%20beyond%20a%20simple%20%22must%20match%22.%0A%20%20%23%20%20%20filter%28%3Fplace%20%3D%20%27town%27%20%7C%7C%20regex%28%3Fplace%2C%20%27%5Ba-z%5D%5B0-9%5D%27%2C%20%27i%27%29%29%0A%0A%20%20%23%20This%20will%20limit%20results%20to%20places%20which%20do%20not%20have%20a%20%60name%3Aen%60%20tag.%0A%20%20%23%20%20%20filter%20not%20exists%20%7B%20%3Fosm%20osmt%3Aname%3Aen%20%3Fnameen.%20%7D%0A%0A%20%20%23%20For%20OSM%20objects%20with%20the%20wikidata%20tag%2C%20find%20the%20English%20name%20of%20that%20object%20in%20Wikidata%0A%20%20%23%20if%20it%20exists.%0A%20%20%20%20%20%3Fosm%20osmt%3Awikidata%20%3Fwd.%0A%20%20%23%20With%20that%20get%20from%20the%20Wikidata%20SPARQL%20endpoint%20service%20what%20type%20of%20the%20object%20it%0A%20%20%23%20is%20%28P31%20is%20the%20property%20instance%20of%20in%20Wikidata%29%2C%20and%20the%20label%20for%20that%20type%2C%0A%20%20%23%20also%20if%20exists%20in%20English.%20For%20labels%20and%20descriptions%2C%20you%20may%20instead%20use%20a%0A%20%20%23%20service%20that%20picks%20first%20available%20language%20based%20on%20a%20list.%0A%20%20%23%20%20%20service%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%23%20%20%20%20%20%3Fwd%20wdt%3AP31%20%3Ftype.%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Fwd%20rdfs%3Alabel%20%3Flabel.%20filter%28lang%28%3Flabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Ftype%20rdfs%3Alabel%20%3Ftypelabel.%20filter%28lang%28%3Ftypelabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%7D%0A%7D%0A%23%20Similar%20to%20SQL%2C%20queries%20can%20use%20aggregations%2C%20subqueries%2C%20and%20limit%20the%20results%0Alimit%2010%20%20%7D%0A%7D%0A places]
* [https://query.portal.mardi4nfdi.de/#PREFIX%20osmnode%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F%3E%0APREFIX%20osmway%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fway%2F%3E%0APREFIX%20osmrel%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Frelation%2F%3E%0APREFIX%20osmt%3A%20%3Chttps%3A%2F%2Fwiki.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20osmm%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fmeta%2F%3E%0APREFIX%20pageviews%3A%20%3Chttps%3A%2F%2Fdumps.wikimedia.org%2Fother%2Fpageviews%2F%3E%0APREFIX%20osmd%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fentity%2F%3E%0APREFIX%20osmdt%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20osmp%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2F%3E%0APREFIX%20osmps%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20osmpq%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fqualifier%2F%3E%0A%0ASELECT%20%2a%20WHERE%20%7B%0A%23%20%20%20wd%3AQ72365%20wdt%3AP12%20%3Fwd%20.%0A%23%20%20%20BIND%28wd%3AQ72365%20as%20%3Fwd%29%0A%20%20SERVICE%20%3Chttps%3A%2F%2Fsophox.org%2Fsparql%3E%20%7B%0A%23%20A%20sample%20query%20to%20list%20all%20OSM%20objects%20with%20a%20place%20tag.%0A%23%20The%20%2a%20will%20show%20all%20variables%20that%20are%20used%20in%20the%20WHERE%20clause%0Aselect%20%2a%20where%20%7B%0A%20%20%23%20The%20first%20expression%20matches%20the%20three%20columns%20of%20the%20Triple%20Store%20with%3A%0A%20%20%23%20%20%20%22find%20any%20subject%20that%20has%20an%20OSM%20%27place%27%20tag%2C%20and%20any%20value%20of%20that%20tag%22%0A%20%20%23%0A%20%20%23%20Question%20mark%20represents%20a%20variable.%20%3Fosm%20becomes%20a%20URI%20for%20an%20OSM%20object%2C%20e.g.%0A%20%20%23%20%20%20%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F2681940767%3E%20%20%28Everest%29%0A%20%20%23%20The%20same%20URI%20may%20also%20be%20written%20with%20a%20prefix%20-%20osmnode%3A2681940767%0A%20%20%23%20All%20OSM%20tags%20use%20osmt%3A%20prefix.%20Using%20osmt%3Aplace%20constant%20only%0A%20%20%23%20matches%20OSM%20object%20with%20a%20place%20tag.%20The%20%3Fplace%20variable%20will%0A%20%20%23%20become%20the%20value%20of%20the%20place%20tag.%20You%20can%20use%20a%20constant%20instead%20of%20a%20variable%2C%0A%20%20%23%20e.g.%20substitute%20%3Fplace%20with%20a%20constant%20string%20%27city%27.%0A%0A%20%20%3Fosm%20osmt%3Aplace%20%3Fplace.%0A%0A%20%20%23%20osmm%3A%20prefix%20means%20%22meta%20values%22%2C%20e.g.%20OSM%20object%20type%2C%20location%20%28loc%29%2C%20version%2C%20...%0A%20%20%23%20Uncomment%20to%20limit%20to%20a%20specific%20type%20of%20an%20OSM%20object%20%28%27n%27%2C%20%27r%27%2C%20%27w%27%29.%0A%20%20%23%20%20%20%3Fosm%20osmm%3Atype%20%27r%27.%0A%0A%20%20%23%20osmm%3Aloc%20is%20a%20centroid%20point%20for%20most%20OSM%20objects.%20If%20included%2C%20the%20results%0A%20%20%23%20can%20be%20shown%20on%20a%20map%20by%20switching%20to%20the%20map%20view%20%28right%20under%20the%20query%29%0A%20%20%23%20%20%20%3Fosm%20osmm%3Aloc%20%3Fcoordinates.%0A%0A%20%20%23%20The%20FILTER%20expressions%20allow%20complex%20filtering%20beyond%20a%20simple%20%22must%20match%22.%0A%20%20%23%20%20%20filter%28%3Fplace%20%3D%20%27town%27%20%7C%7C%20regex%28%3Fplace%2C%20%27%5Ba-z%5D%5B0-9%5D%27%2C%20%27i%27%29%29%0A%0A%20%20%23%20This%20will%20limit%20results%20to%20places%20which%20do%20not%20have%20a%20%60name%3Aen%60%20tag.%0A%20%20%23%20%20%20filter%20not%20exists%20%7B%20%3Fosm%20osmt%3Aname%3Aen%20%3Fnameen.%20%7D%0A%0A%20%20%23%20For%20OSM%20objects%20with%20the%20wikidata%20tag%2C%20find%20the%20English%20name%20of%20that%20object%20in%20Wikidata%0A%20%20%23%20if%20it%20exists.%0A%20%20%20%20%20%3Fosm%20osmt%3Awikidata%20%3Fwd.%0A%20%20%23%20With%20that%20get%20from%20the%20Wikidata%20SPARQL%20endpoint%20service%20what%20type%20of%20the%20object%20it%0A%20%20%23%20is%20%28P31%20is%20the%20property%20instance%20of%20in%20Wikidata%29%2C%20and%20the%20label%20for%20that%20type%2C%0A%20%20%23%20also%20if%20exists%20in%20English.%20For%20labels%20and%20descriptions%2C%20you%20may%20instead%20use%20a%0A%20%20%23%20service%20that%20picks%20first%20available%20language%20based%20on%20a%20list.%0A%20%20%23%20%20%20service%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%23%20%20%20%20%20%3Fwd%20wdt%3AP31%20%3Ftype.%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Fwd%20rdfs%3Alabel%20%3Flabel.%20filter%28lang%28%3Flabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Ftype%20rdfs%3Alabel%20%3Ftypelabel.%20filter%28lang%28%3Ftypelabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%7D%0A%7D%0A%23%20Similar%20to%20SQL%2C%20queries%20can%20use%20aggregations%2C%20subqueries%2C%20and%20limit%20the%20results%0Alimit%2010%20%20%7D%0A%7D%0A places]


== FAIRJupyter and MaRDI ==
== FAIRJupyter and MaRDI portal ==


* [https://reproduceme.uni-jena.de/#/dataset/fairjupyter/query?query=PREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20mardi_wd%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fentity%2F%3E%0APREFIX%20mardi_wdt%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fprop%2Fdirect%2F%3E%0A%0APREFIX%20bd%3A%20%3Chttp%3A%2F%2Fwww.bigdata.com%2Frdf%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0A%0ASELECT%20DISTINCT%20%3Ftitle%20%3Fdoi%20%3Fmethod%20%3FmethodLabel%0A%0AWHERE%20%7B%0A%20%20%3Ffj_article%20%3Chttps%3A%2F%2Fw3id.org%2Freproduceme%2Fdoi%3E%20%3Fdoi%20.%0A%0A%20%20service%20%3Chttp%3A%2F%2Fquery.portal.mardi4nfdi.de%2Fproxy%2Fwdqs%2Fbigdata%2Fnamespace%2Fwdq%2Fsparql%3E%20%7B%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP27%20%3Fdoi%20.%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP159%20%3Ftitle%20.%0A%20%20%20%20%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP1463%20%3Fmethod%20.%0A%20%20%20%20%3Fmethod%20rdfs%3Alabel%20%3FmethodLabel%20.%0A%20%20%7D%0A%0A%7D%0ALIMIT%201000%0A Match articles between FAIR Jupyter and MaRDI via DOI and get co-used software]
* [https://reproduceme.uni-jena.de/#/dataset/fairjupyter/query?query=PREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20mardi_wd%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fentity%2F%3E%0APREFIX%20mardi_wdt%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fprop%2Fdirect%2F%3E%0A%0APREFIX%20bd%3A%20%3Chttp%3A%2F%2Fwww.bigdata.com%2Frdf%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0A%0ASELECT%20DISTINCT%20%3Ftitle%20%3Fdoi%20%3Fmethod%20%3FmethodLabel%0A%0AWHERE%20%7B%0A%20%20%3Ffj_article%20%3Chttps%3A%2F%2Fw3id.org%2Freproduceme%2Fdoi%3E%20%3Fdoi%20.%0A%0A%20%20service%20%3Chttp%3A%2F%2Fquery.portal.mardi4nfdi.de%2Fproxy%2Fwdqs%2Fbigdata%2Fnamespace%2Fwdq%2Fsparql%3E%20%7B%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP27%20%3Fdoi%20.%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP159%20%3Ftitle%20.%0A%20%20%20%20%0A%20%20%20%20%3Fmardi_paper%20mardi_wdt%3AP1463%20%3Fmethod%20.%0A%20%20%20%20%3Fmethod%20rdfs%3Alabel%20%3FmethodLabel%20.%0A%20%20%7D%0A%0A%7D%0ALIMIT%201000%0A Match articles between FAIR Jupyter and MaRDI via DOI and get co-used software]

Revision as of 01:28, 12 November 2024

MaRDI portal and MathAlgodDB

MaRDI portal and Wikidata

MaRDI portal and FactGrid

FAQ

  • Shall there be a "MaRDI item ID"/ "MaRDI property ID"/ "MaRDI entity ID" on FactGrid?
  • Which MaRDI items should get a FactGrid ID?
    • How many would that be?
  • What properties can be used to mediate between MaRDI and FactGrid?
    • Wikidata ID
    • zbMATH author ID
  • Should FactGrid-based information be included in MaRDI profiles?
  • What about using sitelinks rather than external identifiers for mapping to other Wikibase instances? (example: Wilhelm Friedrich Ostwald in MaRDI (which maps to Wikidata via external ID) and in FactGrid (which uses sitelinks)
  • What about magic links to other Wikibase instances, e.g. something like factgrid:Item:Q865262 for https://database.factgrid.de/wiki/Item:Q865262?

MaRDI portal and OpenStreetMap

FAIRJupyter and MaRDI portal

Wikidata and LinkedGeoData

Wikidata and OpenStreetMap

Wikidata and WikiPathways

See also