Bug 107955 - Implement an interpolation function
Summary: Implement an interpolation function
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
Reported: 2017-05-19 14:55 UTC by Frederic Parrenin
Modified: 2017-08-10 04:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2017-05-19 14:55:42 UTC
In an lot of scientific fields, we need to do interpolation of data.
That is, if you have a set of x_i and y_i, you want to know the values y'_i at abscissas x'_i.
Currently, there is no interpolation function in calc, though.
I would greatly appreciate one.
The basic functionality would be to have a linear interpolation.
Other type of interpolation include staircase and cubic spline.
All these interpolations could be done by simply evaluating the function, or also by using an averaging between two consecutive x'_i.
Such a function exists in another spreadsheet software called gnumeric, so it is possible to take some inspiration from it (with a critical look, though).
Comment 1 Jacques Guilleron 2017-05-24 23:42:17 UTC
Hi Frederic,

Some fuctions available in Statistical Category:
as closest functions from Interpolation

for the same forecast charts as in Excel 2016.

Trend lines

Extensions :
Improved trend lines(CorelPolyGUI) where you can find Spline outline.

See also Data > Statistics

Comment 2 Buovjaga 2017-06-03 10:44:21 UTC
Frederic: what do you think about Jacques's comment?
Comment 3 Frederic Parrenin 2017-06-06 09:14:36 UTC
Sorry for the late answer.
What Jacques proposed is NOT linear interpolation.
Forecast.linear is based on a linear regression.
Forecast.Ets.xx is based on Exponential smoothing.
Comment 4 Buovjaga 2017-06-12 08:09:45 UTC
It would be better to have an extension with all the myriad interpolation models.

This thread has a macro solution for cubic spline: https://forum.openoffice.org/en/forum/viewtopic.php?t=4574

Frederic: consider creating such an extension as a university project and submitting it to https://extensions.libreoffice.org/
Comment 5 Jean-Baptiste Faure 2017-07-31 20:50:02 UTC
(In reply to Buovjaga from comment #4)
> [...]
> Frederic: consider creating such an extension as a university project and
> submitting it to https://extensions.libreoffice.org/

I think that developing an extension is the best way: easy prototyping, you can choose the programming language (Basic, Python, Java,...), easy to extend. And when the extension is mature enough it is possible to bundle it with LO if there is a consensus for that.

As you read French, have a look on this discussion: https://forum.openoffice.org/fr/forum/viewtopic.php?f=4&t=24156

What do you think ?
Set status to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 6 Frederic Parrenin 2017-08-04 15:05:17 UTC
It is not clear to me what information I should provide now.
Comment 7 Buovjaga 2017-08-04 17:54:11 UTC
(In reply to Frederic Parrenin from comment #6)
> It is not clear to me what information I should provide now.

Jean-Baptiste just wanted to know that you are OK, if we close this report and you implement this functionality as an extension.
Comment 8 Frederic Parrenin 2017-08-07 08:43:01 UTC
Maybe it is better to let this bug open if other people want to comment.
On my side, I will not have time to implement this extension in the coming months.
Comment 9 Jean-Baptiste Faure 2017-08-10 04:23:24 UTC
Even if the bug report is closed one can add comment, and it is possible to reopen it if someone is interested in developing something.

Closing as WontFix.

Best regards. JBF