Ramendata<- "https://raw.githubusercontent.com/jayleecunysps/AssignmentforSPS/main/ramen-ratings.csv"
Ramendata <-read.csv(Ramendata)
Ramendata <- Ramendata[!(Ramendata$Stars=="Unrated"),]
Ramendata$Stars <-as.numeric(Ramendata$Stars)
Ramendata <- Ramendata %>%
select("Brand","Variety","Style","Country","Stars")
Vardata <- Ramendata %>%
select("Variety","Stars") %>%
filter_at(vars(1), any_vars(. > 0)) #remove blank
Branddata <- Ramendata %>%
select("Brand","Stars") %>%
filter_at(vars(1), any_vars(. > 0)) #remove blank
Styledata <- Ramendata %>%
select("Style","Stars") %>%
filter_at(vars(1), any_vars(. > 0)) #remove blank
Countrydata <- Ramendata %>%
select("Country","Stars") %>%
filter_at(vars(1), any_vars(. > 0)) #remove blank
Varrank <- aggregate(Stars ~ Variety, Vardata, mean)
Brandrank <- aggregate(Stars ~ Brand, Branddata, mean)
Stylerank <- aggregate(Stars ~ Style, Styledata, mean)
Countryrank <- aggregate(Stars ~ Country, Countrydata, mean)
We can use this data set to analyze the favorite favor, best brand, ramen style, and more.
please see the highest and lowest under the table below.
Varrank <- Varrank[order(Varrank$Stars, decreasing = TRUE), ]
head(Varrank,3)
## Variety Stars
## 20 2 Minute Noodles Masala Spicy 5
## 40 Aloe Noodle Red Onion & Sesame Sauce 5
## 42 Aloe Noodle Vegetable Sauce 5
tail(Varrank,3)
## Variety Stars
## 2227 Tiny Noodle With Oyster Flavor 0
## 2320 Vegan Pad Thai Noodle Soup 0
## 2355 Wei Wei A Instant Noodles Chicken Flavor 0
Brandrank <- Brandrank[order(Brandrank$Stars, decreasing = TRUE), ]
head(Brandrank,3)
## Brand Stars
## 40 ChoripDong 5
## 48 Daddy 5
## 49 Daifuku 5
tail(Brandrank,3)
## Brand Stars
## 238 Roland 0
## 306 Tiger 0
## 329 US Canning 0
Stylerank <- Stylerank[order(Stylerank$Stars, decreasing = TRUE), ]
head(Stylerank,3)
## Style Stars
## 1 Bar 5.000000
## 3 Box 4.291667
## 6 Pack 3.700458
tail(Stylerank,3)
## Style Stars
## 7 Tray 3.545139
## 4 Can 3.500000
## 5 Cup 3.498500
Countryrank <- Countryrank[order(Countryrank$Stars, decreasing = TRUE), ]
head(Countryrank,3)
## Country Stars
## 3 Brazil 4.350000
## 29 Sarawak 4.333333
## 4 Cambodia 4.200000
tail(Countryrank,3)
## Country Stars
## 24 Netherlands 2.483333
## 5 Canada 2.243902
## 25 Nigeria 1.500000