Sales Data Analysis

Author

Abraham Eninla

Introduction

This analysis examines the performance of selected products.

Create the Dataset

sales_data <- data.frame(
  Product = c("Laptop", "Printer", "Monitor", "Keyboard"),
  Quantity = c(5, 8, 12, 20),
  UnitPrice = c(450000, 150000, 180000, 25000)
)

sales_data
   Product Quantity UnitPrice
1   Laptop        5    450000
2  Printer        8    150000
3  Monitor       12    180000
4 Keyboard       20     25000

Calculate Revenue

sales_data$Revenue <- sales_data$Quantity * sales_data$UnitPrice

sales_data
   Product Quantity UnitPrice Revenue
1   Laptop        5    450000 2250000
2  Printer        8    150000 1200000
3  Monitor       12    180000 2160000
4 Keyboard       20     25000  500000

Summary Statistics

summary(sales_data)
      Product     Quantity       UnitPrice         Revenue       
 Length   :4   Min.   : 5.00   Min.   : 25000   Min.   : 500000  
 N.unique :4   1st Qu.: 7.25   1st Qu.:118750   1st Qu.:1025000  
 N.blank  :0   Median :10.00   Median :165000   Median :1680000  
 Min.nchar:6   Mean   :11.25   Mean   :201250   Mean   :1527500  
 Max.nchar:8   3rd Qu.:14.00   3rd Qu.:247500   3rd Qu.:2182500  
               Max.   :20.00   Max.   :450000   Max.   :2250000  

Revenue Chart

barplot(
  height = sales_data$Revenue,
  names.arg = sales_data$Product,
  main = "Revenue by Product",
  xlab = "Product",
  ylab = "Revenue",
  las = 2
)

Interpretation

The result shows the revenue generated by each product.