The term geological resource refers to all the solid, gas, and liquid elements originating from the earth’s crust both on the surface and below the surface with optimal concentration to be extracted.
Copper Mine is an example of Geological Resources
Geologically, Indonesia is a potential region for the formation of various energy and mineral resources. Exploration activities that have been carried out since 1800’s up to the present time, have successfully uncovered these resources in numerous areas. Among these various resources, oil, gas, coal, coal, tin, nickel, copper, and gold have so far given important contribution to the Indonesian economy. The majority of Indonesian territory has not been explored thoroughly, and therefore the chance to discover new economical energy and mineral deposit is likely to be substantial.
Data includes all mineral resources from all over Indonesia. Resources including metal, geothermal, non-metal, and coal resources. Data sets is combined for easier visualization. Visualization of data is used to gain insights on how geological resources in Indonesia varied.
#Load all required library
library(tidyverse)
library(ggplot2)
library(readxl)#Import all data
coal <- read_excel("BB.xlsx")
non_metal <- read_excel("BL.xlsx")
metal <- read_excel("ML.xlsx")
geothermal <- read_excel("PB.xlsx")#Bind all data
resources <- rbind(coal, non_metal, metal, geothermal)
resources#Inspect data types
glimpse(resources)#> Rows: 8,288
#> Columns: 9
#> $ potensi <chr> "Batubara", "Batubara", "Batubara", "Batubara", "Batuba~
#> $ nama_provinsi <chr> "Aceh", "Aceh", "Aceh", "Aceh", "Aceh", "Aceh", "Aceh",~
#> $ nama_kabupaten <chr> "Aceh Barat", "Aceh Barat", "Aceh Barat", "Aceh Barat",~
#> $ Komoditas <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ tahun <dbl> 2015, 2016, 2017, 2018, 2015, 2016, 2017, 2018, 2016, 2~
#> $ total_sd <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ total_cad <chr> "450.15", "1195.919382", "766.699382", "954.367382", "0~
#> $ total_sd_2 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ total_cad_2 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#Change data types
resources <- resources %>%
mutate(potensi = as.factor(potensi),
total_sd = as.integer(total_sd),
total_cad = as.integer(total_cad),
total_sd_2 = as.integer(total_sd_2),
total_cad_2 = as.integer(total_cad_2))#Inspect data type after mutate
glimpse(resources)#> Rows: 8,288
#> Columns: 9
#> $ potensi <fct> Batubara, Batubara, Batubara, Batubara, Batubara, Batub~
#> $ nama_provinsi <chr> "Aceh", "Aceh", "Aceh", "Aceh", "Aceh", "Aceh", "Aceh",~
#> $ nama_kabupaten <chr> "Aceh Barat", "Aceh Barat", "Aceh Barat", "Aceh Barat",~
#> $ Komoditas <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ tahun <dbl> 2015, 2016, 2017, 2018, 2015, 2016, 2017, 2018, 2016, 2~
#> $ total_sd <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ total_cad <int> 450, 1195, 766, 954, 0, 0, 0, 0, 53, 53, 319, 44061, 98~
#> $ total_sd_2 <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#> $ total_cad_2 <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,~
#Check missing value
colSums(is.na(resources))#> potensi nama_provinsi nama_kabupaten Komoditas tahun
#> 0 0 0 1255 0
#> total_sd total_cad total_sd_2 total_cad_2
#> 6263 411 6254 6254
#Fill missing total reserve with 0
resources$total_cad <- resources $total_cad %>%
replace_na(0) #Fill missing total resources with 0
resources$total_sd <- resources $total_sd %>%
replace_na(0) #Removing sd_2 and cad_2 and changing column name
resources <- resources %>%
select(-c(total_sd_2, total_cad_2))#Check missing value
colSums(is.na(resources))#> potensi nama_provinsi nama_kabupaten Komoditas tahun
#> 0 0 0 1255 0
#> total_sd total_cad
#> 0 0
resourcespotensi : geological resources potentialnama_provinsi : province name in Indonesianama_kabupaten : district name in IndonesiaKomoditas : resources commoditytahun : yeartotal_sd : total resourcestotal_cad : total energy reserve#Potential Count
potential_count <- data.frame(count = table(resources$potensi))
ggplot(data = potential_count,
mapping = aes(y = reorder(count.Var1,count.Freq), x = count.Freq)) +
geom_col(aes(fill = count.Freq), show.legend = F) +
scale_fill_gradient(low = "orange", high = "red") +
geom_label(data = potential_count, mapping = aes(label = count.Freq)) +
labs(title = "Indonesia Potential Resources Count",
x = "Frequency",
y = NULL)Insights :
#Filter data to be only in java
resources_jawa <- resources %>%
filter(nama_provinsi == "Jawa Barat" | nama_provinsi == "Jawa Tengah" |
nama_provinsi == "Jawa Timur" | nama_provinsi == "Banten" |
nama_provinsi == "D.I. Yogyakarta")resources_jawa_agg <- aggregate(formula = total_cad~nama_provinsi+tahun,
data = resources_jawa,
FUN = sum)
resources_jawa_agg <- resources_jawa_agg %>%
mutate(total_cad = round(total_cad/1000000, 2))
ggplot(data = resources_jawa_agg,
mapping = aes(x = tahun,
y = total_cad)) +
geom_line(aes(group = nama_provinsi, col = nama_provinsi), lwd = 0.9) +
geom_point(aes(col = nama_provinsi)) +
facet_wrap(~nama_provinsi, nrow = 3) +
labs(title = "Java Province Reserve Growth Comparison",
x = "Year",
y = "Total Reserves") +
theme(legend.position = "none")Insights :