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 'ggplot2' was built under R version 4.5.3
## Warning: package 'tibble' was built under R version 4.5.2
## Warning: package 'tidyr' was built under R version 4.5.2
## Warning: package 'readr' was built under R version 4.5.2
## Warning: package 'purrr' was built under R version 4.5.2
## Warning: package 'stringr' was built under R version 4.5.2
## Warning: package 'lubridate' was built under R version 4.5.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats 1.0.1 ✔ readr 2.2.0
## ✔ ggplot2 4.0.3 ✔ stringr 1.6.0
## ✔ lubridate 1.9.5 ✔ tibble 3.3.1
## ✔ purrr 1.2.1 ✔ tidyr 1.3.2
## ── 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 = read.table("Jumlah Tenaga Kerja Industri Skala Mikro dan Kecil Menurut Provinsi, 2025.csv", sep = ";", skip = 4, header = FALSE, quote = "")
colnames(Data) = c("Provinsi", "Mikro", "Kecil")
Data$Mikro = as.numeric(Data$Mikro)
Data$Kecil = as.numeric(Data$Kecil)
Data = Data[Data$Provinsi != "INDONESIA", ]
Data
## Provinsi Mikro Kecil
## 1 ACEH 150225 19524
## 2 SUMATERA UTARA 217093 86270
## 3 SUMATERA BARAT 133126 27262
## 4 RIAU 92177 21300
## 5 JAMBI 60913 9203
## 6 SUMATERA SELATAN 135987 43566
## 7 BENGKULU 40434 5132
## 8 LAMPUNG 210507 36191
## 9 KEP. BANGKA BELITUNG 27869 3144
## 10 KEP. RIAU 35594 2538
## 11 DKI JAKARTA 121578 111919
## 12 JAWA BARAT 1183611 450532
## 13 JAWA TENGAH 1261408 351670
## 14 DI YOGYAKARTA 210285 34127
## 15 JAWA TIMUR 1241187 768588
## 16 BANTEN 239750 72700
## 17 BALI 223931 38736
## 18 NUSA TENGGARA BARAT 128949 180161
## 19 NUSA TENGGARA TIMUR 192880 10898
## 20 KALIMANTAN BARAT 89639 10019
## 21 KALIMANTAN TENGAH 46855 5191
## 22 KALIMANTAN SELATAN 105582 20363
## 23 KALIMANTAN TIMUR 59564 8082
## 24 KALIMANTAN UTARA 12274 1758
## 25 SULAWESI UTARA 67513 9847
## 26 SULAWESI TENGAH 107951 88419
## 27 SULAWESI SELATAN 206147 44513
## 28 SULAWESI TENGGARA 95157 16573
## 29 GORONTALO 68513 27774
## 30 SULAWESI BARAT 36884 4602
## 31 MALUKU 50892 9306
## 32 MALUKU UTARA 32842 41659
## 33 PAPUA BARAT 5119 1092
## 34 PAPUA BARAT DAYA 5637 981
## 35 PAPUA 11085 828
## 36 PAPUA SELATAN 4183 564
## 37 PAPUA TENGAH 4205 1144
## 38 PAPUA PEGUNUNGAN 167 756
Data_long = data.frame(
Provinsi = rep(Data$Provinsi, 2),
Skala = rep(c("Mikro", "Kecil"), each = nrow(Data)),
Jumlah = c(Data$Mikro, Data$Kecil)
)
Data_long
## Provinsi Skala Jumlah
## 1 ACEH Mikro 150225
## 2 SUMATERA UTARA Mikro 217093
## 3 SUMATERA BARAT Mikro 133126
## 4 RIAU Mikro 92177
## 5 JAMBI Mikro 60913
## 6 SUMATERA SELATAN Mikro 135987
## 7 BENGKULU Mikro 40434
## 8 LAMPUNG Mikro 210507
## 9 KEP. BANGKA BELITUNG Mikro 27869
## 10 KEP. RIAU Mikro 35594
## 11 DKI JAKARTA Mikro 121578
## 12 JAWA BARAT Mikro 1183611
## 13 JAWA TENGAH Mikro 1261408
## 14 DI YOGYAKARTA Mikro 210285
## 15 JAWA TIMUR Mikro 1241187
## 16 BANTEN Mikro 239750
## 17 BALI Mikro 223931
## 18 NUSA TENGGARA BARAT Mikro 128949
## 19 NUSA TENGGARA TIMUR Mikro 192880
## 20 KALIMANTAN BARAT Mikro 89639
## 21 KALIMANTAN TENGAH Mikro 46855
## 22 KALIMANTAN SELATAN Mikro 105582
## 23 KALIMANTAN TIMUR Mikro 59564
## 24 KALIMANTAN UTARA Mikro 12274
## 25 SULAWESI UTARA Mikro 67513
## 26 SULAWESI TENGAH Mikro 107951
## 27 SULAWESI SELATAN Mikro 206147
## 28 SULAWESI TENGGARA Mikro 95157
## 29 GORONTALO Mikro 68513
## 30 SULAWESI BARAT Mikro 36884
## 31 MALUKU Mikro 50892
## 32 MALUKU UTARA Mikro 32842
## 33 PAPUA BARAT Mikro 5119
## 34 PAPUA BARAT DAYA Mikro 5637
## 35 PAPUA Mikro 11085
## 36 PAPUA SELATAN Mikro 4183
## 37 PAPUA TENGAH Mikro 4205
## 38 PAPUA PEGUNUNGAN Mikro 167
## 39 ACEH Kecil 19524
## 40 SUMATERA UTARA Kecil 86270
## 41 SUMATERA BARAT Kecil 27262
## 42 RIAU Kecil 21300
## 43 JAMBI Kecil 9203
## 44 SUMATERA SELATAN Kecil 43566
## 45 BENGKULU Kecil 5132
## 46 LAMPUNG Kecil 36191
## 47 KEP. BANGKA BELITUNG Kecil 3144
## 48 KEP. RIAU Kecil 2538
## 49 DKI JAKARTA Kecil 111919
## 50 JAWA BARAT Kecil 450532
## 51 JAWA TENGAH Kecil 351670
## 52 DI YOGYAKARTA Kecil 34127
## 53 JAWA TIMUR Kecil 768588
## 54 BANTEN Kecil 72700
## 55 BALI Kecil 38736
## 56 NUSA TENGGARA BARAT Kecil 180161
## 57 NUSA TENGGARA TIMUR Kecil 10898
## 58 KALIMANTAN BARAT Kecil 10019
## 59 KALIMANTAN TENGAH Kecil 5191
## 60 KALIMANTAN SELATAN Kecil 20363
## 61 KALIMANTAN TIMUR Kecil 8082
## 62 KALIMANTAN UTARA Kecil 1758
## 63 SULAWESI UTARA Kecil 9847
## 64 SULAWESI TENGAH Kecil 88419
## 65 SULAWESI SELATAN Kecil 44513
## 66 SULAWESI TENGGARA Kecil 16573
## 67 GORONTALO Kecil 27774
## 68 SULAWESI BARAT Kecil 4602
## 69 MALUKU Kecil 9306
## 70 MALUKU UTARA Kecil 41659
## 71 PAPUA BARAT Kecil 1092
## 72 PAPUA BARAT DAYA Kecil 981
## 73 PAPUA Kecil 828
## 74 PAPUA SELATAN Kecil 564
## 75 PAPUA TENGAH Kecil 1144
## 76 PAPUA PEGUNUNGAN Kecil 756
length(Data$Mikro)
## [1] 38
mean(Data$Mikro)
## [1] 182045.1
median(Data$Mikro)
## [1] 90908
range(Data$Mikro)
## [1] 167 1261408
max(Data$Mikro) - min(Data$Mikro)
## [1] 1261241
max(Data$Mikro)
## [1] 1261408
min(Data$Mikro)
## [1] 167
var(Data$Mikro)
## [1] 1.01693e+11
sd(Data$Mikro)
## [1] 318893.4
quantile(Data$Mikro)
## 0% 25% 50% 75% 100%
## 167.0 35916.5 90908.0 182216.2 1261408.0
length(Data$Kecil)
## [1] 38
mean(Data$Kecil)
## [1] 67550.84
median(Data$Kecil)
## [1] 18048.5
range(Data$Kecil)
## [1] 564 768588
max(Data$Kecil) - min(Data$Kecil)
## [1] 768024
max(Data$Kecil)
## [1] 768588
min(Data$Kecil)
## [1] 564
var(Data$Kecil)
## [1] 22237561634
sd(Data$Kecil)
## [1] 149122.6
quantile(Data$Kecil)
## 0% 25% 50% 75% 100%
## 564.00 4734.50 18048.50 43089.25 768588.00
ggplot(Data, aes(x = Mikro)) +
geom_histogram(
binwidth = 250000,
boundary = 0,
fill = "pink",
color = "black"
) +
scale_x_continuous(
breaks = seq(0, 1500000, by = 250000),
limits = c(0, 1500000),
labels = function(x) format(x, big.mark = ".", scientific = FALSE)
) +
labs(
title = "Tenaga Kerja Industri Mikro di Indonesia (2025)",
x = "Jumlah Tenaga Kerja (Orang)",
y = "freq"
) +
theme_classic() +
theme(
axis.text.x = element_text(angle = 0, hjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data, aes(x = Kecil)) +
geom_histogram(
binwidth = 100000,
boundary = 0,
fill = "pink",
color = "black"
) +
scale_x_continuous(
breaks = seq(0, 800000, by = 100000),
limits = c(0, 800000),
labels = function(x) format(x, big.mark = ".", scientific = FALSE)
) +
labs(
title = "Tenaga Kerja Industri Kecil di Indonesia (2025)",
x = "Jumlah Tenaga Kerja (Orang)",
y = "freq"
) +
theme_classic() +
theme(
axis.text.x = element_text(angle = 0, hjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data, aes(x = "", y = Mikro)) +
geom_boxplot(fill = "red") +
labs(title = "Box Plot Tenaga Kerja Industri Mikro Indonesia 2025",
x = "", y = "Jumlah Tenaga Kerja (Orang)") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(plot.title = element_text(hjust = 0.5, face = "bold"))
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data, aes(x = "", y = Kecil)) +
geom_boxplot(fill = "red") +
labs(title = "Box Plot Tenaga Kerja Industri Kecil Indonesia 2025",
x = "", y = "Jumlah Tenaga Kerja (Orang)") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(plot.title = element_text(hjust = 0.5, face = "bold"))
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_long, aes(x = Skala, y = Jumlah)) +
geom_boxplot(fill = "red") +
labs(title = "Box Plot Tenaga Kerja Industri Mikro dan Kecil 2025",
x = "Skala Industri", y = "Jumlah Tenaga Kerja (Orang)") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(plot.title = element_text(hjust = 0.5, face = "bold"))
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_long, aes(x = Provinsi, y = Jumlah, fill = Skala)) +
geom_bar(stat = "identity") +
labs(
title = "Jumlah Tenaga Kerja Industri Mikro dan Kecil per Provinsi 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

total_tenaga = aggregate(Jumlah ~ Skala, Data_long, sum)
total_tenaga
## Skala Jumlah
## 1 Kecil 2566932
## 2 Mikro 6917713
ggplot(total_tenaga, aes(x = Skala, y = Jumlah, fill = Skala)) +
geom_bar(stat = "identity") +
labs(
title = "Total Tenaga Kerja Industri per Skala 2025",
x = "Skala Industri",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

Data_Kalimantan <- Data %>%
filter(str_starts(Provinsi, "KALIMANTAN"))
Data_Kalimantan
## Provinsi Mikro Kecil
## 1 KALIMANTAN BARAT 89639 10019
## 2 KALIMANTAN TENGAH 46855 5191
## 3 KALIMANTAN SELATAN 105582 20363
## 4 KALIMANTAN TIMUR 59564 8082
## 5 KALIMANTAN UTARA 12274 1758
Data_Kalimantan_long = Data_long %>%
filter(str_starts(Provinsi, "KALIMANTAN"))
length(Data_Kalimantan$Mikro)
## [1] 5
mean(Data_Kalimantan$Mikro)
## [1] 62782.8
median(Data_Kalimantan$Mikro)
## [1] 59564
range(Data_Kalimantan$Mikro)
## [1] 12274 105582
max(Data_Kalimantan$Mikro) - min(Data_Kalimantan$Mikro)
## [1] 93308
max(Data_Kalimantan$Mikro)
## [1] 105582
min(Data_Kalimantan$Mikro)
## [1] 12274
var(Data_Kalimantan$Mikro)
## [1] 1342055341
sd(Data_Kalimantan$Mikro)
## [1] 36634.07
quantile(Data_Kalimantan$Mikro)
## 0% 25% 50% 75% 100%
## 12274 46855 59564 89639 105582
length(Data_Kalimantan$Kecil)
## [1] 5
mean(Data_Kalimantan$Kecil)
## [1] 9082.6
median(Data_Kalimantan$Kecil)
## [1] 8082
range(Data_Kalimantan$Kecil)
## [1] 1758 20363
max(Data_Kalimantan$Kecil) - min(Data_Kalimantan$Kecil)
## [1] 18605
max(Data_Kalimantan$Kecil)
## [1] 20363
min(Data_Kalimantan$Kecil)
## [1] 1758
var(Data_Kalimantan$Kecil)
## [1] 49479946
sd(Data_Kalimantan$Kecil)
## [1] 7034.198
quantile(Data_Kalimantan$Kecil)
## 0% 25% 50% 75% 100%
## 1758 5191 8082 10019 20363
ggplot(Data_Kalimantan, aes(x = Mikro)) +
geom_histogram(
binwidth = 20000,
boundary = 0,
fill = "pink",
color = "black"
) +
scale_x_continuous(
breaks = seq(0, 120000, by = 20000),
limits = c(0, 120000),
labels = function(x) format(x, big.mark = ".", scientific = FALSE)
) +
labs(
title = "Tenaga Kerja Industri Mikro di Kalimantan (2025)",
x = "Jumlah Tenaga Kerja (Orang)",
y = "freq"
) +
theme_classic() +
theme(
axis.text.x = element_text(angle = 0, hjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan, aes(x = Kecil)) +
geom_histogram(
binwidth = 5000,
boundary = 0,
fill = "pink",
color = "black"
) +
scale_x_continuous(
breaks = seq(0, 25000, by = 5000),
limits = c(0, 25000),
labels = function(x) format(x, big.mark = ".", scientific = FALSE)
) +
labs(
title = "Tenaga Kerja Industri Kecil di Kalimantan (2025)",
x = "Jumlah Tenaga Kerja (Orang)",
y = "freq"
) +
theme_classic() +
theme(
axis.text.x = element_text(angle = 0, hjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan, aes(x = "", y = Mikro)) +
geom_boxplot(fill = "red") +
labs(title = "Box Plot Tenaga Kerja Industri Mikro Kalimantan 2025",
x = "", y = "Jumlah Tenaga Kerja (Orang)") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(plot.title = element_text(hjust = 0.5, face = "bold"))
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan, aes(x = "", y = Kecil)) +
geom_boxplot(fill = "red") +
labs(title = "Box Plot Tenaga Kerja Industri Kecil Kalimantan 2025",
x = "", y = "Jumlah Tenaga Kerja (Orang)") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(plot.title = element_text(hjust = 0.5, face = "bold"))
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan, aes(x = Provinsi, y = Mikro, fill = Provinsi)) +
geom_col() +
labs(
title = "Tenaga Kerja Industri Mikro Pulau Kalimantan Tahun 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold"),
legend.position = "none"
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan, aes(x = Provinsi, y = Kecil, fill = Provinsi)) +
geom_col() +
labs(
title = "Tenaga Kerja Industri Kecil Pulau Kalimantan Tahun 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold"),
legend.position = "none"
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data_Kalimantan_long, aes(x = Provinsi, y = Jumlah, fill = Skala)) +
geom_bar(stat = "identity") +
labs(
title = "Jumlah Tenaga Kerja Industri Mikro dan Kecil di Kalimantan 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

total_kal = aggregate(Jumlah ~ Skala, Data_Kalimantan_long, sum)
total_kal
## Skala Jumlah
## 1 Kecil 45413
## 2 Mikro 313914
ggplot(total_kal, aes(x = Skala, y = Jumlah, fill = Skala)) +
geom_bar(stat = "identity") +
labs(
title = "Total Tenaga Kerja Industri per Skala di Kalimantan 2025",
x = "Skala Industri",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5, face = "bold")
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data, aes(x = Provinsi, y = Kecil, fill = Provinsi)) +
geom_col() +
labs(
title = "Tenaga Kerja Industri Kecil di Indonesia Tahun 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold"),
legend.position = "none"
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing

ggplot(Data, aes(x = Provinsi, y = Mikro, fill = Provinsi)) +
geom_col() +
labs(
title = "Tenaga Kerja Industri Mikro di Indonesia Tahun 2025",
x = "Provinsi",
y = "Jumlah Tenaga Kerja (Orang)"
) +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),
plot.title = element_text(hjust = 0.5, face = "bold"),
legend.position = "none"
)
## Warning in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
## 'big.mark' and 'decimal.mark' are both '.', which could be confusing
