Skip to content
3 hidden cells
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. |
3 hidden cells
wgeo= pd.read_csv('data/workout_geo.csv')
print(wgeo.head())
# Convert 'workout_2018_2023' to numeric, forcing invalid parsing to NaN, then drop NaN values
wgeo['workout_2018_2023'] = pd.to_numeric(wgeo['workout_2018_2023'], errors='coerce')
wgeo1 = wgeo.dropna(subset=['workout_2018_2023'])
print((wgeo1.shape))
fig, ax = plt.subplots()
fig.set_size_inches([12,5])
ax.bar(wgeo1['country'],wgeo1['workout_2018_2023'])
ax.set_xticklabels(wgeo1['country'], rotation = 90)
plt.show()Hidden output
wgeo3kw= pd.read_csv('data/three_keywords_geo.csv')
print(wgeo3kw.head())
# Convert 'workout_2018_2023' to numeric, forcing invalid parsing to NaN, then drop NaN values
wgeo3kw = wgeo3kw[wgeo3kw['Country'].isin( ['Singapore', 'Malaysia'])]
print(wgeo3kw.iloc[0:4])
fig, ax = plt.subplots()
ax.hist(wgeo3kw['Country'],(wgeo3kw['home_workout_2018_2023']+wgeo3kw['home_gym_2018_2023']))
# ax.bar(wgeo3kw['Country'],wgeo3kw['gym_workout_2018_2023'])
# ax.bar(wgeo3kw['Country'],)
ax.set_xticklabels(wgeo3kw['Country'], rotation = 90)
plt.show()year_str='2020'
peak_covid='home workout'
current='gym_workout'
top_country='United States'
home_workout_geo='Philippines'