This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
generated from pjournal/gh-pages-quarto-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inclass1.qmd
56 lines (47 loc) · 1.67 KB
/
inclass1.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title : "In Class Exercise 1"
author: "Oytun Gungor"
date : "2023-01-04"
output: html_document
---
## Import and install required libraries
```{r,message=FALSE}
install.packages("tidyverse")
install.packages("nycflights13")
library("tidyverse")
library("nycflights13")
library("ggplot2")
library("dplyr")
```
## Analyzing the data structure
```{r,message=FALSE}
head(planes)
str(planes)
```
## Creating new df for looking relations between model year, seats number and motor type.
```{r,message=FALSE}
df_ys <- planes %>%
select(year,seats,type)%>%
arrange(desc(year))
## Cleaning na values
na.omit(df_ys)
ggplot(df_ys, aes(x = year, y= seats, color = type))+
geom_point()
```
According to the data and scatter plot, there is a correlation between seat number and product year. You can see that before the 1980' there is no plane with 200+ seat capability.
In addition to this, the capability of all single-engine and rotorcraft planes has under 100 seats. There is another correlation between moto-type and the number of seats.
As a summary you need big planes you need multi engine moto-type.
### Creating new df for looking relations between model year, seats number and engine type.
```{r,message=FALSE}
my_planes <- planes %>%
select(year,engine,seats)%>%
group_by(year)%>%
arrange(engine)
na.omit(my_planes)
ggplot(my_planes, aes(x = year, y= engine,color = seats))+
geom_point()
```
According to the data and plot, we can some insights about engine technology. There is inferences below
- Turbo jet and turbo fan is using after 1980' in general
- 4 cycle engine was used once at middle of 1970'
- Turbo jet and turbo fan technologies using by airlines companies