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"}
Inflation
Annual change of the consumer price index (CPI), month by month since 2002.
In plain words. Inflation measures how much dearer life is than a year ago: at 3%, shopping that cost 100 euros twelve months ago costs 103 now. The INE works it out every month from the prices of what households buy, like bread, petrol or electricity.
Inex.Series.observations_as_data_frame!(["IPC290750"],
observation_start: ~D[2002-01-01]
)
What is going up the most
Annual change of prices in each spending group, in the latest month with the full breakdown. The line is the overall index.
In plain words. The CPI splits spending into groups, like food, transport or housing, and the bars show how much each one has gone up in a year. That way you can see what is pushing inflation up and what is holding it back.
Inex.Tables.observations_as_data_frame!(76125,
filters: [data_type: 74, cpi_group: :all],
last: 2,
language: :en
)