Skip to main content

Kibana Basics

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.

info

By clicking on the Share button at the top, you can export your data.

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)
  • Fitbit Activity Summary (fitbit_daily_activity index)
  • Fitbit Activity Intraday (fitbit_activity index)
  • Fitbit Sleep (fitbit_sleep index)
  • Fitbit Heart Rate (fitbit_heart_rate index)
  • WHOOP Sleep (whoop_sleep index)
  • WHOOP Workout (whoop_workout index)
  • WHOOP Recovery (whoop_recovery 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:

NameField NameTypeDescription
Study IDstudy_idIntegerThe ID of the study this record belongs to.
Participant IDuser_idIntegerThe ID of the participant who provided this record.
Device IDdevice_idKeywordThe 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 Timerecord_timeDateThe 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 Timerel_record_timeDateThe 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 (see Common Fields too):

NameField NameTypeDescription
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

Device State

The Device State logs are utilized to convey various states and settings of a device. They provide a holistic view of the device's operational status, covering aspects from battery life to connectivity. New reports are created as soon as one of the fields changes its value. For example, if the power saving mode is enabled, a new report is created that includes the new value of the power saving mode field and the latest values of other fields.

Index name: device_state

Index fields (see Common Fields too):

NameField NameTypeDescription
Battery Statusbattery_statusKeywordA battery level below 15% is considered LOW.
Values: UNKNOWN = 0, OK = 1, LOW = 2
Battery Levelbattery_levelIntegerShows the current battery level as a percentage (0-100%).
Power Saving Modepower_saving_modeKeywordValues: UNKNOWN = 0, Enabled = 1, Disabled = 2
Battery Optimizationbattery_optimizationKeywordValues: UNKNOWN = 0, Enabled = 1, Disabled = 2
Power Connectivityis_power_connectedKeywordIndicates whether the device is currently connected to a power source.
Values: UNKNOWN = 0, Enabled = 1, Disabled = 2
Storage Statusstorage_statusKeywordAndroid only. Provides information about the device's internal storage status. LOW status depends on each device's specifications and system reports.
Values: UNKNOWN = 0, OK = 1, LOW = 2
Memory Statusmemory_statusKeywordAndroid only. Reports the status of the device's RAM usage. Avicenna checks the memory status every 15 minutes, alongside the OS notification regarding low memory conditions. LOW status depends on each device's specifications and system reports.
Values: UNKNOWN = 0, OK = 1, LOW = 2
Network Connection typenetwork_connection_typeKeywordValues: UNKNOWN = 0, NOT_CONNECTED = 1, CELLULAR = 2, WIFI = 3
Airplane Modeairplane_modeKeywordAndroid only.
Values: UNKNOWN = 0, Enabled = 1, Disabled = 2
Do Not Disturb Modedo_not_disturbKeywordAndroid only.
Values: UNKNOWN = 0, Enabled = 1, Disabled = 2
LocalelocaleKeyword
Time ZonetimezoneKeyword
Operating System Versionos_versionKeyword

Application State

The Application State logs report various states and settings of participants' Android or iOS apps. They provide a holistic view of the application's status. New reports are created as soon as one of the fields changes its value. For example, if the app language changes, a new report is created that includes the new value of the language field and the latest values of other fields.

Index name: application_state

Index fields (see Common Fields too):

NameField NameTypeDescription
Email Notificationsemail_notificationsKeywordIndicates whether email notifications are enabled or disabled in the application settings.
Values: UNKNOWN, ENABLED, DISABLED
SMS Notificationssms_notificationsKeywordIndicates whether SMS notifications are enabled or disabled in the application settings.
Values: UNKNOWN, ENABLED, DISABLED
Wi-Fi Only Uploadwifi_only_uploadKeywordSpecifies whether data uploads are restricted to Wi-Fi connections only in the application settings.
Values: UNKNOWN, ENABLED, DISABLED
Allow Data Collectionallow_data_collectionKeywordDenotes whether data collection is permitted by the participant in the application settings.
Values: UNKNOWN, ENABLED, DISABLED
LanguagelanguageKeywordThe current language of the application set by the participant.
App Version Numberapp_version_numberIntegerThe current version number of the application.
Execution Modeexec_modeKeywordIndicates the execution mode of the application.
Values: UNKNOWN, BACKGROUND, FOREGROUND, TERMINATED (only iOS supports this value and it will be logged only when the participant, not the OS, terminates the app)
Execution Mode Change Occurred Atexec_mode_change_occured_atDateTimestamp of the last time the execution mode has changed.
Onboarding Alertsonboarding_alertsNestedA list indicating changes in alerts related to app permissions and settings that may require user attention or action. Each alert is defined with a type (see the next tables) and status (Values: UNKNOWN, Added which means the alert showed up on the app, Deleted which means the alert was taken care of by the participant in some way).
Study Data Sourcesstudy_datasourcesNestedA list indicating whether data sources are enabled/disabled. Each data source is defined with a type (see the next tables) and status (Values: UNKNOWN, Enabled, Disabled).
Survey Notificationssurvey_notificationsKeywordAndroid only. Indicates the status of survey notifications.
Values: UNKNOWN, ENABLED, DISABLED
Sticky Notificationssticky_notificationsKeywordAndroid only. Indicates the status of sticky notifications.
Values: UNKNOWN, ENABLED, DISABLED
Onboarding Alerts TypesDescription
Unknown
GPSTo grant the app permission to collect GPS data. Also, on iOS devices, with GPS permission, Avicenna can keep the app open in the background for a longer time.
Activity RecognitionTo grant the app permission to collect motion sensor data.
App UsageTo grant the app permission to collect app usage data.
BluetoothTo turn the Bluetooth on.
WiFiTo turn the WiFi on.
GarminTo grant Avicenna permission to access Garmin data.
FitbitTo grant Avicenna permission to access Fitbit data.
WHOOPTo grant Avicenna permission to access WHOOP data.
HealthKitiOS only. To grant Avicenna permission to access HealthKit data.
SensorKitiOS only. To grant Avicenna permission to access Sensor data.
Audio CaptureTo grant the app permission to record audio from the microphone.
Background App RefreshiOS only. To enable background app refresh.
Time-Sensitive NotificationiOS only. To enable time-sensitive notifications.
Persistent Notification BanneriOS only. To enable the persistent notification banner.
Phone ValidationTo verify the phone number.
Email ValidationTo verify the email address.
Application UpdateTo notify when a new app version is available on the store.
Location ServiceTo enable the Location service.
NotificationsTo grant the app permission to prompt notifications.
Battery OptimizationAndroid only. To disable battery optimization.
Battery Optimization (Device Specific)Android only. To disable battery optimization if the device is "Sony", "Samsung", "Huawei", "Xiaomi", or "Oneplus".
Schedule AlertsAndroid only. To grant the app permission to schedule notifications and alarms.
Study Data Sources Types
Unknown
Accelerometer
Ambient Temperature
Gyroscope
Gravity
Light
Linear Accelerometer
Magnet
Orientation
Pressure
Proximity
Relative Humidity
WiFi
Bluetooth
GPS
Battery
Ambient Noise
Ambient Audio
App Usage
Screen State
Pedometer
Motion Based Activity Recognition
Beacon
Apple HealthKit
Apple SensorKit
Fitbit
Garmin
WHOOP

GPS

Index name: gps

Index fields (see Common Fields too):

NameField NameTypeDescription
ProviderproviderKeyword
Satellite Timesatellite_timeDate
LocationlocationGeo Point
SpeedspeedDouble
AccuracyaccuDouble
AltitudealtDouble
BearingbearingDouble

Wi-Fi

Index name: wifi

Index fields (see Common Fields too):

NameField NameTypeDescription
SSIDssidKeyword
BSSIDbssidKeyword
Access Point CapabilitiescapabilitiesKeyword
FrequencyfreqInteger
LevellevelInteger

Pedometer

Index name: pedometer

Index fields (see Common Fields too):

NameField NameTypeDescription
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 (see Common Fields too):

NameField NameTypeDescription
Activity Typeactivity_typeInteger
Confidence Levelconfidence_levelInteger

Battery

Index name: battery

Index fields (see Common Fields too):

NameField NameTypeDescription
LevellevelInteger
ScalescaleInteger
StatusstatusInteger
PluggedpluggedInteger
TemperaturetemperatureInteger
VoltagevoltageInteger

Screen State

Index name: screen_state

Index fields (see Common Fields too):

NameField NameTypeDescription
Screen StatestateBoolean
End Timeend_timeDate

Bluetooth

Index name: bluetooth

Index fields (see Common Fields too):

NameField NameTypeDescription
MAC AddressmacKeyword
Device Namedev_nameKeyword
Device Classdev_classKeyword
RSSIrssiInteger

Bluetooth Beacons

Index name: beacon

Index fields (see Common Fields too):

NameField NameTypeDescription
MAC AddressmacKeyword
Device Namedev_nameKeyword
Device Classdev_classInteger
PayloadpayloadLong
Team IDteam_idInteger
Role IDrole_idInteger
Subject IDsubject_idInteger
RSSIrssiInteger

App Usage

Index name: app_usage

Index fields (see Common Fields too):

NameField NameTypeDescription
App Nameapp_nameKeyword
Start Timestart_timeDate
End Timeend_timeDate
Last Usedlast_usedDate
Foreground Timeforeground_time_msIntegerIn milliseconds.