Day 73 Of 100DaysOfCode: Data Visualization
Tags: womenintech, 100daysofcode, codenewbie, beginners
Published: 2021-03-11 15:15:45

This is my 73th day of  #100daysofcode and  #python learning. Today, I keep learning from Datacamp and also completed some assignments. Also, I am present in one bootcamp from [dphi](https://dphi.tech/lms/learn/data-analysis-and-visualization-101/870) where I did data visualization on data given on assignment, which contained some metropolitan data and publicly available [here](https://raw.githubusercontent.com/dphi-official/Assignment_Solutions/master/Standard%20Metropolitan%20Areas%20Data%20-%20train_data%20-%20data.csv").

After I got [Hawkins Fellowship](https://codefornepal.org/fellowship/), I am learning from Datacamp because I have access to most courses there now. Hence my journey of learning Algorithms from Coursera is in pending state. I am going to write some of assignments I completed today.
 
# dphi Assignment
All the assignments were quizz but I had to write code in order to find the right answer and it was quite fun to try.

I started by reading CSV file using Pandas.
```python
import pandas as pd
%matplotlib inline
data = pd.read_csv("https://raw.githubusercontent.com/dphi-official/Assignment_Solutions/master/Standard%20Metropolitan%20Areas%20Data%20-%20train_data%20-%20data.csv")
data.head()
```

## Question 1: What is the Mean area of lands?
Not that hard, just take mean.
```python
data.land_area.mean()
```
Output of the code is,
```python
2615.7272727272725
```
## Question 2: What is the crime rate among all Metropolitan Areas?
Again it is the max value of single column.
```python
data.crime_rate.max()
```
Output of the code is,
```
85.62
```
## Question 3: What is the average crime rate among all metropolitan areas?
Same as previous, find mean of single column.
```python
data.crime_rate.mean()
```
Output of the above code is,
```
55.64303030303031
```
## Question 4: What is the top 5 data of region 4?
Just do boolean masking.

```python
data[data.region==4]
```
## More
I have uploaded a fully loaded [notebook here](https://github.com/iamdurga/Random-Learning-Stuffs/blob/main/dphi%20-%20Data%20Analysis%20Bootcamp%20Assignment.ipynb)
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 73 Of <a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> and <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <br>Data Visualization<a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> <a href="https://twitter.com/hashtag/WomenWhoCode?src=hash&amp;ref_src=twsrc%5Etfw">#WomenWhoCode</a> <a href="https://twitter.com/hashtag/CodeNewbies?src=hash&amp;ref_src=twsrc%5Etfw">#CodeNewbies</a> <a href="https://twitter.com/hashtag/beginner?src=hash&amp;ref_src=twsrc%5Etfw">#beginner</a> <a href="https://twitter.com/hashtag/DEVCommunity?src=hash&amp;ref_src=twsrc%5Etfw">#DEVCommunity</a> <a href="https://t.co/RF3dNCgAkm">pic.twitter.com/RF3dNCgAkm</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1370023238957293578?ref_src=twsrc%5Etfw">March 11, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>