Ever since the advent of ChatGPT, data analysis and visualization have become immensely convenient and user-friendly by providing natural language interpretation and assistance in the whole data analysis process. Data analysis used to be a lot of manual work, and it was a mentally straining process to extract useful information and present it in an appealing form.
ChatGPT simplified data analysis and visualization in the following ways:
Data exploration and interpretation: ChatGPT can help users analyze, comprehend, and explain the dataset’s structure, recognize potential patterns, identify outliers, and demonstrate statistical concepts.
Data preprocessing and cleaning: ChatGPT can help in data preprocessing by proposing techniques to handle data, and it can also guide users in data transformation, ensuring that data is ready for analysis.
Statistical analysis: ChatGPT can help provide descriptive and inferential statistics results, leading to ease in analysis. Users can then use that information for further analysis.
Collaboration and communication: ChatGPT generates clear responses about the data insights that are easy to understand and can be shared with team members or stakeholders. Users can ask for any report type and explanation depending on the stakeholder.
Quick problem-solving: ChatGPT can help troubleshoot data-related issues and reduce problem-solving time.
Let’s use ChatGPT to generate a dataset to perform some data analysis and create visualizations. First, we must choose a topic we want to work on. Let’s choose “E-learning experience of users”. We asked ChatGPT to generate a survey questionnaire that can be used to create a dataset. The response can be viewed below.
The questionnaire consists of questions that can help us create a dataset to gauge the e-learning experience of users. The next step is to create a dataset by getting the questionnaire filled out by a few individuals. The following is an example of how the dataset might look like:
Age Range | 25–34 | 18–24 | 45–54 | 55–64 | Under 18 |
Gender | Female | Male | Non-binary | Female | Male |
Highest Education | Bachelor’s degree | High school or equivalent | Doctoral degree | Master’s degree | High school or equivalent |
E-Learning Duration | More than 3 years | Less than 6 months | 2–3 years | 1–2 years | Less than 6 months |
No. of E-Learning Platforms | 3 | 1 | 2 | 4 | 1 |
E-Learning Course Type | Professional development courses | Academic courses | Skill-based or vocational courses | Personal interest or hobby courses | Academic courses |
Annual E-Learning Courses | 5–6 | 1–2 | 3–4 | 1–2 | 1–2 |
Satisfaction with E-Learning | 4 | 3 | 5 | 3 | 2 |
Technical Challenges | Yes | Yes | No | Yes | Yes |
Now that we have a steady dataset, we can use it to move forward with data analysis. To understand our dataset better, we perform statistical analysis.
Statistical analysis is a type of data analysis that involves organizing and interpreting data to draw precise conclusions from the dataset. There are two methods to analyze data via statistical analysis–descriptive and inferential statistics–shown. Let’s explore them both.
Descriptive analysis summarizes the dataset into a concise description of the dataset. It consists of many techniques, such as central tendency measures, percentages, dispersion measures, etc. Here, we will use ChatGPT to generate measures of central tendency for every variable of the dataset.
In the response above, you may notice that ChatGPT has chosen a random answer for variables that are tied.
Measures of central tendency can be calculated for all variables, but measures of dispersion can only be calculated for variables with numerical values. We will ask ChatGPT to generate them for us.
We can also generate percentages of different responses against all the given options for a variable in the questionnaire. Here, we will ask ChatGPT to show us the percentage of different responses against all the options provided for the question, “How many E-learning platforms or websites have you used?”.
Inferential statistics are used to draw conclusions about bigger datasets or populations by analyzing and driving results from smaller datasets. We can test a hypothesis, create confidence intervals, and perform regression analysis. Here, we will ask ChatGPT to generate an inferential statistics report for the questions in the survey and results.
We can also visualize data using ChatGPT prompts. For example, we can ask for Python code that can help us plot a chart against the dataset variables. Here, we will ask ChatGPT to show us the percentage of responses for the survey question regarding gender using a bar chart:
import matplotlib.pyplot as plt# Create a bar chartfig = plt.figure(figsize=(9, 8))bars = plt.bar(genders, percentages)for bar, percentage in zip(bars, percentages):plt.text(bar.get_x() + bar.get_width() / 2 - 0.1, bar.get_height() + 1, f"{percentage:.2f}%", ha='center', color='black', fontsize=12)plt.xlabel("Gender")plt.ylabel("Percentage")plt.title("Percentage of Responses by Gender")plt.savefig('output/gender_chart.png')plt.show()
We can also ask for a pie chart that shows us the percentage of e-learners using different numbers of platforms.
import matplotlib.pyplot as plt# Create a pie chartplt.figure(figsize=(8, 8))plt.pie(percentages, labels=platforms, autopct='%1.1f%%', startangle=140, colors=['skyblue', 'lightgreen', 'lightcoral', 'lightsalmon'])plt.title("Percentage of Responses by Number of E-learning Platforms Used")# Display the chartplt.savefig('output/platform_chart.png')plt.show()
ChatGPT offers great flexibility with data visualization. The code generated was for Python but this can easily be done for multiple other languages. Similarly, ChatGPT can also use different libraries if instructed to do so. We can go above and beyond in analyzing a dataset and visualizing as many variables as we want using ChatGPT.
Unlock your potential: ChatGPT for everyday tasks, all in one place!
To continue your exploration of ChatGPT for everyday tasks, check out our series of Answers below:
How can we use ChatGPT to write code?
Learn how ChatGPT can assist in writing clean and efficient code.
How to analyze and visualize data using ChatGPT
Discover how ChatGPT can help with data analysis and visualization.
How can we create a personal website on GitHub Pages using ChatGPT?
Build a personal website with GitHub Pages using ChatGPT.
How to use ChatGPT to generate content for social media
Create engaging social media content with ChatGPT.
How can we use ChatGPT to improve the language of a written text?
Improve the clarity and style of your writing with ChatGPT.
How can we use ChatGPT to write an essay?
Get help generating structured and well-written essays.
Using ChatGPT for SEO-friendly content
Optimize content for search engines with ChatGPT.
How to use ChatGPT for research
Use ChatGPT to gather and analyze research information.
How to use ChatGPT for mental health support
Learn how ChatGPT can assist with mental health support.
How to use ChatGPT for multilingual support
Leverage ChatGPT’s multilingual capabilities for better communication.
How to perform text summarization using ChatGPT
Summarize long texts efficiently with ChatGPT.
How to use ChatGPT for machine translation
Translate text accurately with ChatGPT.
How to use ChatGPT for multi-turn conversation
Create dynamic, multi-turn conversations with ChatGPT.
Free Resources