From 48afc496c0792d662709b2b9c28826afb78914b7 Mon Sep 17 00:00:00 2001 From: lauravchrobak Date: Tue, 2 Jul 2024 11:23:12 -0700 Subject: [PATCH] docs: switch order of imports/pip install in tutorial notebook switched order of imports to avoid ipyleaflet error with fathomnet install and added explanation on running outside of colab. (#28) --- tutorial.ipynb | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/tutorial.ipynb b/tutorial.ipynb index acedfa6..78cf272 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -72,45 +72,43 @@ "id": "-uNeHCauXyvC" }, "source": [ - "First, we'll install a few packages via pip:" + "Note: this notebook assumes you are running from a colab environment. If this is not the case you may have to manually install a few packages that are pre-installed in colab such as numpy and pandas. \n", + "\n", + "First, import the auxiliary modules we need for part 1:" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "id": "4Q--V_Xrr3js" - }, + "metadata": {}, "outputs": [], "source": [ - "!pip install -q -U fathomnet ipyleaflet" + "import ipywidgets as widgets # Provides embedded widgets\n", + "import ipyleaflet # Provides map widgets\n", + "import requests # Manages HTTP requests\n", + "import numpy as np # Facilitates array/matrix operations\n", + "import plotly.express as px # Generates nice plots\n", + "import random # Generates pseudo-random numbers\n", + "from PIL import Image, ImageFont, ImageDraw # Facilitates image operations\n", + "from io import BytesIO # Interfaces byte data" ] }, { "cell_type": "markdown", - "metadata": { - "id": "NfilAbptX2LU" - }, + "metadata": {}, "source": [ - "and import the auxiliary modules we need for part 1:" + "Next, we'll install a few packages via pip:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "id": "QpcYIXG-sofq" + "id": "4Q--V_Xrr3js" }, "outputs": [], "source": [ - "import ipywidgets as widgets # Provides embedded widgets\n", - "import ipyleaflet # Provides map widgets\n", - "import requests # Manages HTTP requests\n", - "import numpy as np # Facilitates array/matrix operations\n", - "import plotly.express as px # Generates nice plots\n", - "import random # Generates pseudo-random numbers\n", - "from PIL import Image, ImageFont, ImageDraw # Facilitates image operations\n", - "from io import BytesIO # Interfaces byte data" + "!pip install -q -U fathomnet ipyleaflet" ] }, {