Data=read.table(file.choose(), header= TRUE, sep="\t")
Data
## Provinsi Desa.dan.Kelurahan Kategori
## 1 Aceh 6513 Raksasa
## 2 Sumatera_Utara 6112 Besar
## 3 Sumatera_Barat 1287 Kecil
## 4 Riau 1870 Sedang
## 5 Jambi 1586 Sedang
## 6 Sumatera_Selatan 3285 Sedang
## 7 Bengkulu 1513 Sedang
## 8 Lampung 2654 Sedang
## 9 Kepulauan_Bangka_Belitung 393 Kecil
## 10 Kepulauan_Riau 430 Kecil
## 11 DKI_Jakarta 267 Kecil
## 12 Jawa_Barat 5957 Besar
## 13 Jawa_Tengah 8563 Raksasa
## 14 DI_Yogyakarta 438 Kecil
## 15 Jawa_Timur 8494 Raksasa
## 16 Banten 1552 Sedang
## 17 Bali 718 Kecil
## 18 Nusa Tenggara Barat 1180 Kecil
## 19 Nusa Tenggara Timur 3538 Sedang
## 20 Kalimantan Barat 2157 Sedang
## 21 Kalimantan Tengah 1577 Sedang
## 22 Kalimantan Selatan 2015 Sedang
## 23 Kalimantan Timur 1055 Kecil
## 24 Kalimantan Utara 484 Kecil
## 25 Sulawesi_Utara 1838 Sedang
## 26 Sulawesi_Tengah 2022 Sedang
## 27 Sulawesi_Selatan 3060 Sedang
## 28 Sulawesi_Tenggara 2292 Sedang
## 29 Gorontalo 732 Kecil
## 30 Sulawesi_Barat 650 Kecil
## 31 Maluku 1262 Kecil
## 32 Maluku_Utara 1209 Kecil
## 33 Papua_Barat 970 Kecil
## 34 Papua_Barat_Daya 1056 Kecil
## 35 Papua 1004 Kecil
## 36 Papua _Selatan 690 Kecil
## 37 Papua_Tengah 1170 Kecil
## 38 Papua_Pegunungan 2545 Sedang
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
ggplot(Data, aes(x="", y=Desa.dan.Kelurahan))+
geom_boxplot(fill="red")+
labs(title = "Box Plot Jumlah Desa dan Kelurahan Tahun 2025", x="",y="Desa dan Kelurahan")+
theme_minimal()+
theme(plot.title = element_text(hjust=0.5, face="bold"))

total_penjualan <- aggregate(Desa.dan.Kelurahan ~ Kategori, Data, sum)
total_penjualan
## Kategori Desa.dan.Kelurahan
## 1 Besar 12069
## 2 Kecil 14995
## 3 Raksasa 23570
## 4 Sedang 33504
ggplot(total_penjualan, aes(x = Kategori, y = Desa.dan.Kelurahan, fill = Kategori)) +
geom_bar(stat = "identity") +
labs(
title = " Desa dan Kelurahan Tahun 2025 per Kategori",
x = "Kategori",
y = "Desa dan Kelurahan"
) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
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 Desa.dan.Kelurahan Kategori
## 1 Kalimantan Barat 2157 Sedang
## 2 Kalimantan Tengah 1577 Sedang
## 3 Kalimantan Selatan 2015 Sedang
## 4 Kalimantan Timur 1055 Kecil
## 5 Kalimantan Utara 484 Kecil
ggplot(Data_Kalimantan, aes(x = Provinsi, y = Desa.dan.Kelurahan, fill = Provinsi)) +
geom_col() +
labs(
title = "Desa dan Kelurahan di Indonesia 2025",
x = "Provinsi",
y = "Desa dan Kelurahan"
) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold"),
legend.position = "none"
)
