Sometimes W|A gives you something ...

WolframAlpha["electricity production of the United States in 2007", "Result"]

enter image description here

... not available in the WDF

CountryData["UnitedStates", {"ElectricityProduction", 2007}]

enter image description here

Other times, the opposite seems to apply - say for more recent data in WDF ...

CountryData["UnitedStates", "ElectricityProduction"]

enter image description here

... whereas in W|A

WolframAlpha["electricity production of the United States in 2014", "Result"]

enter image description here

... or at least I'd assumed it was more recent and this now conflicts with the earlier W|A output?

CountryData["UnitedStates", "ElectricityProduction", "Date"]

enter image description here

Are multiple data sources being used here or is this a bug?

  • 1
    $\begingroup$ I would guess that it is indeed an issue with multiple sources; I cannot figure out what else it could be, and the way you checked the dates for both of the data requests should guarantee it. It could be that because W|A runs on an offsite computer, it is told to take an average of all the available values, whereas Mathematica would take the first available value as a good enough approximation to reduce the computing time required? reference.wolfram.com/language/note/… $\endgroup$ – V-J Jan 4 '16 at 9:10

Based on the documentation, I would say that this is a bug. Note, however, that you can perhaps get at the data you want via the call

EntityValue[Entity["Country", "UnitedStates"], 
 EntityProperty["Country", "ElectricityTotal", "Date" -> 2007]]

though the relationship between "ElectricityTotal" and "ElectricityProduction" is less than clear. I would file this as a feedback to Wolfram.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.