On the ChartsCompiler
Posted: Fri 21 May 2021 2:57 pm
This post is about the ChartsCompiler.
The idea of the chart compiler came from the many questions for little variations in charts which lead to new data (files / usage), new parameters and additional sometimes configurable code. All very well, but when talking about automation you need to search the reusable parts and see what needs to be done to generalise it. So that is what the ChartsCompiler is about: a tool for creating charts for websites which use CumulusMX as a basis in a generalised way.
Beside having a possibility to create charts, it is also a tool to be more efficient with data. Recent charts - e.g. Growing Degree Days - actually only require temperature and not additional data files. Basically every chart which plots derivatives can be calculated where only the basic measurements from the station are uploaded to the site.
Now, calculating all - almost all - charts is an ideal situation and there are many reasons just to upload the datafiles and plot the charts. Nobody feels the pain. But I see the data increasingly going back and forth to and from the website servers and I simply like trying to get that data load down.
So: easy user driven chart definition and reduction of data transfers are the goals.
We'll see how far I get. The basics are here and the tool is laid out in two Wiki articles: the ChartsCompiler and the CDL (Chart Definition Language). The CDL is still under development as is the compiler itself so changes will be fast and many.
It is implemented simply as a module of CumulusUtils and the output can easily be tested just by renaming the .txt output to .html and load it in the browser (make sure the required datafiles are present where you test it). This way it can be used as a stand alone tool. You need to use the parameters GeneratejQueryInclude and DoLibraryIncludes (true to use the output standalone).
[EDIT 24/9/21]:
Now, after the completion of the ExtraSensors module, the ChartsCompiler has become a pivotal module within the ecology of CumulusUtils as the charts for the ExtraSensors are created by writing out CDL code to the CutilsCharts.def file. This means that you can not only plot the ExtraSensor values but add other sensors to the same chart. So it is possible to chart e.g. Soil Temperature against Environment temperature from the standard weather station. Extra Sensors and regular measurements all have the datarange RECENT and therefore can be combined. This gives great possibilities in combining plot variables.
The important thing to notice is that you can create and use charts with the ChartsCompiler on a standalone basis and use those charts in any website or standalone.
Have fun.
The idea of the chart compiler came from the many questions for little variations in charts which lead to new data (files / usage), new parameters and additional sometimes configurable code. All very well, but when talking about automation you need to search the reusable parts and see what needs to be done to generalise it. So that is what the ChartsCompiler is about: a tool for creating charts for websites which use CumulusMX as a basis in a generalised way.
Beside having a possibility to create charts, it is also a tool to be more efficient with data. Recent charts - e.g. Growing Degree Days - actually only require temperature and not additional data files. Basically every chart which plots derivatives can be calculated where only the basic measurements from the station are uploaded to the site.
Now, calculating all - almost all - charts is an ideal situation and there are many reasons just to upload the datafiles and plot the charts. Nobody feels the pain. But I see the data increasingly going back and forth to and from the website servers and I simply like trying to get that data load down.
So: easy user driven chart definition and reduction of data transfers are the goals.
We'll see how far I get. The basics are here and the tool is laid out in two Wiki articles: the ChartsCompiler and the CDL (Chart Definition Language). The CDL is still under development as is the compiler itself so changes will be fast and many.
It is implemented simply as a module of CumulusUtils and the output can easily be tested just by renaming the .txt output to .html and load it in the browser (make sure the required datafiles are present where you test it). This way it can be used as a stand alone tool. You need to use the parameters GeneratejQueryInclude and DoLibraryIncludes (true to use the output standalone).
[EDIT 24/9/21]:
Now, after the completion of the ExtraSensors module, the ChartsCompiler has become a pivotal module within the ecology of CumulusUtils as the charts for the ExtraSensors are created by writing out CDL code to the CutilsCharts.def file. This means that you can not only plot the ExtraSensor values but add other sensors to the same chart. So it is possible to chart e.g. Soil Temperature against Environment temperature from the standard weather station. Extra Sensors and regular measurements all have the datarange RECENT and therefore can be combined. This gives great possibilities in combining plot variables.
The important thing to notice is that you can create and use charts with the ChartsCompiler on a standalone basis and use those charts in any website or standalone.
Have fun.