---
# System prepended metadata

title: CLASS HOMEWORK | 20201012

---

# CLASS HOMEWORK | 20201012
[TOC]

---
Using data : [**Statlog German Credit Data Data Set**](https://archive.ics.uci.edu/ml/datasets/statlog+(german+credit+data))
Using data : [**Fuel economy data from 1999 to 2008 for 38 popular models of cars (MPG)**](http://fueleconomy.gov)
Using language : [**R**](https://www.r-project.org/)
Using package : [**ggplot2**](https://ggplot2.tidyverse.org/)

---
# geom_abline(), geom_hline(), geom_vline()
```R=
# combine
ggplot(bank_data, aes(age, fill=purpose))+geom_histogram() +
  geom_abline(intercept = 10) +
  geom_hline(yintercept = 5) +
  geom_hline(yintercept = 10:60) +
  geom_vline(xintercept = 5) +
  geom_vline(xintercept = 10:60)
```


# geom_bar()
```R=
ggplot(mpg, aes(class))+
  geom_bar(aes(weight = displ)) +
  labs(title="class weighted with displ")
```
# geom_boxplot()
```R=
ggplot(mpg, aes(class, hwy)) +
  geom_boxplot(notch = TRUE, fill = "white", colour = "#3366FF") +
  labs(title="class hwy BOX Plot")
```

# geom_density()
```R=
ggplot(bank_data, aes(age)) +
  geom_density()+
  labs(title="Age Density Plot")
```

# geom_freqpoly() geom_histogram()

# geom_point()

# geom_smooth()

# geom_violin()