CourseProject-AddressingtheBusinessQuestionIndividual-SimranKaur.html

Wedding Vendors and Sustainability Analysis

BY: Simran Kaur

Welcome to the sustainability spot for weddings.

In our project we struggled to find a problem that we could analyze in the wedding industry. By putting our heads together and with a lot of thought we found that the subject of sustainability in weddings is an up and coming topic especially in metropolitan areas such as the Bay Area. The problem is that as our state as a whole goes more towards the green energy and sustainable consumption route, the more people look for ways to apply it to different aspects of their life such as in our case, weddings. Therefore, our cohort decided to look into sustainability and answer our business question "Are wedding vendors with sustainable practices more cost effective?". This comparison aims to ascertain whether vendors implementing sustainable practices demonstrate better cost-effectiveness in different wedding-related departments. For this dataset the two key terms would be Cost Effectiveness and Sustainable Practices, as these our two units of measure. Cost Effectiveness is defined as a "methods or processes bring the greatest possible advantage or profit when the amount that is spent is considered" in the dictionary", and in the context of our wedding planning data base we are essentially trying to discover if being sustainable and providing sustainable vendors has possible advantages in cost and other aspects. Sustainable Practices would be our other key term in relation to our database. Sustainable practices are defined as act and methods that do not harm the environment and support ecological, environmental, human, and economic health. In the wedding vendors we take into account which businesses in our database support this sustainable practice and then essentially how cost effective are they compared to business that don’t offer sustainable practices.

The Business Question:

Based on the analysis conducted using the wedding data, the findings suggest that vendors implementing sustainable practices tend to demonstrate slightly higher costs compared to non-sustainable vendors across various wedding service departments. The data revealed that, on average, sustainable vendors in certain departments, notably venues and music, exhibit slightly higher costs than non-sustainable vendors. This unexpected result indicates that, contrary to our assumptions, sustainable practices might not always lead to immediate cost savings in the wedding industry and for the customer. While sustainable vendors often prioritize eco-friendly practices, the implementation and maintenance of these practices might incur additional expenses that contribute to the observed higher costs.It's crucial to remember that these results do not suggest that sustainable measures are inherently inefficient. Instead, they point to a nuanced interaction of variables influencing prices across various wedding service industries. Investing in environmentally friendly materials, ethical sourcing, or ecologically friendly production techniques are examples of sustainable measures that may initially result in higher operating expenses.

Top Two Actionable Insights

My top two actionable insights were:

  • Do vendors with sustainable practices tend to exhibit lower costs on average across various departments?
  • Identify departments or services where sustainable vendors have a competitive advantage. Encourage vendors to leverage sustainable practices as a marketing strategy to attract eco-conscious clients, potentially increasing market share and revenue.

Utilizing the weddingdata for the first actionable insight, which focused on whether suppliers with sustainable practices typically show lower costs overall across different departments. In order to determine the average expenses related to sustainable and non-sustainable suppliers, the data was categorized by vendor departments and sustainable practices. The objective of this investigation was to identify trends in cost-effectiveness among various services and departments, with a focus on three departments specifically. According to the results, suppliers who follow sustainable practices typically charge a little bit more in several departments than suppliers who don't. It may be necessary to modify infrastructure or acquire specialist technology to employ environmentally friendly production techniques, which would increase operating costs. Furthermore, maintaining strict environmental certifications and laws may require continuing compliance fees, which raises the overall operational costs for sustainable enterprises.

For the Second actionable insight, the analysis attempted to identify departments in which sustainable vendors possess a competitive advantage. Based on the investigation, it was found that departments like flowers and music offer a significant competitive advantage to sustainable vendors as we see that the price difference for sustainable and non-sustainable practices is not significantly outrageous. Which points to a possible tactic suppliers could use to promote to environmentally sensitive customers by utilizing sustainable techniques and still keep their price range affordable for their clientele.

Conclusion

In conclusion, the analysis suggests that while sustainable vendors tend to display slightly lower costs on average across various departments, the extent of this cost-effectiveness varies. Additionally, departments such as venues and flowers demonstrate a more pronounced competitive advantage for sustainable vendors, hinting at a potential marketing strategy to increase market share and revenue through the promotion of sustainable practices. This deeper level of analysis provides actionable insights beyond numerical comparisons, offering strategic directions for vendors to leverage sustainability in attracting eco-conscious clientele.Throughout the mean analysis I found that by just looking at the three departments (venues, flowers, and music), I was able to come to this conclusion that business with sustainable practices are likely to be more expensive than the non-sustainable business.The report emphasizes how critical it is to have a thorough understanding of the cost dynamics associated with sustainability in the wedding industry. It implies that while ethical and ecologically values can be preserved through sustainable practices, these values might not necessarily translate into quick financial gains. Businesses should adopt a long-term perspective while implementing sustainability, understanding that there may be up-front costs involved, but that these expenses may eventually pay off in more sustainable and cost-effective operations.

In [1]:
# importing packages
import pandas as pd # data science essentials
import matplotlib.pyplot as plt # data visualization essentials
import seaborn as sns # data visualization optional datacamp data visulization course
file = "/users/kaurs/downloads/weddingdata.xlsx"

weddingdata = pd.read_excel(io         = file      ,       
                         sheet_name = 0, 
                         header     = 0 )
weddingdata
Out[1]:
vendor_id vendor_name vendor_sustainable vendor_depart vendor_rating vendor_location price_unit price_ce product_name
0 att_01 casablanca bridal 0 dress and attire 0 san francisco 1750.0 4 dress - belobed by casablance bridal
1 att_02 allure bridal 0 dress and attire 0 online 1750.0 4 dress - madison james by allure bridals
2 att_02 allure bridal 0 dress and attire 0 online 2250.0 4 dress - disney fairy tale weddings
3 att_02 allure bridal 0 dress and attire 0 online 225.0 2 dress - allure bridesmaids
4 att_03 stacees 0 dress and attire 0 online 616.0 4 dress - stacees amy wedding dress
... ... ... ... ... ... ... ... ... ...
849 vid_46 julia goldberg photography 0 photo and video 50 san francisco 500.0 1 photo
850 vid_47 bailey w photography 1 photo and video 50 san francisco 500.0 1 photo
851 vid_48 romantic photographer 1 photo and video 0 san rafael 1500.0 1 photo
852 vid_49 weddings by samuel 1 photo and video 0 greenbrae 4000.0 3 photo
853 vid_50 john leestma photography 1 photo and video 50 petaluma 1500.0 1 photo

854 rows × 9 columns

In [2]:
#Descriptve stats
# Finding the mean overall and of the 3 departments selcted 
weddingdata.describe()
Out[2]:
vendor_sustainable vendor_rating price_unit price_ce
count 854.000000 854.000000 854.000000 854.000000
mean 0.528103 38.128806 1328.353677 2.311475
std 0.499502 19.830933 3812.561560 1.098410
min 0.000000 0.000000 0.000000 0.000000
25% 0.000000 40.000000 90.000000 1.000000
50% 1.000000 49.000000 175.000000 2.000000
75% 1.000000 50.000000 400.000000 3.000000
max 1.000000 50.000000 32000.000000 4.000000
In [21]:
#Finding the average price within each deaprtment 
# just an extra cell that I ran to find the ,mean in sustanability across departments
weddingdata.groupby('vendor_depart', as_index=False)["price_unit"].mean() 

weddingdata.groupby('vendor_depart', as_index=False)["vendor_sustainable"].mean() 
Out[21]:
vendor_depart vendor_sustainable
0 catering 0.961165
1 dress and attire 0.440000
2 flowers 0.666667
3 hair and makeup 0.291560
4 invitations 0.640000
5 jewelry 0.500000
6 music 0.571429
7 photo and video 0.980000
8 rental 0.727273
9 venues 0.760000
In [36]:
# Calculate mean of 'price_unit'

price_unit_mean = weddingdata.groupby('vendor_depart')['price_unit'].mean().reset_index()

# Calculate mean of 'vendor_sustainable'
vendor_sustainable_mean = weddingdata.groupby('vendor_depart')['vendor_sustainable'].mean().reset_index()


# Merging two together
combined_means = pd.merge(price_unit_mean, vendor_sustainable_mean, on='vendor_depart')

# Display the combined table
print(combined_means)
      vendor_depart    price_unit  vendor_sustainable
0          catering     80.679612            0.961165
1  dress and attire    530.959600            0.440000
2           flowers     69.035714            0.666667
3   hair and makeup    170.624041            0.291560
4       invitations    288.875200            0.640000
5           jewelry   2303.460000            0.500000
6             music   2161.257143            0.571429
7   photo and video   2916.540000            0.980000
8            rental     91.054545            0.727273
9            venues  13517.000000            0.760000
In [38]:
###filtering for ALL DEPARTMENT sustainable and non sustainable

#mean of a specific column where 'vendor_sustainable' is equal to with price
price_sustainable_vendor_mean = weddingdata[weddingdata['vendor_sustainable'] == 1]['price_unit'].mean()

# Display the mean value
print("Mean of price where 'vendor_sustainable' is 1:", price_sustainable_vendor_mean)
Mean of price where 'vendor_sustainable' is 1: 1882.2495565410197
In [39]:
#mean of a specific column where 'vendor_sustainable' is equal to 0
price_nonsustainable_vendor_mean = weddingdata[weddingdata['vendor_sustainable'] == 0]['price_unit'].mean()

# Display the mean value
print("Mean of price where 'vendor_sustainable' is 0:", price_nonsustainable_vendor_mean)
Mean of price where 'vendor_sustainable' is 0: 708.4850868486352
In [41]:
###filtering for venues sustainable and non sustainable
# for venues within 'vendor_depart' and 'vendor_sustainable' equal to 1
venues_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()

# Display the mean value for the departments and 'vendor_sustainable' equal to 1
print(f"Mean price for venues where 'vendor_sustainable' is 1: {venues_sustainable_mean}")
Mean price for venues where 'vendor_sustainable' is 1: 14459.21052631579
In [42]:
venues_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

# Display the mean value for the departments and 'vendor_sustainable' equal to 0
print(f"Mean price for venues where 'vendor_sustainable' is 0: {venues_nonsustainable_mean}")
Mean price for venues where 'vendor_sustainable' is 0: 10533.333333333334
In [43]:
###filtering for flowers sustainable and non sustainable
flowers_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()

print(f"mean price for flowers where 'vendor_sustainable' is 1: {flowers_sustainable_mean}")
Mean price for flowers where 'vendor_sustainable' is 1: 73.32142857142857
In [44]:
flowers_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

print(f"mean price for flowers where 'vendor_sustainable' is 0: {flowers_nonsustainable_mean}")
Mean price for flowers where 'vendor_sustainable' is 0: 60.464285714285715
In [45]:
###filtering for music sustainable and non sustainable
music_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()

print(f"mean price for music where 'vendor_sustainable' is 1: {music_sustainable_mean}")
mean price for music where 'vendor_sustainable' is 1: 2097.9
In [46]:
music_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

print(f"mean price for music where 'vendor_sustainable' is 0: {music_nonsustainable_mean}")
mean price for music where 'vendor_sustainable' is 0: 2245.733333333333
In [ ]:
venues_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
venues_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()
flowers_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
flowers_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()
music_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
music_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()
In [48]:
# Create a frequency table for a specific column in your DataFrame
frequency_table = weddingdata['vendor_sustainable'].value_counts()

# Display the frequency table
print(frequency_table)
vendor_sustainable
1    451
0    403
Name: count, dtype: int64
In [50]:
#Frequency tables
from scipy.stats import ttest_ind

# Assuming 'df' is your DataFrame

# Filter data for two groups based on 'vendor_sustainable' (1 and 0)
group_1 = weddingdata[weddingdata['vendor_sustainable'] == 1]['price_unit']
group_2 = weddingdata[weddingdata['vendor_sustainable'] == 0]['price_unit']


# Perform independent t-test
t_statistic, p_value = ttest_ind(group_1, group_2, equal_var=False)  # Set equal_var=False if variances are unequal

# Display results
print("T-statistic:", t_statistic)
print("P-value:", p_value)

# Interpret the results based on the p-value (usually if p-value < 0.05, results are considered significant)
if p_value < 0.05:
    print("There is a significant difference between the means of the two groups.")
else:
    print("There is no significant difference between the means of the two groups.")
T-statistic: 4.707900415256033
P-value: 3.053959678966908e-06
There is a significant difference between the means of the two groups.
In [52]:
#Correlation between the top three departments of intrest

# means for sustainable and non-sustainable vendors from each departments
venues_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
venues_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'venues') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

flowers_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
flowers_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'flowers') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

music_sustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 1)]['price_unit'].mean()
music_nonsustainable_mean = weddingdata[(weddingdata['vendor_depart'] == 'music') & (weddingdata['vendor_sustainable'] == 0)]['price_unit'].mean()

# means for each department
print("Venues Sustainable Mean:", venues_sustainable_mean)
print("Venues Non-Sustainable Mean:", venues_nonsustainable_mean)
print("Flowers Sustainable Mean:", flowers_sustainable_mean)
print("Flowers Non-Sustainable Mean:", flowers_nonsustainable_mean)
print("Music Sustainable Mean:", music_sustainable_mean)
print("Music Non-Sustainable Mean:", music_nonsustainable_mean)

# to calc correlations between price_unit and vendor_sustainable within each department
correlation_venues = weddingdata[weddingdata['vendor_depart'] == 'venues'][['price_unit', 'vendor_sustainable']].corr()
correlation_flowers = weddingdata[weddingdata['vendor_depart'] == 'flowers'][['price_unit', 'vendor_sustainable']].corr()
correlation_music = weddingdata[weddingdata['vendor_depart'] == 'music'][['price_unit', 'vendor_sustainable']].corr()

# display of correlations need print with each coorelation being defined by text
print("\nCorrelation for Venues:", correlation_venues)
print("\nCorrelation for Flowers:", correlation_flowers)
print("\nCorrelation for Music:", correlation_music)
Venues Sustainable Mean: 14459.21052631579
Venues Non-Sustainable Mean: 10533.333333333334
Flowers Sustainable Mean: 73.32142857142857
Flowers Non-Sustainable Mean: 60.464285714285715
Music Sustainable Mean: 2097.9
Music Non-Sustainable Mean: 2245.733333333333

Correlation for Venues:                     price_unit  vendor_sustainable
price_unit            1.000000            0.198219
vendor_sustainable    0.198219            1.000000

Correlation for Flowers:                     price_unit  vendor_sustainable
price_unit            1.000000            0.070741
vendor_sustainable    0.070741            1.000000

Correlation for Music:                     price_unit  vendor_sustainable
price_unit            1.000000           -0.049658
vendor_sustainable   -0.049658            1.000000
In [53]:
#3-5 well-designed, highly relevant data visualizations (scatterplots, boxplots, etc.)
# VISUALIZATION # 1 : Bar Plots for each department of interest

fig, axs = plt.subplots(3, figsize=(8, 12))

# Plotting means for sustainable and non-sustainable vendors in different departments
axs[0].bar(['Venues Sustainable', 'Venues Non-Sustainable'], [venues_sustainable_mean, venues_nonsustainable_mean])
axs[0].set_title('Mean Price for Venues')

axs[1].bar(['Flowers Sustainable', 'Flowers Non-Sustainable'], [flowers_sustainable_mean, flowers_nonsustainable_mean])
axs[1].set_title('Mean Price for Flowers')

axs[2].bar(['Music Sustainable', 'Music Non-Sustainable'], [music_sustainable_mean, music_nonsustainable_mean])
axs[2].set_title('Mean Price for Music')

plt.tight_layout()
plt.show()
No description has been provided for this image
In [55]:
# VISUALIZATION # 2 : Scatter Plots for each department of interest
#instantiating a scatter plot for price and sustainability

# Scatter plot with linear regression line for Venues department
sns.lmplot(x='price_unit', 
           y='vendor_sustainable', 
           hue = None,
           scatter = True,
           fit_reg = False,
           aspect = 2,
           data= weddingdata[weddingdata['vendor_depart'] == 'venues'])

plt.title    (label = 'Scatter Plot with Linear Regression for Venues')
plt.xlabel   (xlabel = 'Price'          )
plt.ylabel   (ylabel = 'Vendor Sustainibility)'  )
plt.xlim     (left   = 0, right = 2.8          )
plt.tight_layout(pad    = 1.0                     )
plt.show        (block  = True                    )

# Scatter plot with linear regression line for Flowers department
sns.lmplot(x='price_unit', 
           y='vendor_sustainable', 
           hue = None,
           scatter = True,
           fit_reg = False,
           aspect = 2,
           data=weddingdata[weddingdata['vendor_depart'] == 'flowers'])

plt.title   (label = 'Scatter Plot with Linear Regression for Flowers')
plt.xlabel   (xlabel = 'Price'          )
plt.ylabel   (ylabel = 'Vendor Sustainibility)'  )
plt.xlim     (left   = 0, right = 2.8          )
plt.tight_layout(pad    = 1.0                     )
plt.show        (block  = True                    )

# Scatter plot with linear regression line for Music department
sns.lmplot(x='price_unit',
           y='vendor_sustainable',
           hue = None,
           scatter = True,
           aspect = 2,
           data=weddingdata[weddingdata['vendor_depart'] == 'music'])

plt.title    (label = 'Scatter Plot with Linear Regression for Music')
plt.xlabel   (xlabel = 'Price'          )
plt.ylabel   (ylabel = 'Vendor Sustainibility)'  )
plt.xlim     (left   = 0, right = 2.8          )
plt.tight_layout(pad    = 1.0                     )
plt.show        (block  = True                    )

plt.show()
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
In [64]:
# VISUALIZATION # 3 : Heat Graph for each department of interest

fig, ax = plt.subplots( figsize = (12 , 8) )


plt.subplot(1, 3, 1)
sns.heatmap(correlation_venues, annot=True, cmap='inferno')
plt.title('Heatmap for Venues')

plt.subplot(1, 3, 2)
sns.heatmap(correlation_flowers, annot=True, cmap='coolwarm')
plt.title('Heatmap for Flowers')

plt.subplot(1, 3, 3)
sns.heatmap(correlation_music, annot=True, cmap='ocean')
plt.title('Heatmap for Music')

plt.tight_layout()
plt.show()
No description has been provided for this image

Sources

"Cost-effective." Cambridge Dictionary, Cambridge University Press, https://dictionary.cambridge.org/us/dictionary/english/cost-effective.

"Sustainable." Cambridge Dictionary, Cambridge University Press, https://dictionary.cambridge.org/us/dictionary/english/sustainable?q=Sustainable.

"What is Sustainability?" UCLA Sustainability, University of California, Los Angeles, https://www.sustain.ucla.edu/what-is-sustainability/.

Kusterer,Chase. "Script 8 : Linear Relationships", Hult University, Scatter Plots.

BuiltIN. "How to Do a T-Test in Python." BuiltIn, https://builtin.com/data-science/t-test-python.

Stack Overflow. "Make more than one chart in the same IPython Notebook cell." Stack Overflow, Stack Exchange Inc., 14 May 2013, stackoverflow.com/questions/16392921/make-more-than-one-chart-in-same-ipython-notebook-cell.

Stack Overflow. "How to calculate mean values grouped on another column." Stack Overflow, Stack Exchange Inc., 26 May 2015, stackoverflow.com/questions/30482071/how-to-calculate-mean-values-grouped-on-another-column.

In [ ]: