fix: Update amenity_radar notebook to use correct radar API
Some checks failed
CI / lint-and-test (push) Has been cancelled

Use create_comparison_radar instead of create_radar_figure with
incorrect parameters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-18 20:39:20 -05:00
parent 54665bac63
commit 941305e71c

View File

@@ -113,35 +113,7 @@
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": "import sys\nsys.path.insert(0, '../..')\n\nfrom portfolio_app.figures.radar import create_comparison_radar\n\n# Compare top neighbourhood vs city average (100)\ntop_hood = top_5.iloc[0]\nmetrics = ['parks_index', 'schools_index', 'transit_index']\n\nfig = create_comparison_radar(\n selected_data=top_hood.to_dict(),\n average_data={'parks_index': 100, 'schools_index': 100, 'transit_index': 100},\n metrics=metrics,\n selected_name=top_hood['neighbourhood_name'],\n average_name='City Average',\n title=f\"Amenity Profile: {top_hood['neighbourhood_name']} vs City Average\",\n)\n\nfig.show()"
"import sys\n",
"sys.path.insert(0, '../..')\n",
"\n",
"from portfolio_app.figures.radar import create_radar_figure\n",
"\n",
"# Compare top neighbourhood vs city average (100)\n",
"top_hood = top_5.iloc[0]\n",
"\n",
"data = [\n",
" {\n",
" 'name': top_hood['neighbourhood_name'],\n",
" 'values': [top_hood['parks_index'], top_hood['schools_index'], top_hood['transit_index']],\n",
" 'categories': categories\n",
" },\n",
" {\n",
" 'name': 'City Average',\n",
" 'values': [100, 100, 100],\n",
" 'categories': categories\n",
" }\n",
"]\n",
"\n",
"fig = create_radar_figure(\n",
" data=data,\n",
" title=f\"Amenity Profile: {top_hood['neighbourhood_name']} vs City Average\",\n",
")\n",
"\n",
"fig.show()"
]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",