Next cohort starts January 9.Apply ›

Wayfair · Data Analytics

E-commerce Sales Analysis

The work

  1. import pandas as pd
    import numpy as np
    import matplotlib.pyplot as plt
  2. monthly_revenue = pd.read_csv('..\\visualizations\\chart_data\\monthly_revenue.csv')
  3. category_revenue = pd.read_csv('..\\visualizations\\chart_data\\category_revenue.csv')
  4. category_returns_cancelled = pd.read_csv('..\\visualizations\\chart_data\\category_returns_cancelled.csv')
  5. Monthly revenue trend - Line chart

  6. monthly_revenue.head()
            month  monthly_revenue
    0  2024-01-01         54107.56
    1  2024-02-01         62945.69
    2  2024-03-01         70885.83
    3  2024-04-01         64177.27
    4  2024-05-01         72246.90
  7. plt.plot(monthly_revenue['month'], monthly_revenue['monthly_revenue'],marker='o',color='blue')
    plt.title('Monthly Revenue')
    plt.xlabel('Month')
    plt.ylabel('Revenue ($)')
    plt.grid(True,alpha=0.5)
    plt.xticks(rotation=45, ha='right')
    plt.show()
    Chart produced by this cell
    <Figure size 640x480 with 1 Axes>
  8. Category revenue comparison - Bar chart

  9. category_revenue
        category    revenue
    0  furniture  318593.13
    1    kitchen  276103.06
    2      decor  274367.49
    3    bedding  264321.26
    4    outdoor  244097.30
    5   lighting  234583.07
    6    storage  137978.01
    7       bath  108077.68
  10. category_revenue.plot(x='category', y='revenue',kind='bar',color='green')
    plt.title('Revenue by Category')
    plt.xlabel('Category')
    plt.ylabel('Revenue ($)')
    plt.xticks(rotation=45, ha='right')
    plt.grid(axis='y', alpha=0.5)
    plt.show()
    Chart produced by this cell
    <Figure size 640x480 with 1 Axes>
  11. Category-wise return/cancellation rates - Grouped bar chart

  12. category_returns_cancelled
        category  returend_percentage  cancelled_percentage
    0       bath                 4.44                  4.56
    1    bedding                 5.06                  3.28
    2      decor                 4.18                  3.48
    3  furniture                11.72                  3.08
    4    kitchen                 4.15                  3.80
    5   lighting                 3.99                  2.93
    6    outdoor                 4.43                  3.70
    7    storage                 4.15                  3.35
  13. category_returns_cancelled.plot(x='category', y=['returend_percentage','cancelled_percentage'],kind='bar',color=['orange','red'])
    plt.title('Returns and Cancellations by Category')
    plt.xlabel('Category')
    plt.ylabel('Percentage (%)')
    plt.xticks(rotation=45, ha='right')
    plt.grid(axis='y', alpha=0.5)
    plt.legend(['Returned Percentage', 'Cancelled Percentage'])
    plt.show()
    Chart produced by this cell
    <Figure size 640x480 with 1 Axes>

The brief this answers

Clean two years of online store orders and turn them into a clear sales review for next year's plan.

Try it yourself

Other answers to this brief

The same problem, solved by somebody else.

Discussion

Nothing here yet. Ask how they approached it, or tell them what you would have done differently.