Skip to content
Project: Data-Driven Product Management: Conducting a Market Analysis
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. |
Load data
# Import the necessary libraries
import pandas as pd
import matplotlib.pyplot as pltimport pandas as pd
# Load the data
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')Check data
# workout
print(workout.head())# three_keywords
print(three_keywords.head())# workout_geo
print(workout_geo.head())# three_keywords_geo
print(three_keywords_geo.head())Exploratory analysis: year of peak interest
# Creating a year column
workout['year'] = workout['month'].str.strip().str[:-3]
# Grouping per year
workout.groupby('year')['workout_worldwide'].sum().sort_values(ascending=False)
# Taking the most searched year
year_str = workout.groupby('year')['workout_worldwide'].sum().sort_values(ascending=False).index[0]
print(f'The most searched year is: {year_str}')Exploratory analysis: popular keyword during COVID
# Creating date subsets for COVID and current year
three_keywords_covid = three_keywords[(three_keywords['month'] < '2023-05') & (three_keywords['month'] >= '2020-01')]
three_keywords_now = three_keywords[three_keywords['month'].isin(['2023-01', '2023-02', '2023-03'])]