This EDA uses charts to explore our Qualtrics survey on Nike social media engagement and purchase intention (n = 20).
Purchase_future (Q6), likelihood of purchasing Nike
products in the future (1 = disagree, 2 = somewhat, 3 = agree)Interact_freq (Q2): Frequency of interacting with
Nike’s social media posts (1 = Strongly Disagree to 4 = Strongly
agree)Captures_attn (Q3): Whether Nike’s social media content
captures attention (1 = highly disagree to 4 = agree)Regular_view (Q4): Whether respondent regularly views
Nike content on social media (1 = highly disagree to 5 = highly
agree)library(ggplot2)
library(dplyr)
# Nike Social Media Engagement_December 1, 2026_00.28.csv must be in the same folder as this .Rmd file
raw <- read.csv("Nike Social Media Engagement_December 1, 2026_00.28 (1).csv",
stringsAsFactors = FALSE, check.names = FALSE)
# Remove the first two Qualtrics metadata rows (question text & ImportId)
survey <- raw[-c(1, 2), ]
# Recode text responses to numeric scales (handling survey option typos)
survey <- survey %>%
mutate(
# Dependent variable (Q6)
Purchase_future = case_when(
`Q6 Dependent` == "disagree" ~ 1,
`Q6 Dependent` == "somewhat" ~ 2,
`Q6 Dependent` == "agree" ~ 3
),
# Predictor 1: Frequent interaction (Q2)
Interact_freq = case_when(
Q2 == "Strongly Disagree" ~ 1,
Q2 == "Neither agree nor disagree" ~ 2,
Q2 == "Somewhat agree" ~ 3,
Q2 == "Strongly agree" ~ 4
),
# Predictor 2: Captures attention (Q3)
Captures_attn = case_when(
Q3 == "highly disagree" ~ 1,
Q3 == "diagree" ~ 2,
Q3 == "somwhate agree" ~ 3,
Q3 == "agree" ~ 4
),
# Predictor 3: Regularly view Nike content (Q4)
Regular_view = case_when(
Q4 == "highly diagree" ~ 1,
Q4 == "disagree" ~ 2,
Q4 == "somewhat" ~ 3,
Q4 == "agree" ~ 4,
Q4 == "highly agree" ~ 5
),
# Additional 3-point intention & brand items (Q5, Q7-Q10)
Engage_more = case_when(
Q5 == "No" ~ 1,
Q5 == "Maybe" ~ 2,
Q5 == "somewhat" ~ 2.5,
Q5 == "yes" ~ 3
),
Increases_interest = case_when(Q7 == "No" ~ 1, Q7 == "Maybe" ~ 2, Q7 == "yes" ~ 3),
Recommend = case_when(Q8 == "No" ~ 1, Q8 == "Maybe" ~ 2, Q8 == "yes" ~ 3),
Buy_6mo = case_when(Q9 == "No" ~ 1, Q9 == "Maybe" ~ 2, Q9 == "yes" ~ 3),
Consider_buy = case_when(Q10 == "No" ~ 1, Q10 == "Maybe" ~ 2, Q10 == "yes" ~ 3)
)
ggplot(survey, aes(x = factor(Purchase_future))) +
geom_bar(fill = "steelblue") +
labs(title = "Likelihood to purchase Nike products in the future (Q6)",
x = "Purchase_future code (1 = disagree, 2 = somewhat, 3 = agree)",
y = "Number of respondents")
ggplot(survey, aes(x = Interact_freq)) +
geom_histogram(binwidth = 1, fill = "steelblue", color = "white") +
labs(title = "Frequently interact with Nike social media posts (1 = low, 4 = high)",
x = "Interaction level (Q2)", y = "Number of respondents")
# Distribution of predictors. Interaction frequency clusters in the
middle, with 8 of the 20 respondents choosing code 2 (Neither agree nor
disagree) and 6 choosing code 3 (Somewhat agree). Four respondents chose
code 1 (Strongly Disagree), and only 2 chose code 4 (Strongly agree).
The average score is 2.30, showing moderate engagement overall with very
few heavy commenters or sharers.
ggplot(survey, aes(x = Captures_attn)) +
geom_histogram(binwidth = 1, fill = "steelblue", color = "white") +
labs(title = "Nike social media content captures attention (1 = low, 4 = high)",
x = "Agreement (Q3)", y = "Number of respondents")
ggplot(survey, aes(x = Regular_view)) +
geom_histogram(binwidth = 1, fill = "steelblue", color = "white") +
labs(title = "Regularly view Nike content on social media (1 = low, 5 = high)",
x = "Agreement (Q4)", y = "Number of respondents")
# Interpretation: Regular viewing is right-skewed toward disagreement:
14 of the 20 respondents chose code 1 (highly disagree, 7) or code 2
(disagree, 7). Only 2 respondents chose code 3, 3 chose code 4, and 1
respondent chose code 5 (highly agree). Because of this single
high-viewing respondent, the mean (2.20) sits slightly above the median
(2.00).
ggplot(survey, aes(y = Regular_view)) +
geom_boxplot(fill = "steelblue", alpha = 0.5) +
labs(title = "Regular viewing of Nike content: checking spread & outliers",
y = "Agreement scale (1 to 5)")
#Interpretation: The box shows that the middle half of respondents score
between 1 and 2.25, with the median line at 2.00. The respondent at code
5 sits at the top of the upper whisker rather than being flagged as a
formal statistical outlier, meaning no extreme values distort this
predictor.
ggplot(survey, aes(x = Interact_freq, y = Purchase_future)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Social media interaction vs. future purchase intention",
x = "Frequently interact with Nike posts (1-4)",
y = "Purchase_future (1-3)")
## `geom_smooth()` using formula = 'y ~ x'
ggplot(survey, aes(x = Captures_attn, y = Purchase_future)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Content captures attention vs. future purchase intention",
x = "Content captures attention (1-4)",
y = "Purchase_future (1-3)")
## `geom_smooth()` using formula = 'y ~ x'
ggplot(survey, aes(x = Regular_view, y = Purchase_future)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Regular content viewing vs. future purchase intention",
x = "Regularly view Nike content (1-5)",
y = "Purchase_future (1-3)")
## `geom_smooth()` using formula = 'y ~ x'
#Each predictor vs. future purchase intention
ggplot(survey, aes(x = factor(Purchase_future), y = Interact_freq)) +
geom_boxplot(fill = "steelblue", alpha = 0.5) +
geom_jitter(width = 0.15, alpha = 0.6) +
labs(title = "Social media interaction by purchase intention group",
x = "Purchase_future code (1 = disagree, 2 = somewhat, 3 = agree)",
y = "Frequently interact with Nike posts (1-4)")
vars <- c("Purchase_future", "Interact_freq", "Captures_attn", "Regular_view")
cor_mat <- round(cor(survey[, vars], use = "complete.obs"), 2)
ggplot(as.data.frame(as.table(cor_mat)), aes(Var1, Var2, fill = Freq)) +
geom_tile(color = "white") +
geom_text(aes(label = Freq)) +
scale_fill_gradient2(low = "firebrick", mid = "white", high = "steelblue",
midpoint = 0, limits = c(-1, 1)) +
labs(title = "Correlations among core survey variables", x = NULL, y = NULL, fill = "r")
items <- data.frame(
Item = c("Buy within 6 months (Q9)",
"Engage more than other brands (Q5)",
"Recommend Nike to others (Q8)",
"Consider buying after content (Q10)",
"Content increases interest (Q7)"),
Score = colMeans(survey[, c("Buy_6mo", "Engage_more", "Recommend",
"Consider_buy", "Increases_interest")], na.rm = TRUE)
)
ggplot(items, aes(x = reorder(Item, Score), y = Score)) +
geom_col(fill = "steelblue") +
geom_hline(yintercept = 2, linetype = "dashed") +
coord_flip() +
ylim(0, 3) +
labs(title = "Average agreement across brand & purchase items",
subtitle = "Dashed line = 2.0 ('Maybe' midpoint on a 1 = No to 3 = Yes scale)",
x = NULL, y = "Average score (1 to 3)")
ggplot(survey, aes(x = Consider_buy, y = Purchase_future)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = FALSE, color = "grey20") +
labs(title = "Considering purchase after social content (Q10) vs. future purchase (Q6)",
x = "Consider buying after seeing Nike content (1 = No, 2 = Maybe, 3 = Yes)",
y = "Purchase_future (1-3)")
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 2 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 2 rows containing missing values or values outside the scale range
## (`geom_point()`).
#Interpretation: The box shows that the middle half of respondents score
between 1 and 2.25, with the median line at 2.00. The respondent at code
5 sits at the top of the upper whisker rather than being flagged as a
formal statistical outlier, meaning no extreme values distort this
predictor.