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

Economic growth

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

In plain words. GDP, gross domestic product, is the value of everything Spain produces. Each bar compares a quarter with the same quarter a year before, with price rises taken out, so that a year of inflation does not pass for growth.

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

Wages

Ordinary wage cost per worker and month, before the extra payments of June and December, quarter by quarter since 2008.

In plain words. What a company pays each worker per month in ordinary wages, gross, before tax. The extra payments of June and December are left out; with them in, the line would jump twice a year.

Asking the INE…
Inex.Tables.observations_as_data_frame!(6038,
  filters: [{120, 10769}, {230, 12083}, {506, 284446}],
  observation_start: ~D[2008-01-01]
)

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.