User:Toni 001

From Wikidata
Jump to navigation Jump to search
Babel user information
de-N Dieser Benutzer spricht Deutsch als Muttersprache.
es-3 Este usuario tiene un conocimiento avanzado del español.
en-4 This user has near native speaker knowledge of English.
hu-1 Ez a szerkesztő alapszinten beszéli a magyar nyelvet.
fr-2 Cet utilisateur dispose de connaissances intermédiaires en français.
Wikidata Task Force Physics No Text.svgThis user is a member of
WikiProject Physics.
Wikidata-wikiproject-ontology.pngThis user is a member of
WikiProject Ontology
Users by language

Ich bin Toni.

Soy Toni.

I am Toni.

Conflict of interest[edit]

Wikimedia has guides about conflict of interest and paid editing. Wikidata does not have strict policies but suggests to use common sense. Here is my statement:

I work at Wolfram Research (Q1367937).

This is my personal account and I do all my edits because I want to. I'm not being paid. At Wolfram, I work on semantic web technologies. If I come across missing or wrong data during my work time (I define that as being logged into my computer with my work account), say, while preparing examples for a talk or blog post, then I might improve the data. Overall, the number of edits I make during work time is negligible compared to all my edits.

Quantities and Units[edit]

Motivation[edit]

Quantities and units are part of the language of science.

  • By providing a Wikidata item (Q-number) for each quantity and unit ever used we facilitate unambiguous communication in science.
  • By providing labels and descriptions for each item in each language we help people to talk about science across language barriers.

Localization[edit]

Number of Quantity-Labels per Language[edit]

#defaultView:BubbleChart
select ?lang (count(*) as ?count) where {
  ?item wdt:P7431 [] .
  ?item rdfs:label ?label .
} group by (lang(?label) as ?lang)

Try it!

Translation of Quantity Labels and Descriptions[edit]

select * where {
  ?item wdt:P7431 [] . # having a WL quantity ID
  # language 1:
  optional { ?item rdfs:label ?label1 . filter (lang(?label1) = "de") }
  optional { ?item schema:description ?desc1 . filter (lang(?desc1) = "de") }
  # language 2:
  optional { ?item rdfs:label ?label2 . filter (lang(?label2) = "en") }
  optional { ?item schema:description ?desc2 . filter (lang(?desc2) = "en") }
}

Try it!

Basic Quantities, Units and Prefixes[edit]

ISQ Base Quantities[edit]

select
  ?quantity
  (sample(?label) as ?label)
  (sample(?desc) as ?desc)
  (sample(?symbol) as ?symbol)
  (sample(?unit) as ?unit)
  (sample(?dim) as ?dim)
where {
  ?quantity wdt:P279 wd:Q30337748 .  # ISQ base quantity
  optional { ?quantity rdfs:label ?label . filter (lang(?label) = "de") }
  optional { ?quantity schema:description ?desc . filter (lang(?desc) = "de") }
  optional { ?quantity wdt:P7973 ?symbol . }
  optional { ?quantity wdt:P8111 / wdt:P5061 ?unit . filter (lang(?unit) = "en") }
  optional { ?quantity wdt:P4020 ?dim . }
} group by ?quantity

Try it!

Coherent SI Units[edit]

select distinct * where {
  ?unit wdt:P31 / wdt:P279* wd:Q69197847 .         # coherent SI unit
  optional { ?unit rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?unit schema:description ?desc . filter (lang(?desc) = "en") }

  optional { ?unit wdt:P2370 ?conversion . }       # 1 for every coherent SI unit
  optional { ?unit wdt:P5061 ?symbol . filter (lang(?symbol) = "en") }

  optional { ?unit wdt:P7007 ?wl . }
  optional { ?unit wdt:P2968 ?qudt . }
  optional { ?unit wdt:P6512 ?un . }
}

Try it!

The 20 SI Prefixes[edit]

select * where {
  ?prefix wdt:P31 wd:Q131299 . # SI prefix
  optional { ?prefix rdfs:label ?prefixLabel . filter (lang(?prefixLabel) = "en") }
  ?prefix wdt:P1181 ?value .
} order by ?value

Try it!

General Quantities[edit]

select * where {
  ?gq wdt:P31 wd:Q71758646 . # general quantity
  optional { ?gq rdfs:label ?gqLabel . filter (lang(?gqLabel) = "en") }
}

Try it!

Extended Lists[edit]

Notable Quantities[edit]

Quantities listed in other ontologies.

select
  ?quantity
  (sample(?label) as ?label) (sample(?desc) as ?desc)
  (sample(?symbol) as ?symbol)
  (sample(?dim) as ?dim)
  (group_concat(distinct ?recommendedUnit; separator = ", ") as ?recommendedUnits)
  (sample(?wl) as ?wl) (sample(?qudt) as ?qudt)
where {
  ?quantity wdt:P279+ wd:Q71550118 . # individual quantity
  optional { ?quantity rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?quantity schema:description ?desc . filter (lang(?desc) = "en") }

  optional { ?quantity wdt:P7973 ?symbol . }
  optional { ?quantity wdt:P4020 ?dim . }
  optional { ?quantity wdt:P8111 / wdt:P5061 ?recommendedUnit . filter (lang(?recommendedUnit) = "en") }

  { ?quantity wdt:P7431 ?wl . } union { ?quantity wdt:P8393 ?qudt . }
} group by ?quantity

Try it!

Notable Units[edit]

Units listed in other ontologies.

select
  ?unit
  (sample(?label) as ?label) (sample(?desc) as ?desc)
  (group_concat(distinct ?symbol; separator = ", ") as ?symbols)
  (group_concat(distinct ?quantity; separator = ", ") as ?quantities)
  (sample(?wl) as ?wl) (sample(?qudt) as ?qudt) (sample(?un) as ?un) (sample(?ucum) as ?ucum)
where {
  ?unit wdt:P31 / wdt:P279* wd:Q47574 .  # unit of measurement
  optional { ?unit rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?unit schema:description ?desc . filter (lang(?desc) = "en") }

  optional { ?unit wdt:P5061 ?symbol . filter (lang(?symbol) = "en") }
  optional { ?unit wdt:P111 / rdfs:label ?quantity . filter (lang(?quantity) = "en") }

  { ?unit wdt:P7007 ?wl . } union { ?unit wdt:P2968 ?qudt . } union { ?unit wdt:P6512 ?un . } union { ?unit wdt:P7825 ?ucum . }
} group by ?unit

Try it!

Quantities and Units Listed in the SI Brochure[edit]

select
  ?quantity (sample(?quantityLabel) as ?quantityLabel) (sample(?quantityDesc) as ?quantityDesc)
  ?unit (sample(?unitLabel) as ?unitLabel) (sample(?unitDesc) as ?unitDesc)
  (group_concat(?unitSymbol; separator = "; ") as ?unitSymbols)
  (sample(?unitStatus) as ?unitStatus)
where {
  values ?source { wd:Q68977959 }

  ?quantity wdt:P279+ wd:Q71550118 .
  optional { ?quantity rdfs:label ?quantityLabel . filter (lang(?quantityLabel) = "en") }
  optional { ?quantity schema:description ?quantityDesc . filter (lang(?quantityDesc) = "en") }

  ?quantity p:P8111 ?quantityStatement .
  ?quantityStatement prov:wasDerivedFrom [ pr:P248 ?source ] ; ps:P8111 ?unit .
  optional { ?unit rdfs:label ?unitLabel . filter (lang(?unitLabel) = "en") }
  optional { ?unit schema:description ?unitDesc . filter (lang(?unitDesc) = "en") }
  optional {
    ?unit p:P5061 [ prov:wasDerivedFrom [ pr:P248 ?source ] ; ps:P5061 ?unitSymbol ] .
    filter (lang(?unitSymbol) = "en")
  }

  optional { ?quantityStatement a ?bestRank . }
  bind (if(bound(?bestRank) && ?bestRank = wikibase:BestRank, "<recommended>", "<accepted>") as ?unitStatus)
} group by ?quantity ?unit

Try it!

Quantities Listed in ISO/IEC 80000[edit]

select
  ?quantity
  (sample(?label) as ?label) (sample(?desc) as ?desc)
  (year(sample(?sourceDate)) as ?year) (sample(?item) as ?item)
  (strdt(
    concat("<", "math>", group_concat(distinct ?symbol; separator = "<mtext>,</mtext><mspace width='0.2em'/>"), "</math>"),
    <http://www.w3.org/1998/Math/MathML>
  ) as ?symbols)
  (group_concat(distinct ?unit; separator = ", ") as ?units)
  (sample(?dimension) as ?dimension)
where {
  ?quantity wdt:P31? / wdt:P279+ wd:Q71550118 .   # individual or kind of quantity
  minus { ?quantity wdt:P31 wd:Q71758646 . }      # exclude general quantities

  optional { ?quantity rdfs:label ?label . filter (lang(?label) = "de") }
  optional { ?quantity schema:description ?desc . filter (lang(?desc) = "de") }

  ?source wdt:P629 / wdt:P361 wd:Q568496 .              # any edition of any part of ISO/IEC 80000
  minus { ?source wdt:P1366 / ^wdt:P1343 [] . }         # restrict to the latest edition used anywhere as source
  ?source wdt:P577 ?sourceDate .
  ?quantity p:P1343 [ ps:P1343 ?source ; pq:P958 ?item ] . filter (regex(?item, "^([0-9\\-\\.])+$"))

  optional { ?quantity wdt:P7973 ?symbol . }
  optional {
    ?quantity p:P8111 [ prov:wasDerivedFrom [ pr:P248 ?source ; pr:P958 ?unitSourceItem ] ; ps:P8111 / wdt:P5061 ?unit ] .
    filter ((strstarts(?unitSourceItem, ?item) || strbefore(?item, ".") = strbefore(?unitSourceItem, ".")) && lang(?unit) = "en")
  }
  optional { ?quantity wdt:P4020 ?dimension . }
}
group by ?quantity ?item
order by (
  100 * xsd:integer(strbefore(?item, "-")) +
  xsd:integer(strbefore(concat(strafter(?item, "-"), "."), ".")) +
  0.01 * coalesce(xsd:integer(strafter(?item, ".")), 0)
)

Try it!

Defining Formulas[edit]

select
  ?quantity
  (sample(?label) as ?label)
  (sample(?desc) as ?desc)
  (sample(?symbol) as ?symbol)
  (sample(?formula) as ?formula)
  (
    strdt(
      concat(
        "<", "math><mtable columnalign=left>",
        group_concat(?symbolAndLabel),
        "</mtable></math>"
      ),
      <http://www.w3.org/1998/Math/MathML>
    ) as ?otherSymbols
  )
where {
  ?quantity wdt:P279+ wd:Q71550118 .
  optional { ?quantity rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?quantity schema:description ?desc . filter (lang(?desc) = "en") }
  ?quantity wdt:P2534 ?formula .
  ?quantity wdt:P7235 ?symbol .
  {
    select distinct * where {
      ?quantity p:P4934 [ pq:P7235 ?otherSymbol ; ps:P4934 / rdfs:label ?otherLabel ] .
      filter (lang(?otherLabel) = "en")
      bind (
        concat(
          "<mrow>",
          str(?otherSymbol), "<mtext>", ": ", ?otherLabel, "</mtext>",
          "</mrow>"
        ) as ?symbolAndLabel
      )
    }
  }
} group by ?quantity ?formula

Try it!

Physical Constants[edit]

select
  ?const
  (sample(?label) as ?label)
  (sample(?symbol) as ?symbol)
  (sample(?value) as ?value)
  (sample(?unit) as ?unit)
  (sample(?codata) as ?codata)
  (sample(?qudt) as ?qudt)
  (sample(?wl) as ?wl)
  (sample(?ucum) as ?ucum)
where {
  ?const wdt:P31 wd:Q173227 .
  optional { ?const rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?const wdt:P7973 ?symbol . }
  optional {
    ?const p:P1181 [
      a wikibase:BestRank ;
      psv:P1181 [ wikibase:quantityAmount ?value ; wikibase:quantityUnit / wdt:P5061 ?unit ] ;
    ] .
    filter (lang(?unit) = "en")
  }
  optional {
    ?const wdt:P1645 ?codataVal .
    wd:P1645 wdt:P1630 ?codataTemplate .
    bind (
      strdt(
        concat("<", "math><mtext href='", replace(?codataTemplate, "\\$1", ?codataVal), "'>", ?codataVal, "</mtext></math>"),
        <http://www.w3.org/1998/Math/MathML>
      ) as ?codata
    )
  }
  optional {
    ?const wdt:P2968 ?qudtVal .
    ?const wdtn:P2968 ?qudtURI .
    bind (
      strdt(
        concat("<", "math><mtext href='", str(?qudtURI), "'>", ?qudtVal, "</mtext></math>"),
        <http://www.w3.org/1998/Math/MathML>
      ) as ?qudt
    )
  }
  optional { ?const wdt:P7007 ?wl . }
  optional { ?const wdt:P7825 ?ucum . }
} group by ?const

Try it!

Properties[edit]

Quantity-Valued[edit]

select
  ?property
  (sample(?label) as ?label)
  (sample(?quantity) as ?quantity)
  (sample(?quantityLabel) as ?quantityLabel)
  (sample(?symbol) as ?symbol)
  (sample(?dim) as ?dim)
  (group_concat(distinct ?recommendedUnit; separator = ", ") as ?recommendedUnits)
where {
  ?property wikibase:propertyType wikibase:Quantity .
  optional { ?property rdfs:label ?label . filter (lang(?label) = "en") }
  optional {
    ?property wdt:P1629 ?quantity . ?quantity wdt:P279+ wd:Q71550118 .
    optional { ?quantity rdfs:label ?quantityLabel . filter (lang(?quantityLabel) = "en") }
    optional { ?quantity wdt:P7973 ?symbol . }
    optional { ?quantity wdt:P4020 ?dim . }
    optional { ?quantity wdt:P8111 / wdt:P5061 ?recommendedUnit . filter (lang(?recommendedUnit) = "en") }
  }
} group by ?property

Try it!

Entity Types[edit]

select * where {
  ?item wdt:P7497 ?wlType .
  optional { ?item rdfs:label ?itemLabel . filter (lang(?itemLabel) = "en") }
}

Try it!

Tango[edit]

Canciones[edit]

select
  ?song
  (sample(?songLabel) as ?songLabel)
  (group_concat(distinct ?genreLabel; separator = "; ") as ?genres)
  (group_concat(distinct ?composerLabel; separator = "; ") as ?composers)
  (group_concat(distinct ?lyricistLabel; separator = "; ") as ?lyricists)
  (year(min(?date)) as ?firstYear)
  (sample(?mbID) as ?mbID)
  (sample(?ttID) as ?ttID)
  (sample(?audio) as ?audio)
where {
  ?song wdt:P31 / wdt:P279* wd:Q2188189 . # musical work
  {
    { ?song wdt:P136 wd:Q14390274 . } # tango
    union
    { ?song wdt:P136 wd:Q942955 . } # milonga
    union
    { ?song wdt:P136 wd:Q61891621 . } # vals
  }
  optional { ?song rdfs:label ?songLabel . filter(lang(?songLabel) = "es") }
  optional { ?song wdt:P136 / rdfs:label ?genreLabel . filter(lang(?genreLabel) = "es") }
  optional { ?song wdt:P86 / rdfs:label ?composerLabel . filter (lang(?composerLabel) = "es") }
  optional { ?song wdt:P676 / rdfs:label ?lyricistLabel . filter (lang(?lyricistLabel) = "es") }
  optional { ?song wdt:P577 ?date . }
  optional { ?song wdt:P435 ?mbID . }
  optional { ?song wdt:P4932 ?ttID . }
  optional { ?song wdt:P51 ?audio . }
}
group by ?song
order by ?firstYear

Try it!

Músicos[edit]

select distinct * where {
  {
    { ?artist wdt:P31 wd:Q5 . } # human
    union
    { ?artist wdt:P31 wd:Q2088357 . } # group
  }
  ?artist wdt:P136 wd:Q14390274 . # tango
  optional { ?artist rdfs:label ?artistLabel . filter(lang(?artistLabel) = "es") }
  optional { ?artist wdt:P434 ?mbartist . }
  optional { ?artist wdt:P4931 ?ttperson . }
}

Try it!