library(tidyverse)
library(dplyr)
library(httr2)
<- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2023/2023-11-14/diwali_sales_data.csv')
house
# Retrieving variables of interst
colnames(house)
<- house$`Age Group`
age_group <- house$Orders
Orders <- house$Amount
Amount
# plotting amount spent by age group with gg plot
ggplot(data = house, aes(x = `Age Group`, y = Orders, color = Amount)) +
geom_col() +
labs(
x = "Age Group",
y = "Number of Orders",
title = "Diwali Orders Made by Age"
+ theme_minimal() )
Diwali Sales Data
In an effort to improve my R skills, I’m practicing on some Tidy Tuesday data! I am using Diwali Sales data this time around, which I think will be interesting to map out. Here is some information about where the data for this week comes from:
Saad Haroon. Kaggle. (2024). Diwali Sales Dataset. Retrieved from https://www.kaggle.com/datasets/saadharoon27/diwali-sales-dataset/code.
“The data this week comes from sales data for a retail store during the Diwali festival period in India.”
Below, you will find a plot showcasing the number of purchases for different age groups during Diwali, the festival of lights. The color gradient shows the amount in Indian rupees spent by each customer, revealing how age group impacts total rupees spent with respect to total orders made.