Web Scraping and Data Analysis of Wines on Vivino.com

Posted on Oct 30, 2017
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Introduction

As someone with a taste for  good red wine and coffee but with the limited funds of a student, I decided to web-scrape data from my favorite app, Vivino.com by using Python and Selenium where I scraped information about 16,690 bottles of wines. Vivino is the “go-to” app when you want to discover good red wines, especially on a student budget. Thus, the prices range from $10 - $6,000 a bottle, so it should be possible finding a wine matching almost everyone preference and budget.

After couple of hunts for good affordable wines, I started wondering: what drives the rating at Vivino? What countries and regions should I look against to find high rated “cheap” red wines. Those are the questions I explore  throughout this blog post.

What is Vivino?

Vivino is a Danish founded company and is today the most downloaded wine app, used by more than 26 million users around the world. With millions of wines featured, the database makes up the most extensive wine library in the world. Vivino has established a community and developed an app, which especially is great for us who love red wine but aren’t sommeliers-in-training. The Vivino app enables consumers to snap a photo of a bottle’s label, and the app will immediately pull up information about the wine, its rating score, reviews and much more.

The Dataset

I scraped the following variables on Vivino.com:

  • Wine Name
  • Year
  • Grape variety (Red, White, Sparkling)
  • Region (Wine region of the country)
  • Country of origin
  • #Reviews (Number of reviews given to a specific bottle by consumers)
  • Average price per bottle
  • Rating Score (Overall consumer rating, measured on a scale from 0-5)

Data Insights

A few stats about the dataset:

  • The dataset contains 16,690 bottles scraped on Vivino.com
Red wine White wine Sparkling wine
Number of bottles 12141 3368 1181
Price range $10 - $3520 $8.99 - $5999 $10.49 - $4179.98
Min & Max rating 2.3 - 4.9 2.4 - 4.9 3.2 - 4.8
#countries represented 9 25 16
Total number of reviews 8654903 1405111 131406

Descriptive Analysis

This descriptive analysis is based on data scraped from vivino.com. Please, notice that I have limited the price range, so the prices per bottle range from $8.99 - $500. This means that 169 observations have been dropped from the scrapped dataset, corresponding to ~1% of the dataset.

Red wine, White wine & Sparkling wine

The box plot reveals that the median rating for red wine tends to be slightly higher compared to white wine and sparkling wine. The majority of the red wines obtain a rating approximately between 3.5 - 4.0 (the interquartile range box). Further, it should be noted that the rating for  red wine, white wine and sparkling wine seems to be normally distributed, though there are a few outliers. An interesting observation is that a slightly wider rating range for red wine is observed compared to what we see for the white wine and sparkling wine categories.

Price seems to correlate with rating

I expected to see this correlation. The overall average rating score per bottle and price seems to “some extent” to correlate, particularly for red and sparkling wine. The correlation coefficient reveals a “somewhat” strong relationship between rating and price for red wine (0.68) and sparkling wine (0.69), while the correlation for white wine is significantly smaller(0.57). However, that correlation peters out for red wine priced above $100 a bottle; the rating  only increases slightly in tandem with the price at that point.

How does red wine rating differ from white wine rating?

As observed at the initial boxplot, a slightly wider rating range was observed for red wines, which is why I decided to look into the “spread of the data points” around the average rating (variance) for red and white wine. I wanted to investigate whether ratings for red wine have a higher variance than white wine.

H0: Variance of average(rating red wine) = Variance of average(rating white wine)

H1: Variance of average(rating red wine) ≥ Variance of average(rating white wine)

The variance test revealed an extremely low p-value (2.2e-16), why the null hypothesis is rejected, in favor of the alternative, the rating for red wines has a higher variance compared to white wine. The higher variance for red wine rating can be caused by several factors.  Some part of the explanation might originate from the fact that red wine and white wine are served at two different temperature.

A common rule of thumb is that red wine is best served between 50F and 65F, while white wines are best served between 45F and 50F. As too much cooling causes a  loss of flavor, the odds of flavor loss are higher for white wine than for red. Lastly, red wines are typically aged in oak barrels, while white is aged in stainless steels vats. These two entirely different processes result in two distinct taste experiences. The variety of flavor experience tasting a red wine versus white wine are bigger, and could, therefore, be a part of the explanation why the data points for the rating of red wine are more dispersed.  

Deep-diving into my favorite, red wine......

Nothing really changes here compared to the previous scatterplot. However, it’s again worth pointing out that it’s possible to buy a red wine with top rating for around $75 - $100.  

Old wines achieve high ratings

The jump in the year is because no bottles were present in the missing years in the scraped data. The scatter plot reveals a correlation at -0.377, which could indicate that an increase in the year will decrease the rating. Therefore, we need to test whether it’s significant or not.

An interesting insight here is that older wines tend to have a more narrow rating range, an increase in years also increases the range of rating. This could indicate that old wines are quality wines, wines which people have saved. While the wider rating range for newer wine indicates that from a consumer perspective that both quality and lower quality wines are produced. In sum, the plot makes intuitively good sense when considering year and rating within red wines.

The United States surprise

The boxplot reveals, from my perspective, a quite surprisingly insight! Wines in the United States have on average a low price, while the median rating is the highest compared to the remaining countries. That would indicate that wine lovers who want a decent quality for a reasonable price should look at wines from the US!

Is French really better?

I have often heard that French wines are the best. During my internship at adidas, I had the privilege to live with a French mate for a few months, and we often discussed why people tend to claim that French wines should be a better choice (my mate tried several times to convince me). With the scraped data from Vivion.com, I can check if the ratings support the claim of french superiority.

H: Average rating France = Average rating remaining countries

H1 : Average rating France ≥ Average rating remaining countries

My test revealed that the scraped data did not contain any evidence that the average rating for France wines is higher than the remaining countries.

Zooming in at the more budget friendly wines - Top 30 red wines under $30:

Next, I wanted to figure out which regions and bottles to look for within a reasonable budget. Therefore, I specified the following requirements:

  • A bottle should at least have received 100 reviews
  • Price below $30
  • A minimum average score at 4.1

Web Scraping and Data Analysis of Wines on Vivino.com

The graph confirms the previous boxplot, wine lovers who want quality (high rating) red wine for a reasonable price should indeed look at wines from the US!

Statistical Data Analysis

Playing around with scraped data revealed some interesting and surprising insights, which pointed me in the direction of the following question. Can the predictors, price and year explain the obtained rating score for red wines at Vivino? Therefore, I decided to test the following model:

Rating Score = β0 + β1 √price + β#Number of reviews per bottle + ε

The analysis was carried out in R-studio where I obtain the following output of my regression analysis.

Variable Coefficient Std. Error t-value P-value
Intercept 3.611 0.00487 741.490 <0.001
√Price 0.05336 0.0004977 107.228 <0.001
#Number of reviews per bottle 7.265e-06 0.0003271 2.221 <0.0264

 

The adjusted R-squared for this model was 0.5306, which is decent given the few number of predictors; price and year. The model reveals that the baseline rating score for red wines at Vivino.com is 3.6. Further, every unit increase in √price would increase the rating by 0.053, while each additional reviews increase the rating score by 0.000007265. This means that it takes 137,646 reviews to bump the rating by 1 point. It requires a significant amount of reviews to move the rating.

Conclusion

  • Red wine seems to have a slightly higher median rating compared to White wine and Sparkling wine.
  • There is a strong correlation between rating and price for red wine, white wine, and sparkling wine.
  • Older red wines have a more narrow rating range, while younger wines have a wider rating range.
  • Red wines from the USA have a generally higher median rating compared to the remaining countries in the scraped dataset.
  • Red wine ratings have a significantly higher variance compared to white wine ratings.
  • The scraped data contains no evidence for that red wines from French have significantly higher rating compared to the remaining countries in the dataset.
  • Looking for high rating wine below $30 based on more than 100 reviews? Look for wines in the USA.
  • 53% of the rating per bottle can be explained by the price and number of reviews.
  • Selenium as a scraping tool is significantly slower than Beautifulsoup and Scrapy. Thus, the structure of the site (infinite scroll) forced me in this direction.

 

 

 

 

 

About Author

Related Articles

Leave a Comment

Jip Claassens February 27, 2020
It would be interesting to see whether this price/quality difference between US and the rest of the world is influences by voter composition. I know that it is not possible to study because you can't know where the reviewers live. For example, I live in the Netherlands and there are only few US wines for sale in mainstream shops. And I strongly suspect this is the same for many other European countries, where more local wines are much cheaper. So my concerns with this analysis is whether Vivino is more used by US based individuals. For whom local US wines are relatively cheap compared to European wines. Another thing I am thinking of, how high are the duties on wine in the US? I found that the tax on wine ranges between 0.20 to 3.26 dollars per gallon. Whereas we pay in the Netherlands about 3.62 dollar per gallon wine. Which would indicate that wines in the US could be much cheaper, and due to transport costs local wines even more. Anyway, I really like your extented analysis and I just wanted to add some food for thought!
Luiz Santana November 20, 2019
Hi Keneth, thanks for this lovely article. Would you be able to share the CSV with the extracted data? I'm doing an exercise with python, data science and I'd like to use vivino dataset. Best regards, Luiz
Web Scraping and Analysis of Wines on Vivino.com via /r/wine | The Traveling Vineyard November 29, 2018
[…] https://nycdatascience.edu/blog/student-works/web-scraping-analysis-wines-vivino-com/ […]
Colton February 21, 2018
Any luck getting the code? Would really love to be able to look at the data
Renee February 2, 2018
I am also trying to do an analytics project on data from vivino. Is the code for your crawler available anywhere like GitHub, so I can fork it?
Colton Larson January 30, 2018
Hi Kenneth, I was wondering if you could share your dataset. Im currently working on a project and hoping to involve Vivino data as well. Glad to see there is another wine enthusiast diving into the data out their! Thanks

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI