Data Export

The “raw” position data used to draw SomnoPose charts can be exported in CSV (comma-separated value) format, which can then be directly loaded into many spreadsheet, data analysis, and database applications.

To export data, go to the Charts view and tap the chart to show the toolbar at the bottom:

Action button on chart toolbar

The action button will bring up a menu that includes several data-export items:

  • Use data for this chart... - To export the data for the currently-displayed chart
  • Use data for all charts... - To export all the chart data currently stored in SomnoPose
  • Email data for this chart - To email data for the currently-displayed chart, with additional information
  • Email data for all charts - To email all the chart data currently stored in SomnoPose, with additional information

The "Use data" items will present options for exporting data in various ways, including options to use AirDrop, or pass the data to selected apps (such as Mail or Notes).

The "Email data" items may be omitted if email is not fully set up on your device. These items will create and show an email message with the data as an attachment. You will need to fill in recipient addresses, and you can edit the email subject and body (for example, to add notes) before sending the message.

Data for one eight-hour chart will involve over 14,000 samples (about one every two seconds), so it may take a noticeable time for SomnoPose to prepare the data, depending on the speed of your device (and especially if you are using all your data, collected over many sessions). Lengthy preparation will be indicated by a progress bar overlaid on the chart. You can cancel the email by swiping right over the progress-bar view and tapping the resulting Cancel email button. (The button can instead be dismissed by double-tapping the progress-bar view.)

Progress bar over chart

The exported CSV data files contain five columns, but all the essential data is in the first three columns, with the last two columns providing optional time and date information in a more human-readable form.

Here is a very short example of the beginning of a SomnoPose CSV file:


The data rows are ordered chronologically, with the earliest samples first. Since samples are saved about every two seconds, a file for an eight-hour session will contain about 14,400 rows, with a file size of about 500 kilobytes. (Although most spreadsheet and database software should be able to load such files, some may have difficulty creating charts that use thousands of data values.)

The data columns are as follows:

  1. Timestamp: Time and date of the data sample (as seconds since the first instant of 1 January 2001, GMT)
  2. Orientation: Sleep position, represented by side-to-side angle of the device in degrees, -180 to 180. Zero for face up, positive values for facing right, negative values for facing left.
  3. Inclination: Upright angle of the device (and user) in degrees, 0 to 180. Zero for an upright position (e.g., user standing), 90 for a horizonal position (user lying down), 180 for the unlikely upside-down situation.
  4. Time_of_day: Time of the data sample as hours, minutes, and seconds, derived from the Timestamp value, using the device's time zone setting. It gives no additional information, but is provided in a human-readable format for convenient reference.
  5. Date: Date of the data sample as year, month and day, derived from the Timestamp value. It gives no additional information, but is provided in a human-readable format for convenient reference. To reduce file size, this is not included in every row.