Editing Community Data Science Course (Spring 2023)/Week 3 lecture notes
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 13: | Line 13: | ||
* For example: once you log into Reddit, you can get all posts about almost anything ([https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id Twitter API Docs]) | * For example: once you log into Reddit, you can get all posts about almost anything ([https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id Twitter API Docs]) | ||
==Programming lecture | ==Programming lecture== | ||
* Dictionaries! | * Dictionaries! | ||
Line 32: | Line 32: | ||
** ''Note:'' These can be useful in combination to if statements and can also be super useful for debugging! | ** ''Note:'' These can be useful in combination to if statements and can also be super useful for debugging! | ||
* Writing to files: | * Writing to files: | ||
** Using the | ** Using the open() function | ||
** Using the | ** Using the with statement | ||
** Writing to a file with | ** Writing to a file with print(file=my_file) | ||
** Writing a tab-separated value file using "\t" (make sure we leave a header!) | ** Writing a tab-separated value file using "\t" (make sure we leave a header!) | ||
** Now lets open it up and make a little graph | ** Now lets open it up and make a little graph | ||
Line 41: | Line 41: | ||
** Looking at StackOverflow | ** Looking at StackOverflow | ||
** Walking through the Python API documentation | ** Walking through the Python API documentation | ||
** Using a | ** Using a referece card or cheatsheet | ||
== Resources and Example Code == | == Resources and Example Code == |