FactGrid:Sample queries

From FactGrid
Revision as of 16:13, 31 January 2022 by Olaf Simons (talk | contribs) (→‎Maps)
Jump to navigation Jump to search

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

[https://database.factgrid.de/query/#%23defaultView%3AMap%0A%23defaultView%3AMap%7B%22hide%22%3A%5B%22%3Fpoint%22%2C%20%22%3Fline%22%5D%7D%0ASELECT%20%0A%20%20%3Ftime%20%3Fbegin_time%20%3FlocationLabel%20%3Fpoint%20%3Fline%20%0AWITH%20%7B%0A%20%20SELECT%20%3Fsubject%20%3Flocation%20%3Ftime%20%3Fbegin_time%20%3Fpoint%20%3Fpoint_str%20WHERE%20%7B%0A%20%20%20%20VALUES%20%3Fsubject%20%7B%20wd%3AQ257130%20%7D%20.%0A%20%20%20%20%3Fsubject%20p%3AP296%20%3Fwork_location_statement%20.%0A%20%20%20%20%3Fwork_location_statement%20ps%3AP296%20%3Flocation%20.%20%0A%20%20%20%20%3Flocation%20p%3AP48%20%2F%20ps%3AP48%20%3Fpoint%20.%0A%20%20%20%20%3Flocation%20p%3AP48%20%2F%20psv%3AP48%20%2F%20wikibase%3AgeoLatitude%20%3Flatitude%20.%0A%20%20%20%20%3Flocation%20p%3AP48%20%2F%20psv%3AP48%20%2F%20wikibase%3AgeoLongitude%20%3Flongitude%20.%0A%20%20%20%20%3Fwork_location_statement%20pq%3AP106%20%3Ftime%20.%20%0A%20%20%20%20OPTIONAL%20%7B%20%3Fwork_location_statement%20pq%3AP49%20%3Fbegin_time%20%7D%20.%0A%20%20%20%20BIND%28CONCAT%28STR%28%3Flongitude%29%2C%20%27%20%27%2C%20STR%28%3Flatitude%29%29%20AS%20%3Fpoint_str%29%0A%20%20%7D%0A%20%20ORDER%20BY%20%28%3Ftime%29%0A%7D%20AS%20%25points%0A%0AWITH%20%7B%0A%20%20SELECT%20%3Fsubject%20%28STRDT%28%20CONCAT%28%27LINESTRING%20%28%27%2C%20GROUP_CONCAT%28%3Fpoint_str%3B%20separator%3D%27%2C%27%29%2C%20%27%29%27%29%2C%20geo%3AwktLiteral%29%20AS%20%3Fline%29%20WHERE%20%7B%0A%20%20%20%20INCLUDE%20%25points%0A%20%20%7D%20GROUP%20BY%20%3Fsubject%0A%7D%20AS%20%25line%0A%0AWHERE%20%7B%0A%20%20INCLUDE%20%25points%0A%20%20INCLUDE%20%25line%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D Second mission of the French Prophets, 1 June 1712-1714

Dots

All documents of a specific research interest where from? Map

All persons of a certain profession in a town Merchants in Gotha / Poets in Paris

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

Statistics

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

Notes

  1. Adapted from here.