B4J Library [B4X][Class] Chart analysis

As i could not find any ready code to make analysis of the curve\chart\data flow, i have tried to make something. It was discussed here (thanks to all in the thread!)

If to have a chart, i mean, the data table with 2 columns, say weather temperature per hour - it would be good to have an analysis code that can check the data changing trend and return some result.
Say, the result may be like "Temperature is rising during 5 hours", or "Warning: sudden freeze for -20 degrees during 5 hours !" ...

This is first my result of such class, tested in B4J mainly, and in B4A. I do not have B4i (i guess, should work as no platform specifics).


The project depends on:
  • SQLite lib
  • DBUtils code module
  • For visual testing: xChart lib
TempDownload.pngTempDownload.pngTempDownload.pngTempDownload.pngTempDownload.pngTempDownload.png

The whole project with the class file is attached.

Any feedback, example of .csv data files, donates are welcome.

v.0.26
Class file v.0.18
 

Attachments

  • TrendUtils_v.0.26.zip
    166.6 KB · Views: 194
Last edited:

peacemaker

Expert
Licensed User
Longtime User
The class is reworked very much, to v.0.26.
Added some automated subs for analyzing the charts, including the approximation curve and human-like description of the analyzed chart.

The calculation results are now in the TrendResult type object that helps to create any new analyzing subs, basing on my first example subs.
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User

Attachments

  • TempDownload.png
    TempDownload.png
    57.6 KB · Views: 223
  • TempDownload.png
    TempDownload.png
    55.3 KB · Views: 235
  • TempDownload.png
    TempDownload.png
    55.5 KB · Views: 221
  • Project.zip
    26 KB · Views: 199
  • TempDownload.png
    TempDownload.png
    59.4 KB · Views: 221
  • TempDownload.png
    TempDownload.png
    54.3 KB · Views: 210
  • TempDownload.png
    TempDownload.png
    56.9 KB · Views: 221
Top