Page MenuHomePhabricator

add psn: for °F and °K
Open, LowPublic

Description

For usecases like this, it could be helpful if the query server had directly a psn triple for temperatures in Fahrenheit or Kelvin.

Not sure how we should store the conversion formula as statements.

Current uses; query

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Temperatures are a bit tricky, since unlike most other units, conversion is not simple multiplicative.

I guess the dev question is if one wants simple code for this or wait for more complex use cases that might require a dedicated server

The query currently finds:

  • P2101 melting point in wd:Q42289 degree Fahrenheit: 571
  • P2102 boiling point in wd:Q42289 degree Fahrenheit : 476
  • P2128 flash point in wd:Q42289 degree Fahrenheit : 341

Sample: https://www.wikidata.org/wiki/Q411301#P2102

  • P2101 melting point wd:Q25267 degrees Celsius 349
  • P2102 boiling point wd:Q25267 degrees Celsius 166
  • P2107 decomposition point wd:Q25267 degrees Celsius 51

it could be helpful if the query server had directly a psn triple for temperatures in Fahrenheit or Kelvin.

I don’t think we should have multiple psn triples for several units – the point of psn is to normalize everything to one unit. In this case, I assume that unit should be Kelvin. It would then be the query author’s job to convert the quantities they need into Kelvin when writing the query.

it could be helpful if the query server had directly a psn triple for temperatures in Fahrenheit or Kelvin.

I don’t think we should have multiple psn triples for several units – the point of psn is to normalize everything to one unit. In this case, I assume that unit should be Kelvin. It would then be the query author’s job to convert the quantities they need into Kelvin when writing the query.

Not multiple, just one as it does for temperatures in C.

I’m confused about the status quo now… according to some sandbox experiments, there are psn: triples if the unit is Kelvin, or degrees Celsius (unconverted, in both cases!), but not if the unit is degrees Rankine. That just seems broken to me, but perhaps I’m missing something.

Hmm... not sure why temperatures have psn, probably shouldn't have them...

We did some experiments with https://www.wikidata.org/wiki/Property:P2370 on some of these. Maybe that's why.

I see conversion config for Q25267/degrees Celsius, which is normalized to itself (probably wrong). Kelvin is a SI unit, so it is right to have normalized value, but Q25267 should not be there. I think until we support non-multiplicative conversions, we should take Q25267 out of norm config.

Change 374892 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Remove Q25267 (degree Celsius) from conversion config.

https://gerrit.wikimedia.org/r/374892

Smalyshev triaged this task as Medium priority.Aug 30 2017, 9:56 PM

Change 374892 merged by jenkins-bot:
[operations/mediawiki-config@master] Remove Q25267 (degree Celsius) from conversion config.

https://gerrit.wikimedia.org/r/374892

Do we have the same issue with Fahrenheit as we do with Celsius?

@daniel No, Fahrenheit was not in the config.

To solve the initial problem, would it be possible to interpret something like:

  • ($1+459.67)* 5/9
  • criterion used: kelvin (Q11579)

at https://www.wikidata.org/w/index.php?title=Q42289&oldid=549477986#P370 (°F>°K)

More at:

List: query (should show the three formulas linked above, might not work anymore)

Gehel lowered the priority of this task from Medium to Low.Nov 11 2021, 3:18 PM