Community Data Science Workshops (Spring 2014)/Saturday May 3rd lecture: Difference between revisions
Content added Content deleted
imported>Mako |
imported>Mako No edit summary |
||
Line 6: | Line 6: | ||
#** way to ask for data (almost always a URL) |
#** way to ask for data (almost always a URL) |
||
#** way to get data back (almost always in a format called JSON) |
#** way to get data back (almost always in a format called JSON) |
||
#** every API is different, and documented |
|||
#* to use APIs to build a dataset we will need: |
#* to use APIs to build a dataset we will need: |
||
#** all our tools from last session: variables, etc |
#** all our tools from last session: variables, etc |
||
Line 27: | Line 28: | ||
#* 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 |
||
#* example of placekitten in browser |
#* example of placekitten in browser |
||
#** visit the API documentation |
|||
#** kittens of different sizes |
#** kittens of different sizes |
||
#** kittens in greyscale or color |
#** kittens in greyscale or color |
||
Line 38: | Line 40: | ||
#* 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 |
||
#* |
#* download it and parse it |
||
# Wikipedia API |
# Wikipedia API |
||
#* explain MediaWiki, exists on other wikis |
#* explain MediaWiki, exists on other wikis |