Skip to content

Eurostat Data for Calc 1.0.1

Choose a tag to compare

@davidjayjackson davidjayjackson released this 08 Jul 22:32

Patch release. Fixes two bugs found while validating 1.0.0 against a real profile with other
installed add-ins:

  • Add-in registration: added packaging/CalcAddIns.xcu, the same mechanism this user's other
    Calc add-ins (FRED, StockPicker, MOVAVG, LIST) use to register their function names. The
    interface-based XAddIn registration alone wasn't reliably exposing EUROSTATDATA to the
    formula parser once other extensions were also installed.
  • Demo sheet: Eurostat-Demo.ods's
    generator was auto-fitting column A to the instructional sentence in A2, blowing it out to 11+
    inches wide and pushing every data column off-screen. The underlying data was always correct —
    this was a display-only bug.

Install

Download EurostatAddin-1.0.1.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.1.oxt

Restart Calc if it was already open. The function then appears under the Eurostat category
in the Function Wizard.

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs separated by ;, e.g.
    "geo=DE;time=2023;unit=CP_MEUR". Pass "" for no filtering.

Enter it as an array formula so the whole table spills out: select a range large enough for the
result, type the formula, and confirm with Ctrl+Shift+Enter (recent LibreOffice versions with
dynamic array support will spill automatically from a single cell).

Returns a table: a header row (one column per dimension, plus value), followed by one row per
observation. Errors show as a readable #ERROR: ... cell instead of Err:5xx.

Examples

=EUROSTATDATA("nama_10_gdp"; "geo=DE;time=2023;unit=CP_MEUR")
=EUROSTATDATA("une_rt_a"; "geo=FR;time=2023")
=EUROSTATDATA("tec00118"; "geo=DE;sinceTimePeriod=2015")

The last example uses sinceTimePeriod, one of Eurostat's own reserved query parameters (not a
dimension) — useful for pulling a whole year range back in one call. lastTimePeriod works the
same way. Any filter key you pass goes straight into the API query string.

Common dataset codes

Code Description
nama_10_gdp GDP and main components
une_rt_a Unemployment rate (annual)
demo_pjan Population on 1 January
prc_hicp_manr HICP inflation (annual rate, monthly)
tec00114 Real GDP growth rate
tec00118 HICP inflation (annual rate, yearly)

Browse the full catalogue at the Eurostat Data Browser.

Try it

Download Eurostat-Demo.ods
below — it has several EUROSTATDATA(...) formulas already entered and computed against live
data, so opening it (after installing the add-in above) shows the function working right away.

Notes

  • Pure Java 8, zero external dependencies (hand-rolled JSON parser, HttpURLConnection) — built
    entirely with the LibreOffice SDK's own toolchain, no Maven required. See build.sh to build
    from source.
  • Registers via CalcAddIns.xcu, the same mechanism LibreOffice's own extension ecosystem uses.