Data Portrait

This program is a data visualization for my swimming data

The animation portrays my swimming speed every day of the week.

There is the date of my swimming exercise, my lap speed, my lap count, and how my speed is compared to other dates. Also how far I swim each day

Design Process

Date Source: Apple Health
Data Type: My swimming data. The data includes my lap time, lap count, and date

I also have another app that would show my lap time. It's called Swim-Wise, and it inspired me to look at Apple Health's data. It reminds me that these data may be extractable.

BTW, I swim 1000m every day. Sometimes I swim 2000m if I feel good.

Data Extraction:

From apple health on my iPhone, there is a function to export all my health data and this is what I got:

Half gigabyte of data. My laptop would freeze when I do a serach in this file.
The contents of the data is in XML format like this:

I dug out all the swimming data there and make a new XML file that is much smaller than the original file.

Also, using an online converter tool, I converted the XML file to a csv file so that the p5 can read

Reflection

Apparently, I spent too much time extracting the data and organizing my data. I used nested arrays nested in another array because there is so much data, which gave me a readable on how to use this array well. I wanted to extract more data from Apple Health, such as my stroke count in each lap, but that data wouldn't convert correctly in all online converter tools. Maybe I should learn to write a converter from XML to CSV file by myself in order to get that data. I eventually gave up on getting that data.

I feel my design idea is not so strong here. I only did basic work to present these data in an animated way. It's already frustrating to manage this amount of data for the first time. I feel the nested-nested array that I am using right now is pretty optimized in the end. The class object that I created for each day doesn't really store much data. I am just updating the corresponding location in the array for each track so that each tracked object can go to the nested array to find the numbers they need. It seems performant and does not require much storage space.