AI Prompts for Data Analysis
Discover how ChatGPT and other generative AI tools can transform your data analysis workflow. From exploring datasets to uncovering patterns and insights, GenAI tools can make data analysis faster, more accessible, and actionable for users of all skill levels.
Below, you'll find use cases and prompt examples to guide you in leveraging AI for a range of data analysis tasks.
For more advanced and tailored prompts, visit our AI Prompts Library.
Data Exploration and Interpretation
You can use ChatGPT to quickly summarise and interpret datasets, providing an initial understanding of data patterns and outliers.
Summarize the key characteristics of this dataset, including data types, missing values, and basic statistics.
Generate a concise summary of this dataset for non-technical stakeholders.
Provide insights into the distribution of numerical variables and identify any significant skewness or outliers.
Detect outliers in the 'sales' column and explain their impact on the analysis.
Examine the time series data for seasonality or trends and summarize your findings.
Calculate and interpret the correlation matrix for numerical variables, highlighting strong relationships.
Assess data quality, focusing on missing values, duplicate records, and data entry errors.
Identify anomalous patterns in the 'user_activity' log and suggest possible causes.
Data Cleaning and Preprocessing
ChatGPT can assist in identifying and suggesting methods for handling missing data, outliers, and other data quality issues.
Suggest methods and best practices for cleaning and preprocessing this messy dataset.
How can I effectively handle outliers in the 'sales' column to ensure they don't skew the analysis?
Provide code examples in Python or R for handling missing values in a dataset.
How can I extract meaningful features from datetime columns, such as day of the week or month?
Recommend approaches to identify and remove duplicate records from the dataset.
Statistical Analysis and Hypothesis Testing
As an analyst you can seek assistance from ChatGPT in formulating hypotheses, selecting appropriate statistical tests, and interpreting the results.
Help me design a hypothesis test to determine if there's a significant difference in conversion rates between two website versions.
Calculate the correlation coefficient between 'advertising spend' and 'sales revenue' in our dataset. Is the relationship significant?
Perform a t-test to compare the means of two independent groups in our data. What are the findings?
Conduct a linear regression analysis to predict 'sales' based on 'advertising spend.' Interpret the coefficients.
Calculate the required sample size for a hypothesis test with a specified power and effect size.
Data Visualisation and Reporting
ChatGPT can help generate code for data visualizations and provide suggestions for creating informative reports and dashboards.
What type of chart or graph is most suitable for displaying this data?
Generate a bar chart to visualize the distribution of product sales by category.
Create a line graph to show the trend in website traffic over the past year.
Suggest the most appropriate type of chart or graph for representing the relationship between customer age and purchase frequency.
Which visualization method is best for displaying geographic distribution data?
Generate a heatmap to visualize the correlation matrix of numerical variables in our dataset.
Generate Python code to create a bar chart using Matplotlib to visualize product sales by category.
Create R code to generate a scatter plot to visualize the relationship between two numerical variables.
Produce a box plot to display the distribution of employee salaries in our organization.
Visualize the distribution of customer ages using a histogram.
Create a heatmap to show the concentration of website clicks across different time periods.
Generate a time series plot to show the daily stock prices of a selected company over the past year.
Create a calendar heatmap to visualize employee attendance patterns.
Illustrate the breakdown of marketing campaign expenses by channel using a pie chart.
Compare the distribution of website traffic sources with a donut chart.
Coding and Scripting Assistance
ChatGPT and other AI tools (e.g. Gemini, Copilot) can be used as your code assistant, for with virtually any type of code. Whether you're writing SQL queries, scripting in Python or R, VBA macros, formulating Excel formulas, working with DAX for Power BI, constructing REGEX patterns, or even handling JavaScript for web data extraction, AI will take your coding abilities to the next level. Here are a few prompts you might use for code assistance:
Suggest ways to make my R script more efficient
Optimize this SQL query for better performance.
Review my Python script for data cleaning and suggest improvements to adhere to best coding practices.
I've written an R function for data transformation. Can you provide feedback on code readability and style?
I've been given a Python script that I need to understand. Can you help me interpret its overall functionality and purpose?
Provide a Python code snippet to read a CSV file into a DataFrame using Pandas.
Write an R script to perform linear regression analysis on a dataset and display the results.
Help me write an SQL query to retrieve the top 10 customers by total purchase amount.
Create an SQL query to join two tables and calculate the average order value.
Provide a regular expression pattern in Python for extracting email addresses from text data.
Explain how to authenticate and use the Twitter API in R.
Help me troubleshoot and fix an error in my Python code related to indexing a list.
Explain how to extract information from multiple pages of a website using web scraping.
Explaining Complex Concepts
You can use ChatGPT to simplify and explain complex statistical or technical concepts to non-technical audience.
Provide a simple analogy or metaphor to explain linear regression and its purpose.
Create a concise explanation of the difference between correlation and causation using real-world examples.
Explain A/B testing and its significance for improving website user experience to a non-technical team.
How can I introduce the concept of machine learning to business executives without using technical jargon?
Competitive Analysis
You can use ChatGPT to help you with competitive analysis by using prompts like these:
List potential competitors in our industry and provide a brief overview of each.
Provide insights into our top competitors' market share, strategies, and customer demographics.
Compare our market share with that of our top three competitors over the past year.
Compare the features and functionalities of our product with those of a key competitor.
Provide a sentiment analysis of customer reviews for our product and a major competitor. Are there any insights to be gained?
Analyze the digital marketing strategies (e.g., SEO, PPC, content) of our competitors. What keywords are they targeting?
Examine the website of a major competitor and identify areas of improvement or best practices.
Compare our sales and revenue growth with those of a top competitor over the last five years.
Analyze how our competitors are expanding into new markets or geographic regions.
Market Research and Competitive Analysis
Analysts can discuss market research strategies, competitor analysis, and trends with ChatGPT to gather insights.
Summarize current trends and emerging opportunities in our industry based on recent market research.
Can you provide information about emerging trends in the fashion industry?
What are the latest consumer trends, and how can we align our marketing strategies with them?
Help me estimate the total addressable market (TAM) for our product or service in a specific region.
Explain the factors influencing consumer behavior in our target market. How do demographics impact purchasing decisions?
Give an overview of the demographics (age, gender, income, etc.) of our target market.
Identify seasonal marketing opportunities and recommend campaigns or promotions.
Provide insights into how our brand is perceived in the market and suggest strategies for brand improvement.
Recommend effective ways to segment our customer base for targeted marketing efforts.
Customer Analysis
Create detailed customer personas based on data analysis. What are their pain points, preferences, and motivations?
How can we tailor our marketing messages to resonate with different customer personas?
Calculate customer lifetime value (CLV) and suggest strategies for increasing CLV.
How can we engage and retain high CLV customers effectively?
Social Media analysis
Analyze social media engagement metrics. Which posts or content types receive the most likes, shares, and comments?
Conduct sentiment analysis on social media mentions related to our brand. How do customers perceive our products or services?
Identify sentiment shifts over time and key factors influencing sentiment.
Recommend social media strategies to boost engagement and brand awareness.
Analyze the performance of our recent social media posts. Which posts received the highest engagement, and what can we learn from them?
Identify trends in the type of content (videos, images, infographics) that resonate most with our audience.
Provide insights on our social media audience segments. How can we tailor content to better engage each segment?
Suggest strategies for expanding our reach to new and relevant audience segments.
Evaluate the effectiveness of the hashtags we use in our social media campaigns. Which hashtags drive the most engagement and visibility?
Recommend trending or niche hashtags to incorporate into our content strategy.
Assess the best times and days to post content on each social platform based on engagement data. How can we optimize our posting schedule?
Provide insights on potential influencers in our industry or niche. How can we collaborate with them to boost engagement?
Sentiment Analysis
AI tools can help you extract insights from customer reviews, social comments, and customer surveys. You can use them to learn how people feel about your brand or products, and even those of your competitors. Make sure to have the data available (either in a form of csv, Excel, or a PDF)
Overall Sentiment Analysis: Analyze the overall sentiment of these social media comments. Are they mostly positive, negative, or neutral? Provide a summary and examples. Use the attached dataset to carry out the analysis.
Analyze Public Perception of YouTube Video Topic: Based on the attached YouTube comments, utilize sentiment analysis to evaluate the public’s perception of the topic discussed in the YouTube video. Focus on identifying common themes, overall sentiment (positive, negative, neutral), and any significant shifts in opinion throughout the comments. Summarize the findings to capture the audience’s reaction to the video content.
Pinpoint Specific Concerns or Praise: Are there any specific concerns or repeated compliments mentioned in these comments? Extract and list them.
Identify Key Themes and Topics: What are the most common themes and topics discussed in these comments? Categorize them and provide examples for each category.
Data Extraction
AI tools can be used to streamline data extraction, pulling information from diverse sources like websites, images, and documents (and even APIs). They can often offer outputs directly or through generated scripts for further/reproducible analysis. If you keep on getting instructions rather than the output, then try being more specific and mention that you want the output rather than the instructions (see example below).
Extracting Stock Market Data : Create an Excel file with the latest stock prices for the following companies: Tesla, Apple, and Microsoft.
Weather Data : What is the current weather forecast for London, UK?
Extracting data from an image of a graph: Extract data from this graph into an Excel format. Example
Combining Internet and Local Data: Compare the current market trends with our company’s sales performance. Provide the data in a form of a CSV file.
Extracting inflation data from the internet: Please provide me with a table of monthly inflation rates for the UK, US, and France for the past 3 years. Include the following columns: Country, Year, Month, Inflation Rate (%). The data should be formatted for easy export to Excel.
Extracting data from Google Trends: Please provide the Google Trends data for the keywords 'machine learning' and 'data science' over the past 5 years in the United States and Canada. Include a table of monthly interest values, the top and rising related queries, and a brief analysis comparing the trends in both countries.
Extracting stock price data: Provide the daily stock price data for Apple and Microsoft over the past 30 days and present it as a line graph.
Analyse or extract Trending news and topics:
Show me a list of the most discussed topics on [Social Media Platform] in the past hour, including any relevant hashtags or keywords. Produce the output here.
Give me a summary of the latest developments in [Industry/Topic] based on real-time news sources and trending discussions.
Analyze real-time news feeds and identify the top trending stories in [Country/Region], focusing on [Specific Area of Interest].
Summarize the most popular topics being discussed on [Social Media Platform] right now, along with their sentiment and any relevant hashtags or links.
Prompt for Extracting Petrol Prices in the UK (with code)
I need a Python script to extract and visualize petrol prices in the UK over the past 2 years. The script should:
Install any necessary libraries.
Fetch petrol price data from a reliable source (such as the UK Government's website).
Process the data to filter the prices for the past 2 years.
Plot the petrol prices over time using a line chart.
Please include the entire script in one file, ready to run without modifications.
Once you have the script, simply paste it into Google Colab (free online tool) and Run in there.
Extracting Mortgage rates data from a website:
Extract information about Mortgage rates from this website. Present in a form or a table/-s: https://www.rightmove.co.uk/news/articles/property-news/current-uk-mortgage-rates/#:~:text=The%20current%20average%20rate%20for,is%20unchanged%20from%20last%20week.
In a similar way you can ask to extract data from any other website. If you keep on getting instructions or code code as an output instead of the actual data then try simply starting a new ChatGPT conversation (or refreshing a browser).
Prompts for Sourcing Leads online
give me a list and contact details of 10 media agencies located in Manchester
give me a list and contact details of 5 real estate agencies located in Ascot UK
give me a list of 20 businesses located within 5 miles from postcode TN8, group them by category
give me a list and contact details of 10 companies incorporated in the UK in the last month within the Automotive industry
Generating Ideas for A/B Testing:
ChatGPT can brainstorm ideas for A/B tests, experiment designs, and hypotheses to optimize marketing campaigns or product features.
Suggest A/B test ideas to optimize our homepage for improved user engagement and conversion rates
Generate A/B test variations for our call-to-action (CTA) buttons to increase click-through rates.
Propose A/B test experiments to enhance our product pages for better conversion and sales.
What are some A/B test ideas to improve the navigation menu's usability and effectiveness?
Provide ideas for A/B testing different types of content (e.g., videos, infographics) on our website.
What A/B tests can we conduct to compare user behavior and conversions between mobile and desktop users?
Generate A/B test ideas for optimizing our email capture popup's timing, design, and messaging.
What A/B tests can we conduct to optimize site speed and reduce page load times for better user experience?
Provide A/B test ideas for improving the search functionality on our website to enhance user satisfaction.
Workflow Automation
Export Emails from Apple Mail and save the data into an Excel file: Write a Python script that retrieves emails from the Apple Mail app using AppleScript. The script should fetch all emails from the inbox received in the last 7 days, extracting the subject, sender, and received date for each email. Once the emails are fetched, the script should save the data into an Excel file on the user's desktop, with each email's subject, received date, and sender stored in separate columns. Use the openpyxl
library to handle Excel file creation, and execute the AppleScript using the subprocess
module. Ensure that the Excel file is titled "my_emails.xlsx" and is placed on the desktop. Read more about this prompt.