{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Visualizing Chipotle's Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This time we are going to pull data directly from the internet.\n", "Special thanks to: https://github.com/justmarkham for sharing the dataset and materials.\n", "\n", "### Step 1. Import the necessary libraries" ] }, { "cell_type": "code", "execution_count": 132, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pandas as pd\n", "import collections\n", "import matplotlib.pyplot as plt \n", "\n", "# set this so the \n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/justmarkham/DAT8/master/data/chipotle.tsv). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 3. Assign it to a variable called chipo." ] }, { "cell_type": "code", "execution_count": 133, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 4. See the first 10 entries" ] }, { "cell_type": "code", "execution_count": 134, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
| \n", " | order_id | \n", "quantity | \n", "item_name | \n", "choice_description | \n", "item_price | \n", "
|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "1 | \n", "Chips and Fresh Tomato Salsa | \n", "NaN | \n", "$2.39 | \n", "
| 1 | \n", "1 | \n", "1 | \n", "Izze | \n", "[Clementine] | \n", "$3.39 | \n", "
| 2 | \n", "1 | \n", "1 | \n", "Nantucket Nectar | \n", "[Apple] | \n", "$3.39 | \n", "
| 3 | \n", "1 | \n", "1 | \n", "Chips and Tomatillo-Green Chili Salsa | \n", "NaN | \n", "$2.39 | \n", "
| 4 | \n", "2 | \n", "2 | \n", "Chicken Bowl | \n", "[Tomatillo-Red Chili Salsa (Hot), [Black Beans... | \n", "$16.98 | \n", "
| 5 | \n", "3 | \n", "1 | \n", "Chicken Bowl | \n", "[Fresh Tomato Salsa (Mild), [Rice, Cheese, Sou... | \n", "$10.98 | \n", "
| 6 | \n", "3 | \n", "1 | \n", "Side of Chips | \n", "NaN | \n", "$1.69 | \n", "
| 7 | \n", "4 | \n", "1 | \n", "Steak Burrito | \n", "[Tomatillo Red Chili Salsa, [Fajita Vegetables... | \n", "$11.75 | \n", "
| 8 | \n", "4 | \n", "1 | \n", "Steak Soft Tacos | \n", "[Tomatillo Green Chili Salsa, [Pinto Beans, Ch... | \n", "$9.25 | \n", "
| 9 | \n", "5 | \n", "1 | \n", "Steak Burrito | \n", "[Fresh Tomato Salsa, [Rice, Black Beans, Pinto... | \n", "$9.25 | \n", "