Inex

An Elixir client for the INE API, the open data service of Spain's National Statistics Institute.

Everything INEbase publishes — prices, jobs, population, housing, tourism — is in a free JSON API that needs no key. Inex covers all of it, 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: charts of figures everyone in Spain has an opinion about, by topic, asked of the INE with Inex and drawn with Apache ECharts. Under each one is the call that fetched it.

{:inex, "~> 0.1"}

Unemployment

Unemployment rate from the labour force survey (EPA), quarter by quarter since 2002.

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. It comes from the EPA, a survey the INE makes every quarter of tens of thousands of households, which is why it differs from registered unemployment: the people signed up at job centres.

Asking the INE…
Inex.Series.observations_as_data_frame!(["EPA452434"],
  observation_start: ~D[2002-01-01]
)

Unemployment by region

The same rate in each autonomous community and city, in the latest quarter. The line is Spain as a whole.

In plain words. Each bar is one autonomous community, or one of the two autonomous cities, Ceuta and Melilla. The line is the average for Spain: where a bar goes past it, there is more unemployment than in the country as a whole.

Asking the INE…
Inex.Tables.observations_as_data_frame!(65334,
  filters: [sex: 454, age_total: 15668, ccaa: :all],
  last: 1,
  language: :en
)

The map of unemployment

The same rates, on the map. The Canary Islands are moved closer, and Ceuta and Melilla are drawn as circles so they can be seen.

In plain words. The darker the region, the higher its unemployment. Hover over a region, or tap it, to see its figure.

Asking the INE…
Inex.Tables.observations_as_data_frame!(65334,
  filters: [sex: 454, age_total: 15668, ccaa: :all],
  last: 1,
  language: :en
)

Data: © INE, published under CC BY 4.0. The page asks the INE for it and keeps it for a few hours, so it always shows the latest figures published.

Map: Natural Earth, in the public domain.

Inex is an independent open source project: it is not developed, endorsed or supported by the INE.