Which of the following syntax variations are correct? For the incorrect? syntax, what does the obtained value represent? Statements 2/3 and 4/5 are identical; I was trying to see if it was a bug.

enter image description here

CountryData["Ireland", "GiniIndex"]
CountryData[#, "GiniIndex"] &@Entity["Country", "Ireland"]
CountryData[Entity["Country", "Ireland"], "GiniIndex"]
#["GiniIndex"] &@Entity["Country", "Ireland"]
Entity["Country", "Ireland"][EntityProperty["Country", "GiniIndex"]]

Thanks for your help.

  • 1
    $\begingroup$ Maybe the two forms just read data from different sources. $\endgroup$ Apr 23 at 9:06
  • $\begingroup$ I was trying to do GeoRegionValuePlot with selected properties for various world countries and realized that the colors didn't match, so I reduced it to a MWE. $\endgroup$
    – Syed
    Apr 23 at 9:09
  • 2
    $\begingroup$ 'EntityProperty' probably reads data from Wolfram alpha which is updated more frequently. And CountryData probably reads data from some database that was created when your Mathematica version was released, so it means the data is older. $\endgroup$ Apr 23 at 9:12
  • 2
    $\begingroup$ See diagram on wolframalpha.com/input?i=ireland+gini+index $\endgroup$ Apr 23 at 9:14

1 Answer 1


It looks like CountryData doesn't return the latest data but from a few years ago, so you should use Entity. You can reconsiliate the results by explicitly providing the year.

CountryData["Ireland", "GiniIndex"]
(* 0.306 *)
CountryData["Ireland", "GiniIndex", "Date"]
(* 2018 *)

Entity["Country", "Ireland"]["GiniIndex"]
(* 0.292 *)
Entity["Country", "Ireland"]["GiniIndex", "Date" -> 2018]
Entity["Country", "Ireland"][Dated["GiniIndex", 2018]]
(* 0.306 *)

Entity["Country", "Ireland"]["GiniIndex", "Date" -> All]
(* TemporalData[TimeSeries, {...}]] *)

CountryData["Ireland", {"GiniIndex", 2024}]
(* This should work, but it doesn't ... *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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