How to use ChatGPT to make charts and tables with Advanced Data Analysis

Published on:

Know what floats my boat? Charts and graphs.

Give me a cool chart to dig into and I am unreasonably joyful. I like watching the information on election nights, not for the vote rely, however for all the nice charts. I change between channels all night to see each potential manner that every community finds to current numerical knowledge. 

Is that bizarre? I do not suppose so.

- Advertisement -

Because it seems, ChatGPT does an ideal job making charts and tables. And on condition that this ubiquitous generative AI chatbot can synthesize a ton of data into one thing chart-worthy, what ChatGPT offers up in fairly presentation it greater than makes up for in informational worth.

It ought to come as no shock to anyone that AI chatbots’ characteristic units are altering continually. As of the time of this replace (finish of Could, 2024), OpenAI has simply come out with a Mac software and has launch its GPT-4o LLM, which is offered for each free and paying clients. The GPT-4o model that comes for the added-price Plus model is meant to have interactive chart options and the flexibility to work together with the engine longer per session.

However, not a lot. My free account does not supply GPT-4o in any respect but. It hasn’t rolled out to all free accounts but. And whereas paid ChatGPT Plus plan does present the interactive charts characteristic in Chrome and Safari, it does not within the Mac app.

This text was final up to date when the Superior Knowledge Evaluation options (which included charts) had been solely accessible to Plus clients. Regardless that a few of these options are speculated to be accessible to free clients, since my free account does not have them but, I will current the remainder of this text as if the charting options are solely accessible to Plus clients. Should you’re a free buyer and you’ve got GPT-4o, be at liberty to attempt a few of the prompts. These options might be just right for you, and undoubtely will as we transfer ahead in time.

- Advertisement -

Superior Knowledge Evaluation produces comparatively ugly charts. However it rocks. First, let’s focus on the place ChatGPT will get its knowledge, then we’ll make some tables.

Tips on how to use ChatGPT to make charts and tables

Earlier, we talked about which charting instruments can be found during which variations of ChatGPT. However there’s extra to it than merely charting instruments. If you wish to use ChatGPT productively, that you must perceive what the varied editions can do.

ChatGPT free model: This model has traditionally used the GPT-3.5 massive language mannequin (LLM), which is not fairly as succesful because the GPT-4 model. As of Could 2024, the GPT-4o LLM can also be accessible to some free customers and rolling out over time.

ChatGPT Plus: ChatGPT Plus is OpenAI’s industrial, absolutely powered model of ChatGPT. Proper now, ChatGPT Plus offers three main choice choices per session: GPT-3.5, GPT-4, and GPT-4o. It used to supply plugins, however they have been changed by customized GPTs.

The GPT-4 and GPT-4o variations now embody DALL-E 3, Bing Internet entry, and Superior Knowledge Evaluation. Some customers have reported some issue with utilizing Bing for internet entry. Most of what we will likely be doing is utilizing the Superior Knowledge Evaluation part. Even with out Bing internet entry, GPT-4 and 4o report that coaching knowledge now consists of data as much as December 2023. 

See also  EvolutionaryScale’s ESM3: a generative model for biology

For a lot of this text, we will likely be utilizing the Superior Knowledge Evaluation part of the GPT-4 possibility. This device will import knowledge tables in a variety of file codecs. Whereas it does not specify a dimension restrict for imported knowledge, it might deal with pretty massive information, however will break if the information exceed some undefined degree of complexity.

- Advertisement -

As ChatGPT Plus modifications, and it’ll, we are going to replace you with extra data. For now, let’s simply have a look at making some cool charts.

ChatGPT Enterprise: Superior Knowledge Analytics and plugins are additionally accessible within the enterprise model. You may add information to Enterprise, and they’ll stay confidential. Enterprise can also be supposed to permit for larger information and greater responses. Pricing has not been specified.

Let’s begin with an instance. For the next demonstration, we’ll be working with the highest 5 cities when it comes to inhabitants.

Record the highest 5 cities on the earth by inhabitants. Embody nation.

I requested this query to ChatGPT’s free model and this is what I bought again:

Turning that knowledge right into a desk is easy. Simply inform ChatGPT you need a desk:

Make a desk of the highest 5 cities on the earth by inhabitants. Embody nation.

You may manipulate and customise a desk by giving ChatGPT extra detailed directions. Once more, utilizing the free model, we’ll add a inhabitants rely subject. After all, that knowledge is outdated, however it’s offered anyway:

Make a desk of the highest 5 cities on the earth by inhabitants. Embody nation and a inhabitants subject

You may also specify sure particulars for the desk, like subject order and items. Right here, I am transferring the nation first and compressing the inhabitants numbers.

Make a desk of the highest 5 cities on the earth by inhabitants. Embody nation and a inhabitants subject. 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.

Notice that I gave the AI an instance of how I wished the numbers to show.

That is about so far as the free model will take us. Any longer, we’re switching to the $20/month ChatGPT Plus model.

ChatGPT Plus with Superior Knowledge Analytics enabled 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’re simply going to make a easy bar chart.

Make a bar chart of the highest 5 cities on the earth by inhabitants

Chatty little device, is not it?

The eagle-eyed amongst you will have observed the discrepancy in populations between the earlier desk proven and the outcomes right here. Discover that the desk has a inexperienced icon and this graph has a purple icon. We have jumped from GPT-3.5 (the free model of ChatGPT) to GPT-4 (in ChatGPT Plus). It is fascinating that the differing LLMs have barely totally different knowledge. This distinction is all a part of why it pays to watch out when utilizing AIs, so double-check your work. In our case, we’re simply demonstrating charts, however it is a tangible instance of the place confidently offered knowledge might be incorrect or inconsistent.  

The dataset I selected for this text is available from a authorities website, so you may replicate this experiment by yourself. There are a ton of nice datasets accessible on Knowledge.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 data on ethnicity, so we will run a variety of totally different charts from the identical dataset.

Click on the little add button after which inform it the information file you need to import.

I requested it to point out me the primary 5 strains of the file so I might know extra in regards to the file’s format.

I used to be inquisitive about how the dataset distributed gender names. Here is my first immediate:

Create a pie chart exhibiting gender as a proportion of the general dataset

And this is the outcome:

Sadly, the darkish shade of inexperienced makes the numbers troublesome to learn. Luckily, you may instruct Superior Knowledge Analytics to make use of totally different colours. I used to be cautious to decide on colours that didn’t reinforce gender stereotypes.

Create a pie chart exhibiting gender as a proportion of the general dataset. Use mild inexperienced for male and medium yellow for feminine.

As we noticed earlier, the information collected consists of ethnicity. Here is the best way to see the distribution of the varied ethnicities New York recorded within the early 2010s:

Present the distribution of ethnicity within the dataset utilizing a pie chart. Use solely mild colours.

And this is the outcome. Discover something?

Apparently, New York did not correctly normalize its knowledge. 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 information.

One advantage of 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:

See also  SUSE upgrades its distros with 19 years of support - no other Linux comes close

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 mild colours.

That is higher:

It’s essential to be diligent when taking a look at outcomes. For instance, in a request for prime child names, the AI separated out “Madison” and “MADISON” as two totally different names:

For all the next requests, child names ought to be case insensitive.

Let’s wrap up with a posh chart from one immediate. Here is our immediate:

For every ethnicity, current two pie charts, one for every gender. Every pie chart ought to checklist the highest 5 child names for that gender and that ethnicity. Use solely mild colours.

Because it seems, the chart generated textual content that was too small to learn. So, to get a extra helpful chart, we will export it again out. I will specify each file format and file width:

Export this chart as a 3000 pixel broad JPG file.

And this is the outcome:

Discover that Sofia and Sophia are highly regarded, however are proven as two totally different names. However that is what makes charts so fascinating.

FAQ

How a lot does it value to make use of Superior Knowledge Analytics?

Superior Knowledge Analytics comes with ChatGPT Plus. A few of its options can be found in GPT-4o for the free model of ChatGPT. ChatGPT Plus is $20/month. Superior Knowledge Analytics is also included with the Enterprise version, however pricing for that hasn’t been launched but.

Is the information 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: 

Knowledge privateness is a precedence for ChatGPT. Uploaded knowledge is used solely for the aim of the person’s present session and isn’t saved long-term or used for another functions. Nonetheless, for extremely delicate knowledge, customers ought to all the time train warning and think about using the Enterprise model of ChatGPT, which gives enhanced knowledge confidentiality.

My suggestion: Do not belief ChatGPT or any generative AI device. The Enterprise model is meant to have extra privateness controls, however I’d suggest you solely add knowledge that you simply will not thoughts discovering its option to public visibility.

Can ChatGPT’s Superior Knowledge Evaluation deal with real-time knowledge or is it extra suited to static datasets?

It is potential, however there are some sensible limitations. First, the Plus account will throttle the variety of requests you can also make in a given time period. Second, you need to add every file individually. There may be the likelihood you could possibly use a licensed ChatGPT API to do real-time analytics. However for the chatbot itself, you are taking a look at parsing knowledge at relaxation.


You may comply with my day-to-day challenge updates on social media. Make sure to 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.

- Advertisment -

Related

- Advertisment -

Leave a Reply

Please enter your comment!
Please enter your name here