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

House prices

Annual change of the housing price index (IPV), new and second-hand homes together, quarter by quarter since 2008.

In plain words. The line follows how much house prices have changed in a year, new and second-hand homes together. At 10%, a flat worth 200,000 euros a year earlier is worth 220,000; below zero, homes are getting cheaper.

Asking the INE…
Inex.Tables.observations_as_data_frame!(80270,
  filters: [{345, 16463}, data_type: 74, national: 16473],
  observation_start: ~D[2008-01-01]
)

Rents

Annual change of the rental housing price index, built from tax returns: it is yearly, and arrives a year and a half later.

In plain words. How much rents have gone up in a year. The INE works it out from what landlords declare in their income tax returns, and that is why the figures take so long to come out.

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

Mortgages

Mortgages signed on homes each month, all of Spain, since 2008.

In plain words. How many mortgages on homes are signed each month, as the property registries record them. It shows how busy the housing market is: the more homes are bought with a loan, the higher the line.

Asking the INE…
Inex.Tables.observations_as_data_frame!(13896,
  filters: [{240, 12365}, {247, 12417}, national: 16473],
  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.