Data Visualization Prompt Templates
AI prompt templates for data visualization. Create effective charts, dashboards, and visual reports.
Overview
Good visualizations make data understandable at a glance. Bad ones confuse people or hide important information. These prompts help you choose the right chart type, design clear visuals, and create code for popular visualization libraries. They're built around real decisions you'll face when presenting data.
Best Practices
State what story you want the visualization to tell before asking for help
Specify your tool or library (Matplotlib, D3.js, Tableau, Excel) for usable code
Mention your audience. Executives need different visuals than data scientists
Include the actual data or a representative sample
Ask about accessibility considerations like color blindness
Prompt Templates
1. Chart Type Selector
I need to visualize [DATA_DESCRIPTION] to show [INSIGHT_OR_RELATIONSHIP]. My audience is [AUDIENCE]. Options I'm considering: [CHART_OPTIONS]. Which chart type works best and why? What are the tradeoffs?
I need to visualize monthly revenue by product category (5 categories) over 2 years to show growth trends. My audience is the executive team. Options I'm considering: stacked bar chart, line chart, or area chart.
Use a line chart with one line per category. Here's why: Stacked bars make it hard to compare individual category growth since only the bottom category has a consistent baseline. Area charts have the same problem. Line charts let executives quickly see which categories are growing fastest and spot crossover points. Tradeoff: if total revenue matters more than individual categories, a stacked area chart works better.
When you're unsure which visualization type fits your data and message
- •Always mention the number of categories or data points you have
- •State whether comparison or composition is more important
2. Visualization Code Generator
Create a [CHART_TYPE] using [LIBRARY] that shows [DATA_DESCRIPTION]. Requirements: - Title: [TITLE] - Axis labels: [X_LABEL], [Y_LABEL] - Color scheme: [COLORS_OR_THEME] - Additional features: [FEATURES] Data format: [DATA_FORMAT] Sample data: [SAMPLE_DATA]
Create a bar chart using Python Matplotlib that shows sales by region. Requirements: Title: 'Q4 2024 Sales by Region', Axis labels: 'Region', 'Sales ($M)', Color scheme: blue gradient, Additional features: value labels on bars, horizontal gridlines. Data format: dictionary. Sample data: {'North': 4.2, 'South': 3.1, 'East': 5.8, 'West': 4.9}import matplotlib.pyplot as plt
data = {'North': 4.2, 'South': 3.1, 'East': 5.8, 'West': 4.9}
regions = list(data.keys())
sales = list(data.values())
fig, ax = plt.subplots()
bars = ax.bar(regions, sales, color=['#1e3a5f', '#2e5a8f', '#3e7abf', '#4e9aef'])
ax.bar_label(bars, fmt='$%.1fM')
ax.set_ylabel('Sales ($M)')
ax.set_xlabel('Region')
ax.set_title('Q4 2024 Sales by Region')
ax.yaxis.grid(True, linestyle='--', alpha=0.7)
plt.show()When you need working code for a specific visualization
- •Specify the exact library version if you've had compatibility issues
- •Ask for the code to handle edge cases like missing data
3. Dashboard Layout Planner
Design a dashboard layout for [USE_CASE]. The dashboard should answer these questions: [QUESTION_LIST] Available metrics: [METRICS] User workflow: [HOW_USERS_WILL_USE_IT] Constraints: [SCREEN_SIZE_OR_TOOL] Provide a layout with specific chart recommendations for each section.
Design a dashboard layout for monitoring e-commerce performance. Questions: 1) How are sales trending? 2) Which products are performing best? 3) Where are customers dropping off? Available metrics: daily revenue, orders, conversion rate, cart abandonment, top products, traffic sources. User workflow: Quick daily check, then drill into problem areas. Constraints: Tableau, 1920x1080 screen.
Layout (top to bottom, left to right): TOP ROW (KPI cards): Today's revenue, orders, conversion rate with vs. yesterday comparison. MIDDLE LEFT: Line chart showing 30-day revenue trend with goal line. MIDDLE RIGHT: Funnel chart showing visitor > cart > checkout > purchase with drop-off percentages. BOTTOM LEFT: Horizontal bar chart of top 10 products by revenue. BOTTOM RIGHT: Donut chart of traffic sources. Add date filter at top. This layout follows the daily workflow: check KPIs first, then trends, then dig into products or funnel issues.
When planning a new dashboard and deciding what to include and where
- •Start with the questions users need answered, not the data you have
- •Consider the most common action users will take and put that data prominently
4. Chart Critique and Improvement
Review this visualization and suggest improvements: Current setup: [DESCRIPTION_OF_CURRENT_VIZ] Intended message: [WHAT_IT_SHOULD_COMMUNICATE] Audience: [WHO_WILL_SEE_IT] What's working? What should change? Provide specific recommendations.
Review this visualization: A 3D pie chart showing market share for 8 competitors, with a legend on the right. Intended message: We're the market leader but facing growing competition. Audience: Board presentation.
Problems: 3D pie charts distort proportions and are hard to read. 8 slices is too many to compare. Legends force eye movement back and forth. Recommendations: 1) Switch to a horizontal bar chart sorted by market share. 2) Highlight your company in a different color, gray out competitors. 3) Add year-over-year change as a secondary data point. 4) Label bars directly instead of using a legend. 5) Consider grouping smaller competitors into 'Other' if they're not strategic threats. This focuses attention on your position while still showing the competitive landscape.
When you have an existing visualization that isn't working well
- •Describe what's confusing people or what questions you're getting
- •Include a screenshot or detailed description of the current state
Common Mistakes to Avoid
Asking for a chart type without explaining what insight you want viewers to take away
Not specifying the visualization tool, resulting in code you can't use
Forgetting to mention how many data points or categories you have, which affects chart choice significantly
Frequently Asked Questions
Good visualizations make data understandable at a glance. Bad ones confuse people or hide important information. These prompts help you choose the right chart type, design clear visuals, and create code for popular visualization libraries. They're built around real decisions you'll face when presenting data.
Related Templates
SQL Query Prompt Templates
AI prompt templates for writing SQL queries. Create SELECT, JOIN, aggregate, and complex queries.
Data Analysis Prompt Templates
AI prompt templates for data analysis. Extract insights, identify patterns, and interpret results.
Report Generation Prompt Templates
AI prompt templates for generating reports. Create automated reports from data sources.
Have your own prompt to optimize?