The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Finding Answers About Humans Using Data Science

--

The Human Input — Output project (Part 1 : Data Collection)

Cover by Author (Illustration: Goostudiominsk)

Last Sept, I joined a part-time job at ASU (my grad school) which mandated me to play with data. That’s when I started dipping my feet into the ocean of data science. I started small by learning Microsoft Excel and playing with pivot tables. Soon enough, I found myself applying the learning for my daily life and research. As time went by in the past one year, I dived deeper into data science and later into machine learning. This series of articles is all about how I started performing data collection and analysis for one of my personal research project and the challenges I faced during the process.

The preface to Human I/O project

I am that kind of guy who binge reads any book that is in any way connected to the human mind, psychology, and human productivity. I have learned enough about how we, the Homo sapiens function mentally starting from expectations until emotions. While I was on this pursuit, I noticed that I was completely blinded to see the other half of the picture. That is “How our physical state affects our action?”. I got even more curious after I started learning about epigenetics, physiology, and the human microbiome.

Figure illustrating the premise behind my research project: Human Input — Output project

So, I embarked on my pursuit to find correlations between the food we eat, our activity, our sleep, the environment we live in, and our action. I will start by explaining the various stages of my data analysis which I am currently implementing, followed by my trials and challenges. The current article covers the first part of it: The Data Collection

Data Collection

Note: Each of the app/tools which I mention below provides in-app analytics to analyze the respective metric individually. However, I sync everything with Apple health and later export them from Apple health or I export the data directly from the app after being collected, for my correlational analysis.

The main variables which I choose to monitor to discover the correlations between our body inputs, the environment, and thus our body-mind responses are as follows:

1. Sleep time, duration, and quality — The rest

2. Quantity, type, and quality of food — The food

3. Amount and type of activity — The activity

4. Body response metrics

5. Mind response metrics

6. Environment and Mental feed

The rest

I use the SleepWatch iOS application + Apple Watch to track my sleep. All I need to do is to wear the watch during the sleep every single day. It tracks the following metrics along with various other metrics which I will explain later in this article:

1. Total sleep duration

2. Sleep disruption

3. Time I went to bed

< screenshots from SleepWatch Application and within app analytics>

The food

I use Calory iOS + watchOS applications to record my food entries. Calory is a wonderful tool to capture the details of what we eat. We can create and log plates if we eat the same combinations of food every day. We can split the day into breakfast, lunch, and dinner as per our timings. We can even set our custom labels for these time periods instead of the defaults. I will explain the usefulness of creating more bins in the “challenges and journey” article.

< screenshots from Calory iOS app and Watch application>

The activity

I use Apple watch’s built-in activity tracking and Apple watch workout app to track my activity. Yoga, strength training, and running are the three activities that I do frequently. I established real-time sync between Apple health’s activity data to a Google sheet on my Google Drive via the Health metrics App.

Body response metrics

Measuring how my body is responding to the changes I make in my diet or my activity is one of the primary goals of this study. Therefore, I started measuring our body budgeting system response and sleep response. The first two metrics mentioned below are quantitative measures and I measure the final metric: body feeling qualitatively using journal entries. I measure the third one: sleep sufficiency and response using both the methods.

1. Heart metrics

2. Blood pressure, Basal Temperature, and Bodyweight

3. Sleep sufficiency and response

4. Body feeling (I/O journal)

Heart metrics

Given below are the heart metrics which I monitor every day using the Apple Watch. I use Apple watch’s real-time heart monitoring and SleepWatch app’s Sleep heart metrics.

1. Resting heart rate

2. Heart rate variability

3. Sleeping Heart rate dip

4. Sleeping Heart rate variability

5. Sleeping heart rate

<screenshot from Apple Watch heart monitoring and SleepWatch sleeping heart metrics>

Blood Pressure, Basal temperature, and Bodyweight

These are the body metrics that we can monitor easily at home using respective monitoring devices. I use the Renpho weight scale and companion Apple Watch app to record my body weight every morning with an empty stomach.

And I use a basic basal thermometer + ThermoWatch App’s manual input and an automated blood pressure cuff to measure body temperature and blood pressure every morning. Everything is synced to my Apple health automatically.

<photos of myself measuring weight and temperature>

Sleep sufficiency and response

Initially convinced by the reasoning for sleeping at least 6–7.5 hours a day by Matthew Walker, the author of the book “Why we sleep”, I later included the monitoring of sleep requirements as a response to food and activity changes. I couldn’t thank Sadhguru or Prakruthivanam Prasad enough for this insight. They are proponents of the concept that the sleep requirement is entirely dependent on the way we treat our bodies and ourselves.

To measure the fatigue or sleepiness during the day, I use Multitimer counters. Multitimer app on iPhone provides various types of timers like countdown, count-up, counter, lap, etc., which we can use from the Apple watch. I configured two counters, one for ‘the number of yawns’ and the other for ‘the number of dozes’. Back in the days when I slept 5–6 hours per day, I used to yawn a lot. So, I chose yawing and dozing as measures for sleep insufficiency along with other qualitative information. Coming back to the app, we can maintain journals for the counters we created where Multitimer logs the counts whenever we reset the counter. I usually reset the counters every morning after I wake up so that the journal records the number of yawns and dozes for each day.

Although I quantitatively measure the yawns and dozes, I also measure how active I feel during the day using my I/O journal which I will discuss in the next section. I also noticed that the REM (Rapid Eye Movement) — NonREM sleep split, and sleep disruption changes with changes in food, activity, and other inputs. So, I track these using the SleepWatch app.

<screenshots from Multitimer counters, and an example I/O journal entry using DayOne app>

Body feeling (I/O journal)

I note down any changes I feel in my body as a journal entry in DayOne App. I log things like “l am feeling hungry — 1 pm” or “feeling lethargic after eating rice” or “little headache — seems like sleepiness” or “feeling great with clear thought and vision”.

My intention is to use the daily entries and find correlations using simple word frequency or NLP. I arrived at this solution after a long struggle of quantifying daily body response using quantitative metrics which I will elaborate on in the challenges article.

Mind response metrics (Daily Journal)

Even though my focus is on the human body, Our actions are ultimately determined by our minds. It will be a waste if I do not connect the “state of body” with “our actions” via “our brain”. I monitor my actions and my thought process using the same journal entry method which I use to monitor my body state.

The Preface extension

In fact, the very reason for the inception of this project is because of my journaling habit which I am following for many years. I journal a lot and I write about almost everything that happened on that day. Whom I met, what did I do, where did I go, and how I felt. It became evidently clear on how our surrounding environment and the people whom we live with, affect our actions as I started reflecting on tiny details. And with newly acquired knowledge of physical state affecting our actions, I jumped on to the opportunity to use data and draw conclusions.

I do journaling every morning, reflecting on everything about yesterday. I used to journal using hardcover diaries and pens. But I shifted to digital journaling (Day One and Zoho Notebook) so that I can use ML techniques to extract and understand the information.

The Environment and Mental feed

We won’t have a society if we destroy the environment. — Margaret Mead

The above quote is completely irrelevant to the topic! I am being a Sustainable Engineer here… Please ignore it!

Humans adapt to the changes in the environment they live in, both physically and mentally. I included the environment data to avoid correlation fallacies and also to measure our bodies' adaptability with respect to the external environment.

I capture the information about the environment in my I/O journal. The following examples will provide you an idea of how I capture the details about the environment. The environment includes both inanimate and animate things. The journal entries also include my mental feed i.e what I read, what I watch and what I listen to.

Examples:

What physical environments am I exposed to on that day?

Whom did I meet and what did we talk about?

What did I watch on Netflix?

Did I turn off the light before sleeping?

What’s the room temperature when I was sleeping and when I woke up?

These may seem heavy but with Day One journal’s template feature, we can record many items like these very easily.

<Using various apps across various stages>

Extras: metrics to address biases

As I am playing both the roles of a lab rat and a researcher, the results that I got so far and my implicit biases may allow some biases to creep in on the qualitative data which I am capturing. I will elaborate on the feedback mechanisms and meta things in “Challenges and journey article”. However, I want to provide the details of some extras which I am capturing to solidify the research reducing the impact of biases.

I take a picture of my face every day and do voice journaling once every 2–3 days. In Asian cultures, it is believed that our face is a marker for sound health. Interestingly enough, whenever I eat a lot of sugar or caffeine, acne develops on my face very quickly. So, I capture my face with bright light and a good camera every day, trusting computer vision algorithms to do the job for me.

Voice journaling and video journaling are fun. But I soon lost the habit as I generally journal early mornings and I don’t want to disturb my roommate’s sleep. However, having realized the significance of vocal features (I worked on speech features to predict depression), I restarted voice and video journaling once every 2–3 days, once again having faith in machine learning. I hope these extras may not seem a bit extra to you.

In the next part of this blog series, I will explain how I extract the data, connect all the data sources, and monitor the results.

The inspiration or information for whatever metrics I choose, whatever body responses I measure, and pretty much everything about this project came from the reading or watching of off the below sources. (Of course, from my personal experiences too. Contact me for any information or suggestions or to call me insane).

References:

Books:

Podcasts:

Coursera:

People:

The Complete App list:

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

No responses yet