Wolfram Language

Servicios externos

Analice las tarifas de hiperinflación de países de América del Sur

Conéctese al API del Federal Reserve Economic Data.

In[1]:=
Click for copyable input
fred = ServiceConnect["FederalReserveEconomicData"]
Out[1]=

Obtenga una lista de países de América del Sur.

In[2]:=
Click for copyable input
countries = CountryData["SouthAmerica"];

Recupere series temporales de inflación a partir de los países seleccionados.

In[3]:=
Click for copyable input
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)]];

Cree en gráfico de países con hiperinflación en el período de 19602015.

muestre la entrada completa de Wolfram Language
In[4]:=
Click for copyable input
hyperinflation = Select[data, (Max[#["Values"]] > 1000 &)]; DateListLogPlot[Thread[Legended[Values[#], Keys[#]]] &@hyperinflation, Filling -> Axis, FrameStyle -> White, FrameLabel -> "Logscale of inflation", FrameTicks -> {{Automatic, None}, {Table[DateObject[{i}], {i, 1960, 2015, 5}], None}}, PlotRange -> Full, Background -> RGBColor[0.25, 0.25, 0.25], AspectRatio -> 1/2, DateTicksFormat -> "YearShort", ImageSize -> 480, GridLines -> {None, {{10, White}, {100, Pink}, {1000, Red}}}, GridLinesStyle -> {Thickness[Small], Dashed}]
Out[4]=

Ejemplos relacionados

de en fr ja ko pt-br ru zh