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 pandas as pd
import matplotlib.pyplot as pltworkout = 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()Finding the time of peak searches for workout
workout.info()As we see here, the data named month contains data from 2018 to 2023.
workout_set = workout.sort_values(by=["month"], ascending=False)
workout_setTo group by year, I separated the months and years.
workout[['year', 'month']] = workout['month'].str.split('-', expand=True)
workout.head()yearly_total = workout.groupby('year')['workout_worldwide'].sum().reset_index()
yearly_total.sort_values(by=["workout_worldwide"], ascending=False)import seaborn as sns
sns.set(style = 'whitegrid')
sns.relplot(x ="year",
y ="workout_worldwide",
kind ="line",
data = yearly_total)
plt.show()max_year = yearly_total.loc[yearly_total['workout_worldwide'].idxmax(), 'year']
year_str = str(max_year)
year_strFinding the most popular keywords for the current year and during covid