Using Local Data Filter to customize workout graphs in JMP 12
My latest quantified self data visualization project uses JMP 12 to clean up and visualize my workout data. As I described in my previous post, I cleaned up exercise names in my data table using the JMP 12 Recode platform. I also used Recode to create hierarchical exercise groupings, assigning exercises to primary body areas, and body areas to general body zones, including upper body, lower body and core. (Check out other recent posts on JMP 12 Recode updates.)
The stacked bar chart below summarizes all of the January weight workout data that I recorded in my workout notebooks, showing the total weight I lifted (calculated by a formula column) by body zone. Of course, I have data for other months and years, but I thought I would start my data entry project with January, the traditional month for exercise-related New Years' Resolutions. I found weight training data in my notebooks for 13 different Januaries, spanning the time periods 1999-2005 and 2010-2015.
Below, I used the JMP Local Data Filter to restrict the graph to show only data from January workouts and only exercises I classified as Lower Body or Upper Body exercises. I excluded two other exercise categories: Core, including mainly body weight exercises that contributed very little to my total weight lifted metric, and rows where exercise name was missing, which were cardio workouts.
To recreate this graph:
Drag Total Weight Lifted to the Y axis. (For details on how I calculated this metric with a formula column, see my previous post.)
Drag Year to the X axis, then drag Month above it to create a nested axis. You can create Year and Month columns from a continuous date variable as Transform columns within a launch dialog, or by right clicking on a continuous Date column and choosing New Formula. Column > Date > Year, then repeating these steps to create a Month Abbr column.
Drag Body Zone into to the Graph Builder Overlay drop zone. I customized my colors by adding Value Colors as a column property after double-clicking on the Body Zone column.
I added a Local Data Filter by choosing that option from the Graph Builder red triangle Script menu. Local Data Filter is also available in many other JMP platforms, and you can use it to filter your graphs without affecting the underlying row states in your table.
The body zone bar graph I created gave me an initial glimpse of how much my lifting patterns have shifted over time. In 1999, I was working out very regularly at a gym, usually following a body part split routine with a three day rotation that included a heavy leg training day. In fact, lower body exercises accounted for ~60 percent of the total weight I lifted in January 1999, with the main contribution coming from heavy leg presses and calf raises, as you can see below in the bar chart by exercise. I usually performed sets of leg presses and calf raises one after the other. Between the heavy weights, multiple sets, and a typical rep range of 15-20 rep range, the total weight lifted numbers for these lower body exercises added up quickly.
My focus on lower body training had lessened by January 2000, and I reduced my leg training even more in the following year as I began working out almost exclusively at home with free weights and a Bowflex. Although my husband and I picked up additional workout equipment over the next few years, I never went back to heavy leg training. As life got busy, I didn't use the equipment that we had as consistently either. This is quite obvious from the drop in my total weight lifted metric starting in January 2001, as I spent less and less time working out during graduate school and early parenthood. I became pregnant in early 2004 and lifted the least weight ever in a January in 2005 -- except of course for the years 2006-2009, when I didn't record any workouts at all during the first month of the year.
Below is a graph where I cleared the Local Data Filter restriction on Month and showed the data I've entered so far. In recent years, most of the weight I lift is attributable to upper body exercises. While my total weight lifted in December 2014 was close to the total amount I lifted in January 1999, lower body exercises now only account for only ~20 percent of my total weight lifted metric.
I also used Local Data Filter to customize my graphs to show the maximum amount of weight I lifted for a subset of exercises by year. I decided to focus on my first two years back to consistent training (1999 and 2000) and my last two years (2013 and 2014) of data. I chose a short list of dumbbell exercises I had performed regularly in at least three of those four years, including staple exercises like dumbbell (DB) hammer bicep curls, flat and incline dumbbell chest presses, lateral raises and shoulder presses. Interestingly, the maximum amount of weight I lifted was greatest for nearly all exercises in 2014, with the exception of a single exercise where I used a lot of weight during one workout in 2013. I had to check the original data for that workout to verify that number wasn't a mistake (it wasn't). My training programs last year have included more low-rep sets than have done in the past, for which I tend to use heavier weights.
Creating this graph was a bit trickier, mostly because I had to select markers that could be overlaid, unjittered, but without completely obscuring one another. To make it, I performed the following steps in Graph Builder:
Dragged DB or BB weight to the Y axis.
Dragged Exercise Name to the X axis.
Dragged Year to the Overlay field.
Chose Max as the Summary Statistic in the left hand properties pane.
Filtered to show only data for the years 1999, 2000, 2013 and 2014.
Changed the marker color, shapes, and transparencies so that I could distinguish year by marker and color.
Stay tuned for my next blog post, where I'll show how I created a custom muscle map to visualize my workout data!