Three Useful Code Interpreter Functions For Faculty, Staff & Students

Code Interpreter, a new function of ChatGPT, can be useful for a number of things, in this case we look at clean data, perform data analysis and generating visualisations.

1. Uploading a scanned image of a document and receiving a text file

You can upload a scanned image and have Code Interpreter scan it, it can then provide you with a downloadable text file, very useful for converting paper to digital!

This is my initial prompt after uploading a file

This is the text it generated (it was correct)

I could then download

2. Data analysis and visualisation

Watch the video below to see how it can read data and generate images.

It is also possible to input your own data, as messy as you can imagine, and have Code Interpreter not only read it, but undersand it and then generate something like the graph below.

Then I told it to "generate a graph using this data. Use code interpreter." This is the process it went through:

"To start with, I'll convert the data you provided into a pandas DataFrame, which is a data structure that's very useful for data analysis in Python. Then, I'll create a bar chart showing the Sales by Product."

3. Generating images

You can generate images in various formats, such as HTML, by using data to feed their creation.

For example, feed fed it an unpolished dataset of UFO sightings and it generated a fully-functioning HTML heat map. You can refine it to be specific to the US (like in the image), and you can then download the image directly from ChatGPT. Here's a static version (it easily lets you create as many versions as you want)