FactGrid:Sample queries: Difference between revisions
Jump to navigation
Jump to search
Olaf Simons (talk | contribs) (→Maps) |
Olaf Simons (talk | contribs) (→Maps) |
||
Line 32: | Line 32: | ||
== Maps == | == Maps == | ||
[[File:Illuminati correspondence, lines on maps.JPG|thumb|right| | [[File:Second-Mission-French-Prophets.JPG|thumb|right|300px|[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] | ||
[[File:Illuminati correspondence, lines on maps.JPG|thumb|right|300px|[https://database.factgrid.de/query/index.html?fbclid=IwAR29yqUCMsZsCD4caHaH475VCbMICGUUb8zdjrvQ_jDT87Nj5TQEycLDGqU&fbclid=IwAR1dIHXj94VuVG3w0RAps1QbjwFDoZ2ELfXdK61X1gptkyuR7WUZkkRWHkQ#%23defaultView%3AMap%7B%22hide%22%3A%5B%22%3Fline%22%5D%7D%0ASELECT%20%2a%20WHERE%20%7B%0A%20%20%3Fq%20wdt%3AP2%20wd%3AQ10671%20.%0A%20%20%3Fq%20wdt%3AP97%20wd%3AQ10677%20.%0A%20%20%3Fq%20wdt%3AP95%20%3Forigin%20.%0A%20%20%3Forigin%20wdt%3AP48%20%3FcoordO%20.%0A%20%20%3Forigin%20p%3AP48%2Fpsv%3AP48%20%3Fvaluenode1.%20%3Fvaluenode1%20wikibase%3AgeoLatitude%20%3Flat1%20.%20%3Fvaluenode1%20wikibase%3AgeoLongitude%20%3Flon1.%0A%20%20%3Fq%20p%3AP28%2Fpq%3AP29%20%3Fdest%20.%0A%20%20%3Fdest%20wdt%3AP48%20%3FcoordD%20.%0A%20%20%3Fdest%20p%3AP48%2Fpsv%3AP48%20%3Fvaluenode2.%20%3Fvaluenode2%20wikibase%3AgeoLatitude%20%3Flat2%20.%20%3Fvaluenode2%20wikibase%3AgeoLongitude%20%3Flon2.%0A%20%20BIND%28geof%3Adistance%28%3FcoordO%2C%20%3FcoordD%29%20AS%20%3Fdist%29.%0A%20%20BIND%28floor%28%3Fdist%2F100%29%20AS%20%3Flayer%29.%0A%20%20BIND%28CONCAT%28%27LINESTRING%20%28%27%2C%20STR%28%3Flon1%29%2C%20%27%20%27%2C%20STR%28%3Flat1%29%2C%20%27%2C%27%2C%20STR%28%3Flon2%29%2C%20%27%20%27%2C%20STR%28%3Flat2%29%2C%20%27%29%27%29%20AS%20%3Fstr%29%20.%0A%20%20BIND%28STRDT%28%3Fstr%2C%20geo%3AwktLiteral%29%20AS%20%3Fline%29%0A%7D The Illuminati correspondence on a map]]] | |||
=== Dots === | === Dots === | ||
All documents '''of a specific research interest where from?''' [https://database.factgrid.de/query/#%23defaultView%3AMap%0ASELECT%20%3Fitem%20%3FitemLabel%20%3FOrt%20%3FOrtLabel%20%3FGeokoordinaten%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%3Fitem%20wdt%3AP2%20wd%3AQ10671.%0A%20%20%3Fitem%20wdt%3AP95%20%3FOrt.%0A%20%20%3FOrt%20wdt%3AP48%20%3FGeokoordinaten.%0A%20%20%3Fitem%20wdt%3AP97%20wd%3AQ10677.%0A%7D Map] | All documents '''of a specific research interest where from?''' [https://database.factgrid.de/query/#%23defaultView%3AMap%0ASELECT%20%3Fitem%20%3FitemLabel%20%3FOrt%20%3FOrtLabel%20%3FGeokoordinaten%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%3Fitem%20wdt%3AP2%20wd%3AQ10671.%0A%20%20%3Fitem%20wdt%3AP95%20%3FOrt.%0A%20%20%3FOrt%20wdt%3AP48%20%3FGeokoordinaten.%0A%20%20%3Fitem%20wdt%3AP97%20wd%3AQ10677.%0A%7D Map] |
Revision as of 16:13, 31 January 2022
Help:
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help/Result_Views/en
- https://en.wikibooks.org/wiki/SPARQL/FILTER
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
- Two Persons, when and where did they meet timeline
- All people with a FactGrid account by gender
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
The search is intricate as it goes into related database objects and brings information located there into the table.
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
- all FactGrid people born between 1700 and 1710 A Filter that selects a time frame
- All members of the strict Observance in Frankfurt's Prefecture A Filter that selects an Item in a qualifying statement
Wishful thinking
- A map of all places a Person has been, using (also) the information from sender's and receiver's places
- visualisations quest on phabricator