Using s-Dashboard to show streaming data in dashboard.

<< Click to Display Table of Contents >>

Navigation:  Building Streaming Applications > Tutorial 2: Introduction to Coding with Streaming SQL > Tutorial 2A: Creating a Stream and View in SQLstream s-Studio >

Using s-Dashboard to show streaming data in dashboard.

Previous pageReturn to chapter overviewNext page

Now that you've created a view with speeding buses and their latitude/longitude, you can create a dashboard to display these buses on a map.

Dashboards are web pages that contain multiple panels, each of which can connect to a different stream, view, or table. Each panel contains a visualization. These are flexible modes of viewing your data, including simple tables, points on a map, line plots, bar graphs, area maps, and so on. These all use column-row combinations to plot data. Panels can be changed in terms of both layout and data input. Dashboards will be most useful for streaming data, as you will be able to see data changing in real time.

The dashboard below, for example, shows dials that display various levels of failed login events for a bank.

sl_sample_dashboard

By  using adjustable panels, s-Dashboard lets you view multiple such objects at once. Each dashboard can be laid out with multiple panels, in combinations that you can change by adjusting panel layout.

Creating the Pan and Zoom Map Dashboard

In the following exercise, we'll create a map dashboard. This type of dashboard takes values for latitude (lat) and longitude (lon) as input, and uses these values to display locations on a map.

To do so:

1.Open a dashboard and navigate to http://localhost:5595/dashboards

sbur_s-dashboards_new_dashboards

2.Click the New Dashboard button.
3.Enter a name for the new dashboard and click Create.

sbur_s-dashboards_create_new_db_window

4.Click the start button to open the new dashboard.
5.Click Select Input.

sbur_s-dashboard_select_input

6.In the window that opens, you should see "buses" available as a schema.
7.Click "buses" to expand it.
8.You should see foreign streams and views listed.
9.Click Views to expand it.
10.Select speeders_map.

sbur_s-dashboard_select_input_dialog

11.Click Select.
12.Click Select Panel in the upper right hand corner.
13.In the window that opens, click Geo to expand it.
14.Select Pan & Zoom Map.

sbur_select_pan_and_zoom

A map opens. You should see activity in Australia.

15.Zoom in on Australia by either clicking the + icon in the upper left hand corner of the map or using your mouse wheel.
16.Click the gear icon to open panel preferences.

sbur_s-dashboard_panel_preferences

17.Make the following changes: Change diameter formula to 25.
Change Event Label to Speed:<%=speed>.
This refers to the "speed" column in the speeders_map view.
18.Click Update.

You should see red circles on the map indicating speeding buses. You can click on these to see their speed.

sbur_s-dashboard_map_result