Know what floats my boat? Charts and graphs. Give me a cool chart to dig into and I am unreasonably pleased. Is that bizarre? I do not suppose so.
Because it seems, ChatGPT does a terrific job making charts and tables. And on condition that this ubiquitous generative AI chatbot can synthesize a ton of knowledge into one thing chart-worthy, what ChatGPT offers up in fairly presentation it greater than makes up for in informational worth.
The right way to use ChatGPT to make charts and tables
Earlier, we talked about which charting instruments can be found wherein variations of ChatGPT. However there’s extra to it than merely charting instruments. If you wish to use ChatGPT productively, it’s good to perceive what the assorted editions can do.
It ought to come as no shock to anyone that AI chatbots’ function units are altering continually. As of the time of this replace (November 2024), OpenAI has simply launched an early model of its Home windows utility (for paying prospects solely) and has launched its o1-preview and o1-mini LLM fashions — additionally only for paying prospects. The GPT-4o model is now obtainable to free customers. The Superior Information Evaluation function we’ll be speaking about right here is out there to each free and paying prospects.
Traditionally, OpenAI has launched main new options into its Plus model ($20/month) after which, after a time, rolled them out to free customers. As such, it is usually difficult — week by week — to inform you which options exist within the free model vs. the Plus model.
This is a normal guideline, particularly because it pertains to the remainder of this text. The free model is mostly extra restricted than the Plus model. Meaning fewer queries per session, much less information to investigate, presumably a barely older LLM model obtainable, longer wait instances for responses, and so forth. Mainly, you are within the low-cost seats for those who use the free model and also you get a extra premium expertise for those who pay for the Plus model.
I now pay for the Plus model as a result of I discovered I usually bought reduce off from asking questions earlier than I used to be finished with no matter I used to be engaged on. That (principally) does not occur anymore now that I pay for the Plus model.
For a lot of this text, we’ll be utilizing the Superior Information Evaluation that is now embedded within the free and Plus variations. This instrument will import information tables in a variety of file codecs. Whereas it does not specify a measurement restrict for imported information, it will possibly deal with pretty massive information, however will break if the information exceed some undefined stage of complexity.
For now, my recommendation is to attempt this stuff on the free model, and for those who want a extra responsive expertise, improve to the Plus model.
Let’s begin with an instance. For the next demonstration, we’ll be working with the highest 5 cities by way of inhabitants.
Record the highest 5 cities on the planet by inhabitants. Embrace nation.
I requested this query to ChatGPT and here is what I bought again:
Turning that information right into a desk is easy. Simply inform ChatGPT you need a desk:
Make a desk of the highest 5 cities on the planet by inhabitants. Embrace nation.
Discover that it additionally gave me inhabitants information, regardless that I did not explicitly ask for a inhabitants column.
You may manipulate and customise a desk by giving ChatGPT extra detailed directions. Once more, utilizing the free model, we’ll add a inhabitants depend area. After all, that information is old-fashioned, but it surely’s offered anyway:
You may specify sure particulars for the desk, like area order and models. Right here, I am transferring the nation first and compressing the inhabitants numbers.
Make a desk of the highest 5 cities on the planet by inhabitants. Embrace nation and a inhabitants area. Show the fields within the order of rank, nation, metropolis, inhabitants. Show inhabitants in hundreds of thousands (with one decimal level), so 37,833,000 would show as 37.8M.
Observe that I gave the AI an instance of how I needed the numbers to show.
ChatGPT could make line charts, bar charts, histograms, pie charts, scatter plots, heatmaps, field plots, space charts, bubble charts, Gantt charts, Pareto charts, community diagrams, Sankey diagrams, choropleth maps, radar charts, phrase clouds, treemaps, and 3D charts.
On this instance, we’ll make a easy bar chart.
Make a bar chart of the highest 5 cities on the planet by inhabitants
One in every of Superior Information Analytics’ superpowers is the power to add a dataset. For our instance, I downloaded the Well-liked Child Names dataset from Information.gov. This can be a comma-separated file of New York Metropolis child names from 2011-2014. Although it is a decade old-fashioned, it is enjoyable to play with.
The dataset I selected for this text is available from a authorities website, so you possibly can replicate this experiment by yourself. There are a ton of nice datasets obtainable on Information.gov, however I discovered that many are far too massive for ChatGPT to make use of.
As soon as I downloaded this one, I spotted it additionally included info on ethnicity, so we may run a number of completely different charts from the identical dataset.
Click on the little add button after which inform it the info file you wish to import.
I requested it to indicate me the primary 5 strains of the file so I would know extra in regards to the file’s format.
I used to be inquisitive about how the dataset distributed gender names. This is my first immediate:
Create a pie chart exhibiting gender as a share of the general dataset
And here is the end result. Observe the colour selections for every pie wedge. That was ChatGPT’s alternative.
You may instruct Superior Information Analytics to make use of completely different colours. I used to be cautious to decide on colours that didn’t reinforce gender stereotypes or redefine frequent gender-related colours.
Create a pie chart exhibiting gender as a share of the general dataset. Use gentle inexperienced for male and medium yellow for feminine.
Have a look at ChatGPT’s response fastidiously. This is the place we see inaccuracies in its response. I requested for the male wedge to be inexperienced and the feminine wedge to be yellow. Within the chart, the AI reversed that, however within the descriptive textual content, it bought it proper. Do not be afraid to right the AI.
The colours of the chart do not match the textual content. Please do it once more.
As we noticed earlier, the info collected contains ethnicity. This is find out how to see the distribution of the assorted ethnicities New York recorded within the early 2010s:
Present the distribution of ethnicity within the dataset utilizing a pie chart. Use solely gentle colours.
And here is the end result. Discover something?
Apparently, New York did not correctly normalize its information. It used “WHITE NON HISPANIC” and “WHITE NON HISP” collectively, “BLACK NON HISPANIC” and “BLACK NON HISP” collectively, and “ASIAN AND PACIFIC ISLANDER” and “ASIAN AND PACI” collectively. This resulted in inaccurate representations of the info.
One good thing about ChatGPT is it remembers directions all through a session. So I used to be in a position to give it this instruction:
For all the next requests, group “WHITE NON HISPANIC” and “WHITE NON HISP” collectively. Group “BLACK NON HISPANIC” and “BLACK NON HISP” collectively. Group “ASIAN AND PACIFIC ISLANDER” and “ASIAN AND PACI”. Use the longer of the 2 ethnicity names when displaying ethnicity.
And it replied:
Let’s attempt the chart once more, utilizing the identical immediate.
Present the distribution of ethnicity within the dataset utilizing a pie chart. Use solely gentle colours.
That is higher:
You’ll want to be diligent when taking a look at outcomes. For instance, in a request for high child names, the AI separated out “Madison” and “MADISON” as two completely different names:
For all the next requests, child names needs to be case insensitive.
Let’s wrap up with a fancy chart from one immediate. This is our immediate:
For every ethnicity, current two pie charts side-by-side, one for every gender. Every pie chart ought to listing the highest 5 child names for that gender and that ethnicity. Use solely gentle colours. Don’t title every chart. Take away the phrase “Matplotlib Chart” from every chart.
The AI gave me 4 charts like the next, one for every ethnicity it was monitoring. Observe the phrase “Matplotlib Chart” on the high of the chart. As you possibly can see, I attempted very onerous to get ChatGPT to take away it and different wacky titles it selected to make use of from the charts — with no success. Typically, it’s good to quit and simply use one thing like Photoshop to edit out the silly from an AI response.
Additionally discover that Sofia and Sophia are extremely popular, however are proven as two completely different names. However that is what makes charts so fascinating.
FAQ
Is the info uploaded to ChatGPT for charting stored non-public or is there a danger of knowledge publicity?
Assume that there is all the time a privateness danger.
I requested this query to ChatGPT and that is what it advised me:
Information privateness is a precedence for ChatGPT. Uploaded information is used solely for the aim of the consumer’s present session and isn’t saved long-term or used for another functions. Nevertheless, for extremely delicate information, customers ought to all the time train warning and think about using the Enterprise model of ChatGPT, which provides enhanced information confidentiality.
My advice: Do not belief ChatGPT or any generative AI instrument. The Enterprise model is meant to have extra privateness controls, however I might advocate you solely add information that you simply will not thoughts discovering its solution to public visibility.
Can ChatGPT’s Superior Information Evaluation deal with real-time information or is it extra fitted to static datasets?
It is attainable, however there are some sensible limitations. First, the Plus account will throttle the variety of requests you may make in a given time period. Second, you need to add every file individually. There may be the likelihood you may use a licensed ChatGPT API to do real-time analytics. However for the chatbot itself, you are taking a look at parsing information at relaxation.
You may comply with my day-to-day venture updates on social media. Be sure you subscribe to my weekly replace e-newsletter on Substack, and comply with me on Twitter at @DavidGewirtz, on Fb at Fb.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.