Skip to content

Commit

Permalink
docs: switch order of imports/pip install in tutorial notebook
Browse files Browse the repository at this point in the history
switched order of imports to avoid ipyleaflet error with fathomnet install and added explanation on running outside of colab. (#28)
  • Loading branch information
lauravchrobak authored Jul 2, 2024
1 parent 8202949 commit 48afc49
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down

0 comments on commit 48afc49

Please sign in to comment.