Packages needed (maybe)

Screener Q

Like_Exporing_perc <- df %>%
    count(Like_Exporing) %>%
    mutate(percent = n / sum(n),
           error = sqrt((percent * (1-percent))/n))

ggplot(Like_Exporing_perc, aes(x = reorder(Like_Exporing, -percent), y = percent)) + 
    geom_col(position = "dodge")+xlab("Do you like exploring new recipes?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

Demographics

dietFreq = df[(which(nchar(df$Diet_Allergy) > 5)),]

df$Age <- as.numeric(df$Age)
hist(df$Age)

summary(as.factor(df$Gender)) -> b
barplot(b, xlab="", cex.names=.8,horiz=F,las=1)

summary(as.factor(df$Race)) -> b
barplot(sort(b, decreasing = T), xlab="", cex.names=.7,horiz=F,las=2)

summary(as.factor(df$Income)) -> b
barplot(sort(b, decreasing = T), xlab=, cex.names=.4,horiz=F,las=2)

print('dietary restrictions in ~ 35/150 people')
## [1] "dietary restrictions in ~ 35/150 people"
print(dietFreq$Diet_Allergy)
##  [1] "Nut allergy, dairy intolerance"                                                                              
##  [2] "No restrictions"                                                                                             
##  [3] "oranges"                                                                                                     
##  [4] "I'm pescatarian"                                                                                             
##  [5] "Peanut allergy"                                                                                              
##  [6] "I stay away from sugar and do a low carb diet."                                                              
##  [7] "I have no allergies of which I am aware."                                                                    
##  [8] "Don't eat red meat"                                                                                          
##  [9] "Nothing"                                                                                                     
## [10] "No, I have no dietary allergies."                                                                            
## [11] "I hav to be careful with onions as they upset my stomach if I consume too much, so I don't use it that much."
## [12] "Gluten"                                                                                                      
## [13] "shellfish allergy"                                                                                           
## [14] "no alcohol"                                                                                                  
## [15] "Peanuts, lactose, also general IBS"                                                                          
## [16] "dairy glutwn"                                                                                                
## [17] "eggs and milk"                                                                                               
## [18] "Gluten Free"                                                                                                 
## [19] "I don't have any dietary restrictions."                                                                      
## [20] "no restrictions"                                                                                             
## [21] "Low carb"                                                                                                    
## [22] "no shellfish"                                                                                                
## [23] "vegetarian"                                                                                                  
## [24] "No dietary restrictions"                                                                                     
## [25] "Low fat/low saturated fat"                                                                                   
## [26] "Pescatarian"                                                                                                 
## [27] "white fish, Brazilian nuts"                                                                                  
## [28] "gluten free, soy free"                                                                                       
## [29] "none known allergies"                                                                                        
## [30] "Vegetarian"                                                                                                  
## [31] "I have a wheat/gluten allergy."                                                                              
## [32] "No restrictions"                                                                                             
## [33] "No fatty foods or sugars."                                                                                   
## [34] "Pescatarian"                                                                                                 
## [35] "Can't eat melons"

Recipe discovery

ggplot(LikeNewCuisines_perc, aes(x = reorder(LikeNewCuisines, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Do you like exploring new cuisines")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(FreqNewRecipe_perc, aes(x = reorder(FreqNewRecipe, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("How often do you try new recipes")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(FreqNewCuisine_perc, aes(x = reorder(FreqNewCuisine, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("What % of new recipes you cook are from new cuisines")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(NewRecipeInspo_perc, aes(x = reorder(NewRecipeInspo, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("are you more inspired to cook recipes you saw your friends cook or one's you saw online?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(FriendFamilyRecc_perc, aes(x = reorder(FriendFamilyRecc, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Would you trust a recipe more if you knew that a friend or family had previously liked or cooked it?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

#Are you more often inspired to cook new recipes because someone you know cooked it or because you saw a popular post online?

ggplot(FamilyFriendsTrustFa_perc, aes(x = reorder(FamilyFriendsTrustFa, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Trust family/friends over online ratings")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

#Would you say that you trust recommendations from friends and family more than ratings from recipes you see online?

ggplot(OriginsVSPerson_perc, aes(x = reorder(OriginsVSPerson, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Prefer learning about recipe or creator")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

ggplot(FreqOnlineRecipe_perc, aes(x = reorder(FreqOnlineRecipe, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("out of the last 10 new recipes you cooked, how many were found online?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

### Recipe sharing

ggplot(Freqrecipeshare_perc, aes(x = reorder(Freqrecipeshare, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("How often do you share recipes with friends/family")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(propOriginal_perc, aes(x = reorder(propOriginal, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("When sharing, what proportion are recipes you created vs. found online")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(FeelIfRecipeNotC_perc, aes(x = reorder(FeelIfRecipeNotC, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Do you care if your friends and family cook the recipes you share?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(FreqOfRecipeCookedFr_perc, aes(x = reorder(FreqOfRecipeCookedFr, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("What proportion of the recipes your friends and family share with you do you actually cook?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

ggplot(LikeSeeFriendRecipe_perc, aes(x = reorder(LikeSeeFriendRecipe, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Do you like knowing what your friends and family are cooking?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

ggplot(PartofFoogGroup_perc, aes(x = reorder(PartofFoogGroup, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("Are you a part of any food related groups?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

User group interaction

ggplot(FreqMessageFood_perc, aes(x = reorder(FreqMessageFood, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("How often do you message your friends and family about food?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

#could be biased due to covid. 
ggplot(FreqCookWithFamily_perc, aes(x = reorder(FreqCookWithFamily, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("How often do you cook with your friends and family?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1)) 

#same with this one
ggplot(SharingFoodLists_perc, aes(x = reorder(SharingFoodLists, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("How often do you create or share multiple recipes (i.e. cookbook)")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))

#Likewise
ggplot(FreqCookingEvents_perc, aes(x = reorder(FreqCookingEvents, -percent), y = percent)) + 
    geom_col(position = "dodge") + xlab("AHow often do you participate in cooking events?")+
    theme(text = element_text(size=10),
        axis.text.x = element_text(angle=60, hjust=1))