
Picture by Writer
Information visualization is an important ability for anybody working with information. However creating stunning, informative information viz may be time-consuming and require specialised instruments. That is the place ChatGPT is available in. With its newest updates, ChatGPT makes information visualization quicker and simpler than ever earlier than.
The newest replace has improved the ChatGPT expertise considerably. Now, as a substitute of getting to modify between completely different choices like the unique GPT-4, GPT4 with superior evaluation, or DALLE-3, you merely must sort in a immediate, and ChatGPT will mechanically interpret your request and generate the specified outcomes.
Picture from ChatGPT
On this weblog put up, we’ll discover the right way to immediately generate numerous information visualizations utilizing plain English prompts. Because of ChatGPT’s superior information evaluation, you need not course of the information or run the Python code. We’ll stroll via easy pie and bar charts, then sort out extra complicated visualizations utilizing real-world datasets.
On this half, we’ll write a easy immediate to generate plots. The immediate consists of information within the type of a Python dictionary.
Pie Chart
Earlier than we create a immediate, please guarantee that you’re utilizing the GPT-4 mannequin, as it’s the just one that helps producing visualizations.
We are going to write a immediate to generate a pie chart visualization based mostly on numerous nutrient information. Moreover, we’ve requested that ChatGPT use a lighter coloration mixture, because the default colours are fairly vibrant.
Immediate: Generate a pie chart of values {"Vitamin A":5, "Vitamin B": 1, "Vitamin C": 4, "Water": 90} to maintain the colour mixture mild.
As you’ll be able to see, we acquired nice outcomes.
If you wish to see the Python code behind the visualization, you need to click on on the terminal brand on the finish of the end result.
After that, a window will seem containing the supply code that you would be able to modify and execute by yourself. Nonetheless, this step will not be obligatory, as ChatGPT will merely run the code and show the visualizations as photos. It can save you these photos to your presentation or report.

Bar Chat
Within the subsequent half, we offer CO2 emission information for the automotive and let ChatGPT do the magic.
Immediate: Generate a bar plot co2 emissions of values {"Automotive A":30, "Automotive B": 25, "Automotive C": 20}.
It has added the title, x and y labels, and ensured descending order. Excellent!!!
As a substitute of excessively controlling ChatGPT’s output, you’ll be able to ask it to create outcomes independently, just like numerous Python AutoViz libraries. By merely offering the dataset and requesting a whole exploratory information evaluation to generate the mandatory plots so that you can evaluation.
In our case, we’re offering it with a Buyer Purchasing Traits dataset that gives useful insights into client conduct and buying patterns.
Immediate: Carry out exploratory information evaluation on buyer buying tendencies dataset and show solely plots.
The ChatGPT delivered fast outcomes, processing and analyzing client tendencies in underneath a minute, a job that usually takes at the very least half-hour for me to code and run.
You’ll be able to enhance the outcomes by offering follow-up prompts relating to the kind of visualization you have an interest in.
Immediate: Enhance the evaluation by plotting a correlation chart, bar chart, pie chart, boxplot, and relplot.
If you wish to see multilevel complicated visualization, you need to ask ChatGPT for it particularly.
Immediate: Use the dataset to plot numerous complicated visualizations.
Information visualization performs an important function in evaluating fashions. On this part, we shall be utilizing the Diabetes Dataset from Kaggle and ask ChatGPT to coach and consider a number of fashions. To take advantage of out of ChatGPT’s capabilities, we’ll request it to show a confusion matrix, precision-recall, and a chart evaluating completely different fashions.
Immediate: A number of machine studying fashions must be skilled utilizing the goal column "End result", and the ensuing mannequin analysis visualization ought to embody a confusion matrix, precision-recall, and mannequin comparability chart.
It’s evident that ChatGPT has carried out exceptionally properly. Though the fashions did not carry out properly on the dataset, we’re impressed with its quick and correct information visualization capabilities. It may be used to rapidly analyze datasets or reply questions throughout interviews or take-home assignments.
ChatGPT has revolutionized how we are able to create information visualizations with ease. With its superior information evaluation capabilities, you’ll be able to generate beautiful and informative information viz in seconds utilizing easy English prompts.
On this put up, we’ve discovered how ChatGPT can immediately produce numerous plots like pie charts, bar graphs, correlation matrices, and even complicated visualizations like relplots on request.
ChatGPT additionally exceeded expectations when requested to coach ML fashions on the diabetes dataset and generate analysis metrics and comparability plots. Your complete mannequin constructing and visualization course of took barely a minute.
Whether or not you want a easy bar chart, superior mannequin evaluation, or only a fast strategy to perceive datasets, ChatGPT delivers distinctive outcomes with minimal effort. With capabilities bettering on daily basis, it is an thrilling time to degree up your information viz expertise utilizing this AI assistant.
Abid Ali Awan (@1abidaliawan) is a licensed information scientist skilled who loves constructing machine studying fashions. At the moment, he’s specializing in content material creation and writing technical blogs on machine studying and information science applied sciences. Abid holds a Grasp’s diploma in Know-how Administration and a bachelor’s diploma in Telecommunication Engineering. His imaginative and prescient is to construct an AI product utilizing a graph neural community for college students combating psychological sickness.