{
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# California mobile broadband: article companion\n",
        "\n",
        "Updated November 16, 2026 from the current local project and November 14 UTC report. Annual medians independently checked against cached files; demographic analysis not rerun for this article. This recreates the annual download figure from an embedded summary, not the full geographic/Census pipeline.\n",
        "\n",
        "All 24 quarters are present. Values are unweighted medians of qualifying (at least 20 tests) county-assigned tile-quarter averages within cached rectangular coverage. Changing locations, repeated tiles, and limited geographic coverage prevent population-wide or causal claims.\n",
        "\n",
        "Source: Ookla Open Data, CC BY-NC-SA 4.0. https://github.com/teamookla/ookla-open-data\n",
        "Project: https://github.com/Oli-Data/Ookla-Data (public version may lag local changes).\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "annual = [{'region': 'Bay Area', 'year': 2020, 'download': 52.058, 'upload': 15.737, 'latency': 30, 'observations': 2657, 'distinctTiles': 1626}, {'region': 'Bay Area', 'year': 2021, 'download': 78.5695, 'upload': 17.662, 'latency': 30, 'observations': 3238, 'distinctTiles': 1834}, {'region': 'Bay Area', 'year': 2022, 'download': 142.9505, 'upload': 22.799, 'latency': 30, 'observations': 2598, 'distinctTiles': 1607}, {'region': 'Bay Area', 'year': 2023, 'download': 184.33, 'upload': 25.983, 'latency': 28, 'observations': 1693, 'distinctTiles': 1103}, {'region': 'Bay Area', 'year': 2024, 'download': 255.137, 'upload': 29.0755, 'latency': 27, 'observations': 1448, 'distinctTiles': 982}, {'region': 'Bay Area', 'year': 2025, 'download': 263.761, 'upload': 29.9125, 'latency': 24, 'observations': 1014, 'distinctTiles': 702}, {'region': 'Central Valley', 'year': 2020, 'download': 34.923, 'upload': 10.761, 'latency': 32, 'observations': 1245, 'distinctTiles': 929}, {'region': 'Central Valley', 'year': 2021, 'download': 76.566, 'upload': 17.227, 'latency': 30, 'observations': 1677, 'distinctTiles': 1140}, {'region': 'Central Valley', 'year': 2022, 'download': 131.701, 'upload': 19.94, 'latency': 28, 'observations': 1323, 'distinctTiles': 958}, {'region': 'Central Valley', 'year': 2023, 'download': 176.212, 'upload': 22.551, 'latency': 28, 'observations': 1077, 'distinctTiles': 827}, {'region': 'Central Valley', 'year': 2024, 'download': 257.678, 'upload': 27.471, 'latency': 25, 'observations': 864, 'distinctTiles': 678}, {'region': 'Central Valley', 'year': 2025, 'download': 267.467, 'upload': 31.19, 'latency': 22, 'observations': 651, 'distinctTiles': 528}, {'region': 'Southern California', 'year': 2020, 'download': 43.937, 'upload': 16.3495, 'latency': 31, 'observations': 8688, 'distinctTiles': 5157}, {'region': 'Southern California', 'year': 2021, 'download': 75.6585, 'upload': 20.0605, 'latency': 30, 'observations': 9580, 'distinctTiles': 5512}, {'region': 'Southern California', 'year': 2022, 'download': 156.895, 'upload': 24.6995, 'latency': 27, 'observations': 7738, 'distinctTiles': 4655}, {'region': 'Southern California', 'year': 2023, 'download': 196.2625, 'upload': 24.0365, 'latency': 26, 'observations': 5096, 'distinctTiles': 3167}, {'region': 'Southern California', 'year': 2024, 'download': 249.431, 'upload': 25.662, 'latency': 25, 'observations': 3647, 'distinctTiles': 2400}, {'region': 'Southern California', 'year': 2025, 'download': 276.4945, 'upload': 29.0405, 'latency': 23, 'observations': 2738, 'distinctTiles': 1978}]\n",
        "df = pd.DataFrame(annual)\n",
        "df\n"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "for region, group in df.groupby('region'):\n",
        "    plt.plot(group.year, group.download, marker='o', label=region)\n",
        "plt.ylim(bottom=0)\n",
        "plt.ylabel('Median tile-quarter average download (Mbps)')\n",
        "plt.xlabel('Year')\n",
        "plt.title('County-assigned sampled mobile download speeds')\n",
        "plt.legend()\n",
        "plt.tight_layout()\n",
        "plt.show()\n"
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}
