Income Statement Sankey Diagram
Generate a self-contained interactive HTML Sankey diagram visualizing a company's income statement — from revenue down to net income.
Step 1: Fetch Financial Data
Tools: bash (driven command)
-
Fetch the income statement (default to most recent quarter if user doesn't specify):
For Y/Y comparison, also fetch prior year's same period:
Then pick the matching quarter from the previous year.
-
Revenue segment breakdown (REQUIRED — exhaust all sources before falling back to single Total Revenue):
Try these sources in order until segment data is obtained:
Source A: driven product segmentation
Source B: driven geographic segmentation (if product segments unavailable)
Source C: Full filing or earnings release through Driven
Use driven help to locate the current filing or company-announcement endpoint for the symbol's market, then retrieve the latest applicable 10-Q, 10-K, annual/interim report, or earnings release. Extract the revenue-by-segment table from the notes or MD&A. Keep all retrieval within Driven; do not call arbitrary websites or unrelated external domains.
Source D: For HK-listed companies, try xq