3  In Class 2

Author

Derya Şaşmaz

Published

November 9, 2023

library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
library(ggplot2)

my_data = read.csv("/Users/deryasasmaz/Documents/Github/mef07-sasmazd/netflix_titles.csv")

director_df = my_data %>% count(director)
sorted_director = director_df %>% arrange(desc(n)) 
HD = sorted_director %>% slice(2:11)
graph = ggplot(HD, aes(x = director, y = n)) + geom_bar(stat="identity", fill="skyblue") + labs(title = "En Çok Filmi Olan 10 Yönetmen", x = "Yönetmen", y = "Film Sayısı")
graph

library(dplyr)
library(ggplot2)
MS_df = my_data %>% filter(director == "Martin Scorsese")
ggplot(MS_df %>% select(release_year, title), aes(x = release_year, y = title)) +
    geom_point() + 
    labs (title = "Martin Scorsese'nin Yıllara Göre Filmleri", x = "Yıl", y = "Film")