Packages needed (maybe)
summary(as.factor(df$TimeOnSocial)) -> TimeOnSocial
TimeOnSocial_perc <- df %>%
count(TimeOnSocial) %>%
mutate(percent = n / sum(n),
error = sqrt((percent * (1-percent))/n))
barplot(sort(TimeOnSocial, decreasing = T), xlab="Time on Social Media", cex.names=.5,horiz=F,las=1)
ggplot(TimeOnSocial_perc, aes(TimeOnSocial, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Time on Social Media")
summary(as.factor(df$FreqSociMedia)) -> FreqSociMedia
FreqSociMedia_perc <- df %>%
count(FreqSociMedia) %>%
mutate(percent = n / sum(n),
error = sqrt((percent * (1-percent))/n))
barplot(sort(FreqSociMedia, decreasing = T), xlab="Freq of sharing food-related content", cex.names=.5,horiz=F,las=1)
ggplot(FreqSociMedia_perc, aes(FreqSociMedia, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Freq of sharing food-related content")+
theme(text = element_text(size=10),
axis.text.x = element_text(angle=60, hjust=1))
summary(as.factor(df$FoodFollow)) -> FoodFollow
FoodFollow_perc <- df %>%
count(FoodFollow) %>%
mutate(percent = n / sum(n),
error = sqrt((percent * (1-percent))/n))
barplot(sort(FoodFollow, decreasing = T), xlab="Do you follow food blogs or food social media accounts?", cex.names=.8,horiz=F,las=1)
ggplot(FoodFollow_perc, aes(FoodFollow, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Do you follow food blogs or food social media accounts?")
hist(df$Age)
summary(as.factor(df$Gender)) -> b
barplot(b, xlab="Gender", cex.names=.8,horiz=F,las=1)
summary(as.factor(df$Race)) -> b
barplot(sort(b, decreasing = T), xlab="Race", cex.names=.8,horiz=F,las=1)
summary(as.factor(df$Income)) -> b
barplot(sort(b, decreasing = T), xlab=, cex.names=.4,horiz=F,las=2)
barplot(sort(friendsorfamily, decreasing = T), xlab="Do you share food pictures and recipes more with your friends or family?", cex.names=.4,horiz=F,las=1)
ggplot(friendsorfamily_perc, aes(friendsorfamily, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Do you share food pictures and recipes more with your friends or family?")+
theme(text = element_text(size=10),
axis.text.x = element_text(angle=60, hjust=1))
barplot(sort(AskRecipeFrieandFam, decreasing = T), xlab="How often do you ask friends and family for recipes?", cex.names=.5,horiz=F,las=1)
ggplot(AskRecipeFrieandFam_perc, aes(AskRecipeFrieandFam, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("How often do you ask friends and family for recipes?")
barplot(sort(Freqrecipeshare, decreasing = T), xlab="How often do you send your friends and family recipes?", cex.names=.6,horiz=F,las=1)
ggplot(Freqrecipeshare_perc, aes(Freqrecipeshare, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("How often do you send your friends and family recipes?")
#most common method of sharing
table(df$RecipeSent)
##
## Email Email,Handwritten
## 19 1
## Email,Handwritten,Social Media Email,Social Media
## 1 3
## Email,Text Email,Text,Handwritten,Social Media
## 6 3
## Email,Text,Social Media Handwritten
## 8 2
## Other Social Media
## 2 34
## Text Text,Handwritten
## 35 4
## Text,Handwritten,Other Text,Handwritten,Social Media
## 1 4
## Text,Social Media Text,Social Media,Other
## 23 1
barplot(sort(propOriginal, decreasing = T), xlab="Of the recipes you share, what proportion are your originial recipes versus ones you found online?", cex.names=.4,horiz=F,las=1)
ggplot(propOriginal_perc, aes(propOriginal, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Of the recipes you share, what proportion are your originial recipes versus ones you found online")+
theme(text = element_text(size=10),
axis.text.x = element_text(angle=60, hjust=1))
barplot(sort(CurrentTrends, decreasing = T), xlab="Do you follow current trends in food?", cex.names=.6,horiz=F,las=1)
ggplot(CurrentTrends_perc, aes(CurrentTrends, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("Do you follow current trends in food?")
barplot(sort(CultureOrigin, decreasing = T), xlab="How important is it for you to know the origin or a recipe?", cex.names=.5,horiz=F,las=1)
ggplot(CultureOrigin_perc, aes(CultureOrigin, percent)) +
geom_col(position = "dodge") +
geom_errorbar(aes(ymin = percent - error, ymax = percent + error),
position = position_dodge(0.9)) + xlab("How important is it for you to know the origin or a recipe?")+
theme(text = element_text(size=10),
axis.text.x = element_text(angle=60, hjust=1))
Social Media