ChatGPT’s Code Interpreter – Top 6 uses

Author:

Published:

Updated:

desk with ai tech

Imagine if someone gave ChatGPT an AI tool like ChatGPT to use?

Well, OpenAI has tried that with Code Interpreter.

Note: The Code Interpreter is now called Advanced Data Analytics as of August 2023.

It can analyze data, read mega PDFs, create visualizations, edit images, convert files, and whip up some reusable code (and debug).

In our blog post, we’ve tested 6 pretty cool ways to use the Code Interpreter (Advanced Data Analytics). We know there are more ways, however, we looked at it from a lens of an everyday person who would use the tool.

P.S. Code Interpreter (Advanced Data Analytics) is available to all Pro subscribers. You need to activate it from your settings.

1. Image Editing

We asked Code Interpreter to resize an image, rotate and flip an image and add text to an image (note the white text on the right upper and lower corners were added by the AI). It handled all these requests with ease.

And, it can handle multiple images too – one at a time. (It does seem to use up your 25 chats limit with each upload and acknowledgment though).

But, when we requested it to select the “supergirl” and remove the background, we ran into this issue:

Code Interpreter claims it can’t use the OpenCV library (needed for this task) within its environment, and refused to budge despite our prompting in different ways. It provided the Python code to complete the job within our own IDE though.

We also successfully asked ChatGPT to

  • blur,
  • sharpen, and
  • change images to black and white.

2. Create a gif or a video

The Code Interpreter can transform images into video or gifs (or gifs into videos).

To test this feature, we uploaded a (slightly distorted AI-generated) superhero image and asked ChatGPT’s Code Interpreter (Advanced Data Analytics) to create GIF by panning across it.

The Gif file size we got back was a massive 65 MB! It worked, but unusable for blog posts.

We were able to output data visualizations to GIFs without hitches at normal file sizes (refer to the data visualization section below).

So, instead of going with a super heavy GIF, we re-uploaded the image and asked the Code Interpreter (Advanced Data Analytics) to create a video by panning across it. This worked.

While the pan was not as smooth as we liked (or smooth as the GIF), the option is there to ask ChatGPT to redo it slower, smoother, with fewer frames or more frames etc.

ChatGPT had no problem with accessing libraries for panning and zooming for the video, but no matter how many times it tried (and with repeated prompts), it couldn’t access the python library to add a text overlay or subtitles to the video.

It converts files: e.g. gifs to videos quite easily.

Become a Superhuman at Work with ChatGPT

Achieve more with less effort

Transform your workday by achieving more with less effort. 60 use case walkthroughs designed to help you finish work fast and get you to the people you love faster

3. Data Visualization

This feature is legendary if you are a casual data analyst. You can interact with data sets using natural language, and then get the Code Interpreter (Advanced Data Analytics) to visualize it.

We fed ChatGPT Code Interpreter Football (soccer) Player stats for the 2022-2023 season from the Premier League, Ligue 1, Bundesliga, Serie A, and La Liga. The stats are taken roughly three months before the seasons ended.

The data contained 2,500 rows and 120+ columns (so not the biggest dataset by any means, but a fairly healthy starter challenge):

Creating data Visualizations

We asked Code Interpreter (Advanced Data Analytics) to analyze the data and create some visualizations.

For simple data visualizations, there were no issues:

Still, no issues when we asked Code Interpreter to compare the Goals-per-shot ratio for Erling Haaland, Harry Kane, and Kylian Mbappé who in the provided data set, were on 25, 17, and 13 goals respectively.

Some oddities appear: The distribution of player ages

When we asked Code Interpreter to compare the distribution of player ages across the provided leagues, it skipped certain age groups (see below). We had to use extra prompts to correct that.

Trial and error: more customized comparison visualizations

Finally, we asked Code Interpreter (Advanced Data Analytics) for a slightly challenging visualization: to compare the Average distance, in yards, from goal of all shots taken for Haaland, Kane, and Mbappé.

For this request, we were required to do about 7 prompts and feedback comments to get something “in the direction” of what we wanted.

It’s not exactly what we had in mind but with the current 25 message limit per 3 hours, we needed to work conservatively to run all tests – so we settled for this.

And, to be fair, ChatGPT did tell us what extra data was required to reach the result we actually wanted. Lesson learned is that talking to ChatGPT in the Code Interpreter is slightly different than prompting. But, when you get used to it, we could see the potential it has to be really useful.

Creating visualizations with something more AI-related

We fed in a data set with various AI tools across different categories. The tools serve a range of purposes, from helping with general writing tasks to summarizing content and assisting with social media.

We asked Code Interpreter (Advanced Data Analytics) to visualize the number of tools per category for us. Here’s what it came up with:

number of ai tools per category

Dynamic Visualizations

We wanted to test the dynamic data visualization capabilities of Code Interpreter (Advanced Data Analytics) for a specific use case, so we randomly generated fake information for this test.

We asked ChatGPT to create a time series data set that simulates the growth of AI and tech-related metrics over the past decade. We included AI research papers published, the number of AI startups, the amount of funding in AI, and the increase in AI jobs. AGAIN – all of it was randomly generated for testing purposes.

We then managed to get Code Interpreter to create an interactive visualization of blog posts and their engagement rates. Hovering over a particular dot gave us a pop of the data like below.

Become a Superhuman at Work with ChatGPT

Achieve more with less effort

This ebook will teach you:

  • 60 office use case walkthroughs
  • More time for creative thinking
  • Always finish work on time

4. Create a QR code

We asked Code Interpreter (Advanced Data Analytics) to generate a QR code linking to our website’s Shop page (https://www.chatgptguide.ai/shop) which it did (and it works).

We then asked it to add to embed the image of our best-selling ebook “Become a Superhuman at work with ChatGPT” into the QR code. And, although ChatGPT claimed it had placed it in the center of the image (it’s not visible to us). We will go back and test this with extra prompts and update at a later stage (the 25-chat restriction is a challenge).

Qr code chatptguide.ai

5. Reading and analyzing mega-large PDFs

quran references

We wanted to truly test out Code Intepreter’s ingestion skills so we uploaded two text-heavy PDFs – the Holy Bible and the Holy Quran – simultaneously.

We asked ChatGPT (Advanced Data Analytics) a variety of questions on the text, which the AI handled with incredible ease. These questions included basic information like word counts, “Jesus”-mentions, and language style.

We also threw in some complex analysis questions, which required ChatGPT to cite supporting verses (which it did – and the verses were from the actual PDFs).

The claim on the box is that it can handle a 100 MB size PDF. The largest we tested was around 47 MB.

Wait, are you looking for ways to make money with the Code Interpreter?

6. Programming a simple game

So, we decided to put Code Interpreter (Advanced Data Analytics) to the test and see if it could whip up a game for someone with just basic Python coding skills. Our use case person knew their way around opening an Integrated Development Environment (IDE), installing libraries, and running code, but that was about it.

We asked Code Interpreter to create a simple snake game, which it did without any issues.

We’ve seen examples on social media where users have created really cool graphic games. However, this requires creating your own game assets and texture files. So, yes, it is definitely possible to create your own games with stunning visuals if you’re up for the challenge.

For those more advanced in coding, here’s where it really gets magical. So, you know how sometimes coding can be a bit of a drag? All that time spent searching for the right libraries, reading the documentation, and debugging.

Code Interpreter (Advanced Data Analytics) knows exactly which libraries to use for any given task. That means no more endless scrolling through documentation (or forums) – it’s a real time-saver!

Things we’ve learned…

  • Using Code Interpreter is a step-by-step process to get your result, so patience is key (read the next point).
  • Each time you prompt it, expect a 2-3 minute wait.
  • It’s like watching it learn on-the-go. It talks you through its processes and mistakes, kind of like how we humans debug and iterate when coding.
  • It’s a super productive tool as a coding sidekick and for creating data visuals and analysis. It can literally shave hours of a work week.
  • For the everyday person, it can also be pretty helpful for productivity. Need to edit an image? Just ask in plain English, and it gets the job done quickly. Perfect for anyone who doesn’t have the time to dig into editing software.
  • But, I’ll be real, if you’re familiar with Photoshop or Premiere Pro, these features might feel a bit underpowered.
  • In summary: like ChatGPT, Code Interpreter is there to make you more productive by taking care of repetitive tasks quickly.
  • Final note: Code Interpreter is amazing at math.

FAQs on ChatGPT’s Code Interpreter (Advanced Data Analytics)

Just type your code into the chat and see it run in seconds! No more jumping between chat and code editors. Plus, you can share code snippets with friends.

Loads! From data analysis and cleaning to visualizations, file conversions, and tackling math problems—both big and small.

Become a ChatGPT Plus subscriber, hit the Code Interpreter toggle, and you’re set to code away in your chats.

Imagine running code without leaving your chat. No app-switching means smoother workflows and easier collaborations.

Share this content

Latest posts