From 7ca298de80713e8c5ba83022e4a614da4e1c2b72 Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Wed, 12 Nov 2025 20:18:56 +0530 Subject: [PATCH 1/2] fix-valueError --- tests/Maps.ipynb | 60 +++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/tests/Maps.ipynb b/tests/Maps.ipynb index 96ca20bb9..55929688d 100644 --- a/tests/Maps.ipynb +++ b/tests/Maps.ipynb @@ -6,15 +6,14 @@ "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n", - "Bad key \"text.kerning_factor\" on line 4 in\n", - "/Users/ahemani/anaconda3/envs/datascience/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle.\n", - "You probably need to get an updated matplotlibrc file from\n", - "https://github.com/matplotlib/matplotlib/blob/v3.1.3/matplotlibrc.template\n", - "or from the matplotlib source distribution\n" + "ename": "ModuleNotFoundError", + "evalue": "No module named 'datascience'", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mdatascience\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n", + "\u001b[31mModuleNotFoundError\u001b[39m: No module named 'datascience'" ] } ], @@ -83,35 +82,28 @@ "metadata": {}, "outputs": [ { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" + "ename": "NameError", + "evalue": "name 'Map' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[7]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Different tile styles\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[43mMap\u001b[49m(\n\u001b[32m 3\u001b[39m tiles=\u001b[33m'\u001b[39m\u001b[33mStamen Toner\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 4\u001b[39m attr=\u001b[33m'\u001b[39m\u001b[33mMap tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors\u001b[39m\u001b[33m'\u001b[39m\n\u001b[32m 5\u001b[39m ).show()\n\u001b[32m 7\u001b[39m Map(\n\u001b[32m 8\u001b[39m tiles=\u001b[33m'\u001b[39m\u001b[33mStadia.StamenTerrain\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 9\u001b[39m attr=\u001b[33m'\u001b[39m\u001b[33mMap tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors\u001b[39m\u001b[33m'\u001b[39m\n\u001b[32m 10\u001b[39m ).show()\n", + "\u001b[31mNameError\u001b[39m: name 'Map' is not defined" + ] } ], "source": [ "# Different tile styles\n", - "Map(tiles='Stamen Toner').show()\n", - "Map(tiles='Stamen Terrain')" + "Map(\n", + " tiles='Stamen Toner',\n", + " attr='Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors'\n", + ").show()\n", + "\n", + "Map(\n", + " tiles='Stadia.StamenTerrain',\n", + " attr='Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors'\n", + ").show()" ] }, { From 4ef3163d0aed52302cc8656e1ff3b7c911776edc Mon Sep 17 00:00:00 2001 From: David Wagner <3349841+davidwagner@users.noreply.github.com> Date: Sun, 11 Jan 2026 23:19:11 -0800 Subject: [PATCH 2/2] Re-run Maps tests --- tests/Maps.ipynb | 21655 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 21555 insertions(+), 100 deletions(-) diff --git a/tests/Maps.ipynb b/tests/Maps.ipynb index 55929688d..085c65f85 100644 --- a/tests/Maps.ipynb +++ b/tests/Maps.ipynb @@ -6,14 +6,11 @@ "metadata": {}, "outputs": [ { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'datascience'", - "output_type": "error", - "traceback": [ - "\u001b[31m---------------------------------------------------------------------------\u001b[39m", - "\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mdatascience\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n", - "\u001b[31mModuleNotFoundError\u001b[39m: No module named 'datascience'" + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/daw/ds/datascience/datascience/maps.py:13: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" ] } ], @@ -36,10 +33,110 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 2, @@ -54,17 +151,115 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 3, @@ -82,15 +277,228 @@ "metadata": {}, "outputs": [ { - "ename": "NameError", - "evalue": "name 'Map' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[31m---------------------------------------------------------------------------\u001b[39m", - "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[7]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Different tile styles\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[43mMap\u001b[49m(\n\u001b[32m 3\u001b[39m tiles=\u001b[33m'\u001b[39m\u001b[33mStamen Toner\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 4\u001b[39m attr=\u001b[33m'\u001b[39m\u001b[33mMap tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors\u001b[39m\u001b[33m'\u001b[39m\n\u001b[32m 5\u001b[39m ).show()\n\u001b[32m 7\u001b[39m Map(\n\u001b[32m 8\u001b[39m tiles=\u001b[33m'\u001b[39m\u001b[33mStadia.StamenTerrain\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 9\u001b[39m attr=\u001b[33m'\u001b[39m\u001b[33mMap tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors\u001b[39m\u001b[33m'\u001b[39m\n\u001b[32m 10\u001b[39m ).show()\n", - "\u001b[31mNameError\u001b[39m: name 'Map' is not defined" - ] + "data": { + "text/html": [ + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -121,10 +529,148 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -139,14 +685,150 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" @@ -158,7 +840,145 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" @@ -170,10 +990,154 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -196,10 +1160,155 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -220,10 +1329,262 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -258,10 +1619,277 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -284,10 +1912,262 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -302,17 +2182,269 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 11, @@ -334,9 +2466,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -373,10 +2503,265 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 12, @@ -401,14 +2786,208 @@ "name": "stderr", "output_type": "stream", "text": [ - "/Users/ahemani/Development/data8/datascience/datascience/maps.py:800: FutureWarning: The 'radius' argument is deprecated. Please use 'area' instead.\n", + "/home/daw/ds/datascience/datascience/maps.py:798: FutureWarning: The 'radius' argument is deprecated. Please use 'area' instead.\n", " warnings.warn(\"The 'radius' argument is deprecated. Please use 'area' instead.\", FutureWarning)\n" ] }, { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" @@ -420,10 +2999,204 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 13, @@ -443,9 +3216,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -482,10 +3253,205 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 14, @@ -511,17 +3477,1665 @@ { "cell_type": "code", "execution_count": 15, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 15, @@ -542,10 +5156,172 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 16, @@ -560,17 +5336,5509 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 17, @@ -682,10 +10950,213 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 20, @@ -720,13 +11191,406 @@ " \n", " \n", " \n", - " AL
\n", + " AL
Make this Notebook Trusted to load map: File -> Trust Notebook
\n", " \n", " \n", - " AK
\n", + " AK
Make this Notebook Trusted to load map: File -> Trust Notebook
\n", " \n", " \n", - " AZ
\n", + " AZ
Make this Notebook Trusted to load map: File -> Trust Notebook
\n", " \n", " \n", "\n", @@ -811,10 +11675,609 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 22, @@ -887,13 +12350,354 @@ "metadata": {}, "output_type": "display_data" }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/daw/ds/datascience/datascience/maps.py:798: FutureWarning: The 'radius' argument is deprecated. Please use 'area' instead.\n", + " warnings.warn(\"The 'radius' argument is deprecated. Please use 'area' instead.\", FutureWarning)\n" + ] + }, { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 23, @@ -965,10 +12769,343 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 24, @@ -1048,10 +13185,3925 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 25, @@ -1127,10 +17179,4076 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 26, @@ -1160,10 +21278,230 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 27, @@ -1189,10 +21527,310 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 28, @@ -1218,10 +21856,310 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 29, @@ -1243,10 +22181,276 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 30, @@ -1282,10 +22486,261 @@ { "data": { "text/html": [ - "
" + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ - "" + "" ] }, "execution_count": 31, @@ -1523,7 +22978,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1537,7 +22992,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.14.2" }, "metadata": { "interpreter": { @@ -1546,5 +23001,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }