分析南美国家的恶性通货膨胀率
连接到 Federal Reserve Economic Data API.
In[1]:=
fred = ServiceConnect["FederalReserveEconomicData"]
Out[1]=
获取南美国家的名单.
In[2]:=
countries = CountryData["SouthAmerica"];
从所选国家中检索通胀率时间序列.
In[3]:=
data = Association[DeleteMissing[Block[{source, id, ts, fts},
source =
fred["SeriesSearch",
"Query" -> # <> " inflation consumer price"];
If[Length[source] > 0,
(id = source[1, "ID"];
ts = fred["SeriesData", "ID" -> id];
fts = TimeSeries[ts , MissingDataMethod -> Automatic];
# -> fts),
Missing[#]]
] & /@ (EntityValue[#, "Name"] & /@ countries)]];
制作在 1960-2015 年期间发生恶性通货膨胀的国家的图形.
显示完整的 Wolfram 语言输入
Out[4]=