User:Fexpr/KeibaProject

From Wikidata
Jump to navigation Jump to search

The goal of this project is to import the data related to horse racing (particularly in Japan) into Wikidata.
I will provide this page with more information as the project goes.

Structure and properties[edit]

Breeder dataset[edit]

Completing the breeder (horse stud farm dataset) from Japanese Wikipedia, JBIS, Umanity, netkeiba

Basic:

  • Label: en, ja, id, fr, de
  • Description: en ("horse stud farm in...."), id ("peternakan kuda di....")
  • Also known as: fill with appropriate values (if any)

Statements:

Identifier:

Horse dataset[edit]

Completing the race horse dataset from Japanese Wikipedia, JBIS, Umanity, netkeiba

Basic:

  • Label: en, ja, id, fr, de
  • Description: en ("Japanese Thoroughbred race horse...."), id ("kuda pacu ....")
  • Also known as: fill with appropriate values (if any)

SPARQL Query[edit]

List of horse stud farms in Japan[edit]

#List of all horse stud farms in Japan
SELECT DISTINCT ?stud ?studLabel ?studDescription ?studLabel_ja ?website ?locationLabel
WHERE {
	?stud wdt:P31/wdt:P279* wd:Q108696 ;
		wdt:P17 wd:Q17
	OPTIONAL {
		?stud rdfs:label ?studLabel_ja filter (lang(?studLabel_ja) = "ja")
	}
    OPTIONAL {
		?stud wdt:P856 ?website
	}
    OPTIONAL {
		?stud wdt:P276 ?location
	}
	SERVICE wikibase:label {
		bd:serviceParam wikibase:language "en,ja" .
	}
}


Try it!

Show the location of horse stud farms in Japan, with its information[edit]

#Locations of horse stud farm all over Japan
#defaultView:Map
SELECT ?stud ?studLabel ?studDescription ?studLabel_ja ?countryLabel ?website ?coord ?article
WHERE {
	?stud wdt:P31/wdt:P279* wd:Q108696 ;
		wdt:P17 wd:Q17
	OPTIONAL {
		?stud rdfs:label ?studLabel_ja filter (lang(?studLabel_ja) = "ja")
	}
    OPTIONAL {
		?article schema:about ?stud .
        ?article schema:isPartOf <https://ja.wikipedia.org/>.
	}
    OPTIONAL {
		?stud wdt:P856 ?website
	}
    OPTIONAL {
		?stud wdt:P625 ?coord
	}
	SERVICE wikibase:label {
		bd:serviceParam wikibase:language "en,ja" .
	}
}

Try it!