Wine + GPT4 + Code Interpreter: WOW!!

by | Tuesday, July 11, 2023

OpenAI just released Code Interpreter. It allows you to execute Python code within a live working environment. One of the things that it allows us to do is take data files and conduct data analysis and create graphs and charts.

Not knowing what that meant I decided to play with it. So I found a publicly available database on wine quality (and why not? Don’t give me that look) and imported it into Code Interpreter. I am not including the entire conversation I had with GPT but provide some key excerpts below. You can read the entire interaction in this linked pdf document.

So I started with a complete blank slate. I had no idea what I was doing. So I started the conversation with:

Can you create some interesting data visualizations based on this dataset?

After looking over the data, it suggested the following:

For instance, we can examine the distribution of quality ratings for both types of wine, the correlation between different properties and the quality of the wine, and some other interesting relationships. Does that sound good to you?

And once I said yes, within seconds I had the following diagram, with the explanation below.

In the first plot, “Distribution of Quality Ratings for Each Wine Type,” we can see that the majority of wines, both red and white, have a quality rating of 5, 6, or 7. White wine tends to have slightly higher quality ratings overall compared to red wine. In the second plot, “Distribution of Alcohol Content for Each Quality Rating,” we see that higher-quality wines generally contain more alcohol. This is true for both red and white wines. The trend suggests that wines with higher alcohol content tend to be rated better in quality.

Hmmm… wines with higher alcohol content tend to be rated higher! Why am I not suprised 🙂

Not sure of what to do next, I wrote:

I am interested in some cool visualizations that can emerge from this analysis. What would you suggest?

After a bit of back and forth, where it provided me with a variety of options, I asked it to create a correlational heatmap. Within seconds I had the following.

Here’s the correlation heatmap of the wine properties. From the heatmap, we can observe that:

  1. The alcohol content has a relatively strong positive correlation with the quality of the wine. This observation aligns with our earlier analysis where we noticed that higher-quality wines generally contain more alcohol.
  2. The density of the wine has a somewhat strong negative correlation with the quality of the wine. This suggests that higher-quality wines tend to have a lower density.
  3. The volatile acidity also has a negative correlation with the quality of the wine, implying that better-quality wines tend to have lower volatile acidity.
  4. There are also some strong correlations between different properties of the wine, which are not directly related to the quality. For example, density has a strong positive correlation with residual sugar.

This is when I had to jump onto a meeting in zoom, so I hit pause.

Let me just add that all this took just 20 minutes, maybe less.

I am still trying to wrap my head around this. But the possibilities appear endless and I am constrained by nothing but my imagination.

A few randomly selected blog posts…

Stuck with Google (recursively)

The other day, for one reason or another, I did a Google search for the word "recursion." According to Wikipedia, recursion ... in mathematics and computer science, is a method of defining functions in which the function being defined is applied within its own...

Banning Facebook in school: Interview on the Craig Fahle Show, WDET

I was a guest on WDET’s Craig Fahle Show yesterday. The topic was the the recently passed Missouri law that bans teachers from interacting with students on Facebook in order to protect students from sexual assault. I find this a singularly silly waste of time by the...

The first 100 days, on Facebook

This is just absolutely brilliant!! In particular check out the URL that Dick Cheney sends to Obama, approximately half-way down the page. (You will have to copy and past the url).

Call: Failure and Creative Risk in Technology-Enhanced Learning

Call: Failure and Creative Risk in Technology-Enhanced Learning

I am excited to announce a call for articles on Failure and Creative Risk in Technology-Enhanced Learning for a special section in the journal Tech Trends, edited by Danah Henriksen, Punya Mishra, Edwin Creely, and Michael Henderson. You can download the the...

Jabberwocky goes to graduate school

The 5th floor of Erickson Hall is a fun place to be. Typically a bunch of graduate students hang out there, working on their readings, talking shop and in general having a good time. For some reason, last week, I promised Josh Rosenberg that I would write a poem for...

Fortunate

I had discovered the amazing poet Szymborska (on this very blog a while ago). And then today in my mailbox was another poem by her, sent in by a friend. We're extremely fortunate A poem by Wislawa Szymborska We're extremely fortunate not to know percisely the kind of...

Coding + Aesthetics: New Journal Article

Coding + Aesthetics: New Journal Article

Does beauty have a role to play in learning to code? Can code aspire to beauty and elegance? In this article, we argue that it does and it should. Read on... Good, J., Keenan, S. & Mishra, P. (2016). Education:=Coding+Aesthetics; Aesthetic Understanding,...

Learning futures: Designing the horizon

Learning futures: Designing the horizon

I was recently invited (along with Sean Leahy and Jodie Donner) to present at the Winter Games, Digital Immersive Experience organized by ShapingEDU at Arizona State University. Our talk was titled Learning Futures: Designing the Horizon. We described our session as...

Design book-review podcasts

Design book-review podcasts

I am teaching a new masters/doctoral seminar titled Design in the real world. This is the first class I am teaching here after coming to ASU and it is exciting to back in with students engaged in discussions about design, technology, and its role in our...

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *