"What we have been doing so far has required you to type the data into the programs by hand, which is a bit cruel. For this worksheet, we will be using a larger dataset (still tiny by many standards) and you can download a file containing the data from the [GitHub repository](https://github.com/tobyhodges/ITPP/blob/master/speciesDistribution.txt) where these teaching materials are maintained. Just right-click 'Raw' at the top of the file content and download/save the linked file into the same directory as you are keeping the Python scripts. (_Note: if you already obtained these materials from the repository, you probably downloaded the data file, into the same folder, at the same time._)"
"What we have been doing so far has required you to type the data into the programs by hand, which is a bit cruel. For this worksheet, we will be using a larger dataset (still tiny by many standards) and you can download a file containing the data from the [GitHub repository](https://git.embl.de/grp-bio-it/ITPP/blob/master/speciesDistribution.txt) where these teaching materials are maintained. Just right-click 'Raw' at the top of the file content and download/save the linked file into the same directory as you are keeping the Python scripts. (_Note: if you already obtained these materials from the repository, you probably downloaded the data file, into the same folder, at the same time._)"
]
},
{
...
...
@@ -82,11 +71,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
"lines = f.readlines()"
"lines = f.readlines()\n",
"lines"
]
},
{
...
...
@@ -711,6 +701,10 @@
},
"outputs": [],
"source": [
"% magic inline\n",
"# The above line is a 'magic' line for the Jupyter notebook which allows plots to be placed inside of the notebook.\n",
"# Make sure to place this line before importing matplotlib/pyplot.\n",
"\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt"
]
...
...
@@ -905,7 +899,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
...
...
@@ -1152,7 +1146,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The `charts` library also contains several other functions for common types of plot, and `bokeh.io` provides functions to display these plots together. For example, below we will create a scatter plot and display that alongside our bar chart in the output:"
"The `charts` library also contains several other functions for common types of plot, and `bokeh.models.layours` provides functions to display these plots together. For example, below we will create a scatter plot and display that alongside our bar chart in the output:"