FactGrid:Sample queries: Difference between revisions

From FactGrid
Jump to navigation Jump to search
Line 82: Line 82:


== Filters ==
== Filters ==
* [https://database.factgrid.de/query/#SELECT%20%3Fperson%20%3FpersonLabel%20%3Fdob%0AWHERE%0A%7B%0A%20%20%3Fperson%20wdt%3AP2%20wd%3AQ7%3B%0A%20%20%20%20%20%20%20%20%20%20wdt%3AP77%20%3Fdob.%0A%20%20FILTER%28%221700-01-01%22%5E%5Exsd%3AdateTime%20%3C%3D%20%3Fdob%20%26%26%20%3Fdob%20%3C%20%221710-01-01%22%5E%5Exsd%3AdateTime%29.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%20%0A%7D all FactGrid people born between 1700 and 1710]
* [https://database.factgrid.de/query/#SELECT%20%3Fperson%20%3FpersonLabel%20%3Fdob%0AWHERE%0A%7B%0A%20%20%3Fperson%20wdt%3AP2%20wd%3AQ7%3B%0A%20%20%20%20%20%20%20%20%20%20wdt%3AP77%20%3Fdob.%0A%20%20FILTER%28%221700-01-01%22%5E%5Exsd%3AdateTime%20%3C%3D%20%3Fdob%20%26%26%20%3Fdob%20%3C%20%221710-01-01%22%5E%5Exsd%3AdateTime%29.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%20%0A%7D all FactGrid people born between 1700 and 1710] A Filter that selects a time frame
* [https://database.factgrid.de/query/#SELECT%20%3FPers%20%3FPersLabel%20%3FPrefecture%20%3FPrefectureLabel%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3FPers%20wdt%3AP91%20wd%3AQ10679.%0A%20%20%20%20OPTIONAL%20%7B%20%3FPers%20%28p%3AP91%2Fpq%3AP419%29%20%3FPrefecture.%20%7D%0A%20%20%20%20FILTER%28%3FPrefecture%20IN%28wd%3AQ251652%29%20%29.%0A%7D All members of the strict Observance in Frankfurt's Prefecture]
* [https://database.factgrid.de/query/#SELECT%20%3FPers%20%3FPersLabel%20%3FPrefecture%20%3FPrefectureLabel%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3FPers%20wdt%3AP91%20wd%3AQ10679.%0A%20%20%20%20OPTIONAL%20%7B%20%3FPers%20%28p%3AP91%2Fpq%3AP419%29%20%3FPrefecture.%20%7D%0A%20%20%20%20FILTER%28%3FPrefecture%20IN%28wd%3AQ251652%29%20%29.%0A%7D All members of the strict Observance in Frankfurt's Prefecture] A Filter that selects an Item in a qualifying statement


== Wishful thinking ==
== Wishful thinking ==
* A map of all places a Person has been, using (also) the information from sender's and receiver's places
* A map of all places a Person has been, using (also) the information from sender's and receiver's places
* [https://phabricator.wikimedia.org/T165473 visualisations quest on phabricator]
* [https://phabricator.wikimedia.org/T165473 visualisations quest on phabricator]

Revision as of 12:18, 10 November 2021

Help:



Looking for people

  • Search all people of the same family name, sort by given names, state everyone with information about life dates and family details. Table
  • Name of people who ever were a residents of place with basic personal information. Table

Looking for documents

  • All documents written by N.N. with corresponding documents. Table
  • All documents sent to N.N. with corresponding documents. Table
  • All documents mentioning N.N. with corresponding documents. Table
  • All documents of a file listed in sequence. Table
  • All documents sent from (place) by date. Table
  • All documents of a specific archive and research interest by date. Table

Maps

Dots

All documents of a specific research interest where from? Map

All persons of a certain profession in a town Map

Lines

Tables

  • no functional query yet, but a first attempt is here, modeled after the "academic tree" graph in Scholia's author aspect

Graphs

Timelines

Bubble Charts

Grammatically intricate searches

Looking for a statement - give it with all the qualifying statements

This search is especially useful if the data model needs to be changed. It searches the database for a particular statement and gives all the instances with the respective qualifying sub-statements:

SELECT * WHERE {
  ?s wdt:P2 wd:Q7.
  ?s p:P266 ?st. # ?s is the the statement node
  ?st ps:P266 ?o. # that simulates the predicate
  ?st ?qualifier ?value. # this is an attribute (a qualifier)
}

Filters

Wishful thinking