How to Read Data from APIs with Python
Zenva
ACCESS the FULL COURSE here: https://academy.zenva.com/product/data-science-mini-degree/?zva_src=youtube-datascience-md
TRANSCRIPT
Hello everyone and welcome to our course on an Into to Reading from APIs. My name is Nimish and I'll be guiding you through the next hour to an hour and and half in which we'll be learning how to read JSON and XML data in Python. So what topics will we be covering in this course? We'll first of all start with a few slides that will provide an intro to APIs, JSON, and XML. It's important understand the differences between JSON and XML data and exactly what APIs are and how they work before we begin using them. After this, we'll learn how to make URL requests to retrieve some data. Then we'll learn how to retrieve JSON data specifically. We'll learn how to parse that JSON data. So that means basically taking the JSON data and converting it into variables which we can use in our programs.
And finally, we'll explore how to write that JSON data to a CSV or a comma separated value sheet. We can think of that as being kind of like a spreadsheet and it's a very common way to store the data that you're retrieving. After this, we'll basically be following the same steps but with XML data, instead. First working on retrieving the XML data, then parsing out the XML data into the variables, et cetera. Finally, working on writing that XML data to a CSV. And then we'll finish up by taking a look at how to read XML and JSON data from a local file. The difference between this final section and the previous sections, will be that we'll start by reading data from a URL. So basically, we download the data and then parse it all at once versus having pre-downloaded an XML or a JSON data file and then reading it from that. Otherwise, the whole process of parsing and writing data to a CSV is exactly the same regardless of whether we download or we already have the files on our local machine. So, let's get started. As always, thanks very much for signing up for these courses. We really do appreciate the support and I hope that you enjoy them, or at the very least can learn something from them. So, let's get started learning about APIs, JSON, and XML. ... https://www.youtube.com/watch?v=nzlsNwX0Z0k
3841576 Bytes