BW #41: Wine production

Climate change is causing all sorts of problems in the world — including, according to a recent report, the number of grapes grown for wine production. Let's look at the numbers on wine production.

BW #41: Wine production

Black Friday

First, a quick announcement: This year, as in most years, I'm offering 40% off of my many Python and Pandas courses. But I'm also excited to be launching two new membership programs, one for Python and the second for Python + data analytics. They give you access not only to my paid courses, but to exercises, office hours, a private forum, and special lectures/events that I'll be holding on a regular basis.

The Python + Data membership offer includes everything in the Python tier, plus special data-related office hours, events, and forum topics. It also includes a one-year paid subscription to Bamboo Weekly. (If you're already a paid subscriber, then I'll extend your subscription.)

I'm very excited about these membership programs, which are aimed at helping you to improve your Python and Pandas skills in every way I know.

You can learn more about these deals at https://lernerpython.com/bfcm-2023/ . Any questions? Just e-mail me (reuven@lerner.co.il), and I'll gladly answer.

And now, onto this week's topic, wine.

A short article in the Economist last week mentioned that world wine production had declined over the last few years, particularly in southern-hemisphere countries. They quoted the International Organization of Vine and Wine (the OIV, https://www.oiv.int), an industry organization that tracks such information. The article piqued my curiosity, in no small part because I have learned (thanks to my wife) to enjoy drinking wine, and I was surprised to hear that harvests had gone down. We also just finished watching "Drops of God" on Apple TV+, and I can't tell whether we're all sniffing our wine and stirring our glasses because we're really more attuned to the subtle smells and tastes, or because we're just trying to seem pompous.

Regardless, I looked up the OIV, and found that they make their data publicly available. And thus, especially given all of the problems we're seeing around the world, I thought that this week might be a time to look at wine production, identifying which countries and regions of the world are producing more, how wine production is even measured, and what countries tend to import vs. export wine.

Data and seven questions

As I mentioned, this week's questions comes from OIV. Specifically, the data comes from the online browser that they've provided to look through their data:

https://www.oiv.int/what-we-do/data-discovery-report?oiv

You can export the data to Excel, and download that file, by following the short directions just above the column names. Once you have downloaded that file (creatively named "data.xlsx"), you can start to analyze it.

I've prepared seven questions and tasks for this week. As usual, I'll return tomorrow with my solutions, including the Jupyter notebook I used to answer the questions. The learning goals for this week are: Cleaning data from an Excel file, plotting, pivot tables, aggregation methods, and joining.

My questions for this week are:

  • Download the English-language version of the report as an Excel file. Turn it into a data frame, keeping only the named columns and rows with actual data.
  • In how many ways is grape production measured? Which unit is used for wine?