So we're going to put to test what we have learned so far about lists how to iterate through and display
things or display data into list or table views as they're called in UI kit.
So this is what we the new building.
It's what I call quakes app.
So what this app does is goes and fetches a Jason API remotely somewhere else in the web.
And then we display all this information inside of a list.
So there's quite a few earthquakes that we are getting but you can see the user interface is very simple.
It's a list and we have here a circle that contains a number.
Now this is what a magnitude is which is the unit that is used to measure how severe a certain earthquake
was or not.
OK.
So two point nine is not too bad.
And I think the maximum is about seven point zero which is catastrophic.
But you can see here we have one of five that zeros for a click.
It goes ahead and shows in a map exactly where this quake happened.
So in this case here it happened in Indonesia.
It tells us that we have a view.
First of all we have a map of view showing it very nice and we have in our rotation a marker there.
So if you click and this marker notices gets bigger NSA is in a very small font magnitude 5.
But we actually have the same information that top here for each item four for each quake that we click
on.
So this 1 6 5 0 in the information where this happened.
Right.
So go back there pick this one in Japan.
Gonna go and fetch the map in Japan Japan.
You can actually move it as you can see here very nicely and you can click it's hard to see but you
can see there is magnitude magnitude four point seven.
And there's information right there OK.
So keep going back.
We can go ahead and pick the first one again.
I think that's going to be the same one but in a different area.
As you can see so this data is pretty recent.
We're getting this information from the USGS Earthquake USGS at golf.
So this is the Web site a government Web site in United States that has a lot of information about the
earthquake.
So how do we get there.
So if you go to earthquake that U.S. USGS and gov.
Earthquakes and then you have these interfaces Web site here there's a lot of information you can look
but what are you interested in is the data and products so click here.
It's going to take you to this other page here where has real time earthquakes.
Let's go ahead and click this one and see what happens.
He's got all of this information but what we really want to go back is to go to Web services because
a web server allows us to tap into it and get information from their databases.
So click that and that we have here web API eyes.
That's what we need.
So earthquakes.
That's what we want.
There's also another API about geo service geo server.
There's other API is here for geo serve us hazard.
Let's click on the U.S. has or see.
So U.S. hazard here it will give you all this information about the conditions in the regions where
those conditions bad conditions are happening.
All right.
So you can explore all of these different other API.
But what is interesting in the earthquakes it says here earthquakes and real time and catalog.
If you click there we'll take you here and you can see exactly how to use the earthquake in this page
here we'll give you the information that you need to understand how to get the data that you want.
So ultimately I have another tab here.
Ultimately what we need is to get information this information about earthquakes.
OK.
So let's go back here so I can show exactly together.
Once you get there says Please note that automated application to use real time Jason feeds which is
exactly what you want.
Click there and there you go.
This page here gives it another description of this Jason geo Jason and everything but what are we.
You can go ahead and read all this information.
But most importantly it gives us the output of our Jason.
Essentially it's this.
OK.
So it gives us exactly what we expecting a dictionary which all these fields and they're all their types.
All right.
So to do right here there is our feed tab so we have the past hour or so every updated every minute.
So if we go to click here 4.5 or over.
Notice that there is this one in Indonesia.
In fact probably that's the one I just showed you.
It is indeed of 4.5 magnitude.
This has the time which the time when that occurred.
So this time is what we call the UNIX timestamp.
We'll talk about that later.
OK.
We'll have to convert that to a time or a data that we can't actually read and it makes sense and there's
a lot of information here that we can actually get.
But we're interested in the magnitude.
Place the time and maybe the updated time and also the type or also the title but also we're interested
in the coordinates.
So these are the coordinates that we need to actually point on the map where this occurred.
OK.
So this is what we're gonna be using.
Let's go back here.
So depending on what do you want to get you can get the magnitude for that plus every hour per say as
you see there and it's updated every minute.
If you go to at least less than four point four you notice now we have more earthquakes right.
Thank goodness and that just means that earthquakes are happening as not as bad as four or five or seven
even.
OK.
So depending on what you want to do you can go and fetch whichever frequency you want and go back down
here.
You can go and get all earthquakes.
Obviously is going to go getting all earthquakes that have happened in the past hour or so.
OK.
If you want to get the past information you can also go past day past seven days or past 30 days and
so forth.
But what I kind of like this is my preference at this point can change if you need to do so.
I like to get this past hour and this 2.5 OK which is exactly I think is exactly what I have here on
this other side here.
I had this one open here so that I can show you later.
But it's the same thing.
OK nice if you refresh this you will notice that all the information is there.
So every minute this has been refreshed and is showing.
So this API is what is being fetched to populate our application here with all these data.
And you can see here we have the time like I told you.
This is the feel that we're getting the time from and we converting it into something that you can read.
OK all right.
So let's go ahead and get started.