Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 3.96 KB

File metadata and controls

68 lines (51 loc) · 3.96 KB

SalesPulse Analysis Export & Report Guide

Assignment: 2.50 — Insight Export & Report Generation
Engine: export_functions.py & streamlit_export_integration.py
Output Directory: output/<YYYY-MM-DD_HHMM>_analysis/


1. Package Overview & Output Formats

Every analysis generated by SalesPulse is automatically compiled into three portable output formats designed to serve different stakeholder needs:

File Name Format Primary Stakeholder Key Features & Purpose
cleaned_data.csv CSV Dataset Financial Analysts, Ops Team Raw cleaned dataset ready for pivot tables, custom Excel modeling, or VLOOKUP joining. Includes record count and date boundaries.
summary_report.pdf PDF Document Executive Leadership, Board Standalone non-technical executive summary. Includes situation overview, key findings, risk quantification, and actionable recommendations.
interactive_report.html Single-File HTML Product Managers, Sales Ops Complete interactive report with embedded Plotly charts (hover cards, zoom/pan). Runs in any browser without needing Python.
README.md Markdown Metadata Analytics Audit Team Complete data dictionary, record count, timestamp, column definitions, and refresh schedule history.

2. File Specifications & Use Case Guide

1. cleaned_data.csv (Raw Analysis Output)

  • Purpose: Enables self-serve analysis for stakeholders who want to explore raw data in Excel or PowerBI.
  • Content: 100+ customer transaction rows including customer_id, date, segment, revenue, support_response_hours, and churn_risk.
  • Use Case:
    • Filter by customer segment (Enterprise vs. SMB)
    • Calculate custom averages or build Excel pivot tables
    • Merge with internal CRM exports

2. summary_report.pdf (Executive Brief)

  • Purpose: High-level summary designed for 3-minute executive reading during meetings or email distribution.
  • Content: Executive situation, quantitative findings, risk analysis ($2.0M churn loss), and $400K revenue recovery recommendations.
  • Use Case:
    • Email attachment for executive briefings
    • Printable handout for board meetings
    • Archival reference for budget decision approvals

3. interactive_report.html (Interactive Web Report)

  • Purpose: Full analytical deep-dive with responsive Plotly visualisations.
  • Content: Summary text + interactive Plotly charts (Response Time Distribution & Revenue Scatter).
  • Use Case:
    • Double-click to open in Chrome/Edge/Firefox
    • Hover over data points to inspect exact customer transaction values
    • Pan and zoom into specific date ranges or customer spend tiers

3. How to Use These Output Files

  1. For Excel Analysis: Open cleaned_data.csv directly in Microsoft Excel or Google Sheets.
  2. For Executive Emailing: Attach summary_report.pdf for C-suite decision sign-offs.
  3. For Browser Exploration: Double-click interactive_report.html to explore charts interactively without installing Python.
  4. For Immediate Downloads: Open streamlit_export_integration.py and click "📥 Export Analysis" or "📊 Download Data (CSV)" in the sidebar.

4. Automated Refresh & Scheduled Export Architecture

Refresh Schedule

  • Automated Daily Run: Scheduled job executes daily at 17:00 UTC via export_functions.py (scheduled_export_job()).
  • On-Demand Execution: Analysts can click "Export Analysis" in the Streamlit UI at any time for instant report compilation.

Automated Error Handling Strategy

  1. Graceful Failover: If PDF generation binaries are absent, the system falls back to a native Python PDF layout writer without crashing the export pipeline.
  2. Error Logging: Failed export attempts log error tracebacks to output/export_error_log.txt with timestamps.
  3. Audit Trail: Timestamped folders (output/2026-08-11_1130_analysis/) ensure previous reports are preserved for week-over-week comparison.