💾 Archived View for jb55.com › ward.asia.wiki.org › datalog-viewer captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The Datalog plugin acquires and stores data often conveniently represented as multiple lines in a timeseries chart. We have been replicating an html/plotly.js application for this purpose. Here we consider replacing these with a plugin.
Advantages include direct control over a proliferation of views and possible drill-down into chart data within wiki.
Disadvantages include living with or working around smaller screen space and publishing experiments in npm.
The current scripts follow a pattern visible with "show page source". We'll examine a recent variation. plot
Load plotly.js from CDN.
Parse url for parameters.
Fetch recent Datalog files.
Reformat data into traces.
Invoke and interact with plotly.
Many parameters could be discovered by a plugin locating the relevant Datalog and interacting with it.
Markup could specify additional preferences. Adjusting number of days to plot would then involve item editing rather than browser url editing.
Datalog files would be similarly fetched. Some optimization might be possible should multiple plugins desire the same files. Incremental updates could come directly from the Datalog plugin via client-side events.
Markup could direct reformatting into traces. Some options would be general like choosing which of many items are to be plotted or smoothing algorithms employed. Other items might be source specific.
Converting temperature to Fahrenheit.
Averaging multiple colocated sensors.
Computing timestamp jitter.
Recognizing missing values.
Selecting traces by property.
Perhaps Plotly could be configured to use the space available to a plugin more effectively say by smaller margins and pop-up key? A version of enlarge, as for images, should be made to work.
The plugin should find the nearest datalog-source or possibly multiple-compatible sources. Tempo and blocking could be reconciled if desires were specified abstractly. Data shape would be harder to coerce without heuristics.
A plugin could make its Plotly traces available to other plugins. Perhaps data wrangling and rendering could be separate plugins.
Multiple plugins could provide coordinated views into related data such that pan and zoom in one is echoed in others. Example is two-way Data interaction with Line.
Our Pingdom replacement benefits from tabular display of processed Datalog records. See Ping Wiki Servers