Editing Community Data Science Course (Spring 2015)/Day 4 Lecture
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
;Outline: | ;Outline: | ||
* What did we learn in Session 1? | |||
* What is an API? | * What is an API? | ||
* How do we use one to fetch interesting datasets? | * How do we use one to fetch interesting datasets? | ||
Line 48: | Line 49: | ||
* the ability to save to files | * the ability to save to files | ||
* the ability to understand (i.e., parse) JSON data that APIs usually give us | * the ability to understand (i.e., parse) JSON data that APIs usually give us | ||
; Session 1 review | |||
* Navigating in the terminal and using it to run programs | |||
* Writing Python: | |||
** using variables to manipulate data | |||
** types of data: strings, integers, lists, dictionaries | |||
** if statements | |||
** for loops | |||
** printing | |||
** importing modules, so you can use code other people have written for you! | |||
Line 55: | Line 68: | ||
* requests | * requests | ||
* open files and write to them | * open files and write to them | ||
* parsing a string (turning the string into a data structure we can manipulate) | |||
Line 76: | Line 90: | ||
* 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: [http://mako.cc/teaching/2014/cdsw-autumn/parse_cdswjson.py parse_cdswjson.py] | ||
; Using other APIs | ; Using other APIs |