library(sf)
## Warning: package 'sf' was built under R version 4.3.3
## Linking to GEOS 3.11.2, GDAL 3.8.2, PROJ 9.3.1; sf_use_s2() is TRUE
library(tmap)
## Warning: package 'tmap' was built under R version 4.3.3
library(raster)
## Warning: package 'raster' was built under R version 4.3.3
## Loading required package: sp
## Warning: package 'sp' was built under R version 4.3.3
library(ggplot2)
library(openxlsx)
## Warning: package 'openxlsx' was built under R version 4.3.3
library(readxl)
## Warning: package 'readxl' was built under R version 4.3.3
library(terra)
## Warning: package 'terra' was built under R version 4.3.3
## terra 1.8.29
geo = st_read("C:/Users/benin/Downloads/Provinsi Jawa Timur/PROVINSI_JAWA_TIMUR.shp")
## Reading layer `PROVINSI_JAWA_TIMUR' from data source
## `C:\Users\benin\Downloads\Provinsi Jawa Timur\PROVINSI_JAWA_TIMUR.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 38 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 110.8987 ymin: -8.78036 xmax: 116.2702 ymax: -5.048857
## Geodetic CRS: WGS 84
geo
## Simple feature collection with 38 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 110.8987 ymin: -8.78036 xmax: 116.2702 ymax: -5.048857
## Geodetic CRS: WGS 84
## First 10 features:
## KABKOTNO PROVINSI KABKOT PDRB17 PDRB16 geometry
## 1 01 JAWA TIMUR PACITAN 4.98 5.21 MULTIPOLYGON (((111.375 -8....
## 2 02 JAWA TIMUR PONOROGO 5.10 5.29 MULTIPOLYGON (((111.6746 -7...
## 3 03 JAWA TIMUR TRENGGALEK 5.02 5.00 MULTIPOLYGON (((111.6507 -8...
## 4 04 JAWA TIMUR TULUNGAGUNG 5.08 5.02 MULTIPOLYGON (((111.8639 -8...
## 5 05 JAWA TIMUR BLITAR 5.07 5.08 MULTIPOLYGON (((112.2387 -8...
## 6 06 JAWA TIMUR KEDIRI 4.90 5.02 MULTIPOLYGON (((112.1216 -7...
## 7 07 JAWA TIMUR MALANG 5.43 5.30 MULTIPOLYGON (((112.7057 -8...
## 8 08 JAWA TIMUR LUMAJANG 5.05 4.70 MULTIPOLYGON (((113.295 -7....
## 9 09 JAWA TIMUR JEMBER 5.11 5.23 MULTIPOLYGON (((113.818 -8....
## 10 10 JAWA TIMUR BANYUWANGI 5.45 5.38 MULTIPOLYGON (((114.2038 -8...
ggplot(data = geo) +
geom_sf(aes(fill = PDRB17)) +
scale_fill_viridis_c(option = "magma", direction = 1)
theme_void()
## List of 136
## $ line : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ rect : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ text :List of 11
## ..$ family : chr ""
## ..$ face : chr "plain"
## ..$ colour : chr "black"
## ..$ size : num 11
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : num 0
## ..$ lineheight : num 0.9
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ title : NULL
## $ aspect.ratio : NULL
## $ axis.title : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.title.x : NULL
## $ axis.title.x.top : NULL
## $ axis.title.x.bottom : NULL
## $ axis.title.y : NULL
## $ axis.title.y.left : NULL
## $ axis.title.y.right : NULL
## $ axis.text : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.text.x : NULL
## $ axis.text.x.top : NULL
## $ axis.text.x.bottom : NULL
## $ axis.text.y : NULL
## $ axis.text.y.left : NULL
## $ axis.text.y.right : NULL
## $ axis.text.theta : NULL
## $ axis.text.r : NULL
## $ axis.ticks : NULL
## $ axis.ticks.x : NULL
## $ axis.ticks.x.top : NULL
## $ axis.ticks.x.bottom : NULL
## $ axis.ticks.y : NULL
## $ axis.ticks.y.left : NULL
## $ axis.ticks.y.right : NULL
## $ axis.ticks.theta : NULL
## $ axis.ticks.r : NULL
## $ axis.minor.ticks.x.top : NULL
## $ axis.minor.ticks.x.bottom : NULL
## $ axis.minor.ticks.y.left : NULL
## $ axis.minor.ticks.y.right : NULL
## $ axis.minor.ticks.theta : NULL
## $ axis.minor.ticks.r : NULL
## $ axis.ticks.length : 'simpleUnit' num 0points
## ..- attr(*, "unit")= int 8
## $ axis.ticks.length.x : NULL
## $ axis.ticks.length.x.top : NULL
## $ axis.ticks.length.x.bottom : NULL
## $ axis.ticks.length.y : NULL
## $ axis.ticks.length.y.left : NULL
## $ axis.ticks.length.y.right : NULL
## $ axis.ticks.length.theta : NULL
## $ axis.ticks.length.r : NULL
## $ axis.minor.ticks.length : 'simpleUnit' num 0points
## ..- attr(*, "unit")= int 8
## $ axis.minor.ticks.length.x : NULL
## $ axis.minor.ticks.length.x.top : NULL
## $ axis.minor.ticks.length.x.bottom: NULL
## $ axis.minor.ticks.length.y : NULL
## $ axis.minor.ticks.length.y.left : NULL
## $ axis.minor.ticks.length.y.right : NULL
## $ axis.minor.ticks.length.theta : NULL
## $ axis.minor.ticks.length.r : NULL
## $ axis.line : NULL
## $ axis.line.x : NULL
## $ axis.line.x.top : NULL
## $ axis.line.x.bottom : NULL
## $ axis.line.y : NULL
## $ axis.line.y.left : NULL
## $ axis.line.y.right : NULL
## $ axis.line.theta : NULL
## $ axis.line.r : NULL
## $ legend.background : NULL
## $ legend.margin : NULL
## $ legend.spacing : NULL
## $ legend.spacing.x : NULL
## $ legend.spacing.y : NULL
## $ legend.key : NULL
## $ legend.key.size : 'simpleUnit' num 1.2lines
## ..- attr(*, "unit")= int 3
## $ legend.key.height : NULL
## $ legend.key.width : NULL
## $ legend.key.spacing : 'simpleUnit' num 5.5points
## ..- attr(*, "unit")= int 8
## $ legend.key.spacing.x : NULL
## $ legend.key.spacing.y : NULL
## $ legend.frame : NULL
## $ legend.ticks : NULL
## $ legend.ticks.length : 'rel' num 0.2
## $ legend.axis.line : NULL
## $ legend.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.text.position : NULL
## $ legend.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.title.position : NULL
## $ legend.position : chr "right"
## $ legend.position.inside : NULL
## $ legend.direction : NULL
## $ legend.byrow : NULL
## $ legend.justification : NULL
## $ legend.justification.top : NULL
## $ legend.justification.bottom : NULL
## $ legend.justification.left : NULL
## $ legend.justification.right : NULL
## $ legend.justification.inside : NULL
## $ legend.location : NULL
## $ legend.box : NULL
## $ legend.box.just : NULL
## $ legend.box.margin : NULL
## $ legend.box.background : NULL
## $ legend.box.spacing : NULL
## [list output truncated]
## - attr(*, "class")= chr [1:2] "theme" "gg"
## - attr(*, "complete")= logi TRUE
## - attr(*, "validate")= logi TRUE
data <- read_excel("C:/Users/benin/Downloads/Tingkat Pengangguran Terbuka (TPT) 2022-2024.xlsx")
data
## # A tibble: 39 × 4
## `Kabupaten/Kota Se Jawa Timur` `2022` `2023` `2024`
## <chr> <dbl> <dbl> <dbl>
## 1 Kabupaten Pacitan 3.65 1.83 1.56
## 2 Kabupaten Ponorogo 5.51 4.66 4.19
## 3 Kabupaten Trenggalek 5.37 4.52 3.9
## 4 Kabupaten Tulungagung 6.65 5.65 4.12
## 5 Kabupaten Blitar 5.45 4.91 4.77
## 6 Kabupaten Kediri 6.83 5.79 5.1
## 7 Kabupaten Malang 6.57 5.7 5.13
## 8 Kabupaten Lumajang 4.97 3.67 3.28
## 9 Kabupaten Jember 4.06 4.01 3.23
## 10 Kabupaten Banyuwangi 5.26 4.75 4.03
## # ℹ 29 more rows
geo[,7] = data[,4]
## Warning in `[<-.data.frame`(`*tmp*`, , 7, value = structure(list(`2024` =
## c(1.56, : replacement element 1 has 39 rows to replace 38 rows
plot(geo[,7])
tmap_options(check_and_fix = TRUE)
qtm(geo, fill = "2024", text = "KABKOT", text.size = 0.2)
##
## ── tmap v3 code detected ───────────────────────────────────────────────────────
## [v3->v4] `qtm()`: use `text_size` instead of `text.size`.
## The shape object "structure(list(KABKOTNO = c("01", "02", "03", "04", "05", "06", " is invalid. Trying to fix it...
Berdasarkan data Harapan Lama Sekolah (HLS) tahun 2022–2024 di beberapa kabupaten/kota di Jawa Timur, terlihat adanya tren peningkatan di hampir seluruh wilayah.
Berdasarkan peta persebaran:
Keseluruhan pola menunjukkan bahwa meskipun rata-rata HLS membaik, pemerataan akses pendidikan antar wilayah masih perlu ditingkatkan, terutama untuk daerah non-perkotaan.