Jump to content

Wikibase Sample Data: Difference between revisions

From HxmnWiki
Wikibase sample data page (auto-generated)
 
Wikibase sample data (auto-generated)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Wikibase Sample Data ==
== Wikibase Sample Data ==
This page displays sample data from [https://wd.hxmn.dev Wikibase (wd.hxmn.dev)].
Data fetched '''dynamically''' from [https://wd.hxmn.dev Wikibase] via SPARQL.
Tables are rendered by [[Module:Wikibase|Module:Wikibase]] (Lua), same pattern as Wikipedia.


=== Countries ===
=== Countries ===
{| class="wikitable sortable"
{{#invoke:Wikibase|countries}}
! Country !! Capital !! Population !! Founded !! Continent !! Wikibase Item
|-
| '''Germany''' || Berlin || 84,482,000 || 1871 || Europe || [https://wd.hxmn.dev/wiki/Item:Q7 Q7]
|-
| '''Japan''' || Tokyo || 125,124,000 || 660 BC || Asia || [https://wd.hxmn.dev/wiki/Item:Q8 Q8]
|-
| '''United States''' || Washington, D.C. || 331,449,000 || 1776 || North America || [https://wd.hxmn.dev/wiki/Item:Q9 Q9]
|-
| '''France''' || Paris || 67,750,000 || 843 || Europe || [https://wd.hxmn.dev/wiki/Item:Q10 Q10]
|}


=== Cities ===
=== Cities ===
{| class="wikitable sortable"
{{#invoke:Wikibase|cities}}
! City !! Country !! Population !! Founded !! Wikibase Item
|-
| '''Berlin''' || Germany || 3,748,000 || 1237 || [https://wd.hxmn.dev/wiki/Item:Q11 Q11]
|-
| '''Tokyo''' || Japan || 13,960,000 || 1457 || [https://wd.hxmn.dev/wiki/Item:Q12 Q12]
|-
| '''Washington, D.C.''' || United States || 689,545 || 1790 || [https://wd.hxmn.dev/wiki/Item:Q13 Q13]
|-
| '''Paris''' || France || 2,161,000 || 259 BC || [https://wd.hxmn.dev/wiki/Item:Q14 Q14]
|}


=== SPARQL Query ===
=== SPARQL Queries ===
You can run SPARQL queries against the Wikibase data at [https://wd.hxmn.dev/query/ WDQS Query Service].
Run queries at [https://wd.hxmn.dev/query/ WDQS Query Service].
 
Example query to get all countries with their capitals:
<pre>
SELECT ?country ?countryLabel ?capital ?capitalLabel ?population WHERE {
  ?country wdt:P1 wd:Q1 .
  ?country wdt:P5 ?capital .
  ?country wdt:P3 ?population .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?population)
</pre>


[[Category:Wikibase]]
[[Category:Wikibase]]

Latest revision as of 22:22, 4 April 2026

Wikibase Sample Data[edit]

Data fetched dynamically from Wikibase via SPARQL. Tables are rendered by Module:Wikibase (Lua), same pattern as Wikipedia.

Countries[edit]

Country Capital Population Founded Continent Wikibase
France Paris 67,750,000 843 Europe Q10
Germany Berlin 84,482,000 1871 Europe Q7
Japan Tokyo 125,124,000 660 BC Asia Q8
United States Washington, D.C. 331,449,000 1776 North America Q9

Cities[edit]

City Country Population Founded Wikibase
Berlin Germany 3,748,000 1237 Q11
Paris France 2,161,000 259 BC Q14
Tokyo Japan 13,960,000 1457 Q12
Washington, D.C. United States 689,545 1790 Q13

SPARQL Queries[edit]

Run queries at WDQS Query Service.