Skip to content

You are a product manager for a fitness studio and are interested in understanding the current demand for digital fitness classes. You plan to conduct a market analysis in Python to gauge demand and identify potential areas for growth of digital products and services.

The Data

You are provided with a number of CSV files in the "Files/data" folder, which offer international and national-level data on Google Trends keyword searches related to fitness and related products.

workout.csv

ColumnDescription
'month'Month when the data was measured.
'workout_worldwide'Index represeting the popularity of the keyword 'workout', on a scale of 0 to 100.

three_keywords.csv

ColumnDescription
'month'Month when the data was measured.
'home_workout_worldwide'Index represeting the popularity of the keyword 'home workout', on a scale of 0 to 100.
'gym_workout_worldwide'Index represeting the popularity of the keyword 'gym workout', on a scale of 0 to 100.
'home_gym_worldwide'Index represeting the popularity of the keyword 'home gym', on a scale of 0 to 100.

workout_geo.csv

ColumnDescription
'country'Country where the data was measured.
'workout_2018_2023'Index represeting the popularity of the keyword 'workout' during the 5 year period.

three_keywords_geo.csv

ColumnDescription
'country'Country where the data was measured.
'home_workout_2018_2023'Index represeting the popularity of the keyword 'home workout' during the 5 year period.
'gym_workout_2018_2023'Index represeting the popularity of the keyword 'gym workout' during the 5 year period.
'home_gym_2018_2023'Index represeting the popularity of the keyword 'home gym' during the 5 year period.
# Import the necessary libraries
import pandas as pd
import matplotlib.pyplot as plt
# Start coding he

workout = pd.read_csv('data/workout.csv')
three_keywords = pd.read_csv('data/three_keywords.csv')
workout_geo = pd.read_csv('data/workout_geo.csv')
three_keywords_geo = pd.read_csv('data/three_keywords_geo.csv')
workout.head()
# Find the row with the maximum workout_worldwide value to get the month of peak interest
peak_month = workout.loc[workout['workout_worldwide'].idxmax(), 'month']

# Extract the year from the peak month
year_str = peak_month.split("-")[0]

year_str
three_keywords.head()
three_keywords.plot()
workout_geo.head()
peak_covid = 'home_workout_worldwide'
current = 'gym_workout_worldwide'
top_country = workout_geo[workout_geo['country'].isin(["United States", "Australia", "Japan"])]
top_country = top_country[top_country["workout_2018_2023"] == top_country["workout_2018_2023"].max()]

top_country = top_country['country'].values[0]
top_country
three_keywords_geo.head()
three_keywords_geo = three_keywords_geo[three_keywords_geo['Country'].isin(["Philippines", "Malaysia"])]


home_workout_geo = three_keywords_geo[three_keywords_geo["home_workout_2018_2023"] == three_keywords_geo["home_workout_2018_2023"].max()]

home_workout_geo = home_workout_geo['Country'].values[0]


home_workout_geo