{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lab 1 6,000xp\n", "\n", "\n", "## Part 1 - Fun with Crickets\n", "\n", "\n", "\n", "A long, long time ago, in the summer of 1898, Ernst Athearn Bessey and his brother Carl decided to observe tree crickets in Lincoln, Nebraska. (Ernst was 21 at the time and just finished his MA degree) They were interested in the relationship between the speed of cricket chirps and outdoor temperature. The thing that made this a bit easier was that they found \"that each cricket remained in the same tree for days at a time.\"\n", "\n", "\n", "\n", "\n", "\n", "\n", "We are going to examine the data they collected.\n", "\n", "First let's import the numpy library\n", "\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we will read the data file from the web and place it in an np.array" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "## read in the cricket file\n", "cricket_data = np.genfromtxt('http://zacharski.org/files/crickets.csv', delimiter=',')" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[[ 20. 88.59999847]\n", " [ 16. 71.59999847]\n", " [ 19.79999924 93.30000305]\n", " [ 18.39999962 84.30000305]\n", " [ 17.10000038 80.59999847]\n", " [ 15.5 75.19999695]\n", " [ 14.69999981 69.69999695]\n", " [ 17.10000038 82. ]\n", " [ 15.39999962 69.40000153]\n", " [ 16.20000076 83.30000305]\n", " [ 15. 79.59999847]\n", " [ 17.20000076 82.59999847]\n", " [ 16. 80.59999847]\n", " [ 17. 83.50000125]\n", " [ 14.39999962 76.30000305]\n", " [ 17.1 81.50055115]\n", " [ 13.1 68.36003334]\n", " [ 13.65 70. ]\n", " [ 14.2 72.00011123]\n", " [ 18.67 86.67711113]\n", " [ 19.1226667 88.21000242]\n", " [ 19.01 84.05999912]\n", " [ 17.61 83.18999999]\n", " [ 16.125 77.30100011]\n", " [ 13. 67.26666667]\n", " [ 12. 62.72740003]\n", " [ 12.49 66.33333333]\n", " [ 14.111 77.81221677]\n", " [ 17.6 85. ]]\n" ] } ], "source": [ "print(cricket_data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "That first column is the number of chirps and the second column is the temperature.\n", "\n", "\n", "