{
 "nbformat": 4,
 "nbformat_minor": 5,
 "metadata": {
  "colab": {
   "provenance": [],
   "toc_visible": true
  },
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3"
  },
  "language_info": {
   "name": "python"
  }
 },
 "cells": [
  {
   "id": "m15-l2-0",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Lesson 15.2 · The Executive Dashboard: Next.js, Recharts and Vercel\n",
    "\n",
    "*Accelerated Foundation in Applied Causal Inference*\n",
    "\n",
    "**By the end of this lesson you can:**\n",
    "\n",
    "- Build a Next.js page that posts an applicant profile to the causal API\n",
    "- Visualise expected impact against cost with a Recharts bar chart and a break-even line\n",
    "- Configure the API address with an environment variable\n",
    "- Deploy the frontend to Vercel and the API to a Python host\n",
    "\n",
    "> Read the full explanations on the course website, then run each cell here in order (**Runtime → Run all** works on a fresh runtime)."
   ]
  },
  {
   "id": "m15-l2-1",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Who is the dashboard for?"
   ]
  },
  {
   "id": "m15-l2-2",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Scaffold the frontend"
   ]
  },
  {
   "id": "m15-l2-3",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The intervention simulator component"
   ]
  },
  {
   "id": "m15-l2-4",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> **Question it answers:** What would the subsidy do for this applicant, and should we offer it?"
   ]
  },
  {
   "id": "m15-l2-5",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The impact chart"
   ]
  },
  {
   "id": "m15-l2-6",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Deploying both halves"
   ]
  },
  {
   "id": "m15-l2-7",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ✍️ Exercise\n",
    "\n",
    "Extend the simulator with a **coverage planner**: a slider for the budget share (10–100%) that calls the\n",
    "`/predict_batch` endpoint from Lesson 15.1's exercise on a sample of applicants and plots total net benefit\n",
    "against coverage with a Recharts line chart."
   ]
  },
  {
   "id": "m15-l2-8",
   "cell_type": "code",
   "metadata": {},
   "execution_count": null,
   "outputs": [],
   "source": [
    "# Your answer here"
   ]
  },
  {
   "id": "m15-l2-9",
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Checklist and recap"
   ]
  }
 ]
}