Data=read.table(file.choose(),header=TRUE)
Data
##                Provinsi   IDI
## 1                  Aceh 83.43
## 2        Sumatera_Utara 81.49
## 3        Sumatera_Barat 80.08
## 4                  Riau 78.79
## 5                 Jambi 79.86
## 6      Sumatera_Selatan 81.48
## 7              Bengkulu 79.72
## 8               Lampung 77.83
## 9  Kep._Bangka_Belitung 81.31
## 10            Kep._Riau 81.51
## 11          DKI_Jakarta 82.94
## 12           Jawa_Barat 80.86
## 13          Jawa_Tengah 86.72
## 14        DI_Yogyakarta 89.79
## 15           Jawa_Timur 84.05
## 16               Banten 78.05
## 17                 Bali 88.73
## 18  Nusa_Tenggara_Barat 75.27
## 19  Nusa_Tenggara_Timur 83.98
## 20     Kalimantan_Barat 86.17
## 21    Kalimantan_Tengah 81.04
## 22   Kalimantan_Selatan 81.23
## 23     Kalimantan_Timur 82.66
## 24     Kalimantan_Utara 81.07
## 25       Sulawesi_Utara 73.03
## 26      Sulawesi_Tengah 80.04
## 27     Sulawesi_Selatan 81.96
## 28    Sulawesi_Tenggara 81.48
## 29            Gorontalo 75.77
## 30       Sulawesi_Barat 76.62
## 31               Maluku 73.93
## 32         Maluku_Utara 70.51
## 33          Papua_Barat 59.61
## 34     Papua_Barat_Daya 63.92
## 35                Papua 66.95
## 36        Papua_Selatan 58.91
## 37         Papua_Tengah 59.24
## 38     Papua_Pegunungan 56.31
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
ggplot(Data, aes(x = IDI))+
  geom_histogram(
    binwidth = 5,
    boundary = 60,
    fill = "blue",
    color = "black"
  ) +
  scale_x_continuous (
    breaks = seq(55, 90, by=5),
    limits = c(55, 90)
  )+
  labs(
    title ="IDI di Indonesia",
    x= "IDI",
    y= "Freq"
  )+
  
  theme_classic()+
  theme(
    axis.text.x = element_text(angle=0,hjust=0.5),
    plot.title=element_text(
      hjust=0.5,
      face="bold"
    )
  )

ggplot(Data, aes(x="", y=IDI)) +
  geom_boxplot(fill="pink") +
  labs (title = "Box Plot IDI Indonesia 2025", x="", y="IDI") +
  theme_minimal() +
  theme(plot.title = element_text(hjust=0.5, face="bold"))

library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
## 
## 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(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.5.3
## Warning: package 'tibble' was built under R version 4.5.3
## Warning: package 'tidyr' was built under R version 4.5.3
## Warning: package 'readr' was built under R version 4.5.3
## Warning: package 'purrr' was built under R version 4.5.3
## Warning: package 'stringr' was built under R version 4.5.3
## Warning: package 'forcats' was built under R version 4.5.3
## Warning: package 'lubridate' was built under R version 4.5.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ lubridate 1.9.5     ✔ tibble    3.3.1
## ✔ purrr     1.2.2     ✔ tidyr     1.3.2
## ✔ readr     2.2.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggplot2)

Data_Kalimantan <- Data %>%
 filter(str_starts(Provinsi, "Kalimantan"))
Data_Kalimantan
##             Provinsi   IDI
## 1   Kalimantan_Barat 86.17
## 2  Kalimantan_Tengah 81.04
## 3 Kalimantan_Selatan 81.23
## 4   Kalimantan_Timur 82.66
## 5   Kalimantan_Utara 81.07
ggplot(Data_Kalimantan, aes(x = Provinsi, y = IDI, fill = Provinsi)) +
 geom_col() +
 labs(
 title = "IDI Pulau Kalimantan Tahun 2025",
 x = "Provinsi",
 y = "IDI"
 ) +
 theme_minimal() +
 theme(
 axis.text.x = element_text(angle = 45, hjust = 1),
 plot.title = element_text(hjust = 0.5, face = "bold"),
 legend.position = "none"
 )