Skip to content

Instantly share code, notes, and snippets.

@cm3
Last active March 24, 2022 10:18
Show Gist options
  • Save cm3/4dc56f9846e2f4827ac8e6366a81ad56 to your computer and use it in GitHub Desktop.
Save cm3/4dc56f9846e2f4827ac8e6366a81ad56 to your computer and use it in GitHub Desktop.
sample of normalized quantity in Wikidata

Q79934.ttl is extracted RDF from U.S. Route 66 - Wikidata

This .ttl file contains a graph below.

graph-draw

Wikidata model values as Quantity and it holds a normalized quantity eneity

model

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix wikibase: <http://wikiba.se/ontology#> .
@prefix wds: <http://www.wikidata.org/entity/statement/> .
@prefix wdv: <http://www.wikidata.org/value/> .
@prefix p: <http://www.wikidata.org/prop/> .
@prefix psv: </prop/statement/value/> .
@prefix psn: </prop/statement/value-normalized/> .
wd:Q79934 p:P2043 wds:Q79934-178b83ef-4103-6fdf-5512-b04d2d69aa0b.
wds:Q79934-178b83ef-4103-6fdf-5512-b04d2d69aa0b psn:P2043 wdv:d26ece0cd6a21050438bfbaf826993ad;
psv:P2043 wdv:6fbe2c821ef315fd0a416be42235a9ce.
wdv:d26ece0cd6a21050438bfbaf826993ad wikibase:quantityNormalized wdv:d26ece0cd6a21050438bfbaf826993ad;
rdf:type wikibase:QuantityValue;
wikibase:quantityAmount 3940000;
wikibase:quantityLowerBound 3938000;
wikibase:quantityUpperBound 3941000;
wikibase:quantityUnit wd:Q11573.
wdv:6fbe2c821ef315fd0a416be42235a9ce wikibase:quantityNormalized wdv:d26ece0cd6a21050438bfbaf826993ad;
rdf:type wikibase:QuantityValue;
wikibase:quantityAmount 2448;
wikibase:quantityLowerBound 2447;
wikibase:quantityUpperBound 2449;
wikibase:quantityUnit wd:Q253276.
wd:Q11573 rdfs:label "メートル"@ja.
wd:Q253276 rdfs:label "マイル"@ja.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment