Skip to main content

Using Kibana

Avicenna Kibana Integration

Kibana is an open-source data visualization tool which can create different graphs and charts from large amounts of data. Kibana allows you to explore the data, create visualizations such as bar chart, line charts, scatter plots, maps, and many more. You can further combine these visualizations to create interactive dashboards.

In this document, we describe how you can use Kibana to explore and visualize your Avicenna study data. This document does not intend to teach you how Kibana, Elasticsearch, or Lucine works. There are already many online resources and training videos for these technologies. We suggest you review them to better understand how you can use Kibana for your work.

For each study you create in Avicenna, a set of data tables are created in a data storage system called Elasticsearch. These tables are also called index or index pattern. Kibana allows you to access these data tables, query them, read the data, and visualize them. To access the Kibana, go to the Researcher Dashboard, and from the left-side menu click on Kibana. This will take you to a page similar to the image below:

Kibana first page

There are 4 important sections in the above image:

Number 1 lists the data tables for your study. Your study does not necessarily have data in all these tables, depending on which data sources and which activities you have added to your study.

Number 2 shows the time range over which you are querying the data. By default, the time range just shows the data for the past 15 minutes, so there is a chance that you do not see any data. You can increase this time range to load more data.

Number 3 lists the data fields that are available in the current data table. This list is different depending on the data table that you have selected. For example, for GPS it includes the location and the speed of the movement, while for Pedometer it includes the number of steps taken.

Number 4 allows you to filter your data. You can put filter on any data field that exist in the current data table. For example, assuming that you are looking at the Pedometer data table, you can filter data for those who have taken 100 steps or more.

Avicenna does not store all data sources in the Elasticsearch. At the moment, only the following data sources are stored in the Elasticsearch and therefore are accessible through Kibana:

  • GPS (gps index)
  • Wi-Fi (wifi index)
  • Pedometer (pedometer index)
  • Motion-based Activity Recognition (mb_activity_rec index)
  • Battery (battery index)
  • Screen State (screen_state index)
  • Bluetooth (bluetooth index)
  • Bluetooth Beacons (beacon index)
  • App Usage Statistics (app_uage index)
  • Call & SMS logs (telephonycomms index)
  • Participant Audit Logs (participant_history index)
  • Survey Responses (survey_responses index)
  • Stroop Responses (stroop_responses index)
  • Time Use Diary Responses (time_use_responses index)

Below you can read the details for each of these data sources, including available fields and their types.

Avicenna clusters host the services for Kibana and Elasticsearch. Therefore, your study data does not leave Avicenna servers for any of the procedures described here.

Available Data Sources

This section describes the available data sources and the fields each data source have in Kibana. The name of the field is necessary to access the field's data in Kibana. The field's type specifies the type of the data being stored in it. You can refer to Elasticsearch's field datatypes for more details about each type. You also can check the Data Sources section for detailed definition of each field.

Common Fields

The following data fields are available in each of the data sources described below:

Study ID
Filed Namestudy_id
TypeInteger
DescriptionThe ID of the study this record belongs to.
Participant ID
Filed Nameuser_id
TypeInteger
DescriptionThe ID of the participant who provided this record.
Device ID
Filed Namedevice_id
TypeKeyword
DescriptionThe ID of the device which provided this record. Each participant can own multiple devices during the course of the study, and each device will have a unique ID. Avicenna uses this ID to tag all records coming from the same device. The ID remains the same even when the user uninstalls and reinstalls the Avicenna app on their phone.
Record Time
Filed Namerecord_time
TypeDate
DescriptionThe time which this record was captured. For survey responses, record_time for all responses in the same session are identical, and it represents the time when the user has pressed Submit button (or equivalent) to finish responding to the survey.
Relative Record Time
Filed Namerel_record_time
TypeDate
DescriptionThe number of milliseconds between the participant's participation period start time, and the time this record was captured. This field is particularly useful for studies with rolling enrollment, where each participant starts the study at a potentially different date. Therefore, 0 indicates the record was captured right at the start time, 1 indicates the record was captured 1 ms after the start time, and so on. Note that this field is marked as Date, therefore Avicenna will show the field as milliseconds passed Unix epoch (Jan. 1st, 1970). If you plan to query the data based on this field, you need to set the time range based on this date.

Survey Responses

For survey responses, Avicenna stores each response to a given question as a separate record. Therefore, a given survey session can contain multiple records. For example, assume your survey contains 5 questions, from question ID 1 to 5. Every time a participant responds to your survey, 5 new records will be added to this index, one for each question (assuming the participant has responded to all questions).

Also, note that not each record contains all the fields specified here. If a given record does not have a given field, it means the field was not relevant for that record. For example, if a survey response is of type text, the record will contain answer_content, but it will not contain answer_url.

Index name: survey_responses

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
Survey IDsurvey_idInteger
Question Set IDquestionset_idInteger
Response DurationdurationintegerIn minutes.
Scheduled Timescheduled_timeDateFor Time- and Proximity-Triggered sessions, this shows the time the survey was automatically triggered. For User Triggered sessions, this shows the time the survey was started by the participant.
Prompt Timeprompt_timeDateSame as Scheduled Time.
Response Timeresp_timeDateThe time this response was provided.
IterationiterationInteger
Loop Countloop_countInteger
Question IDq_idInteger
Question Contentq_contentText
Question Typeq_typeKeyword
Answer IDanswer_idInteger
Answer Contentanswer_contentText
Answer URLanswer_urlKeyword
LocationlocationGeo Point
Location Accuracylocation_accuDouble
Location Speedlocation_speedDouble
Preferred Unitpref_unitKeyword
SelectorselectorKeyword

GPS

Index name: gps

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
ProviderproviderKeyword
Satellite Timesatellite_timeDate
LocationlocationGeo Point
SpeedspeedDouble
AccuracyaccuDouble
AltitudealtDouble
BearingbearingDouble

Wi-Fi

Index name: wifi

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
SSIDssidKeyword
BSSIDbssidKeyword
Access Point CapabilitiescapabilitiesKeyword
FrequencyfreqInteger
LevellevelInteger

Pedometer

Index name: pedometer

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
StepsstepsInteger
AccuracyaccuDouble
DistancedistanceDouble
Average Active Paceavg_active_paceDouble
Current Cadencecur_cadenceDouble
Current Pacecur_paceDouble
DurationdurationInteger
Floor Ascendedfloor_ascendedDouble
Floor Descendedfloor_descendedDouble

Motion-based Activity Recognition

Index name: mb_activity_rec

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
Activity Typeactivity_typeInteger
Confidence Levelconfidence_levelInteger

Battery

Index name: battery

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
LevellevelInteger
ScalescaleInteger
StatusstatusInteger
PluggedpluggedInteger
TemperaturetemperatureInteger
VoltagevoltageInteger

Screen State

Index name: screen_state

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
Screen StatestateBoolean
End Timeend_timeDate

Bluetooth

Index name: bluetooth

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
MAC AddressmacKeyword
Device Namedev_nameKeyword
Device Classdev_classKeyword
RSSIrssiInteger

Bluetooth Beacons

Index name: beacon

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
MAC AddressmacKeyword
Device Namedev_nameKeyword
Device Classdev_classInteger
PayloadpayloadLong
Team IDteam_idInteger
Role IDrole_idInteger
Subject IDsubject_idInteger
RSSIrssiInteger

App Usage Statistics

Index name: app_usage

Index fields:

NameField NameTypeDescription
Participant IDuser_idInteger
Device IDdevice_idKeyword
Record Timerecord_timeDate
Relative Record Timerel_record_timeDate
App Nameapp_nameKeyword
Start Timestart_timeDate
End Timeend_timeDate
Last Usedlast_usedDate
Foreground Timeforeground_time_msIntegerIn milliseconds.