Untitled
unknown
plain_text
a year ago
2.1 kB
4
Indexable
import matplotlib.pyplot as plt # Data for Revenue and Net Earnings Comparison (2022 vs 2023) years = ['2022', '2023'] revenues = [132070421, 172069985] net_earnings = [16680433, 9885765] # Data for Departmental Performance for Q1 2024 departments = [ 'Platforms & Product', 'Web Sales', 'Phone Sales', 'Loss Prevention', 'Fraud Prevention', 'Customer Service', 'Infrastructure', 'Admin', 'Executive', 'Customer Champion', 'Public Relations' ] q1_2024_totals = [ -272443, 6585809, 2324680, 1776065, -1012627, -3160019, -510256, -809025, -329874, -65686, -94244 ] # Data for Revenue and Net Revenue (2018-2024 YTD) years_extended = ['2018', '2019', '2020', '2021', '2022', '2023', '2024 YTD'] revenues_extended = [ 227185200, 235181100, 85170820, 71442470, 140586800, 182899100, 42289452.40578 ] net_revenues = [ 222017400, 226897962, 80791675, 68192950, 134489173, 170415778, 39420265 ] # Plot 1: Revenue and Net Earnings Comparison (2022 vs 2023) plt.figure(figsize=(10, 6)) bar_width = 0.35 index = range(len(years)) plt.bar(index, revenues, bar_width, label='Revenue') plt.bar([i + bar_width for i in index], net_earnings, bar_width, label='Net Earnings') plt.xlabel('Year') plt.ylabel('Amount (in billions)') plt.title('Revenue and Net Earnings Comparison (2022 vs 2023)') plt.xticks([i + bar_width / 2 for i in index], years) plt.legend() plt.show() # Plot 2: Departmental Performance for Q1 2024 plt.figure(figsize=(12, 6)) plt.bar(departments, q1_2024_totals, color='skyblue') plt.xlabel('Department') plt.ylabel('Total (Q1 2024)') plt.title('Departmental Performance for Q1 2024') plt.xticks(rotation=45, ha='right') plt.tight_layout() plt.show() # Plot 3: Revenue and Net Revenue (2018-2024 YTD) plt.figure(figsize=(10, 6)) plt.plot(years_extended, revenues_extended, marker='o', label='Revenue') plt.plot(years_extended, net_revenues, marker='o', label='Net Revenue') plt.xlabel('Year') plt.ylabel('Amount (in billions)') plt.title('Revenue and Net Revenue (2018-2024 YTD)') plt.legend() plt.show()
Editor is loading...
Leave a Comment