data <-read.csv("social_media_entertainment_data.csv")
Social_Media_Summary <- data %>%
summarise(
Min = min(Daily.Social.Media.Time..hrs.),
Max = max(Daily.Social.Media.Time..hrs.),
Mean = mean(Daily.Social.Media.Time..hrs.),
Median = median(Daily.Social.Media.Time..hrs.),
Q1 = quantile(Daily.Social.Media.Time..hrs., 0.25),
Q3 = quantile(Daily.Social.Media.Time..hrs., 0.75)
)
Income_Summary <- data %>%
summarise(
Min = min(Monthly.Income..USD.),
Max = max(Monthly.Income..USD.),
Mean = mean(Monthly.Income..USD.),
Median = median(Monthly.Income..USD.),
Q1 = quantile(Monthly.Income..USD., 0.25),
Q3 = quantile(Monthly.Income..USD., 0.75)
)
list(SocialMedia = Social_Media_Summary, Income = Income_Summary)
## $SocialMedia
## Min Max Mean Median Q1 Q3
## 1 0.5 8 4.254808 4.26 2.38 6.13
##
## $Income
## Min Max Mean Median Q1 Q3
## 1 500.01 9999.93 5256.919 5259.01 2883.818 7630.525
1. How does daily social media time vary across different primary platforms?
2. Does monthly income vary significantly between different occupations?
3. Is there a correlation between internet speed and time spent in online communities?
Average_Time_By_Platform <- data %>%
group_by(Primary.Platform) %>%
summarise(AverageTime = mean(Daily.Social.Media.Time..hrs.))
Average_Time_By_Platform
## # A tibble: 5 Ă— 2
## Primary.Platform AverageTime
## <chr> <dbl>
## 1 Facebook 4.26
## 2 Instagram 4.25
## 3 TikTok 4.25
## 4 Twitter 4.25
## 5 YouTube 4.27
The data suggests that users split their time evenly across different platforms
Equal distribution of time could indicate that no single platform dominates users’ daily routines
data_summary <- data %>%
group_by(Country, Internet.Speed..Mbps.) %>%
summarise(AverageTime = mean(Daily.Social.Media.Time..hrs., na.rm = TRUE)) %>%
ungroup() %>%
arrange(Country, Internet.Speed..Mbps.)
## `summarise()` has grouped output by 'Country'. You can override using the
## `.groups` argument.
ggplot(data_summary, aes(x = Internet.Speed..Mbps., y = AverageTime, color = Country, group = Country)) +
geom_line() + geom_point(alpha = 0.5) +
labs(
title = "Social Media Consumption vs Internet Speed by Country",
x = "Internet Speed (Mbps)",
y = "Average Social Media Time (hrs)"
)
Insights:
There are similar patterns across all countries, showing that the internet speed does not have as much effect on the time.
USA dominates the plot keeping a steady rate of social media time.
# Create age ranges
data <- data %>%
mutate(AgeRange = cut(Age,
breaks = c(0, 18, 25, 35, 45, 55, 65, 100),
labels = c("0-18", "18-25", "26-35", "36-45", "46-55", "56-65", "65+")))
age_social_media <- data %>%
group_by(AgeRange) %>%
summarise(AverageTime = mean(Daily.Social.Media.Time..hrs., na.rm = TRUE))
ggplot(data, aes(x = AgeRange, y = Daily.Social.Media.Time..hrs.)) +
geom_boxplot(fill = "lightblue", color = "black") +
facet_wrap(~ Country) +
labs(title = "Social Media Consumption Across Age Ranges by Country",
x = "Age Range",
y = "Daily Social Media Time (hrs)") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Insights:
The data suggests that each country has similar social media consumption time by age range.
The overall average time spent on social media is approximately 4 hours per day, which remains relatively constant between countries.
The data suggests that age ranges or country specific factors don’t drastically influence the overall time spent