Community Data Science Workshops (Spring 2014)/Saturday May 3rd lecture: Difference between revisions
Content added Content deleted
imported>Mako No edit summary |
imported>Mako No edit summary |
||
Line 14: | Line 14: | ||
#* example python program |
#* example python program |
||
# New programming concepts: |
# New programming concepts: |
||
⚫ | |||
#* join a string together |
|||
⚫ | |||
#* urllib2 and urlopen |
#* urllib2 and urlopen |
||
⚫ | |||
# JSON file (JavaScript Object Notation) |
#* JSON file (JavaScript Object Notation) |
||
#* what is json |
|||
#* |
#** what is json |
||
#** import json; json.loads() |
|||
#* like Python (except no single quotes) |
#** like Python (except no single quotes) |
||
#* simple lists, dictionaries |
#** simple lists, dictionaries |
||
#* can reflect more complicated data structures |
#** can reflect more complicated data structures |
||
#* Example file at http://mako.cc/cdsw.json |
#* Example file at http://mako.cc/cdsw.json |
||
⚫ | |||
# [http://placekitten.com/ placekitten.com] |
# [http://placekitten.com/ placekitten.com] |
||
#* API that takes specially crafted URLs and gives appropriately sized picture of kittens |
#* API that takes specially crafted URLs and gives appropriately sized picture of kittens |