Hello everyone! All people want to eat at good and high rated resataurants. Therefore, we all have to know which restaurant is good,better, best or even worst. Regarding to this situation, an institution called Michelin developed a way to score and evaluate how good a restaurant is. They give stars to a restaurant which is good for them. More stars that a restaurant get more good it will be.
This document, summarise the distribution of 1,2, and 3 stars restaurant in many different countries. However, after observing the data, we can conclude that there are only 3 different continents who have 1,2,3 star restaurants.
At the end, I hope that you can get much information abaout the distiburion of michelin restaurant in the world and someday it can be a reference to go. Thankyou and happy reading!
Before start, we need to load our packages
I will check for the data types
## 'data.frame': 549 obs. of 5 variables:
## $ name : Factor w/ 544 levels "108","21212",..: 228 356 135 77 124 112 367 521 411 497 ...
## $ year : int 2019 2019 2019 2019 2019 2019 2019 2019 2019 2019 ...
## $ region : Factor w/ 24 levels "Austria","California",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ cuisine: Factor w/ 67 levels "American","Asian",..: 16 12 16 38 45 45 16 12 35 67 ...
## $ price : Factor w/ 6 levels "$","$$","$$$",..: 5 5 5 5 4 5 5 5 5 5 ...
I found that “year” coloumn still in int, therefore I am going to convert it to factor
Got it! Now I will check for the summary of the region, so I can group the region into five different continents in the world
## Austria California Chicago Croatia Czech Republic
## 12 69 18 5 2
## Denmark Finland Greece Hong Kong Hungary
## 22 6 3 44 5
## Ireland Macau New York City Norway Poland
## 13 11 55 7 2
## Rio de Janeiro Sao Paulo Singapore South Korea Sweden
## 5 10 34 19 16
## Taipei Thailand United Kingdom Washington DC
## 18 22 138 13
Making a new column named “continent”
asia <- c("Hong Kong", "Macau","Singapore","South Korea","Taipei","Thailand")
america <- c("California","Chicago","New York City","Washington DC", "Rio de Janeiro","Sao Paulo")
onestar$continent <- ifelse(onestar$region %in% asia , "Asia", ifelse(onestar$region %in% america, "America", "Europe"))
onestar$continent <-as.factor(onestar$continent)Let us see the diagram of all the number of one-michelin star restaurant in the world
ggplot(data = onestar, mapping = aes(x = continent)) +
geom_bar(mapping = aes(fill = continent,
)) +
labs (title = "Numbers of One Michelin Star Restaurants", x="", y="Counts", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))Wohoo! Most of one-michelin star restaurants are located in Europe!
Now let’s compare the prices between the continents
##
## America Asia Europe
## $ 0 29 0
## $$ 19 40 8
## $$$ 50 49 30
## $$$$ 87 19 18
## $$$$$ 14 11 24
## N/A 0 0 151
onestar$rate <- ifelse(onestar$price == "$", 1 ,
ifelse(onestar$price == "$$", 2 ,
ifelse(onestar$price == "$$$", 3,
ifelse(onestar$price== "$$$$", 4 , 5))))
table ( onestar$continent, onestar$rate)##
## 1 2 3 4 5
## America 0 19 50 87 14
## Asia 29 40 49 19 11
## Europe 0 8 30 18 175
table_rate <-aggregate(rate ~ continent, onestar, FUN= mean)
table_rate$rate <- round(table_rate$rate, 2)
p1<- ggplot(data = table_rate, mapping = aes(x = continent, y= rate)) +
geom_col(mapping = aes(fill = continent,
text = glue("Continent : {continent}
Rate : {rate}"),
)) +
labs (title = "Rate Comparison Between One Michelin Star Restaurant", x="", y="Rate", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))
ggplotly(p1, tooltip = "text")One star restaurants in Europe are the most expensive than the others.
Now let’s look at 2 stars restaurants
twostar<- read.csv(file="two-stars-michelin-restaurants.csv")[ , -c(3,4,5,7,10)]
twostar$year <- as.factor(twostar$year)
str(twostar)## 'data.frame': 110 obs. of 5 variables:
## $ name : Factor w/ 108 levels "Écriture","aâ\200šoâ\200šc",..: 80 37 62 46 84 89 12 19 15 50 ...
## $ year : Factor w/ 2 levels "2018","2019": 2 2 2 2 2 2 2 2 2 2 ...
## $ region : Factor w/ 19 levels "Austria","California",..: 1 1 1 1 1 1 2 2 2 2 ...
## $ cuisine: Factor w/ 28 levels "Californian",..: 7 7 7 22 22 7 5 5 20 5 ...
## $ price : Factor w/ 6 levels "$","$$","$$$",..: 5 5 5 5 5 5 4 4 4 4 ...
We do the same thing as one star
And How about 2 star?
ggplot(data = twostar, mapping = aes(x = continent)) +
geom_bar(mapping = aes(fill = continent)) +
labs (title = "Numbers of Two Michelin Star Restaurants", x="", y="Counts", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))Just like one star, mots of two stars michelin restaurants are located in Europe! (38)
##
## America Asia Europe
## $ 0 2 0
## $$ 0 6 0
## $$$ 0 11 1
## $$$$ 33 8 9
## $$$$$ 3 9 8
## N/A 0 0 20
twostar$rate <- ifelse(twostar$price == "$", 1 ,
ifelse(twostar$price == "$$", 2 ,
ifelse(twostar$price == "$$$", 3,
ifelse(twostar$price== "$$$$", 4 , 5))))
table ( twostar$continent, twostar$rate)##
## 1 2 3 4 5
## America 0 0 0 33 3
## Asia 2 6 11 8 9
## Europe 0 0 1 9 28
table_rate_two <-aggregate(rate ~ continent, twostar, FUN= mean)
table_rate_two$rate <- round(table_rate_two$rate, 2)
p2<- ggplot(data = table_rate_two, mapping = aes(x = continent, y= rate)) +
geom_col(mapping = aes(fill = continent,
text = glue("Continent : {continent}
Rate : {rate}") )) +
labs (title = "Rate Comparison Between Two Michelin Star Restaurant", x="", y="Rate", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))
ggplotly(p2, tooltip = "text")And again, two star restaurants in Europe are the most expensive, while the cheapest are in asia.
threestar<- read.csv(file = "three-stars-michelin-restaurants.csv")[ , -c(3,4,5,7,10)]
names(threestar)## [1] "name" "year" "region" "cuisine" "price"
## 'data.frame': 36 obs. of 5 variables:
## $ name : Factor w/ 36 levels "8½ Otto e Mezzo - Bombana",..: 4 23 6 26 5 33 35 28 3 14 ...
## $ year : Factor w/ 1 level "2019": 1 1 1 1 1 1 1 1 1 1 ...
## $ region : Factor w/ 13 levels "Austria","California",..: 1 2 2 2 2 2 2 2 3 4 ...
## $ cuisine: Factor w/ 16 levels "American","Asian",..: 7 6 2 6 6 6 6 6 6 7 ...
## $ price : Factor w/ 5 levels "$$","$$$","$$$$",..: 4 3 3 3 3 3 3 3 3 3 ...
And last for the 3 star restaurants, are there any differences?
threestar$continent <- ifelse(threestar$region %in% asia , "Asia", ifelse(threestar$region %in% america, "America", "Europe"))
threestar$continent <-as.factor(threestar$continent)ggplot(data = threestar, mapping = aes(x = continent)) +
geom_bar(mapping = aes(fill = continent)) +
labs (title = "Numbers of Three Michelin Star Restaurants", x="", y="Counts", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))Wow! Although Europe has the highest numbers of one-star and two-star restaurants in the world, it has the lowest in three star restaurants. The highest is now in America while Asia stands in 2nd. Interesting!
Now how about the prices?
##
## America Asia Europe
## $$ 0 2 0
## $$$ 0 2 0
## $$$$ 14 6 3
## $$$$$ 0 3 1
## N/A 0 0 5
threestar$rate <- ifelse(threestar$price == "$", 1 ,
ifelse(threestar$price == "$$", 2 ,
ifelse(threestar$price == "$$$", 3,
ifelse(threestar$price== "$$$$", 4 , 5))))
table ( threestar$continent, threestar$rate)##
## 2 3 4 5
## America 0 0 14 0
## Asia 2 2 6 3
## Europe 0 0 3 6
table_rate_three <-aggregate(rate ~ continent, threestar, FUN= mean)
table_rate_three$rate <- round(table_rate_three$rate, 2)
p3<- ggplot(data = table_rate_three, mapping = aes(x = continent, y= rate)) +
geom_col(mapping = aes(fill = continent,
text = glue("Continent : {continent}
Rate : {rate}"))) +
labs (title = "Rate Comparison Between Three Michelin Star Restaurant", x="", y="Rate", fill = "Continent") +
theme (plot.title = element_text(face = "bold"), panel.grid = element_blank(), panel.background = element_rect(fill = "white"))
ggplotly (p3, tooltip= "text")As wee see, from one,two,and three star restaurants, Europe has the most expensives dishes in the world.
Now, for a better visualization we make the charts simpler.
asia1 <- nrow(onestar[onestar$continent == "Asia", ])
asia2 <- nrow(twostar[twostar$continent == "Asia", ])
asia3 <- nrow(threestar[threestar$continent == "Asia", ])
asia.mul <- rbind (asia1, asia2, asia3)
asia.mul <- as.data.frame(asia.mul)
names(asia.mul)[names(asia.mul) == "V1"] <- "Asia"
asia.mul$Star <- c("1-Star", "2-Star","3-Star")
asia.mul<- asia.mul[, c(2,1)]
asia.mul$Star <- as.factor(asia.mul$Star)
asia.mul## Star Asia
## asia1 1-Star 148
## asia2 2-Star 36
## asia3 3-Star 13
america1 <- nrow(onestar[onestar$continent == "America", ])
america2 <- nrow(twostar[twostar$continent == "America", ])
america3 <- nrow(threestar[threestar$continent == "America", ])
america.mul <- rbind (america1, america2, america3)
america.mul <- as.data.frame(america.mul)
names(america.mul)[names(america.mul) == "V1"] <- "America"
america.mul$Star <- c("1-Star", "2-Star","3-Star")
america.mul<- america.mul[, c(2,1)]
america.mul$Star <- as.factor(america.mul$Star)
america.mul## Star America
## america1 1-Star 170
## america2 2-Star 36
## america3 3-Star 14
europe1 <- nrow(onestar[onestar$continent == "Europe", ])
europe2 <- nrow(twostar[twostar$continent == "Europe", ])
europe3 <- nrow(threestar[threestar$continent == "Europe", ])
europe.mul <- rbind (europe1, europe2, europe3)
europe.mul <- as.data.frame(europe.mul)
names(europe.mul)[names(europe.mul) == "V1"] <- "Europe"
europe.mul$Star <- c("1-Star", "2-Star","3-Star")
europe.mul<- europe.mul[, c(2,1)]
europe.mul$Star <- as.factor(europe.mul$Star)
europe.mul## Star Europe
## europe1 1-Star 231
## europe2 2-Star 38
## europe3 3-Star 9
## Star Asia America Europe
## asia1 1-Star 148 170 231
## asia2 2-Star 36 36 38
## asia3 3-Star 13 14 9
## # A tibble: 9 x 3
## Star name value
## <fct> <chr> <int>
## 1 1-Star Asia 148
## 2 1-Star America 170
## 3 1-Star Europe 231
## 4 2-Star Asia 36
## 5 2-Star America 36
## 6 2-Star Europe 38
## 7 3-Star Asia 13
## 8 3-Star America 14
## 9 3-Star Europe 9
colnames(mulp) <- c("Star", "Continent","Star_Count")
mulp$Continent <- as.factor (mulp$Continent)
mulp## # A tibble: 9 x 3
## Star Continent Star_Count
## <fct> <fct> <int>
## 1 1-Star Asia 148
## 2 1-Star America 170
## 3 1-Star Europe 231
## 4 2-Star Asia 36
## 5 2-Star America 36
## 6 2-Star Europe 38
## 7 3-Star Asia 13
## 8 3-Star America 14
## 9 3-Star Europe 9
Time to ggplot!
library(extrafont)
p4 <- ggplot (data = mulp, mapping = aes(x= Continent, y=Star_Count)) +
geom_col (mapping = aes(fill = Star,
text = glue("Continent : {Continent}
Star Count : {Star_Count}")), position = "dodge") +
labs(x ="", y="Count", fill = "", title = "Number of Michelin Star Restaurant in America, Asia, and Europe") +
theme (plot.title = element_text(size = 10, face = "bold"), panel.background = element_rect(colour = "red", fill="beige"),axis.title.y = element_text(size = 10))
ggplotly(p4, tooltip = "text")Chart above is the summary of total number of 1-star,2-star,3-star michelin restaurants in America, Asia , and Europe.
Our data have information about the time (in year) of michelin restaurants in the world. We will see if there are changes about the number of michelin restaurant year by year (starting from 2018)
We group the data by each continents.
#For Asia
oneasia<- onestar %>%
filter (continent =="Asia") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("1-star"))
twoasia<- twostar %>%
filter(continent == "Asia") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("2-star"))
threeasia<- threestar %>%
filter(continent == "Asia") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("3-star"))#For America
oneamerica<- onestar %>%
filter (continent =="America") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = "1-star")
twoamerica<- twostar %>%
filter(continent == "America") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("2-star"))
threeamerica<- threestar %>%
filter(continent == "America") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("3-star"))#For Europe
oneeurope<- onestar %>%
filter (continent == "Europe") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("1-star"))
twoeurope<- twostar %>%
filter(continent == "Europe") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("2-star"))
threeeurope<- threestar %>%
filter(continent == "Europe") %>%
select(year, continent) %>%
group_by(year, continent) %>%
count() %>%
mutate(star = as.factor("3-star"))Table joining using full join
star1<- oneasia %>%
full_join(oneamerica) %>%
full_join(oneeurope)
star2<- twoasia %>%
full_join(twoamerica) %>%
full_join(twoeurope)
star3<- threeasia %>%
full_join(threeamerica) %>%
full_join(threeeurope)
fix<- star1 %>%
full_join(star2) %>%
full_join(star3)
fix[,c("year", "star")] <- lapply(fix[,c("year", "star")], as.factor)
fix %>%
arrange (continent)## year continent freq star
## 1 2019 America 170 1-star
## 2 2019 America 36 2-star
## 3 2019 America 14 3-star
## 4 2018 Asia 34 1-star
## 5 2019 Asia 114 1-star
## 6 2018 Asia 5 2-star
## 7 2019 Asia 31 2-star
## 8 2019 Asia 13 3-star
## 9 2019 Europe 231 1-star
## 10 2019 Europe 38 2-star
## 11 2019 Europe 9 3-star
Now we make the plot!
p10<- fix %>%
ggplot(mapping = aes(x= continent, y=freq))+
geom_col(aes(fill = year, text = glue("Continent = {continent}
Year : {year}
Counts : {freq}")), position = "dodge")+
facet_wrap(~star, nrow =1 ) +
theme_minimal()+
labs(title = "Trend of Michelin Star Restaurants Between 2018 and 2019", y = "counts")+
theme(plot.title = element_text(size = 10, face = "bold"),
axis.title.y = element_text(size = 11))
ggplotly(p10, tooltip ="text")As we can see from the charts above, only Asia has michelin restaurants in 2018.
After processing all data, here what we can get:
1.Europe has the highest number of Michelin Stars restaurant. This indicates that most of European restaurants are highly rated.
2 The most expensive restaurants are located in Europe
3 No 1,2,3 stars Michelin restaurants established in Africa and Australia
4.Only Asia has michelin restaurants in 2018
So this this the end of the article.
Thank you for reading and see you on the next ones!