top of page
Search

Analyzing my fitness using Python

colinmbooth

Updated: Oct 7, 2021

As somebody who has Asthma, the pandemic has focused my attention on managing my asthma better and how I really should lose some weight to help that.


I wanted to see how I do with my fitness in the past, so using the data on my phone i created a python project to analyze that.


I wanted to see how many calories I was burning each day and how many miles I was walking a day.


The Opportunity

The idea behind this project was to use the data to help me reach my health goals of weighing 168 lbs with a 34 inch waistline.


Data Collection

I usually carry my IPhoneXR so used it to track my steps each day and the the amount of calories burnt. I know these are not 100% accurate but for the purposes of this project, I shall assume they are. Although these devices capture our fitness they don't make it so easy to download the data so I used a third party app called QS Access t to export the raw data collected in my Apple health.


Here's a snapshot of the data


As you can see the data has 2 date columns, and Active Calories. Dietary Calories, Flights Climbed, Step s taken and Weight Columns.


Once I had this data downloaded and ready to export as .CSV file I was ready to analyze it.


Data Analysis


I wanted to use python for this project to do some automated quick analysis and learn python. I used Google Colab. You can check out my notebook here


First used Pandas to import the CSV for analysis, I then used df.describe to get some basic descriptive analytics about my data. it was illuminating.


Calories

Insight - During periods when I didn't monitor my calorific intake my weight tended to go up, which would suggest I eat more than I think I do, typically over winter.

Action - Monitor daily intake to find a sweet spot in calories where I am neither losing or gaining weight


Steps

Insight - When I walked more than 6000 steps in a day I slept earlier, longer and was happier

Action - Aim to walk > 6000 steps every day


Using Boolean Masking, I teased out the days that I walked more 4 miles, these typically coincided with the summer months of increased activity.


Conclusion


I need to eat more healthily and consistently as well as exercise regularly, especially over the winter months.


1 view0 comments

Recent Posts

See All

Comments


Post: Blog2_Post

©2021 by colin.m.booth | data analyst. Proudly created with Wix.com

bottom of page