I am trying to look up data of entities, but I imagine I'm not doing it right, or have misunderstood the structure.
Here, I try the extract the values of the new SI defining constants, which are embedded deeply in the structure of the Entity["PhysicalConstants"]. However, the structure is not real Associations, so you can "index" your way to the information, but I had to use Lookup. Also, not all entities in the list have the property/value I look for, so some filtering is necessary.
My best try is
siconstants = {#[[1]], Lookup[#[[2]], "Value"]} &
/@ Cases[{#, Lookup[EntityValue[#, "Values"], "CODATA2017RecommendedRevisedSI"] } &
/@ EntityList["PhysicalConstant"], {_, _List}]
but there must be a simpler and more correct way(?)
"CODATA2017RecommendedRevisedSI", but would the following work for you?Thread[#[[2]] -> #["Value"]] & /@ EntityList["PhysicalConstant"]work for you? It is throwing some errors on my computer, but may be in the ballpark of what you are looking for. I added theThreadto clearly show what constant it was returning. – kickert Nov 28 '18 at 22:08EntityPropertyqualifiers (there were recently a few Q/A things on that here) and they're documented in the scope section ofEntityValue. – b3m2a1 Nov 29 '18 at 06:45EntityClasshasValueandValuesas properties.Valuesincludes multiple sources and results.Valueappears to be the one Wolfram has determined is best. From looking at the output forValuesit seems very few have "CODATA2017RecommendedRevisedSI" information, while most of some version of CODATA, although the year varies (and some have no CODATA values.) – kickert Nov 29 '18 at 10:28QualifierValuesoptions, but can't get it to work on my computer (in 11.3 or 12PR). Not just for this case, but even copying the example directly from the documentation (Agriculture production). Are you having any luck with it? – kickert Nov 29 '18 at 10:47EntityValue[ EntityProperty["PhysicalConstant", "Values"], "QualifierValues"]gives an empty list, so not much help there. Apparently there are no Qualifiers for this entity type,EntityValue[#, "Qualifiers"] & /@ Entity["PhysicalConstant"]["Properties"]– HJensen Dec 01 '18 at 07:44