library(readxl)
Data <- read_excel(file.choose())
Data
## # A tibble: 38 × 2
## Provinsi laju_pertumbuhan_2025
## <chr> <dbl>
## 1 Aceh 1.37
## 2 Sumatera_Utara 1.37
## 3 Sumatera_Barat 1.41
## 4 Riau 1.34
## 5 Jambi 1.28
## 6 Sumatera_Selatan 1.12
## 7 Bengkulu 1.3
## 8 Lampung 1.18
## 9 Kepulauan_Bangka_Belitung 1.34
## 10 Kepulauan_Riau 1.48
## # ℹ 28 more rows
length(Data$laju_pertumbuhan_2025)
## [1] 38
mean(Data$laju_pertumbuhan_2025)
## [1] 1.289474
median(Data$laju_pertumbuhan_2025)
## [1] 1.34
range(Data$laju_pertumbuhan_2025)
## [1] 0.23 2.67
max(Data$laju_pertumbuhan_2025) -
min(Data$laju_pertumbuhan_2025)
## [1] 2.44
max(Data$laju_pertumbuhan_2025)
## [1] 2.67
min(Data$laju_pertumbuhan_2025)
## [1] 0.23
var(Data$laju_pertumbuhan_2025)
## [1] 0.1470321
sd(Data$laju_pertumbuhan_2025)
## [1] 0.3834477
quantile(Data$laju_pertumbuhan_2025)
## 0% 25% 50% 75% 100%
## 0.2300 1.1350 1.3400 1.4475 2.6700
library(ggplot2)
ggplot(Data, aes(x = laju_pertumbuhan_2025)) +
geom_histogram(
binwidth = 0.2,
fill = "pink",
color = "black"
) +
labs(
title = "Distribusi Laju Pertumbuhan Penduduk Indonesia Tahun 2025",
x = "Laju Pertumbuhan Penduduk (%)",
y = "Frekuensi"
) +
theme_classic() +
theme(
plot.title = element_text(
hjust = 0.5,
face = "bold"
)
)

ggplot(Data, aes(x="", y=laju_pertumbuhan_2025)) +
geom_boxplot(fill="skyblue") +
labs(
title="Box Plot Laju Pertumbuhan Penduduk Indonesia Tahun 2025",
x="",
y="Laju Pertumbuhan Penduduk (%)"
) +
theme_minimal() +
theme(
plot.title=element_text(
hjust=0.5,
face="bold"
)
)

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)
Data_Kalimantan <- Data %>%
filter(Provinsi %in% c(
"Kalimantan_Barat",
"Kalimantan_Tengah",
"Kalimantan_Selatan",
"Kalimantan_Timur",
"Kalimantan_Utara"
))
Data_Kalimantan
## # A tibble: 5 × 2
## Provinsi laju_pertumbuhan_2025
## <chr> <dbl>
## 1 Kalimantan_Barat 1.33
## 2 Kalimantan_Tengah 1.35
## 3 Kalimantan_Selatan 1.26
## 4 Kalimantan_Timur 2.67
## 5 Kalimantan_Utara 1.39
ggplot(Data_Kalimantan,
aes(
x = Provinsi,
y = laju_pertumbuhan_2025,
fill = Provinsi
)) +
geom_bar(stat = "identity") +
labs(
title = "Laju Pertumbuhan Penduduk Provinsi di Pulau Kalimantan Tahun 2025",
x = "Provinsi",
y = "Laju Pertumbuhan Penduduk (%)"
) +
theme_minimal() +
theme(
axis.text.x = element_text(
angle = 45,
hjust = 1
),
plot.title = element_text(
hjust = 0.5,
face = "bold"
),
legend.position = "none"
)
