- Home
- Who it’s for
- For data analysts
Claude for data analysis: preserve the reasoning
An analysis chat can explain how a result took shape, but a colleague also needs the inputs, final code, and definitions behind it. Save those pieces together so the conclusion can be checked.
Use Claude for data analysis to clarify a question, examine calculation logic, and explain the result, then check the work against the actual data. Save the agreed metric definition, executable code, inputs, and outputs alongside the conversation. That package lets another analyst follow the conclusion back to the calculation instead of guessing which draft you used.
Define the result before calculating
Start with the business question and translate it into a measurable definition. Did onboarding improve? leaves room for several answers. What proportion of accounts created during the launch week completed activation within seven days? specifies a population and a window, but still needs an activation definition, a reporting time zone, and a rule for accounts whose observation window is incomplete.
Put those decisions near the beginning of the analysis. Identify whether one row represents an account, person, session, or event. Name the fields used for the cohort and outcome, including their units. If a table contains multiple events per account, an event count cannot stand in for an account count without changing the question.
The American Statistical Association includes this principle in its Ethical Guidelines for Statistical Practice: “Supporting statistical practice that is objective and transparent.” In a practical handoff, transparency means explaining the choices that could change the answer. A clean chart does not make an undocumented denominator easier to defend.
Copy the agreed definition into the final analysis note. Update it whenever the window or exclusions change, so the next reader can identify which definition governs the result.
Work through an activation example
Consider an onboarding analysis with 100 eligible new accounts. After applying the agreed seven-day outcome window, the event table contains 40 activation rows. Eight are additional activation events for accounts already represented, leaving 32 distinct activated accounts. The account activation rate is therefore 32 divided by 100, or 32%. Counting event rows would produce 40% and answer a different question.
Ask Claude to explain the counting logic before requesting a polished chart. A useful prompt makes the expected unit explicit and asks for the intermediate counts:
Review this activation calculation at the account level.
Use the supplied cohort and seven-day observation window.
Report eligible accounts, qualifying event rows, distinct activated
accounts, and the final rate. Explain duplicate handling and joins.
Mark unresolved definitions instead of choosing them silently.
In this example, the analyst should verify that the 100 accounts are unique before joining them to events. Qualifying events must belong to those accounts and fall inside each account’s outcome window. Multiple qualifying events can establish that an account activated, but they should not increase the number of activated accounts.
Keep the intermediate counts in the review note so stakeholders can see the difference between 40 events and 32 accounts. They also give a colleague checkpoints for a rerun. These numbers illustrate the logic.
If the question becomes a comparison with the previous onboarding flow, write a separate comparison definition. Check that both cohorts have the same opportunity to complete activation, and describe any differences in eligibility or collection. A change from one percentage to another is a descriptive result until the analysis supports a stronger interpretation.
Reconcile code, tables, and charts
Choose one final calculation and make every distributed output agree with it. A table might use distinct accounts while a chart still reflects an earlier event-count query. A narrative might say within seven days even though a revised filter uses calendar weeks. Review these connections before spending time on colors or slide layout.
Read generated code as code you are responsible for running. Check join keys, missing values, date comparisons, grouping, and the point at which duplicates are removed. Run it in your approved analysis environment against the intended input. Record actual execution outcomes only after that run. A confident explanation in the conversation is not an execution record.
For the funnel, the final table should show 100 eligible accounts, 32 activated accounts, and a 32% rate. A chart displaying the rate should identify the cohort and outcome window. If it displays counts instead, label those counts directly. Avoid making the audience infer whether a bar represents accounts, events, or a percentage.
Check the chart’s axis labels, units, category order, legends, and omitted categories. Explain a truncated axis when it could mislead. If filters or interactive controls affect the chart, record the displayed state so a saved picture has a clear meaning.
Write the conclusion last. The example supports reporting that 32 of 100 eligible accounts activated within seven days in this cohort. It cannot show that onboarding caused the behavior or that the result generalizes to other cohorts. Those questions need additional evidence.
Keep a runnable analysis package
Give the next analyst a route from the note to the calculation. Include a short explanation of the input location, extraction date, relevant schema, final code file, and execution command. Record dependency versions and important parameters. Where access restrictions prevent copying data, reference the approved location and access process rather than placing sensitive rows in the narrative.
Preserve the exact input used when your environment and data policy allow it. If you instead rely on a changing warehouse table, record enough extraction logic and timing information to explain what a later query will retrieve. An analysis against today’s records does not necessarily recreate last week’s result. A compact package might use these filenames:
activation-analysis/
README.md
activation.sql
environment.txt
activation-summary.csv
activation-rate.png
conversation.md
Assemble these files yourself. One export does not create this package. The README should identify the executable file and its outputs. Keep rejected code clearly marked, with the reason for rejecting it in the conversation record.
For a recurring report, use the Claude SOP workflow to turn the verified procedure into repeatable steps. If the work changes a metric pipeline or reporting service, the design-document workflow helps explain the implementation decision. Link those documents from the analysis note instead of copying their full contents into every report.
Export the conversation and artifacts
DocMyChat exports the open chat or a single reply in desktop Chrome. Choose the reading copy for the reviewer’s task:
| Format | Best use in the handoff | Check before sharing |
|---|---|---|
| Markdown | Explanation beside versioned code | Save images separately; Claude image links need a signed-in session |
| Word | Editable interpretation for stakeholder review | Table contents, code punctuation, and chart labels |
| A fixed reading copy | Page breaks and readable charts |
Open Export in the conversation header to select a format. Keep Include artifacts enabled when their content belongs in the reading copy. Interactive widgets cannot operate in these files. The document marks their location and directs the reader to the chat.
Choose Artifacts separately for a ZIP containing the latest artifact and file versions. Its structure is flat: duplicate filenames receive numbers, and slashes become spaces. Rebuild required folders and pair the code with the correct inputs and environment before trying to run it. Published Docs and decks appear as titled links in the transcript, without their contents; save those deliverables through their own export controls.
Give the reviewer a specific question
A useful review request names the uncertainty: does the account-level definition match the business question, does the code implement it, and does the conclusion follow? Agree who will resolve each question before the result informs a decision.
Keep a short record of the review outcome and any resulting changes. If the denominator changes, regenerate the table and chart together and revise the narrative. Saving only the corrected paragraph leaves an inconsistent package that can be misunderstood when its pieces are reused.
Start with one completed analysis
Choose one completed analysis and write its population, unit, window, and calculation in a short note. Run the saved code, reconcile the table and chart, and ask a reviewer to follow the package from question to result without your help.
Questions
Is a saved Claude conversation enough to reproduce an analysis?
It preserves the discussion, but reproduction also needs the actual input data, final executable code, dependencies, and parameters. Record where those files live and how to run them.
What if the source table changes before a rerun?
Use an approved snapshot or record the extraction query, time, and source version so another analyst can identify the intended input. Keep the access process with that reference; a query against today’s table may answer a different question from the original run.
How should I save a chart discussed in Claude?
Keep a readable chart alongside the data and code that produced it. Check its units, filters, time period, and denominator against the final table before distributing it.