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"}

Economic growth

Annual change of the EU's gross domestic product in volume, quarter by quarter since 2008. The bars below zero are the recessions.

In plain words. GDP, gross domestic product, is the value of everything a country produces. If it grows, the economy is bigger than a year before. In volume means price rises are taken out, so that a year of inflation does not pass for growth.

Asking Eurostat…
Eurostatx.Statistics.data_as_data_frame!("namq_10_gdp",
  filters: [geo: "EU27_2020", unit: "CLV_PCH_SM", s_adj: "SCA", na_item: "B1GQ"],
  start_period: "2008-Q1"
)

GDP per person

Gross domestic product per person in purchasing power standards, which take out the differences in prices between countries, with the EU at 100.

In plain words. A country's GDP divided among the people who live there, as a rough idea of how rich it is per person. The figure is an index: the EU is always 100 and every country is compared with it. At 120, a country has 20% more per person than the EU average; at 80, 20% less. Purchasing power standards take prices into account, since 1,000 euros buy more in Bulgaria than in Denmark.

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!("tec00114",
  filters: [geo: ["EU27_2020" | eu]],
  last_periods: 2
)

Public debt

General government gross debt as a share of GDP, at the end of the latest year. The Maastricht treaty sets the limit at 60%. The line is the EU as a whole.

In plain words. Public debt is the money the central, regional and local governments have borrowed and still owe. It is divided by GDP to compare it with the size of the economy: at 100%, a country owes as much as it produces in a whole year.

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!("gov_10dd_edpt1",
  filters: [geo: ["EU27_2020" | eu], na_item: "GD", sector: "S13", unit: "PC_GDP"],
  last_periods: 2
)

Minimum wage

Gross monthly minimum wage in euros, in the countries that have a national one. Where it is paid in more than 12 payments a year, it is spread over 12.

In plain words. The minimum wage is the least an employer can legally pay for a full-time job. Gross means before taxes and social security. Austria, Denmark, Finland, Italy and Sweden have no legal minimum: unions and employers agree wages sector by sector.

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!("earn_mw_cur",
  filters: [geo: eu, currency: "EUR"],
  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.