library(tidyverse)
library(tidytext)
library(ggtext)
library(RColorBrewer)
library(extrafont)
library(plotly)
library(htmlwidgets)
# font_import()
loadfonts()
Do You Like Stretching? I Would Reconsider!
I imported and cleaned a gym dataset using tidyverse to properly factorize variables, remove missing values, and prepare the data for analysis. I then computed mean workout ratings by exercise type and experience level and created interactive Plotly visualizations with a custom ggplot theme to rank these exercises. My analysis revealed that while stretching improves flexibility and reduces injury risk, it consistently ranks the lowest for muscle building compared to weight training, emphasizing its role as a supplementary activity.
Abstract
This study examines the role of stretching in muscle building and its implications for fitness enthusiasts. While stretching offers benefits in terms of flexibility and injury prevention, it falls short as a primary method for muscle growth. The focus of stretching on range of motion rather than muscle mass and strength limits its effectiveness. In isolation, stretching lacks the necessary resistance to stimulate muscle growth. Moreover, my analysis using R reveals that stretching ranks the lowest in terms of workout ratings. The findings highlight the importance of incorporating weight and resistance training as the primary approaches for muscle development.
Introduction
Stretching enhances flexibility and prevents injuries, but its effectiveness in building muscle mass and strength is debated. This study explores the role of stretching in muscle building compared to other exercises. Stretching prioritizes flexibility over muscle development due to inadequate resistance and tension. It may not yield significant gains in muscle mass or strength. Excessive stretching can even reduce muscle activation and power output. Analysis of workout ratings using R shows stretching ranks lowest for muscle building. Weight and resistance training are emphasized as primary methods, with stretching as a supplementary activity for flexibility.
General Setup
Data Wrangling
<- read_csv("../../../assets/datasets/megaGymDataset.csv")
gymDs
# head(gymDs, 5)
# names(gymDs)
<- gymDs %>%
ds mutate(
ID = ...1,
Level = factor(Level, levels = c("Beginner", "Intermediate", "Expert")),
Type = as.factor(Type)
%>%
) select(-...1) %>%
drop_na()
Unleashing the Power of Plotly
<- ds %>%
plotDs group_by(Type, Level) %>%
summarize(meanRating = mean(Rating)) %>%
arrange(Type, meanRating) %>%
ungroup()
<- plotDs %>%
p highlight_key(., ~ reorder_within(Type, meanRating, Level)) %>%
ggplot(aes(
x = meanRating,
y = reorder_within(Type, meanRating, Level),
fill = fct_reorder(Type, meanRating),
text = paste0(
"Rating: ", round(meanRating, 2),
"<br>Type: ", Type
)+
)) geom_col(color = "black") +
facet_grid(
rows = vars(Level),
scales = "free_y",
switch = "y",
space = "free_y"
+
) scale_y_reordered() +
scale_fill_brewer(palette = "PuBuGn") +
labs(
title = "Ranking Exercise Type According to Experience Level of Individuals",
x = "Average Rating of Each Exercise Type",
fill = "Workout Types"
+
) theme_minimal() +
myTheme
ggplotly(p, tooltip = "text") %>%
config(displayModeBar = FALSE) %>%
highlight(on = "plotly_hover", off = "plotly_doubleclick") %>%
layout(
uniformtext = list(minsize = 8, mode = "hide"),
margin = list(b = 70, l = 140, r = 140)
)
Conclusion
While stretching remains valuable for improving flexibility and reducing the risk of injuries, it should be viewed as a supplementary activity rather than the main strategy for building muscle mass and strength. The incorporation of weight and resistance training, supported by the utilization of interactive plots using R, offers a more effective and comprehensive approach to achieving desired muscle development goals.