Skip to main content
All CollectionsClaude.aiUsing Claude.ai
Enabling and using the analysis tool
Enabling and using the analysis tool
Updated over a week ago

Before turning on the analysis tool feature preview, ensure Artifacts are enabled in your account.

The analysis tool is a feature preview that enables Claude to write and run JavaScript code within Claude.ai, providing real-time data analysis and insights. This article will guide you through enabling the feature, using it effectively, and leveraging its capabilities for various use cases.

Enabling or disabling the analysis tool

To enable the analysis tool feature preview:

  1. Click on your initials in the lower left corner.

  2. Select “Feature Preview” from the menu.

  3. Locate the "Analysis tool" toggle and switch it on.

You can disable the feature at any time by following the same steps and turning the toggle off.

Using the analysis tool

Once enabled, you can start using the analysis tool in your conversations with Claude. The analysis tool has two primary use cases:

  1. General computation and code execution

  2. CSV data analysis and visualization

Here's how to use each:

General computation and code execution

You can ask Claude to perform calculations or run code for various tasks. For example:

  1. "Can you calculate the distance between New York and San Francisco using the Haversine formula?"

  2. "Calculate the compound interest on $10,000 invested at 6.5% APR compounded daily for 30 years, showing monthly totals."

  3. "What are the Celsius temperatures for every Fahrenheit degree from 0-1000 in 0.1 degree increments?"

Claude can use the analysis tool to perform these calculations or run the necessary code, providing you with the results directly in your chat.

CSV data analysis and visualization

You can also use the analysis tool to analyze and visualize data from uploaded CSV files. Here's how:

  1. Upload a CSV file that you want Claude to analyze.

    1. Note: The file must fit within the conversation’s context window.

  2. Prompt Claude to analyze the data, being as specific as possible in your request.

Craft effective prompts for the analysis tool

To get the most out of the analysis tool, consider these prompt examples for various analytical needs:

  1. General Analysis:

    • "Please analyze this CSV file and provide an overview of its contents."

  2. Statistical Analysis:

    • "Calculate the mean, median, and standard deviation for each numerical column in this dataset."

  3. Time-based Analysis:

    • "This data represents monthly sales. Can you analyze the year-over-year growth rate?"

  4. Comparative Analysis:

    • "How does the performance of Product A compare to Product B across all metrics?"

  5. Predictive Analysis:

    • "Based on this historical data, can you forecast the likely values for the next 3 months?"

  6. Segmentation Analysis:

    • "Can you segment the data into distinct groups based on customer purchasing behavior?"

  7. Data Quality Analysis:

    • "Check for any missing or inconsistent data in this CSV."

  8. Specific Metric Analysis:

    • "What's our average customer acquisition cost based on this data?"

  9. Comprehensive Analysis:

    • "Provide a comprehensive analysis of our sales data, including trends over time, top-performing products, and any correlations between sales and other factors like marketing spend or seasonality."

  10. Computational Requests:

    • "Can you calculate the compound interest on a $10,000 investment at 5% annual rate over 10 years?"

Viewing the analysis

After Claude responds with insights, you can click on "View analysis" to see the behind-the-scenes work. This reveals the exact code Claude executed and its output, providing full transparency into the analytical process. This feature is particularly useful for:

  • Verifying results

  • Understanding methodologies

  • Learning new data analysis techniques

Working with visualizations

Claude can also create Artifacts for visualizing your data, allowing you to interact with it, gather insights, or prompt for further analysis. Here's how you can make the most of this feature:

  1. Request a Visualization Explicitly: To ensure that Claude provides a visualization, you should explicitly ask for one. You could say something like:

    • "Can you create a visualization of this data?"

    • "Please generate a chart or graph to represent these findings."

  2. Specify the Type of Visualization: If you have a preference for the type of chart or graph, you can request it specifically:

    • "Could you create a bar chart showing the sales data by month?"

    • "I'd like to see a pie chart of the market share distribution."

    • "Can you visualize this time series data in a line graph?"

  3. Provide Context for the Visualization: The more context you provide about what you're trying to understand or highlight, the better Claude can tailor the visualization:

    • "I'm trying to identify trends over time. Can you create a visualization that emphasizes this?"

    • "I want to compare performance across different categories. What's the best way to visualize this?"

  4. Ask for Multiple Views: Sometimes, multiple visualizations can provide different insights:

    • "Can you create both a pie chart and a bar graph of this data? I'd like to see which is more informative."

    • "Please provide a few different ways to visualize this data so we can decide which is most effective."

  5. Request Customization: You can ask for specific customizations to make the visualization more useful:

    • "Can you create a chart with a color scheme that highlights the top performers?"

    • "Is it possible to add data labels to the visualization?"

    • "Could you sort the data in descending order in the chart?"

  6. Interact with the Visualization: Once Claude has created a visualization, you can interact with it further:

    • "Based on this chart, can you explain why there's a spike in July?"

    • "The bar for Product A seems much higher than the others. Can you provide more details about its performance?"

    • "This visualization is helpful, but could you modify it to focus on the top 5 categories only?"

  7. Combine with Analysis: You can ask for a visualization along with analytical insights:

    • "Can you create a visualization of this data and highlight any significant patterns or anomalies you notice?"

    • "Please generate a chart of our quarterly sales and provide an analysis of the trends you observe."

Did this answer your question?