Question: Write a program to answer the following from the fitbit data given in the file fitbit_data.csv: list the periods of sustained activity as indicated by
Write a program to answer the following from the fitbit data given in the file fitbit_data.csv: list the periods of sustained activity as indicated by a heart rate above 90 for at least 5 minutes. The list should consist of the start time of the period, the length of time, and the average heart rate ans steps per minute for each period. Think about, and write suitable functions that help simplify the task. Remember that data is often messy - in this case some of the fields are empty (null strings). There is a csv module in Python - you should not use it for this exercise.
1 minute calories distance floors heartsteps 2 0:00:00 0.9689 3 0:01:000.9689 4 0:02:00 0.9689 5 0:03:000.9689 6 0:04:00 0.9689 7 0:05:00 0.9689 8 0:06:00 0.9689 9 0:07:00 0.9689 10 0:08:00 0.9689 11 0:09:00 0.9689 12 0:10:00 0.9689 13 0:11:000.9689 14 0:12:00 0.9689 15 0:13:00 0.9689 16 0:14:000.9689 17 0:15:00 0.9689 18 0:16:00 0.9689 19 0:17:00 0.9689 20 0:18:00 0.9689 sleep level 63 67 69 70 70 71 69 71 68 67 0 0 0 65 65 67 65 63 0 0 63 63
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
