Skip to content
Project: Data-Driven Product Management: Conducting a Market Analysis
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
| Column | Description |
|---|---|
'month' | Month when the data was measured. |
'workout_worldwide' | Index representing the popularity of the keyword 'workout', on a scale of 0 to 100. |
three_keywords.csv
| Column | Description |
|---|---|
'month' | Month when the data was measured. |
'home_workout_worldwide' | Index representing the popularity of the keyword 'home workout', on a scale of 0 to 100. |
'gym_workout_worldwide' | Index representing the popularity of the keyword 'gym workout', on a scale of 0 to 100. |
'home_gym_worldwide' | Index representing the popularity of the keyword 'home gym', on a scale of 0 to 100. |
workout_geo.csv
| Column | Description |
|---|---|
'country' | Country where the data was measured. |
'workout_2018_2023' | Index representing the popularity of the keyword 'workout' during the 5 year period. |
three_keywords_geo.csv
| Column | Description |
|---|---|
'country' | Country where the data was measured. |
'home_workout_2018_2023' | Index representing the popularity of the keyword 'home workout' during the 5 year period. |
'gym_workout_2018_2023' | Index representing the popularity of the keyword 'gym workout' during the 5 year period. |
'home_gym_2018_2023' | Index representing the popularity of the keyword 'home gym' during the 5 year period. |
# Import the necessary libraries
import pandas as pd
import matplotlib.pyplot as pltFind the year of peak interest
# Start coding here
workout_df = pd.read_csv('data/workout.csv')
plt.figure(figsize=(12, 6))
plt.plot(workout_df['month'], workout_df['workout_worldwide'])
plt.xticks(rotation=90)
plt.title('Worldwide Workout Trends Over Time')
plt.xlabel('Month')
plt.ylabel('Workout Interest')
plt.show()
workout_peak = max(workout_df['workout_worldwide'])
year_str = workout_df[workout_df['workout_worldwide'] == workout_peak].iloc[0, 0]
# Assuming the 'month' column is in the format 'YYYY-MM'
year_str = year_str[:4]
year_strFind the most popular keywords available during covid pandemic and now
plt.clf()
three_kwd_df = pd.read_csv('data/three_keywords.csv')
plt.figure(figsize=(12, 6))
plt.plot(three_kwd_df['month'], three_kwd_df['home_workout_worldwide'], label='Home workout')
plt.plot(three_kwd_df['month'], three_kwd_df['gym_workout_worldwide'], label='Gym workout')
plt.plot(three_kwd_df['month'], three_kwd_df['home_gym_worldwide'], label='Home gym')
plt.xticks(rotation=90)
plt.title('Worldwide Trending Keywords Over Time')
plt.xlabel('Month')
plt.ylabel('Number of keywords')
plt.legend()
plt.show()
peak_covid = 'home workout'
current = 'gym workout'Find the country having the highest interest for workouts
plt.clf()
workout_geo = pd.read_csv('data/workout_geo.csv')
workout_geo_subset = workout_geo[workout_geo['country'].isin(['United States', 'Australia', 'Japan'])]
plt.bar(workout_geo_subset['country'], workout_geo_subset['workout_2018_2023'])
plt.title('Top countries\' Workout Trends Over Time')
plt.xlabel('Country')
plt.ylabel('Workout Interest')
plt.show()
top_country = 'United States'Comparison of virtual home workouts between Philippines and Malaysia
plt.clf()
three_kwd_geo = pd.read_csv('data/three_keywords_geo.csv')
three_kwd_geo_subset = three_kwd_geo[(three_kwd_geo['Country'].isin(['Philippines', 'Malaysia']))]
home_workout_subset = three_kwd_geo_subset.loc[:, ['Country', 'home_workout_2018_2023']]
plt.bar(home_workout_subset['Country'], home_workout_subset['home_workout_2018_2023'])
plt.title('Comparison of virtual home workouts between Philippines and Malaysia')
plt.xlabel('Country')
plt.ylabel('Number of keywords')
plt.show()
home_workout_geo = 'Philippines'