anime_data <- read_csv2("animelist.csv")
## ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
## New names:
## Rows: 12387 Columns: 6
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: ";" chr
## (3): title, type, rating dbl (3): ...1, score, start_year
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`
head(anime_data)
## # A tibble: 6 × 6
## ...1 title type score rating start_year
## <dbl> <chr> <chr> <dbl> <chr> <dbl>
## 1 1 Fullmetal Alchemist: Brotherhood televisi 9.13 r 2009
## 2 2 Hunter x Hunter (2011) televisi 9.04 pg_13 2011
## 3 3 Shingeki no Kyojin Season 3 Part 2 televisi 9.07 r 2019
## 4 4 Steins;Gate televisi 9.08 pg_13 2011
## 5 5 Koe no Katachi film 8.95 pg_13 2016
## 6 6 Kimi no Na wa. film 8.86 pg_13 2016
Ini adalah Dokumen R Markdown yang berisi data terkait daftar anime dari rentang tahun sedemikian rupa
summary(anime_data)
## ...1 title type score
## Min. : 1 Length:12387 Length:12387 Min. :1.850
## 1st Qu.: 3174 Class :character Class :character 1st Qu.:5.970
## Median : 6471 Mode :character Mode :character Median :6.550
## Mean : 6642 Mean :6.551
## 3rd Qu.: 9952 3rd Qu.:7.175
## Max. :14271 Max. :9.140
## rating start_year
## Length:12387 Min. :1989
## Class :character 1st Qu.:2005
## Mode :character Median :2012
## Mean :2010
## 3rd Qu.:2017
## Max. :2022
Ini adalah plot yang diambil dari dataset animelist.csv
if ("score" %in% names(anime_data)) {
ggplot(anime_data, aes(x = as.numeric(score))) +
geom_histogram(binwidth = 0.5, fill = "steelblue", color = "white") +
labs(title = "Distribusi Skor Anime", x = "Skor", y = "Jumlah") +
theme_minimal()
} else {
cat("Kolom 'score' tidak ditemukan.")
}