GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python/courses/da-visualization/starter/charts.py at master · flypythoncom/python Expand file tree/ Copy pathcharts.pyMore file actions 49 lines (30 loc) · 1.23 KB / Copy pathcharts.pyFile metadata and controls49 lines (30 loc) · 1.23 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 """Data visualization — starter (deliberately unfinished). Contract: see TASK.md. Produce the three spec'd charts and summary.json in out/ using matplotlib (Agg backend — no display required). """ from __future__ import annotations import json from pathlib import Path import pandas as pd SCENARIO_DIR = Path(__file__).resolve().parent.parent / "scenario" / "sales-clean" OUT_DIR = Path(__file__).resolve().parent.parent / "out" def load_sales(path): """Read the daily-sales CSV into a DataFrame with a parsed date column.""" raise NotImplementedError def summary(df): """Return {"revenue_by_region": {region: float}, "daily_revenue": {date: float}, "grand_total": float} — every value rounded to 2.""" raise NotImplementedError def revenue_by_region(df, dest): """Bar chart of total revenue per region -> PNG at dest.""" raise NotImplementedError def daily_revenue(df, dest): """Line chart of total revenue per day -> PNG at dest.""" raise NotImplementedError def revenue_histogram(df, dest): """Histogram of row-level revenue values -> PNG at dest.""" raise NotImplementedError def main(argv=None): raise NotImplementedError if __name__ == "__main__": raise SystemExit(main()) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |