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.
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.
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.
Inex.Tables.observations_as_data_frame!(13896,
filters: [{240, 12365}, {247, 12417}, national: 16473],
observation_start: ~D[2008-01-01]
)