Eurostatx

An Elixir client for the Eurostat APIs, the open data services of the statistical office of the European Union.

Everything Eurostat publishes — national accounts, prices, jobs, energy, population, trade — is in free APIs that need no key. Eurostatx covers all of them, validates the options before making the request and turns the answers into Explorer data frames, ready to analyse or to plot in Livebook.

This page is a demo: the countries of the Union side by side, with figures asked of Eurostat with Eurostatx and drawn with Apache ECharts. Under each chart is the call that fetched it.

{:eurostatx, "~> 0.1"}

Inflation

Annual change of the harmonised index of consumer prices (HICP) in the EU and its four largest economies, month by month since 2015.

In plain words. Inflation is how much more things cost than a year ago. At 3%, what cost 100 euros twelve months ago costs 103 today. The HICP measures it the same way in every EU country, so they can be compared, and the European Central Bank tries to keep it around 2%.

Asking Eurostat…
Eurostatx.Statistics.data_as_data_frame!("prc_hicp_minr",
  filters: [geo: ["EU27_2020", "DE", "FR", "IT", "ES"], unit: "RCH_A", coicop18: "TOTAL"],
  start_period: "2015-01",
  shape: :wide
)

Inflation by country

The same rate in each of the 27 member states, in the latest month all of them have published. The line is the EU as a whole.

In plain words. Even with the same currency, each country has its own inflation: energy weighs more in some, food in others. If a bar goes past the line, prices there are rising faster than in the EU as a whole.

Asking Eurostat…
eu = ~w(BE BG CZ DK DE EE IE EL ES FR HR IT CY LV LT LU HU MT NL AT PL PT RO SI SK FI SE)

Eurostatx.Statistics.data_as_data_frame!("prc_hicp_minr",
  filters: [geo: ["EU27_2020" | eu], unit: "RCH_A", coicop18: "TOTAL"],
  last_periods: 2
)

House prices

Annual change of house prices, new and existing homes together, in the latest quarter published. The line is the EU as a whole.

In plain words. The bars show how much house prices have changed in a year. At 10%, a flat worth 200,000 euros a year ago is worth 220,000 today; below zero, homes are getting cheaper.

Asking Eurostat…
eu = ~w(BE BG CZ DK DE EE IE EL ES FR HR IT CY LV LT LU HU MT NL AT PL PT RO SI SK FI SE)

Eurostatx.Statistics.data_as_data_frame!("prc_hpi_q",
  filters: [geo: ["EU27_2020" | eu], purchase: "TOTAL", unit: "RCH_A"],
  last_periods: 2
)

Data: © European Union, Eurostat, reusable under its copyright notice (CC BY 4.0). The page asks Eurostat for it one request at a time, as Eurostat asks, and keeps it for a few hours, so it always shows the latest figures published.

Map: Natural Earth, in the public domain.

Eurostatx is an independent open source project: it is not developed, endorsed or supported by Eurostat.