{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Data analysis from my journal\n", "\n", "I've tracked my sleep for a few days, about its quality and length, to have statistics and analyze this data." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext rpy2.ipython" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ " Date BeginningTime Length AwakeningReason\n", " 2023-10-18:2 1:00:00 :1 1:42:00 :1 AlarmClock :3 \n", " 2023-10-19:2 1:10:00 :1 17:10:00:1 AlarmMissed:1 \n", " 2023-10-20:1 1:28:00 :1 5:02:00 :1 Natural :1 \n", " 16:15:00:1 6:20:00 :1 \n", " 18:45:00:1 8:00:00 :1 \n", " Feeling \n", " NotVeryRested:1 \n", " QuiteRested :1 \n", " Rested :3 \n", " \n", " \n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%R\n", "data = read.csv('data.csv') # Read data\n", "summary(data)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[1] NA\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%R\n", "mean(data$Length)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }