Difference between revisions of "Wikidata"
Jump to navigation
Jump to search
(→Import) |
(→Import) |
||
Line 173: | Line 173: | ||
* https://github.com/maxlath/wikidata-cli | * https://github.com/maxlath/wikidata-cli | ||
* https://www.wikidata.org/wiki/Wikidata:Tools/External_tools | * https://www.wikidata.org/wiki/Wikidata:Tools/External_tools | ||
+ | == Virtuoso Import == | ||
+ | * http://wikidata.demo.openlinksw.com/sparql -- SPARQL endpoint | ||
+ | * http://wikidata.demo.openlinksw.com/fct -- Faceted Browsing Interface | ||
+ | * https://wikidata.demo.openlinksw.com/describe/?url=http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ60&gp=16&go=&lp=940&invfp=IFP_OFF&sas=SAME_AS_OFF&distinct=1 | ||
+ | |||
= Ontology = | = Ontology = | ||
* https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Wikibase/+/master/docs/ontology.owl | * https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Wikibase/+/master/docs/ontology.owl |
Revision as of 10:24, 29 August 2019
The Genesis of WikiData
Links
Structure
see also https://addshore.com/2018/12/wikidata-architecture-overview-diagrams/ https://www.mediawiki.org/wiki/Wikibase/DataModel/Primer
https://upload.wikimedia.org/wikipedia/commons/c/c2/Wikibase_JavaScript_Data_Model_1.0.svg
Example
Æthelstan King of the English - 927-939
Position Held
Queen Victoria
- https://en.wikipedia.org/wiki/Queen_Victoria
- https://www.wikidata.org/wiki/Q9439
- http://royal-family.bitplan.com/index.php/Queen_Victoria
Entity:Queen Victoria
Statements | |
---|---|
PropertyId/name | value |
P18/image | |
P569/date of birth | 24 May 1819 |
P39/position held | Q9134365/Monarch of the United Kingdom qualifiers -> start:20 June 1837, end:22 January 1901, replaced by:https://www.wikidata.org/wiki/Q20875 |
P570/date of death | 22 January 1901 |
P20/place of death | Osborne House |
P21/sex or gender] | Q6581072/female |
Descendants of Queen Victoria
# WikiData SPARQL Query
#
# Wolfgang Fahl 2018-01-06
#
# get childen of queen victoria
SELECT ?child ?childLabel ?genderLabel ?dob
WHERE {
#
# child
# https://www.wikidata.org/wiki/Property:P40
# Queen Victoria
# https://www.wikidata.org/wiki/Q9439
wd:Q9439 wdt:P40+ ?child.
# gender
# https://www.wikidata.org/wiki/Property:P21
?child wdt:P21 ?gender.
# date of birth
# https://www.wikidata.org/wiki/Property:P569
?child wdt:P569 ?dob
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?dob
How Triples are stored in WikiData
Regular triple
WikiData Example Queen Victoria's father
WikiData Example Queen Victoria's father (technically)
WikiData Example Queen Victoria's father (multiple languages)
Queen Victoria's father SPARQL Query
# WikiData SPARQL Query
#
# Wolfgang Fahl 2018-01-06
# see also https://stackoverflow.com/a/48341522/1497139
#
# get father of queen victoria
SELECT ?queenVictoria ?queenVictoriaLabel ?fatherProperty ?fatherPropertyLabel ?father ?fatherLabel
WHERE {
#
# father
# https://www.wikidata.org/wiki/Property:P42
# Queen Victoria
# https://www.wikidata.org/wiki/Q9439
VALUES (?queenVictoria) {(wd:Q9439)}
VALUES (?property) {(wdt:P22)}
?queenVictoria ?property ?father.
?fatherProperty wikibase:directClaim ?property
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
Import
- https://www.wikidata.org/wiki/Wikidata:Data_Import_Guide
- https://www.wikidata.org/wiki/Q2140665
- https://github.com/maxlath/wikidata-cli
- https://www.wikidata.org/wiki/Wikidata:Tools/External_tools
Virtuoso Import
- http://wikidata.demo.openlinksw.com/sparql -- SPARQL endpoint
- http://wikidata.demo.openlinksw.com/fct -- Faceted Browsing Interface
- https://wikidata.demo.openlinksw.com/describe/?url=http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ60&gp=16&go=&lp=940&invfp=IFP_OFF&sas=SAME_AS_OFF&distinct=1