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"}
Unemployment
Unemployment rate, seasonally adjusted, in the EU and its four largest economies, month by month since 2008.
In plain words. Out of every 100 people who want to work, the unemployment rate is how many are looking for a job and have not found one. Students, pensioners and anyone who is not looking are left out. Seasonally adjusted means summer and Christmas jobs are smoothed out, so one month can be compared with the next.
Eurostatx.Statistics.data_as_data_frame!("une_rt_m",
filters: [
geo: ["EU27_2020", "DE", "FR", "IT", "ES"],
age: "TOTAL",
sex: "T",
unit: "PC_ACT",
s_adj: "SA"
],
start_period: "2008-01",
shape: :wide
)
Unemployment by country
The same rate in each member state, in the latest month published. The line is the EU as a whole.
In plain words. Each bar is one country with its unemployment rate. The line is the EU average: the countries whose bar goes past it have more unemployment than the Union as a whole.
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!("une_rt_m",
filters: [geo: ["EU27_2020" | eu], age: "TOTAL", sex: "T", unit: "PC_ACT", s_adj: "SA"],
last_periods: 2
)
The map of unemployment
The same rates, on the map. The countries outside the EU are left grey, and Malta is drawn as a circle so it can be seen.
In plain words. The darker the country, the higher its unemployment. Hover over a country, or tap it, to see its figure.
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!("une_rt_m",
filters: [geo: ["EU27_2020" | eu], age: "TOTAL", sex: "T", unit: "PC_ACT", s_adj: "SA"],
last_periods: 2
)
Youth unemployment
Unemployment rate of people under 25, in the countries that publish it every month. The line is the EU as a whole.
In plain words. The same rate, counting only people under 25. It is always well above the overall rate, partly because a first job is the hardest one to find.
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!("une_rt_m",
filters: [geo: ["EU27_2020" | eu], age: "Y_LT25", sex: "T", unit: "PC_ACT", s_adj: "SA"],
last_periods: 2
)