Lizzeth Bautista Lab 9

Reflection:

Working through this lab helped me realize how vastly different customers shopping interests and experiences are. This is based on various factors such as age, demographic, whether they shop in stores or prefer deliveries, their satisfaction, etc. Turning this dataset into an R markdown file helped me visualize the data and physically see the differences among everyone’s preferences due to these aspects. For example, some age groups appeared to show stronger preferences for delivery or online shopping, while other prefer the in store experience. These are patterns that highlight the importance of understanding customer segments when evaluating service effectiveness and customer satisfaction.

There are certain limitations this data imposed such as how there are some variables that are numerically coded, impacting the interpretation and decreasing its preciseness. Despite this, the analysis still manages to demonstrate the value of segmentation in understanding customer needs and improving service strategies. Throughout this lab, I learned how important it is to collect data and how it impacts a business. As they should strive to improve customer experiences and tailortheir services to meet diverse needs.

title: “Customer Segmentation Analysis”
author: “Your Name”
date: “2026-03-28”
output: html_document

1. Load Data (Embedded)

df <- read.csv(text = "
ID,CS_helpful,Recommend,Come_again,All_Products,Profesionalism,Limitation,Online_grocery,delivery,Pick_up,Find_items,other_shops,Gender,Age,Education
1,2,2,2,2,2,2,2,2,2,2,2,1,2,2
2,1,2,1,2,2,2,2,2,2,2,2,1,2,2
3,2,1,1,2,2,2,2,2,2,2,3,1,2,2
4,3,3,2,3,3,2,2,2,2,2,2,1,3,5
5,2,1,3,2,2,2,2,2,2,2,3,2,4,2
")

df <- clean_names(df)

2. Prepare Variables

df <- df %>%
  mutate(
    gender = factor(gender),
    age = factor(age),
    education = factor(education),
    find_items = factor(find_items),
    online_grocery = factor(online_grocery),
    delivery = factor(delivery)
  )

3. Gender

ggplot(df, aes(x = gender, fill = gender)) +
  geom_bar() +
  scale_fill_brewer(palette = "Set2") +
  labs(title = "Gender Distribution") +
  theme_minimal() +
  theme(legend.position = "none")

4. Age

ggplot(df, aes(x = age, fill = age)) +
  geom_bar() +
  scale_fill_brewer(palette = "Set3") +
  labs(title = "Age Distribution") +
  theme_minimal() +
  theme(legend.position = "none")

5. Education

ggplot(df, aes(x = education, fill = education)) +
  geom_bar() +
  scale_fill_brewer(palette = "Pastel1") +
  labs(title = "Education Distribution") +
  theme_minimal() +
  theme(legend.position = "none")

6. Find Items

ggplot(df, aes(x = find_items, fill = find_items)) +
  geom_bar() +
  scale_fill_brewer(palette = "Blues") +
  labs(title = "Ease of Finding Items") +
  theme_minimal() +
  theme(legend.position = "none")

7. Online Grocery

ggplot(df, aes(x = online_grocery, fill = online_grocery)) +
  geom_bar() +
  scale_fill_brewer(palette = "Greens") +
  labs(title = "Online Grocery Usage") +
  theme_minimal() +
  theme(legend.position = "none")

8. Delivery

ggplot(df, aes(x = delivery, fill = delivery)) +
  geom_bar() +
  scale_fill_brewer(palette = "Oranges") +
  labs(title = "Delivery Preference") +
  theme_minimal() +
  theme(legend.position = "none")

9. Cross Analysis

ggplot(df, aes(x = gender, fill = online_grocery)) +
  geom_bar(position = "dodge") +
  scale_fill_brewer(palette = "Set1") +
  labs(title = "Gender vs Online Grocery")

ggplot(df, aes(x = age, fill = delivery)) +
  geom_bar(position = "dodge") +
  scale_fill_brewer(palette = "Dark2") +
  labs(title = "Age vs Delivery")

10. Key Insights