Marcus finished his analysis. Now he has to convince the VP to act on it.
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
with PdfPages("memo_q1.pdf") as pdf:
# Page 1 — title + TL;DR
fig, ax = plt.subplots(figsize=(8.5, 11))
ax.axis("off")
ax.text(0.05, 0.95, "Q1 Northeast Customers — Memo", fontsize=20, weight="bold", va="top")
ax.text(0.05, 0.85,
"TL;DR — The top 20 NE customers drove 62% of revenue but their\n"
"margin% trails the national average by 6 points. We recommend\n"
"a pricing review on the three SKUs that account for 80% of the gap.",
fontsize=12, va="top")
pdf.savefig(fig); plt.close(fig)
# Page 2 — the chart
fig, ax = plt.subplots(figsize=(8.5, 11))
# ... build the chart
pdf.savefig(fig); plt.close(fig)
from docx import Document
doc = Document()
doc.add_heading("Q1 Northeast Customers — Memo", 0)
doc.add_paragraph("TL;DR — The top 20 NE customers drove 62% of revenue...")
doc.add_picture("ne_margins.png", width=docx.shared.Inches(6))
doc.add_heading("Recommendation", level=2)
doc.add_paragraph("Pricing review on SKUs 12345, 23456, 34567 by end of June.")
doc.save("memo_q1.docx")
Take your last analysis. Distill it into a TL;DR, one chart, and a recommendation. Hand it to a colleague and ask: "did this make me sound certain enough?"