Here everyone so in this video we are going to do some basic analyses beginning with which 10 states
have the most number of schools that open project together donations bloated data using part.
Then we have what are the top 10 states in which school get the most amount of average donations will
they project.
Some of you are thinking that why we need to do that because that's the analyses that you can do the
things and lights these things like find the product that is most selling in the last seven days or
the maximum number of revenue generated by any product something like that things.
So we will begin with this one that stands to have the most number of schools.
Now the thing is how you can find that vis 10 states have the maximum number of schools that open projects
together delicious.
So for that we need the states first thing.
This is how you are going to work with that one.
First you need states that which states are involved in that particular thing.
Then we need to count the number of states that are involved in that thing and how many times did that.
Like if you focus on that one the most number of schools that opened projects together donations.
So we need to have something like in which state we have maximum number of schools that are involved
in these kinds of donations together.
That particular donation.
So first task is we need to find all these states then we need to count that how many schools are available
in each state.
And after that when we need that which one has the maximum number of schools we can say and we have
to find 10 of these.
So after getting the number of counts we have to raise them in such a way so that we can find the top.
So let's move to the end less is how we can do it.
We have this number of data we have about most data.
If you notice this one here.
And we also have these data finds.
So how we can find data.
So go to these files and think about that but our problem is about the states that are having schools
for the donations.
So if you focus on your data up then Davey here we have the data project and school load head donations
do just do.
So teachers is a kind of data maybe that will not provide these states of element.
So teachers is not the one that we need then we have schools dot head.
Maybe this will provide us the data.
So if you notice on the data set here we have school I.D. school name school Metro type school percentage.
So this is something like similar to Denver that one like.
After that when we have schools state so they will go with that one.
This is a main point.
So once you find that particular thing that we need to analyze go for it.
If you observe a does then in that one we did not have this school straight into sources dot head in
the projects dot head.
If you notice we did not have that one again in the dot notes.
We also do not have that one and in the new nations we also did not have that one.
So school is the key that we need here.
Now the data that we have must do so far the data phys ed one that is data four also contains that one.
So go for that one or this one.
So in the case in which your data can be sorted only by using small data set then go for Dedmon but
in the cases you need to figure out the data from the competition to then before that.
So this time maybe this one can solve a problem.
So we did not require the larger data so go for this one.
So here we have the Coolum school state.
Now we get the column.
That is school state.
And one thing we left there.
Let me again show you Dedmon notice.
We have these states.
And here we have school links.
Now if you notice these five are different but maybe then we have two on the or against it today.
You notice fewer of the states are repeating there we have Texas here access here then we have California
here and I have the California dates.
So Maryland two times here.
And all the adults also they are available here a number of times like it's not like every state have
just only one school.
States have many number of schools.
So here what we need to do we will count that each state has maximum number of schools and take the
top that from Declan.
Now the question is are we going to observe all the files here.
If you see in the shape school data frame have 7 2 9 9 3 rules it means it has seventy two thousand
nine hundred and ninety trees.
The middle schools.
So how we can separate them by using the country's will order against the states then maybe we have
maximum number of 20 to 30 states not more than that one so either need to analyze all the data.
So here we will use other data science tools to analyze that one in just these two sin Texas or because
it says of a level we have.
So we begin by creating a data that is in a variable est and this will be from schools.
So here we have schools and the column I'm using there is school state.
So now I have access that particular column I'm in school state.
Know what to do now.
So now what will I do.
I will first count the values available there.
So value underscore count we had the sun and the parties to something that will count the number of
values of a level they're like two times the taxes three times the any of the that number of times in
Washington these things.
So this is that fund matter that will help us to count the values.
Now once we have all the values counted like if we have Washington well then we have California with
one day then we have any other states say x y z we have four.
Now we have these files but our second globe problem is that how we know that Fitch has the maximum
and which has the minimum how we can find the top ten from all these fights.
So what we need to do here now requires something assorted list assorted list is something in which
either we have the ascending order of values or we have the values in descending order.
So the thing here is we require to sort of values.
Now we again are going to analyze all the values and sort according to that one.
Like first that one has the maximum.
Then something like that when all the values noncitizens know that again way to use a method here that
is known as sort underscored values.
It was sort all the values there.
And the order we will just make the ascending false.
Here we have ascending and this one false so that the values will be available in descending order it
means we have the maximum on the top.
And how many values we require.
And according to this one.
So here we have the date if you shifted then we go to the attribute error series which it has not.
Well you underscored combed the I have left s this one also contains I asked them so for that one shifted
on.
There we be literal life been the s you will have the top ten of these like the California has eight
thousand four hundred and fifty seven schools there's something we can never count thereby using like
Washington has this one now and that one now by just counting visualizing the list then we have Texas
New York Florida and if you notice this one it's a thousand degrees by 2000 then degrees by three thousand
then nearly equals tenth floor now we have the data if you do not include head here you will have but
the thing I left there this princes that made a move Dedmon also you will have all the available states
step so they are approximately 30 and if you'll notice here all the values are counted in that one.
Now let me again bend to only the 10 values there.
So here we have the had no.
Our next step is blow the data using Mark Block.
So we will plotted data here by using a barcode.
So I'm going to use the filing this time here.
You can use any of Deven kind equal to but if you remember then we have X data and X data.
Let me show these states on next data.
So here we have states and divide title y capital and then title and then that will be equal to like
number of schools something like that one so here we had this one and last.
The title of plot that something like number of schools
involved
in projects by
so shifted done that one day we had the backlog.
So here is a barcode available here.
And if you notice these values first we have eight thousand four hundred fifty seven.
Then we have this one six thousand four hundred eighty five and they're decreasing.
And here we have the constant rate.
So that's how you can get the data.
What's the cushion we have.
And states have the most number of schools.
So here we have 10 states that have most number of schools and we have utilized the data by using upload
here.
So if you did not involve this one there and now try to pin the bar note you will have all the states
of a living there.
If you notice we have all this to say I'm on the x axis.
We have states only by axis we have a number of schools and this one have a title.
So now I hope you will discern that how we do this one and this one is very interesting.
Let me have again that one lady.
Now we are done with this but let's move to the next question.
What are the top 10 states in which school get the most amount of average donations for their projects.
So the second question is something more typical than the first one and this one is a little task for
you both the video and tried for a second so that you will get that are you getting these things or
not.
I hope you get that one.
This is not once again but you have posed the video.
I told you so now let's begin with discussion.
Top 10 steps.
So we again need steps in which school get the most amount of average donations for their projects.
So in this time.
So at this time we require this school to sort of states and we also require donation.
And if you'll notice on the data now we have the donation amount present in donations but we don't have
states here.
These states are available in the schools I believe we have right now.
So here we have school states.
So the thing here is how we can do that right now.
One column is present in school.
Another column is presented in donations.
So this time we're going to need the complete data that is this one.
It also have the donation amount and school.
Let me have that one.
So here we have the school state.
After that we have where the donation amount there is the donation amount.
So we have both the things available here.
Now let's move to the question.
We have no states and donation and now focus on the question what are the top 10 states in which school
get the most amount of average donations.
So require the states in which days maximum donation these states are which has maximum number of schools
involved that now require the states in which we have maximum donation and see whether they are equal
to these or not.
So again vary by assembly time.
That is as true we are going to use then data are.
And now the column that we are going to need here are two columns.
So we first group these things by using school state.
Here we have schools state and after these things are grouped according to that fund.
So here first we have made make a group of debt one like the all these available debt debt.
Then we will access the donation amount that what is the donation amount.
Present there.
So donation amount and then what we need is the maximum amount gathered by these.
So here we will use mean.
And then we are not done with that one.
We have other data from that one.
We have arranged for the school steps and own bases of that one.
We have the donation amount like you can imagine this one in a simple way like we have arranged all
these.
Something like that one and then we have access the amount of donation present busted.
Then we have find the mean of these because in each if you notice we have eight thousand four hundred
fifty seven.
So we need to find a means of one so can have we can have a basic idea of the average amount.
So we had used to mean there.
Now again the same things before need to sort.
The values so sought underscore values and ascending equal to False.
I hope you go that wondered how I have done this one.
Make sure you are getting this thing that how this one is working.
Grouping the things are going into first column then getting the values at that particular columns.
After that this one ascending equal to folks and how many we need.
Again we need only 10.
We have this one give it a time to get processed
so waiting for that one.
Until then let me write this index for our partner.
So just as to what I plot this one taking time because the file is very large so don't worry about it.
One kind equals two.
Here we have the board.
And then X title to add this one state then we have white title and provided this one.
Average
donation
but project.
Here we have this one.
Then the last title and title is the caution though and states in which he just like let me leave this
enterprise states and index pass pervade maximum donation.
There we go.
And this one is again don't be same like that one.
So change the color.
Let me have a proper view here right now.
So I will provide a color scale also so that it will be a little different from the above one and the
color scale will be better.
The blue one.
Nowadays this one man processing and let me print that one as to David go with that one.
So if you notice we had the California with maximum number of schools but maybe they only show about
this low there.
That's why we have filming with the maximum donation amount.
Then we have how I just rolled Iceland North Dakota and New Jersey.
So that's the thing there.
Now we will applaud that but here we go deadline.
So maximum 130.
If you notice this one 130.
Then we have this one decreasing and of course generate here.
So these are the top 10 states with maximum number of donation.
So we are done with this one also.
And the next problem we have analyzed the maximum minimum mean median mode and twenty five point seventy
five percent of donations.
So this problem is for you.
Give it a try and we will continue in the next video for the next problems and I hope you get that.
How.
I have been these.
So this one is the basic idea mode you will understand while we sold the remaining problems.
So thanks for watching.
See in the next video.