Halaal, before we go into the session, let's have a quick recap of what we have done in this project.
So in the very first session, we have prepared our data so that, again, we will analyze our data
and find some friends, find some meaningful insight.
And again, we will be such a machine learning model that can predict whether a particular booking is
going to cancel or not.
So we have to build such a model.
But before building a model, you have to understand your data.
And the best way to understand the data is by performing your last analysis on your data.
So here in the previous session, we have performed lots of preparation, our data by just creating
this filter.
So in this session, what we have to do, we have to analyze our data very first.
We have to understand our data.
So the very first problem statement is where do the guests come from?
The very first formal statement, you have to understand your guest.
You have to understand where users from which location they are coming.
So this is exactly the very first problem statement.
So let me say, whenever you are going to perform your spatial analysis, so what exactly is spatial
analysis?
So spatial analysis is all about whenever you are going to visualize the data on some map so that you
will get a clear cut yapped from which which location your guests are coming.
So let me perform spatial analysis over there.
But before performing it, I need some data so that I can easily perform.
That is patient analysis.
So very first for I'm going to do it here.
Here I'm going to say data off here.
I have a feature which is underscore canceled.
And here I'm going to say it is equally close to zero because I just need that data that are my valid
bookings.
And wherever this is cancellation, it goes to zero.
So this is exactly the invalid booking.
So I have to just pass this filter in so that I will get my filter data frame.
And on this filter data frame, I have to access my country.
So I'm just going to access my country.
And on this, if I'm going to call this value on a school counselor, dear, now you will get some idea
from which, which country, who users are coming.
You will see your Portugal and some European countries.
But let's say I just need a clear cut.
I just need to visualize this data on some map.
So let me very first convert all this stuff into some data frames.
I'm just going to say just gonna reset an index and I'll get executed.
And this is your amazing data frame that you have to consider.
So let me name this data frame.
Let's say country score lies, underscore data and just execute it.
And if I'm going to print it, you can just print it using this country on a scale and data and let's
say I have to modify my column name.
So I'm going to say this DOT columns, let me assign my own column name to the very first column name
and exactly my country.
And second column name is exactly my number of guest.
And once I have all this stuff, so what I have to do, I have to simply print my data and exit.
Now you will figure out this is exactly the data set.
This is exactly that data frame that you have to consider, especially for this problem statement.
Where do the guest come from?
So now what you need, you need some external modules so that you can visualize.
So basically you need a library, which is exactly my volume.
So if you happen to start earlier, you guys can simply install using PIP, install FOLIA.
So just execute this.
Come on and your liberi get successfully executed.
Now what I have to do so from this forelimb library, I have something Jusu so I'm just going to say
don't plug ins, just press tab over here and you will figure out this is exactly the module.
So from this I have to import something known as heat map.
So it just execute it.
Now, if using this volume, if I am going to call my map over there, which is exactly inbuilt function
inside this volume, now you will figure out this is my global map.
So the top of this base map, you can dump it as base maps on top of this base map.
I have to visualize my map or I guess I had realize my visual depending upon what type of visual this
data will me.
So let's say this is exactly my basement.
So I'm going to say this is exactly my base map and let me just execute it.
Now, what you have to do, we have to import very basic stuff.
You have to import your.
So if you haven't installed plotless to install using this pipe installed properly, and if you guys
don't know what exactly, the Pratley subplot laser advanced level data will liability that is extensively
used for deployment level results.
So let's say I'm just going to say import tautly, DOT Xpress and I have to create its Elías as, let's
say oops and just execute it.
Now, using this because I have something known as code of that map.
And if you will pass to or you will figure out all your custom parameters.
So then you have to perform this spatial analysis.
There are two main function that are extensively used.
The first one, it is exactly a heat map.
Either you can consider this heat map or you can go ahead with this map.
There's some minor difference between both and you will figure out there are some custom parameter.
What is a data frame, latitude and longitude, all these different different parameters here?
I have to say, my very first parameter is country and a school, which is called data after eight.
What I have to do, I have a parameter which is exactly my location, which is exactly this one.
It means I have to plot my country to that map.
So for this I'm going to say a school and it's data.
And in this I have a feature, which is exactly my so I'm going to say this is exactly my country.
So after having all these stuff over here, I have again a parameter over here, which is exactly my
color parameter, because to my quarterback map, I have to assign some color.
So here I am going to say I have to assign color on the basis of number of guest.
It means more than a number of guest.
We have higher the density of the color.
FILBY So here I'm going to say it is nothing but my number of you can press tab as well, which is exactly
my number of guest.
And it's still you have some dozens of parameters.
You can play it whatever parameter you want.
So here I have some more parameter which is exactly my who are on the score.
Whenever you are going to hover your mouse on your visual, what exactly you want to reflect.
So for this, I'm just going to say or underscore name, which is exactly this one.
So I'm just going to say I just need to reflect my country names for this.
I'm just going to say this is nothing but my this country.
After having all this stuff, let's say I have to assign my subtitles for this.
I'm just going to say title is nothing, but let's say whole country of guest.
So home country of guests.
So this is exactly my title of my quadruped map softheaded.
What we have to do, let's say I'm just going to store it somewhere else.
So I'm just going to say this is exactly my map underscore guest once having all this stuff on this
map, underscore guest.
I have to just call my show function.
That's it.
And if I'm going to execute this well now you will see over here, this is amazing quadruplet map and
this is exactly your color bar over here.
So almost observe over here almost.
There are 80 to 85 percent of countries that have almost between zero to five thousand guests.
But yeah, there are few countries, let's say, which are exactly my Portugal and some European countries
where we have a maximum number of guest.
So that's a type of entrance, how you can fetch stronger data.
So let's go ahead with our next statement in which I have to analyze how much do guest pay for a room
per night.
So for this, let me Kollar had on my data frame to get a preview how exactly it looks like you will
see this is exactly the data set that you have over here.
But very first you need somebody looking.
So I'm just going to say data of is on this call.
Cancel it close to zero.
I have to just pass this in my this one here.
I'm going to say this is nothing but let's say my data too.
So I have to just executed and now you will figure out in your problem statement you have to analyze
how much do guest pay for night.
It means you just need price distribution of each of the room type.
So for this, whenever you need a distribution, either you can go ahead with your distribution function
of Seabourne, either of a plot, or you can consider some fancy stuff like box plot.
So I'm just going to say Asness Dot here, I have a very handy function, which is exact.
My doctors, I'm just going to say it is exactly my box, but if you will pass shift BASTABLE here,
you will get all the documentation.
What is your X?
What is it?
Why?
What is it?
Who parameter humans?
On which basis you have to split your box plot.
So basically on this exact six what I need.
Exactly.
So let me say very first on this data to if I'm going to call my columns over here, you will see you
have all your column names over here.
So on this X axis, you exactly need your reserved room type, which is exactly this one.
So I'm just going to copy from here and let me just paste it.
And this is exactly on your x axis after it.
On Y axis, you have to assign some your price because you need a distribution with the respective price.
So on y axis, I'm going to say it is nothing but my ADR.
And after it I have something which is exactly my hue.
So here I'm going to say I just need distribution, both of resort as well as for that.
So here I'm going to say you go to that operator.
I have to mention my data frame as well.
So I'm going to say data is nothing but basically my data to call data to the current data free on which
we are working.
So if let's say I have to customize this box as well, so I'm going to say PLT or figure I have to assign
my own figures.
So take side, let's say 12, Gunma eight, and let me assign some title as well.
So I'm going to say t dot data and what exactly is meant to my title.
Nothing.
But let's say price of room types per night and per person.
Or you can say only person once having this title you have to assign some X label, some Y level as
well.
So here I am going to say my X label is nothing but let's say my room type to her.
I'm going to say X level is nothing but my type.
After signing or X label, you have to assign Uruguay label as well.
So my Y level is nothing but let's say price in euros.
So I'm going to say price in euro after having all this is what you have to you have to simply show
your matplotlib this to it.
And here you have one more function, which is exactly what leakin because you have to show Leegin with
respect to the result as well as with respect to your city hotel as well.
So if I'm going to ask you that, you will see this amazing visual with respect to each of your room
type over here.
You will see this this blue this blue distribution is exactly a resort hotel and this orange one with
respect to city hotel.
But you will see the middle line is exactly your median, whereas this one is exactly four hundred percentile
data.
And this this one is exactly what, twenty fifth percentile data.
And this one is exactly where 70 percent data and this just list is exactly zero percent data.
So you can easily conclude from this.
Yeah, the best distribution with respect to City Hotel is almost with my G type, whereas if I will
talk about with respect to my resort hotel, it's the best distribution of price is almost 10 to with
respect to this at room type.
And what our data point that you will see over here, these are exactly your high values.
Or you can see these are exactly the outliers.
So you can definitely conclude as much as you can.
So that's all about this.
I hope you love the session very much.
And if you have, don't just post your doubts in your Q&A section or via your personal mode of communication
with me as well.
Whatever you want.
So thank you.
Have a nice day.
Keep learning.
Keep growing.
Keep practicing.