Skip to content

Instantly share code, notes, and snippets.

@jt14den
Created July 16, 2020 00:55
Show Gist options
  • Select an option

  • Save jt14den/080492eae0750c296ea779de0da9e6cd to your computer and use it in GitHub Desktop.

Select an option

Save jt14den/080492eae0750c296ea779de0da9e6cd to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Flickr script"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The script you sent works! I made a few tweaks to get it running, but it works as written. I made notes as I got it working. Jupyter Notebooks make it easier to leave notes like this. Look under the <kbd>Help</kbd> tab for more help. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"#ucomment & run if not installed\n",
"#!pip install FlickrAPI"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Above we can install Python modules or packages inside the notebook if needed. Below is the existing import section from the previous code. I added one at the bottom `import get_images` -- this imports the `get_images.py` script so we can use that script in this notebook."
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"from flickrapi import FlickrAPI\n",
"import pandas as pd\n",
"#import xml\n",
"import xml.etree.ElementTree as ET\n",
"from datetime import datetime\n",
"# pprint is a module that lets us print out the response from the API \n",
"import pprint\n",
"# you can import a local python script as a module (package) - don't add the .py though\n",
"import get_images"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"key='<your key>'\n",
"secret='<your-secret>'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We set the tags and text below, but we aren't using `text` as far as I can tell. "
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"tag = 'LARio_Trail'\n",
"text = 'Los_Angeles'"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"MAX_COUNT = 500"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We create the flickr API object and set parameters for the API call. "
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"flickr = FlickrAPI(key, secret)\n",
"photos = flickr.walk(tags=tag,\n",
" tag_mode='all',\n",
" extras='geo,tags,views,date_taken,owner_name,url_o,date_upload,description',\n",
" per_page=50,\n",
" sort='relevance', \n",
" content_type='1'\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"count=0\n",
"info=[]"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"db_columns = [\"url\", \"latitude\", \"longitude\", \"tags\", \"date taken\", \"owner name\", \"views\", \"date uploaded\", \"description\"]\n"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"rows = []"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This code works without fussing with it. I think the missing descriptions are because the user didn't add a description to the photos."
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fetching info for image number 0\n",
"Fetching info for image number 1\n",
"Fetching info for image number 2\n",
"Fetching info for image number 3\n",
"Fetching info for image number 4\n",
"Fetching info for image number 5\n",
"Fetching info for image number 6\n",
"Fetching info for image number 7\n",
"Fetching info for image number 8\n",
"Fetching info for image number 9\n",
"Fetching info for image number 10\n",
"Fetching info for image number 11\n",
"Fetching info for image number 12\n",
"Fetching info for image number 13\n",
"Fetching info for image number 14\n",
"Fetching info for image number 15\n",
"Fetching info for image number 16\n",
"Fetching info for image number 17\n",
"Fetching info for image number 18\n",
"Fetching info for image number 19\n",
"Fetching info for image number 20\n",
"Fetching info for image number 21\n",
"Fetching info for image number 22\n",
"Fetching info for image number 23\n",
"Fetching info for image number 24\n",
"Fetching info for image number 25\n",
"Fetching info for image number 26\n",
"Fetching info for image number 27\n",
"Fetching info for image number 28\n",
"Fetching info for image number 29\n",
"Fetching info for image number 30\n",
"Fetching info for image number 31\n",
"Fetching info for image number 32\n",
"Fetching info for image number 33\n",
"Fetching info for image number 34\n",
"Fetching info for image number 35\n",
"Fetching info for image number 36\n",
"Fetching info for image number 37\n",
"Fetching info for image number 38\n",
"Fetching info for image number 39\n",
"Fetching info for image number 40\n",
"Fetching info for image number 41\n",
"Fetching info for image number 42\n",
"Fetching info for image number 43\n",
"Fetching info for image number 44\n",
"Fetching info for image number 45\n",
"Fetching info for image number 46\n",
"Fetching info for image number 47\n",
"Fetching info for image number 48\n",
"Fetching info for image number 49\n",
"Fetching info for image number 50\n",
"Fetching info for image number 51\n",
"Fetching info for image number 52\n",
"Fetching info for image number 53\n",
"Fetching info for image number 54\n",
"Fetching info for image number 55\n",
"Fetching info for image number 56\n",
"Fetching info for image number 57\n",
"Fetching info for image number 58\n",
"Fetching info for image number 59\n",
"Fetching info for image number 60\n",
"Fetching info for image number 61\n",
"Fetching info for image number 62\n",
"Fetching info for image number 63\n",
"Fetching info for image number 64\n",
"Fetching info for image number 65\n",
"Fetching info for image number 66\n",
"Fetching info for image number 67\n",
"Fetching info for image number 68\n",
"Fetching info for image number 69\n",
"Fetching info for image number 70\n",
"Fetching info for image number 71\n",
"Fetching info for image number 72\n",
"Fetching info for image number 73\n",
"Fetching info for image number 74\n",
"Fetching info for image number 75\n",
"Fetching info for image number 76\n",
"Fetching info for image number 77\n",
"Fetching info for image number 78\n",
"Fetching info for image number 79\n",
"Fetching info for image number 80\n",
"Fetching info for image number 81\n",
"Fetching info for image number 82\n",
"Fetching info for image number 83\n",
"Fetching info for image number 84\n",
"Fetching info for image number 85\n",
"Fetching info for image number 86\n",
"Fetching info for image number 87\n",
"Fetching info for image number 88\n",
"Fetching info for image number 89\n",
"Fetching info for image number 90\n",
"Fetching info for image number 91\n",
"Fetching info for image number 92\n",
"Fetching info for image number 93\n",
"Fetching info for image number 94\n",
"Fetching info for image number 95\n",
"Fetching info for image number 96\n",
"Fetching info for image number 97\n",
"Fetching info for image number 98\n",
"Fetching info for image number 99\n",
"Fetching info for image number 100\n",
"Fetching info for image number 101\n",
"Fetching info for image number 102\n",
"Fetching info for image number 103\n",
"Fetching info for image number 104\n",
"Fetching info for image number 105\n",
"Fetching info for image number 106\n",
"Fetching info for image number 107\n",
"Fetching info for image number 108\n",
"Fetching info for image number 109\n",
"Fetching info for image number 110\n",
"Fetching info for image number 111\n",
"Fetching info for image number 112\n",
"Fetching info for image number 113\n",
"Fetching info for image number 114\n",
"Fetching info for image number 115\n",
"Fetching info for image number 116\n",
"Fetching info for image number 117\n",
"Fetching info for image number 118\n",
"Fetching info for image number 119\n",
"Fetching info for image number 120\n",
"Fetching info for image number 121\n",
"Fetching info for image number 122\n",
"Fetching info for image number 123\n",
"Fetching info for image number 124\n",
"Fetching info for image number 125\n",
"Fetching info for image number 126\n",
"Fetching info for image number 127\n",
"Fetching info for image number 128\n",
"Fetching info for image number 129\n",
"Fetching info for image number 130\n",
"Fetching info for image number 131\n",
"Fetching info for image number 132\n",
"Fetching info for image number 133\n",
"Fetching info for image number 134\n",
"Fetching info for image number 135\n",
"Fetching info for image number 136\n",
"Fetching info for image number 137\n",
"Fetching info for image number 138\n",
"Fetching info for image number 139\n",
"Fetching info for image number 140\n",
"Fetching info for image number 141\n",
"Fetching info for image number 142\n",
"Fetching info for image number 143\n",
"Fetching info for image number 144\n",
"Fetching info for image number 145\n",
"Fetching info for image number 146\n",
"Fetching info for image number 147\n",
"Fetching info for image number 148\n",
"Fetching info for image number 149\n",
"Fetching info for image number 150\n",
"Fetching info for image number 151\n",
"Fetching info for image number 152\n",
"Fetching info for image number 153\n",
"Fetching info for image number 154\n",
"Fetching info for image number 155\n",
"Fetching info for image number 156\n",
"Fetching info for image number 157\n",
"Fetching info for image number 158\n",
"Fetching info for image number 159\n",
"Fetching info for image number 160\n",
"Fetching info for image number 161\n",
"Fetching info for image number 162\n",
"Fetching info for image number 163\n",
"Fetching info for image number 164\n",
"Fetching info for image number 165\n",
"Fetching info for image number 166\n",
"Fetching info for image number 167\n",
"Fetching info for image number 168\n",
"Fetching info for image number 169\n",
"Fetching info for image number 170\n",
"Fetching info for image number 171\n",
"Fetching info for image number 172\n",
"Fetching info for image number 173\n",
"Fetching info for image number 174\n",
"Fetching info for image number 175\n",
"Fetching info for image number 176\n",
"Fetching info for image number 177\n",
"Fetching info for image number 178\n",
"Fetching info for image number 179\n",
"Fetching info for image number 180\n",
"Fetching info for image number 181\n",
"Fetching info for image number 182\n",
"Fetching info for image number 183\n",
"Fetching info for image number 184\n",
"Fetching info for image number 185\n",
"Fetching info for image number 186\n",
"Fetching info for image number 187\n",
"Fetching info for image number 188\n",
"Fetching info for image number 189\n",
"Fetching info for image number 190\n",
"Fetching info for image number 191\n",
"Fetching info for image number 192\n",
"Fetching info for image number 193\n",
"Fetching info for image number 194\n",
"Fetching info for image number 195\n",
"Fetching info for image number 196\n",
"Fetching info for image number 197\n",
"Fetching info for image number 198\n",
"Fetching info for image number 199\n",
"Fetching info for image number 200\n",
"Fetching info for image number 201\n",
"Fetching info for image number 202\n",
"Fetching info for image number 203\n",
"Fetching info for image number 204\n",
"Fetching info for image number 205\n",
"Fetching info for image number 206\n",
"Fetching info for image number 207\n",
"Fetching info for image number 208\n",
"Fetching info for image number 209\n",
"Fetching info for image number 210\n",
"Fetching info for image number 211\n",
"Fetching info for image number 212\n",
"Fetching info for image number 213\n",
"Fetching info for image number 214\n",
"Fetching info for image number 215\n",
"Fetching info for image number 216\n",
"Fetching info for image number 217\n",
"Fetching info for image number 218\n",
"Fetching info for image number 219\n",
"Fetching info for image number 220\n",
"Fetching info for image number 221\n",
"Fetching info for image number 222\n",
"Fetching info for image number 223\n",
"Fetching info for image number 224\n",
"Fetching info for image number 225\n",
"Fetching info for image number 226\n",
"Fetching info for image number 227\n",
"Fetching info for image number 228\n",
"Fetching info for image number 229\n",
"Fetching info for image number 230\n",
"Fetching info for image number 231\n",
"Fetching info for image number 232\n",
"Fetching info for image number 233\n",
"Fetching info for image number 234\n",
"Fetching info for image number 235\n",
"Fetching info for image number 236\n",
"Fetching info for image number 237\n",
"Fetching info for image number 238\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fetching info for image number 239\n",
"Fetching info for image number 240\n",
"Fetching info for image number 241\n",
"Fetching info for image number 242\n",
"Fetching info for image number 243\n",
"Fetching info for image number 244\n",
"Fetching info for image number 245\n",
"Fetching info for image number 246\n",
"Fetching info for image number 247\n",
"Fetching info for image number 248\n",
"Fetching info for image number 249\n",
"Fetching info for image number 250\n",
"Fetching info for image number 251\n",
"Fetching info for image number 252\n",
"Fetching info for image number 253\n",
"Fetching info for image number 254\n",
"Fetching info for image number 255\n",
"Fetching info for image number 256\n",
"Fetching info for image number 257\n",
"Fetching info for image number 258\n",
"Fetching info for image number 259\n",
"Fetching info for image number 260\n",
"Fetching info for image number 261\n",
"Fetching info for image number 262\n",
"Fetching info for image number 263\n",
"Fetching info for image number 264\n",
"Fetching info for image number 265\n",
"Fetching info for image number 266\n",
"Fetching info for image number 267\n",
"Fetching info for image number 268\n",
"Fetching info for image number 269\n",
"Fetching info for image number 270\n",
"Fetching info for image number 271\n",
"Fetching info for image number 272\n",
"Fetching info for image number 273\n",
"Fetching info for image number 274\n",
"Fetching info for image number 275\n",
"Fetching info for image number 276\n",
"Fetching info for image number 277\n",
"Fetching info for image number 278\n",
"Fetching info for image number 279\n",
"Fetching info for image number 280\n",
"Fetching info for image number 281\n",
"Fetching info for image number 282\n",
"Fetching info for image number 283\n",
"Fetching info for image number 284\n",
"Fetching info for image number 285\n",
"Fetching info for image number 286\n",
"Fetching info for image number 287\n",
"Fetching info for image number 288\n",
"Fetching info for image number 289\n",
"Fetching info for image number 290\n",
"Fetching info for image number 291\n",
"Fetching info for image number 292\n",
"Fetching info for image number 293\n",
"Fetching info for image number 294\n",
"Fetching info for image number 295\n",
"Fetching info for image number 296\n",
"Fetching info for image number 297\n",
"Fetching info for image number 298\n",
"Fetching info for image number 299\n",
"Fetching info for image number 300\n",
"Fetching info for image number 301\n",
"Fetching info for image number 302\n",
"Fetching info for image number 303\n",
"Fetching info for image number 304\n"
]
}
],
"source": [
"for photo in photos:\n",
"\n",
" if count< MAX_COUNT:\n",
" \n",
" print(\"Fetching info for image number {}\".format(count))\n",
" url = photo.get('url_o')\n",
" geo_lat = photo.get('latitude')\n",
" geo_long = photo.get('longitude')\n",
" tags = photo.get('tags').split(\" \")\n",
" date_taken = photo.get('datetaken')\n",
" owner_name = photo.get('ownername')\n",
" views = photo.get('views')\n",
" date_upload = int(photo.get('dateupload'))\n",
" date_upload = datetime.utcfromtimestamp(date_upload).strftime('%Y-%m-%d %H:%M:%S')\n",
" photo_desc = photo.get('description')\n",
" \n",
" \n",
" if url is not None:\n",
" count=count+1\n",
" rows.append(\n",
" {db_columns[0] : url,\n",
" db_columns[1] : geo_lat,\n",
" db_columns[2] : geo_long,\n",
" db_columns[3] : tags,\n",
" db_columns[4] : date_taken,\n",
" db_columns[5] : owner_name,\n",
" db_columns[6] : views,\n",
" db_columns[7] : date_upload,\n",
" db_columns[8] : photo_desc\n",
" }\n",
" )\n",
" \n",
" photo_response = flickr.photos.getInfo(photo_id=photo.get('id'))\n",
" #photo_xml = photo_response()[0]\n",
" #for f in photo_xml.getiterator():\n",
" # print(f)\n",
" # print(f.items())\n",
" \n",
" \n",
" else:\n",
" print(\"Done fetching info, fetched {} photos out of {}\".format(len(info),MAX_COUNT))\n",
" break"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The list `row` we created as we looped thru the photos can be subsetted similar to R. Below we look at the element 1 (this is the second element b/c python starts counting with zero). "
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"{'url': 'https://live.staticflickr.com/8502/29086547321_27ed358b80_o.jpg',\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'tags': ['appleiphone6plus',\n",
" 'bikepath',\n",
" 'lariotrail',\n",
" 'bicycling',\n",
" 'bicycle',\n",
" 'bucephalus',\n",
" 'cannondale',\n",
" 'wrigley',\n",
" 'longbeach'],\n",
" 'date taken': '2016-08-21 18:56:02',\n",
" 'owner name': 'jjldickinson',\n",
" 'views': '59',\n",
" 'date uploaded': '2016-08-22 21:15:55',\n",
" 'description': None}"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rows[1]"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"305"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(rows)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For the photo url `https://live.staticflickr.com/545/18626034854_655a7c012f_o.jpg` the `18626034854` is the photo ID.\n",
"We can get to the photo in the context of the user's profile by adding it to the `owner name` like so: \n",
"https://www.flickr.com/photos/jjldickinson/18626034854. Notice it lacks a description. The photos for this tag are from a single user and he probably doesn't add descriptions to his photos. \n",
"\n",
"We can also print out a range of the items in the list rows. Below, we're using `pprint` that makes it easier to read. You can spot check the below to see if there are any descriptions on the photos, but I doubt they are b/c they are all from a single user. "
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'date taken': '2009-08-02 22:43:37',\n",
" 'date uploaded': '2010-02-08 06:24:57',\n",
" 'description': None,\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'owner name': 'jjldickinson',\n",
" 'tags': ['bicycling',\n",
" 'losangeles',\n",
" 'losangelesriver',\n",
" 'lariver',\n",
" 'motorolarazrv3m',\n",
" 'lariotrail'],\n",
" 'url': 'https://live.staticflickr.com/2748/4340176590_06e2da06e5_o.jpg',\n",
" 'views': '91'}\n",
"{'date taken': '2009-07-17 23:37:41',\n",
" 'date uploaded': '2010-02-08 06:24:07',\n",
" 'description': None,\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'owner name': 'jjldickinson',\n",
" 'tags': ['motorolarazrv3m',\n",
" 'bucephalus',\n",
" 'cannondale',\n",
" 'bicycle',\n",
" 'bixbyknolls',\n",
" 'bicycling',\n",
" 'bontrager',\n",
" 'lariotrail',\n",
" 'lariver',\n",
" 'losangelesriver',\n",
" 'longbeach'],\n",
" 'url': 'https://live.staticflickr.com/2697/4340175034_aacb611c4d_o.jpg',\n",
" 'views': '97'}\n",
"{'date taken': '2009-10-18 00:28:05',\n",
" 'date uploaded': '2009-10-18 07:28:05',\n",
" 'description': None,\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'owner name': 'jjldickinson',\n",
" 'tags': ['harbor',\n",
" 'bicycling',\n",
" 'hiking',\n",
" 'vicks',\n",
" 'wrigley',\n",
" 'olympusompc',\n",
" 'lariotrail',\n",
" 'lariver',\n",
" 'longbeachharbor',\n",
" 'vastindustrialconcretekafkaesquestructures',\n",
" 'losangelesriver',\n",
" 'fujicolorsuperiaxtra400',\n",
" 'longbeach'],\n",
" 'url': 'https://live.staticflickr.com/2500/4021034243_01da6508fa_o.jpg',\n",
" 'views': '67'}\n",
"{'date taken': '2009-10-18 00:23:05',\n",
" 'date uploaded': '2009-10-18 07:23:05',\n",
" 'description': None,\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'owner name': 'jjldickinson',\n",
" 'tags': ['harbor',\n",
" 'bicycling',\n",
" 'hiking',\n",
" 'vicks',\n",
" 'sunset',\n",
" 'olympusompc',\n",
" 'lariotrail',\n",
" 'lariver',\n",
" 'longbeachharbor',\n",
" 'vastindustrialconcretekafkaesquestructures',\n",
" 'losangelesriver',\n",
" 'fujicolorsuperiaxtra400',\n",
" 'longbeach'],\n",
" 'url': 'https://live.staticflickr.com/2638/4021788270_bbac561c85_o.jpg',\n",
" 'views': '129'}\n",
"{'date taken': '2009-10-18 00:21:51',\n",
" 'date uploaded': '2009-10-18 07:21:51',\n",
" 'description': None,\n",
" 'latitude': '0',\n",
" 'longitude': '0',\n",
" 'owner name': 'jjldickinson',\n",
" 'tags': ['harbor',\n",
" 'bicycling',\n",
" 'hiking',\n",
" 'vickssunset',\n",
" 'olympusompc',\n",
" 'lariotrail',\n",
" 'lariver',\n",
" 'longbeachharbor',\n",
" 'vastindustrialconcretekafkaesquestructures',\n",
" 'losangelesriver',\n",
" 'fujicolorsuperiaxtra400',\n",
" 'longbeach'],\n",
" 'url': 'https://live.staticflickr.com/3534/4021025959_33c1fd1dbb_o.jpg',\n",
" 'views': '127'}\n"
]
}
],
"source": [
"for row in rows[300:305]:\n",
" pprint.pprint(row)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The below converts to a Pandas dataframe. Pandas is a package that gives Python dataframe (they copied R's implementation)."
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
"db = pd.DataFrame(rows, columns=db_columns)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's look at the dataframe. We can print it out in Jupyter Notebook like so: "
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>url</th>\n",
" <th>latitude</th>\n",
" <th>longitude</th>\n",
" <th>tags</th>\n",
" <th>date taken</th>\n",
" <th>owner name</th>\n",
" <th>views</th>\n",
" <th>date uploaded</th>\n",
" <th>description</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>https://live.staticflickr.com/8480/29171773065...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[appleiphone6plus, bikepath, lariotrail, bicyc...</td>\n",
" <td>2016-08-21 18:56:02</td>\n",
" <td>jjldickinson</td>\n",
" <td>55</td>\n",
" <td>2016-08-23 05:23:44</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>https://live.staticflickr.com/8502/29086547321...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[appleiphone6plus, bikepath, lariotrail, bicyc...</td>\n",
" <td>2016-08-21 18:56:02</td>\n",
" <td>jjldickinson</td>\n",
" <td>59</td>\n",
" <td>2016-08-22 21:15:55</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>https://live.staticflickr.com/7503/29086537431...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[appleiphone6plus, bikepath, lariotrail, bicyc...</td>\n",
" <td>2016-08-21 18:56:18</td>\n",
" <td>jjldickinson</td>\n",
" <td>48</td>\n",
" <td>2016-08-22 21:15:33</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>https://live.staticflickr.com/1591/26650233902...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[losangelesriver, lariver, river, friendsofthe...</td>\n",
" <td>2016-04-30 09:51:13</td>\n",
" <td>jjldickinson</td>\n",
" <td>108</td>\n",
" <td>2016-05-01 06:24:31</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>https://live.staticflickr.com/1609/26676969381...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[losangelesriver, lariver, river, friendsofthe...</td>\n",
" <td>2016-04-30 09:18:30</td>\n",
" <td>jjldickinson</td>\n",
" <td>83</td>\n",
" <td>2016-05-01 06:22:45</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>300</th>\n",
" <td>https://live.staticflickr.com/2748/4340176590_...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[bicycling, losangeles, losangelesriver, lariv...</td>\n",
" <td>2009-08-02 22:43:37</td>\n",
" <td>jjldickinson</td>\n",
" <td>91</td>\n",
" <td>2010-02-08 06:24:57</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>301</th>\n",
" <td>https://live.staticflickr.com/2697/4340175034_...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[motorolarazrv3m, bucephalus, cannondale, bicy...</td>\n",
" <td>2009-07-17 23:37:41</td>\n",
" <td>jjldickinson</td>\n",
" <td>97</td>\n",
" <td>2010-02-08 06:24:07</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>302</th>\n",
" <td>https://live.staticflickr.com/2500/4021034243_...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[harbor, bicycling, hiking, vicks, wrigley, ol...</td>\n",
" <td>2009-10-18 00:28:05</td>\n",
" <td>jjldickinson</td>\n",
" <td>67</td>\n",
" <td>2009-10-18 07:28:05</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>303</th>\n",
" <td>https://live.staticflickr.com/2638/4021788270_...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[harbor, bicycling, hiking, vicks, sunset, oly...</td>\n",
" <td>2009-10-18 00:23:05</td>\n",
" <td>jjldickinson</td>\n",
" <td>129</td>\n",
" <td>2009-10-18 07:23:05</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>304</th>\n",
" <td>https://live.staticflickr.com/3534/4021025959_...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>[harbor, bicycling, hiking, vickssunset, olymp...</td>\n",
" <td>2009-10-18 00:21:51</td>\n",
" <td>jjldickinson</td>\n",
" <td>127</td>\n",
" <td>2009-10-18 07:21:51</td>\n",
" <td>None</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>305 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" url latitude longitude \\\n",
"0 https://live.staticflickr.com/8480/29171773065... 0 0 \n",
"1 https://live.staticflickr.com/8502/29086547321... 0 0 \n",
"2 https://live.staticflickr.com/7503/29086537431... 0 0 \n",
"3 https://live.staticflickr.com/1591/26650233902... 0 0 \n",
"4 https://live.staticflickr.com/1609/26676969381... 0 0 \n",
".. ... ... ... \n",
"300 https://live.staticflickr.com/2748/4340176590_... 0 0 \n",
"301 https://live.staticflickr.com/2697/4340175034_... 0 0 \n",
"302 https://live.staticflickr.com/2500/4021034243_... 0 0 \n",
"303 https://live.staticflickr.com/2638/4021788270_... 0 0 \n",
"304 https://live.staticflickr.com/3534/4021025959_... 0 0 \n",
"\n",
" tags date taken \\\n",
"0 [appleiphone6plus, bikepath, lariotrail, bicyc... 2016-08-21 18:56:02 \n",
"1 [appleiphone6plus, bikepath, lariotrail, bicyc... 2016-08-21 18:56:02 \n",
"2 [appleiphone6plus, bikepath, lariotrail, bicyc... 2016-08-21 18:56:18 \n",
"3 [losangelesriver, lariver, river, friendsofthe... 2016-04-30 09:51:13 \n",
"4 [losangelesriver, lariver, river, friendsofthe... 2016-04-30 09:18:30 \n",
".. ... ... \n",
"300 [bicycling, losangeles, losangelesriver, lariv... 2009-08-02 22:43:37 \n",
"301 [motorolarazrv3m, bucephalus, cannondale, bicy... 2009-07-17 23:37:41 \n",
"302 [harbor, bicycling, hiking, vicks, wrigley, ol... 2009-10-18 00:28:05 \n",
"303 [harbor, bicycling, hiking, vicks, sunset, oly... 2009-10-18 00:23:05 \n",
"304 [harbor, bicycling, hiking, vickssunset, olymp... 2009-10-18 00:21:51 \n",
"\n",
" owner name views date uploaded description \n",
"0 jjldickinson 55 2016-08-23 05:23:44 None \n",
"1 jjldickinson 59 2016-08-22 21:15:55 None \n",
"2 jjldickinson 48 2016-08-22 21:15:33 None \n",
"3 jjldickinson 108 2016-05-01 06:24:31 None \n",
"4 jjldickinson 83 2016-05-01 06:22:45 None \n",
".. ... ... ... ... \n",
"300 jjldickinson 91 2010-02-08 06:24:57 None \n",
"301 jjldickinson 97 2010-02-08 06:24:07 None \n",
"302 jjldickinson 67 2009-10-18 07:28:05 None \n",
"303 jjldickinson 129 2009-10-18 07:23:05 None \n",
"304 jjldickinson 127 2009-10-18 07:21:51 None \n",
"\n",
"[305 rows x 9 columns]"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"db"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can write it out as a `csv`. Here we prefix the filename by the `tag` variable -- so if we look for other tags we'll get differetn csv's. "
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
"db.to_csv(tag+\".csv\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ok, we have the metadata in a spreadsheet. We now want to use the `get_images` script to download the images. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can use the Unix `ls` command to list files in our working directory. This will show our the `LARio_Trail.csv` file created by the script."
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[36mLARio\u001b[m\u001b[m \u001b[1m\u001b[36m__pycache__\u001b[m\u001b[m \u001b[1m\u001b[36mlariver\u001b[m\u001b[m\r\n",
"LARioTrail.csv flickr-api.ipynb lariver_sm.csv\r\n",
"LARio_Trail.csv \u001b[31mget_images.py\u001b[m\u001b[m\r\n",
"LARio_Trail_urls.csv \u001b[31mjvl_flickr_geturl.py\u001b[m\u001b[m\r\n"
]
}
],
"source": [
"!ls"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can examine the CSV file from within Jupyter Notebook by using a unix. "
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
",url,latitude,longitude,tags,date taken,owner name,views,date uploaded,description\r\n",
"0,https://live.staticflickr.com/8480/29171773065_0b2c8b0405_o.jpg,0,0,\"['appleiphone6plus', 'bikepath', 'lariotrail', 'bicycling', 'bicycle', 'bucephalus', 'cannondale', 'wrigley', 'longbeach']\",2016-08-21 18:56:02,jjldickinson,55,2016-08-23 05:23:44,\r\n",
"1,https://live.staticflickr.com/8502/29086547321_27ed358b80_o.jpg,0,0,\"['appleiphone6plus', 'bikepath', 'lariotrail', 'bicycling', 'bicycle', 'bucephalus', 'cannondale', 'wrigley', 'longbeach']\",2016-08-21 18:56:02,jjldickinson,59,2016-08-22 21:15:55,\r\n",
"2,https://live.staticflickr.com/7503/29086537431_f02473219c_o.jpg,0,0,\"['appleiphone6plus', 'bikepath', 'lariotrail', 'bicycling', 'bicycle', 'bucephalus', 'cannondale', 'wrigley', 'longbeach']\",2016-08-21 18:56:18,jjldickinson,48,2016-08-22 21:15:33,\r\n",
"3,https://live.staticflickr.com/1591/26650233902_2067bdb490_o.jpg,0,0,\"['losangelesriver', 'lariver', 'river', 'friendsofthelosangelesriver', 'folar', 'thegreatlosangelesrivercleanup', 'lagranlimpieza', 'nikond3300', '104d3300', 'nikon1855mmf3556gvriiafsdxnikkor', 'promaster52mmdigitalhdprotectionfilter', 'volunteer', 'water', 'vastindustrialconcretekafkaesquestructures', 'vicks', 'lariotrail', 'bicycling', 'bridge', 'willowstreetbridge', 'longbeach']\",2016-04-30 09:51:13,jjldickinson,108,2016-05-01 06:24:31,\r\n"
]
}
],
"source": [
"!head -n 5 LARio_Trail.csv"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Let's get photos from Flickr"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The `get_images.py` script expects a few things to work. It needs the `URL` column of the spreadsheet to iterate through and download the images. It also needs to have a csv filename with an underscore in it like so `LARio_Trail.csv`. This is because it splits that filename on the `_` and then creates a directory to put files in on the prefix `LARio`. It's designed based on the `tag` used in the script to get the photos from flickr. So, if you want to run the script again with a different `tag` the script will create a new directory by that new tag name. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can run the script. It will read the csv in and loop thru the rows, grabbing the second column (the url) adding it to a list. It then will create the directory and download the photos into that. "
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Starting download 1 of 305\n",
"Done downloading 1 of 305\n",
"Starting download 2 of 305\n",
"Done downloading 2 of 305\n",
"Starting download 3 of 305\n",
"Done downloading 3 of 305\n",
"Starting download 4 of 305\n",
"Done downloading 4 of 305\n",
"Starting download 5 of 305\n",
"Done downloading 5 of 305\n",
"Starting download 6 of 305\n",
"Done downloading 6 of 305\n",
"Starting download 7 of 305\n",
"Done downloading 7 of 305\n",
"Starting download 8 of 305\n",
"Done downloading 8 of 305\n",
"Starting download 9 of 305\n",
"Done downloading 9 of 305\n",
"Starting download 10 of 305\n",
"Done downloading 10 of 305\n",
"Starting download 11 of 305\n",
"Done downloading 11 of 305\n",
"Starting download 12 of 305\n",
"Done downloading 12 of 305\n",
"Starting download 13 of 305\n",
"Done downloading 13 of 305\n",
"Starting download 14 of 305\n",
"Done downloading 14 of 305\n",
"Starting download 15 of 305\n",
"Done downloading 15 of 305\n",
"Starting download 16 of 305\n",
"Done downloading 16 of 305\n",
"Starting download 17 of 305\n",
"Done downloading 17 of 305\n",
"Starting download 18 of 305\n",
"Done downloading 18 of 305\n",
"Starting download 19 of 305\n",
"Done downloading 19 of 305\n",
"Starting download 20 of 305\n",
"Done downloading 20 of 305\n",
"Starting download 21 of 305\n",
"Done downloading 21 of 305\n",
"Starting download 22 of 305\n",
"Done downloading 22 of 305\n",
"Starting download 23 of 305\n",
"Done downloading 23 of 305\n",
"Starting download 24 of 305\n",
"Done downloading 24 of 305\n",
"Starting download 25 of 305\n",
"Done downloading 25 of 305\n",
"Starting download 26 of 305\n",
"Done downloading 26 of 305\n",
"Starting download 27 of 305\n",
"Done downloading 27 of 305\n",
"Starting download 28 of 305\n",
"Done downloading 28 of 305\n",
"Starting download 29 of 305\n",
"Done downloading 29 of 305\n",
"Starting download 30 of 305\n",
"Done downloading 30 of 305\n",
"Starting download 31 of 305\n",
"Done downloading 31 of 305\n",
"Starting download 32 of 305\n",
"Done downloading 32 of 305\n",
"Starting download 33 of 305\n",
"Done downloading 33 of 305\n",
"Starting download 34 of 305\n",
"Done downloading 34 of 305\n",
"Starting download 35 of 305\n",
"Done downloading 35 of 305\n",
"Starting download 36 of 305\n",
"Done downloading 36 of 305\n",
"Starting download 37 of 305\n",
"Done downloading 37 of 305\n",
"Starting download 38 of 305\n",
"Done downloading 38 of 305\n",
"Starting download 39 of 305\n",
"Done downloading 39 of 305\n",
"Starting download 40 of 305\n",
"Done downloading 40 of 305\n",
"Starting download 41 of 305\n",
"Done downloading 41 of 305\n",
"Starting download 42 of 305\n",
"Done downloading 42 of 305\n",
"Starting download 43 of 305\n",
"Done downloading 43 of 305\n",
"Starting download 44 of 305\n",
"Done downloading 44 of 305\n",
"Starting download 45 of 305\n",
"Done downloading 45 of 305\n",
"Starting download 46 of 305\n",
"Done downloading 46 of 305\n",
"Starting download 47 of 305\n",
"Done downloading 47 of 305\n",
"Starting download 48 of 305\n",
"Done downloading 48 of 305\n",
"Starting download 49 of 305\n",
"Done downloading 49 of 305\n",
"Starting download 50 of 305\n",
"Done downloading 50 of 305\n",
"Starting download 51 of 305\n",
"Done downloading 51 of 305\n",
"Starting download 52 of 305\n",
"Done downloading 52 of 305\n",
"Starting download 53 of 305\n",
"Done downloading 53 of 305\n",
"Starting download 54 of 305\n",
"Done downloading 54 of 305\n",
"Starting download 55 of 305\n",
"Done downloading 55 of 305\n",
"Starting download 56 of 305\n",
"Done downloading 56 of 305\n",
"Starting download 57 of 305\n",
"Done downloading 57 of 305\n",
"Starting download 58 of 305\n",
"Done downloading 58 of 305\n",
"Starting download 59 of 305\n",
"Done downloading 59 of 305\n",
"Starting download 60 of 305\n",
"Done downloading 60 of 305\n",
"Starting download 61 of 305\n",
"Done downloading 61 of 305\n",
"Starting download 62 of 305\n",
"Done downloading 62 of 305\n",
"Starting download 63 of 305\n",
"Done downloading 63 of 305\n",
"Starting download 64 of 305\n",
"Done downloading 64 of 305\n",
"Starting download 65 of 305\n",
"Done downloading 65 of 305\n",
"Starting download 66 of 305\n",
"Done downloading 66 of 305\n",
"Starting download 67 of 305\n",
"Done downloading 67 of 305\n",
"Starting download 68 of 305\n",
"Done downloading 68 of 305\n",
"Starting download 69 of 305\n",
"Done downloading 69 of 305\n",
"Starting download 70 of 305\n",
"Done downloading 70 of 305\n",
"Starting download 71 of 305\n",
"Done downloading 71 of 305\n",
"Starting download 72 of 305\n",
"Done downloading 72 of 305\n",
"Starting download 73 of 305\n",
"Done downloading 73 of 305\n",
"Starting download 74 of 305\n",
"Done downloading 74 of 305\n",
"Starting download 75 of 305\n",
"Done downloading 75 of 305\n",
"Starting download 76 of 305\n",
"Done downloading 76 of 305\n",
"Starting download 77 of 305\n",
"Done downloading 77 of 305\n",
"Starting download 78 of 305\n",
"Done downloading 78 of 305\n",
"Starting download 79 of 305\n",
"Done downloading 79 of 305\n",
"Starting download 80 of 305\n",
"Done downloading 80 of 305\n",
"Starting download 81 of 305\n",
"Done downloading 81 of 305\n",
"Starting download 82 of 305\n",
"Done downloading 82 of 305\n",
"Starting download 83 of 305\n",
"Done downloading 83 of 305\n",
"Starting download 84 of 305\n",
"Done downloading 84 of 305\n",
"Starting download 85 of 305\n",
"Done downloading 85 of 305\n",
"Starting download 86 of 305\n",
"Done downloading 86 of 305\n",
"Starting download 87 of 305\n",
"Done downloading 87 of 305\n",
"Starting download 88 of 305\n",
"Done downloading 88 of 305\n",
"Starting download 89 of 305\n",
"Done downloading 89 of 305\n",
"Starting download 90 of 305\n",
"Done downloading 90 of 305\n",
"Starting download 91 of 305\n",
"Done downloading 91 of 305\n",
"Starting download 92 of 305\n",
"Done downloading 92 of 305\n",
"Starting download 93 of 305\n",
"Done downloading 93 of 305\n",
"Starting download 94 of 305\n",
"Done downloading 94 of 305\n",
"Starting download 95 of 305\n",
"Done downloading 95 of 305\n",
"Starting download 96 of 305\n",
"Done downloading 96 of 305\n",
"Starting download 97 of 305\n",
"Done downloading 97 of 305\n",
"Starting download 98 of 305\n",
"Done downloading 98 of 305\n",
"Starting download 99 of 305\n",
"Done downloading 99 of 305\n",
"Starting download 100 of 305\n",
"Done downloading 100 of 305\n",
"Starting download 101 of 305\n",
"Done downloading 101 of 305\n",
"Starting download 102 of 305\n",
"Done downloading 102 of 305\n",
"Starting download 103 of 305\n",
"Done downloading 103 of 305\n",
"Starting download 104 of 305\n",
"Done downloading 104 of 305\n",
"Starting download 105 of 305\n",
"Done downloading 105 of 305\n",
"Starting download 106 of 305\n",
"Done downloading 106 of 305\n",
"Starting download 107 of 305\n",
"Done downloading 107 of 305\n",
"Starting download 108 of 305\n",
"Done downloading 108 of 305\n",
"Starting download 109 of 305\n",
"Done downloading 109 of 305\n",
"Starting download 110 of 305\n",
"Done downloading 110 of 305\n",
"Starting download 111 of 305\n",
"Done downloading 111 of 305\n",
"Starting download 112 of 305\n",
"Done downloading 112 of 305\n",
"Starting download 113 of 305\n",
"Done downloading 113 of 305\n",
"Starting download 114 of 305\n",
"Done downloading 114 of 305\n",
"Starting download 115 of 305\n",
"Done downloading 115 of 305\n",
"Starting download 116 of 305\n",
"Done downloading 116 of 305\n",
"Starting download 117 of 305\n",
"Done downloading 117 of 305\n",
"Starting download 118 of 305\n",
"Done downloading 118 of 305\n",
"Starting download 119 of 305\n",
"Done downloading 119 of 305\n",
"Starting download 120 of 305\n",
"Done downloading 120 of 305\n",
"Starting download 121 of 305\n",
"Done downloading 121 of 305\n",
"Starting download 122 of 305\n",
"Done downloading 122 of 305\n",
"Starting download 123 of 305\n",
"Done downloading 123 of 305\n",
"Starting download 124 of 305\n",
"Done downloading 124 of 305\n",
"Starting download 125 of 305\n",
"Done downloading 125 of 305\n",
"Starting download 126 of 305\n",
"Done downloading 126 of 305\n",
"Starting download 127 of 305\n",
"Done downloading 127 of 305\n",
"Starting download 128 of 305\n",
"Done downloading 128 of 305\n",
"Starting download 129 of 305\n",
"Done downloading 129 of 305\n",
"Starting download 130 of 305\n",
"Done downloading 130 of 305\n",
"Starting download 131 of 305\n",
"Done downloading 131 of 305\n",
"Starting download 132 of 305\n",
"Done downloading 132 of 305\n",
"Starting download 133 of 305\n",
"Done downloading 133 of 305\n",
"Starting download 134 of 305\n",
"Done downloading 134 of 305\n",
"Starting download 135 of 305\n",
"Done downloading 135 of 305\n",
"Starting download 136 of 305\n",
"Done downloading 136 of 305\n",
"Starting download 137 of 305\n",
"Done downloading 137 of 305\n",
"Starting download 138 of 305\n",
"Done downloading 138 of 305\n",
"Starting download 139 of 305\n",
"Done downloading 139 of 305\n",
"Starting download 140 of 305\n",
"Done downloading 140 of 305\n",
"Starting download 141 of 305\n",
"Done downloading 141 of 305\n",
"Starting download 142 of 305\n",
"Done downloading 142 of 305\n",
"Starting download 143 of 305\n",
"Done downloading 143 of 305\n",
"Starting download 144 of 305\n",
"Done downloading 144 of 305\n",
"Starting download 145 of 305\n",
"Done downloading 145 of 305\n",
"Starting download 146 of 305\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Done downloading 146 of 305\n",
"Starting download 147 of 305\n",
"Done downloading 147 of 305\n",
"Starting download 148 of 305\n",
"Done downloading 148 of 305\n",
"Starting download 149 of 305\n",
"Done downloading 149 of 305\n",
"Starting download 150 of 305\n",
"Done downloading 150 of 305\n",
"Starting download 151 of 305\n",
"Done downloading 151 of 305\n",
"Starting download 152 of 305\n",
"Done downloading 152 of 305\n",
"Starting download 153 of 305\n",
"Done downloading 153 of 305\n",
"Starting download 154 of 305\n",
"Done downloading 154 of 305\n",
"Starting download 155 of 305\n",
"Done downloading 155 of 305\n",
"Starting download 156 of 305\n",
"Done downloading 156 of 305\n",
"Starting download 157 of 305\n",
"Done downloading 157 of 305\n",
"Starting download 158 of 305\n",
"Done downloading 158 of 305\n",
"Starting download 159 of 305\n",
"Done downloading 159 of 305\n",
"Starting download 160 of 305\n",
"Done downloading 160 of 305\n",
"Starting download 161 of 305\n",
"Done downloading 161 of 305\n",
"Starting download 162 of 305\n",
"Done downloading 162 of 305\n",
"Starting download 163 of 305\n",
"Done downloading 163 of 305\n",
"Starting download 164 of 305\n",
"Done downloading 164 of 305\n",
"Starting download 165 of 305\n",
"Done downloading 165 of 305\n",
"Starting download 166 of 305\n",
"Done downloading 166 of 305\n",
"Starting download 167 of 305\n",
"Done downloading 167 of 305\n",
"Starting download 168 of 305\n",
"Done downloading 168 of 305\n",
"Starting download 169 of 305\n",
"Done downloading 169 of 305\n",
"Starting download 170 of 305\n",
"Done downloading 170 of 305\n",
"Starting download 171 of 305\n",
"Done downloading 171 of 305\n",
"Starting download 172 of 305\n",
"Done downloading 172 of 305\n",
"Starting download 173 of 305\n",
"Done downloading 173 of 305\n",
"Starting download 174 of 305\n",
"Done downloading 174 of 305\n",
"Starting download 175 of 305\n",
"Done downloading 175 of 305\n",
"Starting download 176 of 305\n",
"Done downloading 176 of 305\n",
"Starting download 177 of 305\n",
"Done downloading 177 of 305\n",
"Starting download 178 of 305\n",
"Done downloading 178 of 305\n",
"Starting download 179 of 305\n",
"Done downloading 179 of 305\n",
"Starting download 180 of 305\n",
"Done downloading 180 of 305\n",
"Starting download 181 of 305\n",
"Done downloading 181 of 305\n",
"Starting download 182 of 305\n",
"Done downloading 182 of 305\n",
"Starting download 183 of 305\n",
"Done downloading 183 of 305\n",
"Starting download 184 of 305\n",
"Done downloading 184 of 305\n",
"Starting download 185 of 305\n",
"Done downloading 185 of 305\n",
"Starting download 186 of 305\n",
"Done downloading 186 of 305\n",
"Starting download 187 of 305\n",
"Done downloading 187 of 305\n",
"Starting download 188 of 305\n",
"Done downloading 188 of 305\n",
"Starting download 189 of 305\n",
"Done downloading 189 of 305\n",
"Starting download 190 of 305\n",
"Done downloading 190 of 305\n",
"Starting download 191 of 305\n",
"Done downloading 191 of 305\n",
"Starting download 192 of 305\n",
"Done downloading 192 of 305\n",
"Starting download 193 of 305\n",
"Done downloading 193 of 305\n",
"Starting download 194 of 305\n",
"Done downloading 194 of 305\n",
"Starting download 195 of 305\n",
"Done downloading 195 of 305\n",
"Starting download 196 of 305\n",
"Done downloading 196 of 305\n",
"Starting download 197 of 305\n",
"Done downloading 197 of 305\n",
"Starting download 198 of 305\n",
"Done downloading 198 of 305\n",
"Starting download 199 of 305\n",
"Done downloading 199 of 305\n",
"Starting download 200 of 305\n",
"Done downloading 200 of 305\n",
"Starting download 201 of 305\n",
"Done downloading 201 of 305\n",
"Starting download 202 of 305\n",
"Done downloading 202 of 305\n",
"Starting download 203 of 305\n",
"Done downloading 203 of 305\n",
"Starting download 204 of 305\n",
"Done downloading 204 of 305\n",
"Starting download 205 of 305\n",
"Done downloading 205 of 305\n",
"Starting download 206 of 305\n",
"Done downloading 206 of 305\n",
"Starting download 207 of 305\n",
"Done downloading 207 of 305\n",
"Starting download 208 of 305\n",
"Done downloading 208 of 305\n",
"Starting download 209 of 305\n",
"Done downloading 209 of 305\n",
"Starting download 210 of 305\n",
"Done downloading 210 of 305\n",
"Starting download 211 of 305\n",
"Done downloading 211 of 305\n",
"Starting download 212 of 305\n",
"Done downloading 212 of 305\n",
"Starting download 213 of 305\n",
"Done downloading 213 of 305\n",
"Starting download 214 of 305\n",
"Done downloading 214 of 305\n",
"Starting download 215 of 305\n",
"Done downloading 215 of 305\n",
"Starting download 216 of 305\n",
"Done downloading 216 of 305\n",
"Starting download 217 of 305\n",
"Done downloading 217 of 305\n",
"Starting download 218 of 305\n",
"Done downloading 218 of 305\n",
"Starting download 219 of 305\n",
"Done downloading 219 of 305\n",
"Starting download 220 of 305\n",
"Done downloading 220 of 305\n",
"Starting download 221 of 305\n",
"Done downloading 221 of 305\n",
"Starting download 222 of 305\n",
"Done downloading 222 of 305\n",
"Starting download 223 of 305\n",
"Done downloading 223 of 305\n",
"Starting download 224 of 305\n",
"Done downloading 224 of 305\n",
"Starting download 225 of 305\n",
"Done downloading 225 of 305\n",
"Starting download 226 of 305\n",
"Done downloading 226 of 305\n",
"Starting download 227 of 305\n",
"Done downloading 227 of 305\n",
"Starting download 228 of 305\n",
"Done downloading 228 of 305\n",
"Starting download 229 of 305\n",
"Done downloading 229 of 305\n",
"Starting download 230 of 305\n",
"Done downloading 230 of 305\n",
"Starting download 231 of 305\n",
"Done downloading 231 of 305\n",
"Starting download 232 of 305\n",
"Done downloading 232 of 305\n",
"Starting download 233 of 305\n",
"Done downloading 233 of 305\n",
"Starting download 234 of 305\n",
"Done downloading 234 of 305\n",
"Starting download 235 of 305\n",
"Done downloading 235 of 305\n",
"Starting download 236 of 305\n",
"Done downloading 236 of 305\n",
"Starting download 237 of 305\n",
"Done downloading 237 of 305\n",
"Starting download 238 of 305\n",
"Done downloading 238 of 305\n",
"Starting download 239 of 305\n",
"Done downloading 239 of 305\n",
"Starting download 240 of 305\n",
"Done downloading 240 of 305\n",
"Starting download 241 of 305\n",
"Done downloading 241 of 305\n",
"Starting download 242 of 305\n",
"Done downloading 242 of 305\n",
"Starting download 243 of 305\n",
"Done downloading 243 of 305\n",
"Starting download 244 of 305\n",
"Done downloading 244 of 305\n",
"Starting download 245 of 305\n",
"Done downloading 245 of 305\n",
"Starting download 246 of 305\n",
"Done downloading 246 of 305\n",
"Starting download 247 of 305\n",
"Done downloading 247 of 305\n",
"Starting download 248 of 305\n",
"Done downloading 248 of 305\n",
"Starting download 249 of 305\n",
"Done downloading 249 of 305\n",
"Starting download 250 of 305\n",
"Done downloading 250 of 305\n",
"Starting download 251 of 305\n",
"Done downloading 251 of 305\n",
"Starting download 252 of 305\n",
"Done downloading 252 of 305\n",
"Starting download 253 of 305\n",
"Done downloading 253 of 305\n",
"Starting download 254 of 305\n",
"Done downloading 254 of 305\n",
"Starting download 255 of 305\n",
"Done downloading 255 of 305\n",
"Starting download 256 of 305\n",
"Done downloading 256 of 305\n",
"Starting download 257 of 305\n",
"Done downloading 257 of 305\n",
"Starting download 258 of 305\n",
"Done downloading 258 of 305\n",
"Starting download 259 of 305\n",
"Done downloading 259 of 305\n",
"Starting download 260 of 305\n",
"Done downloading 260 of 305\n",
"Starting download 261 of 305\n",
"Done downloading 261 of 305\n",
"Starting download 262 of 305\n",
"Done downloading 262 of 305\n",
"Starting download 263 of 305\n",
"Done downloading 263 of 305\n",
"Starting download 264 of 305\n",
"Done downloading 264 of 305\n",
"Starting download 265 of 305\n",
"Done downloading 265 of 305\n",
"Starting download 266 of 305\n",
"Done downloading 266 of 305\n",
"Starting download 267 of 305\n",
"Done downloading 267 of 305\n",
"Starting download 268 of 305\n",
"Done downloading 268 of 305\n",
"Starting download 269 of 305\n",
"Done downloading 269 of 305\n",
"Starting download 270 of 305\n",
"Done downloading 270 of 305\n",
"Starting download 271 of 305\n",
"Done downloading 271 of 305\n",
"Starting download 272 of 305\n",
"Done downloading 272 of 305\n",
"Starting download 273 of 305\n",
"Done downloading 273 of 305\n",
"Starting download 274 of 305\n",
"Done downloading 274 of 305\n",
"Starting download 275 of 305\n",
"Done downloading 275 of 305\n",
"Starting download 276 of 305\n",
"Done downloading 276 of 305\n",
"Starting download 277 of 305\n",
"Done downloading 277 of 305\n",
"Starting download 278 of 305\n",
"Done downloading 278 of 305\n",
"Starting download 279 of 305\n",
"Done downloading 279 of 305\n",
"Starting download 280 of 305\n",
"Done downloading 280 of 305\n",
"Starting download 281 of 305\n",
"Done downloading 281 of 305\n",
"Starting download 282 of 305\n",
"Done downloading 282 of 305\n",
"Starting download 283 of 305\n",
"Done downloading 283 of 305\n",
"Starting download 284 of 305\n",
"Done downloading 284 of 305\n",
"Starting download 285 of 305\n",
"Done downloading 285 of 305\n",
"Starting download 286 of 305\n",
"Done downloading 286 of 305\n",
"Starting download 287 of 305\n",
"Done downloading 287 of 305\n",
"Starting download 288 of 305\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Done downloading 288 of 305\n",
"Starting download 289 of 305\n",
"Done downloading 289 of 305\n",
"Starting download 290 of 305\n",
"Done downloading 290 of 305\n",
"Starting download 291 of 305\n",
"Done downloading 291 of 305\n",
"Starting download 292 of 305\n",
"Done downloading 292 of 305\n",
"Starting download 293 of 305\n",
"Done downloading 293 of 305\n",
"Starting download 294 of 305\n",
"Done downloading 294 of 305\n",
"Starting download 295 of 305\n",
"Done downloading 295 of 305\n",
"Starting download 296 of 305\n",
"Done downloading 296 of 305\n",
"Starting download 297 of 305\n",
"Done downloading 297 of 305\n",
"Starting download 298 of 305\n",
"Done downloading 298 of 305\n",
"Starting download 299 of 305\n",
"Done downloading 299 of 305\n",
"Starting download 300 of 305\n",
"Done downloading 300 of 305\n",
"Starting download 301 of 305\n",
"Done downloading 301 of 305\n",
"Starting download 302 of 305\n",
"Done downloading 302 of 305\n",
"Starting download 303 of 305\n",
"Done downloading 303 of 305\n",
"Starting download 304 of 305\n",
"Done downloading 304 of 305\n",
"Starting download 305 of 305\n",
"Done downloading 305 of 305\n",
"Done with download, job took 383.42381381988525 seconds\n"
]
}
],
"source": [
"get_images.put_images('LARio_Trail.csv')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment