## 7 Automated Event Visualization Using Semantic Reasoning
Kafka ([[http://kafka.apache.org/](http://kafka.apache.org/)]([http://kafka.apache.org/](http://kafka.apache.org/)), accessed on 26 October 2021) is a highly scalable distributed message passing platform that enables real-time, in-order and at-least-once processing of messages. It is used to stream incoming sensor observations in real time to the event detectors. When an event is detected, it is again published through Kafka where it is picked up by the dashboard, but also persisted in Stardog ([[https://www.stardog.com/](https://www.stardog.com/)]([https://www.stardog.com/](https://www.stardog.com/)), accessed on 26 October 2021), a semantic database specialized in storing RDF graphs. This permanent storage of events allows the dashboarding platform to retrieve them in bulk at a later stage. The dynamic dashboarding platform mainly consists of a graphical user interface (GUI) for its users and a broker component [5]. The dashboarding GUI is a web application that users run in their web browser to create dashboards that visualize sensor data and event information. The dashboard broker acts as the central back-end service for all dashboarding operations, such as listing available sensors and saving dashboard compositions. An Event API serves as a utility web service to the dashboarding GUI for retrieving, storing or updating events. The Event API streams events, as soon as they are detected, from Kafka, to the dashboarding GUI, using the WebSocket protocol ([[https://tools.ietf.org/html/rfc6455](https://tools.ietf.org/html/rfc6455)]([https://tools.ietf.org/html/rfc6455](https://tools.ietf.org/html/rfc6455)), accessed on 17 August 2021). Furthermore, the dashboarding GUI uses the Event API for fetching historical events (e.g., the events that occurred over the past month) from permanent event storage, using Stardog's data querying endpoint and the SPARQL querying language ([[https://www.w3.org/TR/sparql11-overview/](https://www.w3.org/TR/sparql11-overview/)]([https://www.w3.org/TR/sparql11-overview/](https://www.w3.org/TR/sparql11-overview/)), accessed on 17 August 2021). Figure 5 shows the dashboard GUI, where the event list on the right side is updated in real time through the Event API. When a user selects an event from the list, the dashboard broker automatically composes a dashboard tab to visualize the selected event. Specifically, it performs the event-driven visualization reasoning process as described in Section 7 using the EYE Server ([[https://github.com/[PERSON]/EyeServer](https://github.com/[PERSON]/EyeServer)]([https://github.com/[PERSON]/EyeServer](https://github.com/[PERSON]/EyeServer)), accessed on 17 August 2021), which exposes the EYE reasoner as a service. The reasoning output specifies a set of visualization widgets for the new dashboard tab and is passed by the broker to the dashboard GUI, where the widgets are added to the web page. Please note that the dashboard broker automatically discovers the semantic annotations of all sensors and visualizations that are used for the event visualization reasoning. This allows operators to update the information of sensors and monitored assets, as well as the set of available visualizations, in a decentralized way. The design of the Dynamic Dashboard is documented in detail in [PERSON] et al. (2018)

Whenever a user interacts with the dashboard and provides feedback about an event alert, the dashboard GUI informs the Event API, which then publishes the update on Kafka. The update is in turn ingested by the known pattern detector and rule miner components, who use it to improve their event detection performance on new sensor data. This essentially closing a feedback loop and creates a synergy between detectors and dashboard for obtaining better-quality event detection. We validated the throughput of this architecture by replacing the stream of incoming measurements by a high-speed replay of recorded measurements originating from a single ventilation unit. This way, _all_ incoming data and events would be visualized in a single dashboard.