Imagine if someone gave ChatGPT an AI tool like ChatGPT to use?
Well, OpenAI has tried that with Code Interpreter.
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.
But, when we requested it to select the “supergirl” and remove the background, we ran into this issue:
We also successfully asked ChatGPT to
- 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.
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.
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.
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
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é.
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.
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:
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.
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).
5. Reading and analyzing mega-large PDFs
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).
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!
FAQs on ChatGPT’s Code Interpreter (Advanced Data Analytics)
Essentially it is a ChatGPT plugin letting you run code right in your chat. It understands multiple programming languages and even handles file uploads.
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.