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# reading csv data file
workout = pd.read_csv('data/workout.csv')
keywords = pd.read_csv('data/three_keywords.csv')
geo = pd.read_csv('data/workout_geo.csv')
geo_keywords = pd.read_csv('data/three_keywords_geo.csv')
workout.head()# When was the global search for 'workout' at its peak?
workout['year'] = workout['month'].str.split('-').str[0]
workout_by_year = workout.groupby('year')['workout_worldwide'].sum().sort_values(ascending=False)
workout_by_year.plot(kind = 'line', x = 'year', y = 'workout_worldwide')
plt.show()
year_str = "2020"#Of the keywords available, what was the most popular during the covid pandemic, and what is the most popular now? Save your answers as variables called peak_covid and current respectively.
keywords.head()
pandemic_keyword = keywords[(keywords['month']>= '2020-03') & (keywords['month'] < '2023-05')]
current_keyword = keywords[(keywords['month']>= '2023-05')]
keywords.plot(kind = 'line', x = 'month')
plt.show()
peak_covid = 'home_workout_world_wide'
current = 'gym_workout_worldwide'#What country has the highest interest for workouts among the following: United States, Australia, or Japan? Save your answer as top_country
geo.head()
sub_geo = ['United States', 'Australia', 'Japan']
new_geo = geo[geo['country'].isin(sub_geo)]
new_geo.plot(kind='bar', x = 'country')
plt.show()
top_country = "United States"# Philippines or Malaysia? home_workout_geo
geo_keywords.head()
sub_country = ['Philippines','Malaysia']
geo_keywords_m_P = geo_keywords[geo_keywords['Country'].isin(sub_country)]
geo_keywords_m_P.plot(kind='bar', x = 'Country', y = 'home_workout_2018_2023')
plt.show()
home_workout_geo = "Philippines"