For this assignment, I selected a retail sales dataset containing 1,000 transactions. The dataset includes information about individual transactions, including product category, quantity, price per unit, and total sales amount.
I chose this dataset because I work in retail analytics and wanted to work with familiar data. I plan to select the variables most relevant to sales and use them to create a smaller data frame. I would also like to summarize sales by product category to compare the performance of different categories.
The dataset was obtained from a public GitHub repository and contains 1,000 retail transactions across three product categories: Beauty, Clothing, and Electronics.
Data loading
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
I selected the variables most relevant to sales and renamed the columns to make them easier to interpret. I then grouped the data by product category and calculated total sales for each category.
Electronics generated the highest total sales at $156,905. This analysis could be extended by comparing sales over time or examining quantity sold and average price by category.