# How to convert units from percent per year to real number with CountryData? [closed]

I have CountryData coming in via e.g.

Entity["Country", "Australia"][
EntityProperty["Country", "GDP",
{"CurrencyUnit" -> "Constant2000USDollar",
"TimeSeriesOperator" -> "AnnualGrowthRate"}
]
]


Which returns

-0.00383656% per year (* unit: percent per year *)


My desired output is -0.0000383656 (i.e. as purely a decimal number).

I am surprised by how hard it has been to find an answer. Despite this question being very simple, I can't find a way with Quantity, NumberForm, etc.

• I'd just do QuantityMagnitude[r]/100 where r is your result you obtained from that long command. !Mathematica graphics -0.0000383656 Commented Nov 28, 2022 at 9:43
• Simply take the first part of your result: yourresult[[1]] Commented Nov 28, 2022 at 10:08
• Every object in MMA is like an array. With obi[[0]] you can get the head and with obi[[i,j..] all the parts. Note, this does not work for atomic objects , they consist of only the head. Commented Nov 28, 2022 at 12:43
• Also with FullForm you can see the structure of the returnvalue: FullForm[r] gives you Quantity[-0.0038365585665900404,Times["Percent",Power["Years",-1]]] Commented Nov 28, 2022 at 17:32
• FullForm, TreeForm and ExpressionTree might lead to expressions that are too lengthy at times in which case you can consider InputForm after getting familiar with outputs of FullForm Commented Nov 29, 2022 at 2:29

1. QuantityMagnitude[%]
2. %[[1]] or Part[%, 1]
And inspect the output with FullForm[%], TreeForm[%], and ExpressionTree[%]`.