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 plt# Start coding here1 - Load data on global interest in workouts
# Reading a CSV file
workout = pd.read_csv('data/workout.csv')
workout.head()workout.info()2 - Find the time of peak searches for workout
# Identifying trends in workout interest
fig, ax = plt.subplots(figsize=(12, 6))
ax.plot('month', 'workout_worldwide', data=workout)
ax.set_xlabel('Month')
ax.set_ylabel('Popularity Index')
ax.set_title('Workout Searches Index')
ax.set_xticklabels(labels=workout['month'], rotation=90)
plt.show()year_str = '2020'
print(year_str)3 - Find the most popular keywords for the current year and during covid
# Reading in a CSV file
three_keywords = pd.read_csv('data/three_keywords.csv')
print(three_keywords.head())
print(three_keywords.info())# Adding multiple variables to a line plot
fig, ax = plt.subplots(figsize=(12, 6))
for data in ['home_workout_worldwide', 'gym_workout_worldwide', 'home_gym_worldwide']:
ax.plot('month', data, data=three_keywords, label=data)
ax.set_xlabel('Month')
ax.set_ylabel('Popularity Index')
ax.set_title('Keywords Searches Index')
ax.set_xticklabels(labels=three_keywords['month'], rotation=90)
ax.legend()
plt.show()peak_covid = 'home workout'
current = 'gym workout'
print(peak_covid)
print(current)4 - Find the country with the highest interest for workouts