ACCESS the FULL COURSE here: https://academy.zenva.com/product/data-science-mini-degree/?zva_src=youtube-datascience-md
Hello everyone, and welcome to our tutorial on API's, JSON, and XML. Here we're going to bundle three topics into one, and we're basically just gonna show you a series of slides, parade some information about these three topics, and we'll take a look at a couple of examples of JSON, and XML data as well. So, for starters, what is an API? And API stands for an Application Programming Interface, and it's kind of a way to connect an application to a database. We can think about an API as being a bit like a messenger that communicates with the application on the database, and runs data back and forth. So we can use this to upload data to a database, or retrieve data from a database, or maybe do some modifications as well. So the way in which we use APIs typically starts by specifying what kind of data we want with a URL. We use this to request data. So within a URL, we will put the parameters that we want, and we'll use these parameters as a series of filters. For example, let's say we're retrieving stock data. Maybe we'll want a start and an end date, we'll obviously want the stock we're retrieving data from, we'll want maybe a limit, so maybe we want the previous ten days, or the previous 20 days, or something like that. Perhaps the type of data that we want back, do we want XML data, or do we want JSON data? And very often with most of the API's I've used actually, I've had to create an account in there, some kind of a key that's associated with that. We'll be using a dataset that doesn't need a key, because it's gonna be open source, and that'll be easier for everyone. So, once we specify what kind of data want with a URL, again, it's just kind of a series of filters. Then, we make a data request, we retrieve that data, and once we have that dataset, we parse it. Now the way in which we parse it depends on whether we have XML or JSON data.
Okay, before we launch into examples, let's quickly talk about XML, so we can compare the two. XML stands for extensible markup language. Note how XML is very similar to HTML, HTML is hyper text markup language. And that's because the format of XML is actually very, very similar to HTML. So another way to store and transport data, but whereas HTML focuses a lot more on style and how to display data on your page, XML is not doing any of that. It's not doing any displaying, it's not running anything, it's basically just there to hold data. Okay, so we actually are not restricted to the tags like we have in HTML, such as divs or paragraphs or headers, stuff like that. With XML, we create custom tags, so we can put whatever information we want within an XML tag header, and then of course, we'll have the actual text.