Editing Community Data Science Course (Spring 2023)/Week 4 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 61: | Line 61: | ||
** <code>import requests</code> | ** <code>import requests</code> | ||
** <code>response = requests.get(URL, params={})</code> | ** <code>response = requests.get(URL, params={})</code> | ||
** <code>print(response.status_code)</code> | ** <code>print(response.status_code)</code> | ||
** <code>data = response.json()</code>; now we can check type and poke around in it | ** <code>data = response.json()</code>; now we can check type and poke around in it Β | ||
* e.g., lets work through a quick example | * e.g., lets work through a quick example | ||
** Let's put it into a Python program to print out one activity for 1 through 5 people! | ** Let's put it into a Python program to print out one activity for 1 through 5 people! |