NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > R Shiny > Data Analysis on Crossfit Athletes with R-Shiny

Data Analysis on Crossfit Athletes with R-Shiny

Martin Kihn
Posted on Jan 3, 2021
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Weekend (Data) Warrior

For many of us, New Year == New You: a running start to all those exercise, eating and wellbeing programs we never quite got to last year. There's data evidence that the most-common new year's resolution among Americans is to exercise more, and that more healthy living is a goal for almost a third of us.

Like half a million other people around the world, my activity of choice is Crossfit. Although I've been doing it for five years, I resolved this year to increase my Crossfit knowledge, engagement and mojo. Rather than actually go to the gym, I decided to build an interactive R Shiny app that could help me and other Crossfitters to analyze the performance of competitive athletes, looking for patterns that can lead to gains.

The data consisted of two files. (They can be accessed here and here, and previous analyses can be found here and here.) One contained of over 1.5 million records of athlete performance at various Crossfit events, including the annual Open, which attracts hundreds of thousands of people like me with dreams of ESPN Crossfit Games glory. The other file had 423,000 rows of 28 attributes, most of which were self-reported by athletes, including times on standard workouts, weightlifting loads, and answers to survey questions about diet, background, lifestyle and routines.

The data files could be joined on Athlete ID, which is unique to each registered athlete.

Note: If you'd like just like to interact with the app -- it's pretty self-explanatory -- you can jump right to it here.

Motivating Questions

The primary questions I was hoping to answer with the help of the app were:

  • Is there a competitive benefit to focusing on cardio or weightlifting, both of which feature in the Crossfit program?
  • What is the impact of body-mass index (BMI) on the different types of activities?
  • Is there a background or routine that leads to better performance in competitions?

In particular, I wanted to reach some conclusions about how athletes who performed well at sanctioned events trained and focused their time. Someday, I mused, I might be one of them ....

Building the R Shiny App

Data Prep

The primary challenge was missing and suspicious data. The sanctioned event response data was reliable because it was official and simply had to be deduplicated around Athlete ID and checked for missing rows, which were removed.

The self-reported data was a different matter. Many athletes left many responses blank, for various reasons. Because the results are idiosyncratic to the athlete, I did not feel comfortable imputing values. Some data were obvious erroneous -- either entered in error or deliberately fudged. For example, a number of athletes entered times for "running a 400K" that were faster than the world record or slower than a nap. I created a probable range of reasonableness and removed outliers.

Survey questions about diet and lifestyle were self-reported and not ideally structured. They were contained within a single string with multiple responses allowed. For simplicity, I selected the first response.

Building the App

I wanted to have an easy-to-use app that had three tabs. The areas of interest were:

  • Benchmarks: Let an athlete see how their times/loads for various standard workouts compared to others in their cohort.
  • Competitor Benchmarks: Explore how athletes who finished at various levels in ranked competitions did on these same workouts.
  • Lifestyle Factors: Finally, I wanted athletes to be able to see survey responses to questions about diet, training, etc. from athletes who ranked at some chosen level -- in order to compare "winners" vs. "others"

My app used the basic format of ui.R, server.R and global.R. My toggles were related to selecting cohorts. In cohorts, there are divisions made between men and women (for competition and for benchmarking), as well as for adults over and under 35 years old (with 35 yrs + considered a "Masters" athlete). Body-mass index (BMI) is not a competitive variable but is important in gauging individual performance; as you should know, it's a general representation of height/weight proportions.

A design note: I wanted the toggles in the sidebar to be different for each tab, showing only the relevant inputs. I was able to do this by setting up a mainPanel, 3 tabsetPanels and 3 conditionalPanels. Snippets are shown here:

Data Analysis on Crossfit Athletes with R-Shiny

The final UI for the first tab used boxplots to indicate the distribution of the self-reported scores for various benchmark workouts. The workouts themselves are listed at the bottom of the screen. Note that Crossfit gives standard workouts names (like "Fran") and calls them WODs (for Workout-of-the-Day). Yes, you could call it a feel-good cult.

Data Analysis on Crossfit Athletes with R-Shiny

R Shiny App UI

What I Learned about Crossfit

Is there a competitive benefit to focusing on Cardio or Weightlifting?

Running vs. WODs: Basically, there is less variability in running ability than there is in weightlifting for various cohorts. This makes intuitive sense: running is more of a general marker of cardio health than weightlifting, which requires both health and specific skill in the movement.

Weightlifting: There are more outliers on the high-end in the hard-core weightlifting events. So there seems to be a more concentrated group of gifted lifters than there are people who are generally good at endurance. This again points to the importance of improving weightlifting vs. cardio for competitive excellence.

Elites: Speaking of elites, there is definitely a bright line between the top 10K or so athletes and the rest of us -- they regularly outperform in competition and run us ragged. So only those in the top 10K or so (which is, say, the top 4-5% of serious Crossfitters) are elite. This separation is even more pronounced among women.

Data on the Impact of BMI on Different Types of Activities

BMI: It's the most important factor we have in the data. Surprisingly, BMI has more impact on performance than age or gender. Remember that BMI is simply an indication of how "dense" your body is -- it's possible to have an outsized BMI (above the mean for your age/gender) by being obese or by being heavily muscled. So it's not equivalent to being out of shape. The data bears this up: higher BMIs predicted lower cardio scores but higher weightlifting scores.

Older Athletes: Based on survey responses, older athletes (35+) were more careful with their diets and were even less likely to perform well with a higher BMI index. The lesson here is that while BMI is critical in all age groups, it gets more important with age to stay relatively lean.

Is there a supporting data background or routine that leads to better performance?

Background: Both men and women who performed well at Crossfit events quite often started working out alone (with no coach), and many have only been doing Crossfit for a couple of years. So the lesson is it's okay to start small and don't assume you need years of experience to win.

Secret: The single lifestyle factor that seemed to have the biggest impact on performance was simple: the number of workouts per week. Better athletes work out more often than also-rans. It's an old story but apparently true: work it, it's worth it.

Resources

The Shiny app itself can be enjoyed here

Happy WOD'ing!

About Author

Martin Kihn

SVP Strategy, Salesforce Marketing Cloud - formerly VP Research at Gartner, covering data-driven marketing, marketing and advertising analytics and data management platforms. Interested in ad tech, measurement and digital advertising and marketing. Author and balletomane.
View all posts by Martin Kihn >

Related Articles

R Shiny
R Shiny: Downstream Processing Dashboard
Meetup
New York Restaurants: Inspection Data Analysis, Statistics and More - R Programming Language
R
Beijing and its Air Quality
R
How to Build Interactive Dashboard in R shiny for Cryptocurrency Analysis
Meetup
Examining Digital Connectivity in Kenya's 2019 Census Data

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application