• Tidak ada hasil yang ditemukan

Agustina T, Sitanggang IS. 2015. Sequential patterns for hotspot occurences based weather data using Clospan algorithm. Di dalam: International Conference on Adaptive and Intelligent Agroindustry (ICAIA); 2015 Agu 3-4; Bogor, Indonesia (ID). hlm 301-305.

Han J, Pei J, Yan X. 2005. Sequential pattern mining by pattern-growth: principles and extensions. StudFuzz. 180: 183-220.

Hermawati R, Sitanggang IS. 2016. Web-based clustering application using Shiny framework and DBSCAN algorithm for hotspots data in peatland in Sumatra.

Procedia Environmental Sciences 33. hlm 317-323.

[KLH] Kementrian Lingkungan Hidup. 2006. Koordinasi kelembagaan pengelolaan lahan gambut di Indonesia [internet]. Jakarta (ID): KLH. [diunduh 2015 Desember 4]. Tersedia pada: http://www.menlh.go.id/koordinasi-kelembagaan-pengelolaan-lahan-gambut-di-indonesia/.

Siknun GP, Sitanggang IS. 2016. Web-based classification application for forest fire data using the shiny framework and the C5.0 algorithm. Procedia Environmental Sciences 33. hlm 332-339.

Suci AMYA, Sitanggang IS. 2015. Web-based application for outliers detection on hotspot data using K-Means clustering algorithm and Shiny framework. Di dalam: IOP Conference Series: Earth and Environmental Science 31; 2016;

Indonesia (ID).

Zaki MJ. 2001. SPADE: An efficient algorithm for mining frequent sequences.

Machine Learning, 42, 31-60.

Zhao Q, Bhowmick SS. Sequential pattern mining: A survey. Technical Report CAIS No.2003118. Singapore, 2003.

19 Lampiran 1 Pola sekuensial titik panas setiap dataset dengan ukuran 1-sekuens Dataset Sumatra 2014

Dataset Sumatra 2015

20

Lampiran 1 Lanjutan

Dataset Kalimantan 2014

Dataset Kalimantan 2015

21 Lampiran 1 Lanjutan

22

Lampiran 2 Pola sekuens titik panas Sumatra 2015 dengan ukuran minimal 2-sekuens

23 Lampiran 2 Lanjutan

sequence support 118 <{129},{282}> 0.01488834 119 <{190},{282}> 0.01450659 120 <{221},{282}> 0.01679710 121 <{252},{282}> 0.01011643 122 <{68},{282}> 0.01030731 123 <{159},{281}> 0.01049819 124 <{220},{281}> 0.01221607 125 <{68},{272}> 0.01049819 126 <{9},{272}> 0.01450659 127 <{268},{271}> 0.01221607 128 <{270},{271}> 0.01450659 129 <{68},{271}> 0.01049819 130 <{9},{271}> 0.01698797 131 <{268},{270}> 0.01087994 132 <{9},{270}> 0.01145257 133 <{268},{269}> 0.01164344 134 <{266},{268}> 0.02844054 135 <{264},{266}> 0.02405039 136 <{265},{266}> 0.01336133 137 <{255},{257}> 0.01221607 138 <{8},{241}> 0.01450659 139 <{129},{221}> 0.01164344 140 <{190},{221}> 0.01183432 141 <{159},{220}> 0.01107082 142 <{129},{190}> 0.01565184 143 <{129},{160}> 0.01068906 144 <{68},{160}> 0.01087994 145 <{67},{159}> 0.01259782 146 <{8},{159}> 0.01393396 147 <{98},{159}> 0.01603359

24

Lampiran 3 Kode program R untuk algoritme SPADE

function (data, parameter = NULL, control = NULL, tmpdir = tempdir()) {

if (.Platform$OS == "windows" && .Platform$GUI == "Rgui")

system2 <- function(command, args = character(), stdout = "",

if (!inherits(data, "transactions"))

stop("'data' not of class transactions")

if (!all(c("sequenceID", "eventID") %in% names(transactionInfo(data)))) stop("slot transactionInfo: missing 'sequenceID' and/or 'eventID'") class <- transactionInfo(data)[["classID"]]

if (!is.null(class)) {

names(class) <- transactionInfo(data)[["sequenceID"]]

class <- class[!duplicated(names(class))]

class <- factor(class) }

if (!all(dim(data)))

return(new("sequences"))

parameter <- as(parameter, "SPparameter") control <- as(control, "SPcontrol") if (control@verbose) {

exe <- system.file(exe, package = "arulesSequences") file <- tempfile(pattern = "cspade", tmpdir)

on.exit(unlink(paste(file, "*", sep = "."))) opt <- ""

25

if (system2(file.path(exe, "exttpose"), args = c("-i", file, "-o", file, "-p", nop, opt, "-l -x -s", parameter@support), stdout = out))

stop("system invocation failed") file.append("summary.out", out) if (!is.null(class))

write_class(class, paste(file, "class", sep = ".")) if (length(parameter@maxsize))

opt <- paste(opt, "-Z", parameter@maxsize, collapse = "") if (!length(control@bfstype) || !control@bfstype)

opt <- paste(opt, "-r", collapse = "")

else if (system2(file.path(exe, "spade"), args = c("-i", file, "-s", parameter@support, opt, "-e", nop, "-o"),

out <- read_spade(con = out, labels = itemLabels(data), transactions = if (control@tidLists)

26

Lampiran 3 Lanjutan

data, class = class)

out@info <- c(data = match.call()$data, ntransactions = length(data), out@info, support = parameter@support)

if (control@verbose) { t4 <- proc.time()

cat(paste(" [", format((t4 - t3)[3], digits = 2, format = "f"), "s]", sep = ""))

cat("\n\ntotal elapsed time: ", (t4 - t1)[3], "s\n", sep = "")

}

if (!control@summary) unlink("summary.out") out

}

<environment: namespace:arulesSequences>

27 Lampiran 4 Kode program untuk menampilkan plot berdasarkan karakteristik

lahan gambut

#input dataset to data.frame selectedData2 <- reactive({

switch(input$firespot2,

'2fs14' = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/2sumatra2014.csv', sep = ',', header = TRUE)), '2fs14' = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/2sumatra2015.csv', sep = ',', header = TRUE)), '3fs14' = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/3sumatra2014.csv', sep = ',', header = TRUE)), '3fs14' = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/3sumatra2015.csv', sep = ',', header = TRUE)), '4fs15' = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/4sumatra2015.csv', sep = ',', header = TRUE)) )

})

#Plot by Landuse

landuse_plot <- reactive({

# read shapefile (plot spatial data)

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData2()$longitude lat <- selectedData2()$latitude landuse <- selectedData2()$landuse hotspot <- data.frame(long,lat,landuse)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color = "grey") +

theme(legend.position = "right", legend.direction = "horizontal") + geom_point(data = hotspot, aes(long,lat, color=factor(landuse)), size=2) + ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=1, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

#Plot by Depth

depth_plot2 <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData2()$longitude

28

Lampiran 4 Lanjutan

lat <- selectedData2()$latitude depth <- selectedData2()$depth hotspot <- data.frame(long,lat,depth)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") +

geom_point(data = hotspot, aes(long,lat, color=factor(depth)), size=2) + ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=1, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

#Plot by type

type_plot2 <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData2()$longitude lat <- selectedData2()$latitude type <- selectedData2()$type

hotspot <- data.frame(long,lat,type)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") + geom_point(data = hotspot, aes(long,lat, color=factor(type)), size=2) + ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=1, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

db_summarys <- reactive({

landuse <- selectedData2()$landuse depth <- selectedData2()$depth type <- selectedData2()$type

sums <- data.frame(landuse, depth, type) tablesum <- summary.data.frame(sums) list(tablesum = tablesum)

})

#output for plot by landuse output$luseplot <- renderPlot({

input$showplot12

if(input$showplot12 == 0)

return("Please click 'Show Plot' button to see plot") else isolate(landuse_plot())

})

29 Lampiran 4 Lanjutan

#output for plot by depth output$deplot2 <- renderPlot({

input$showplot22

if(input$showplot22 == 0)

return("Please click 'Show Plot' button to see plot") else isolate(depth_plot2())

})

#output for plot by type output$typlot2 <- renderPlot({

input$showplot32

if(input$showplot32 == 0)

return("Please click 'Show Plot' button to see plot") else isolate(type_plot2())

})

output$summarys <- renderTable(

db_summarys()$tablesum,options = list(paging = FALSE, searching = FALSE, searchable = FALSE, pageLength = -1, sort=FALSE))

30

Lampiran 5 Kode program untuk menampilkan plot berdasarkan cuaca

selectedData4 <- reactive({

switch(input$firespot4,

fss14 = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/cuaca sumatra 2014.csv', sep = ',', header = TRUE)),

fss15 = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/cuaca sumatra 2015.csv', sep = ',', header = TRUE))

) })

temperature <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData4()$longitude lat <- selectedData4()$latitude

temperature <- selectedData4()$average_temperature hotspot <- data.frame(long,lat,temperature)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") +

geom_point(data = hotspot, aes(long,lat, color=factor(temperature)), size=2) + ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=3, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

humidity <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData4()$longitude lat <- selectedData4()$latitude

humidity <- selectedData4()$average_humidity hotspot <- data.frame(long,lat,humidity)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") +

geom_point(data = hotspot, aes(long,lat, color=factor(humidity)), size=2) + ylab("Latitude") + xlab("Longitude") +

31 Lampiran 5 Lanjutan

guides(col = guide_legend(ncol=2, byrow = TRUE, override.aes = list(size=3))) + guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) +

coord_equal() })

rain <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData4()$longitude lat <- selectedData4()$latitude rain <- selectedData4()$precipitation hotspot <- data.frame(long,lat,rain)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") + geom_point(data = hotspot, aes(long,lat, color=factor(rain)), size=2) + ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=1, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

db_summaryw <- reactive({

temperature <- selectedData4()$average_temperature humidity <- selectedData4()$average_humidity precipitation <- selectedData4()$precipitation

sumw <- data.frame(temperature, humidity, precipitation) tablesum <- summary.data.frame(sumw)

list(tablesum = tablesum) })

output$splot <- renderPlot({

input$shows

if(input$shows == 0)

return("Please click 'Show Plot' button to see plot") else isolate(temperature())

})

output$chplot <- renderPlot({

input$showch

if(input$showch == 0)

return("Please click 'Show Plot' button to see plot") else isolate(rain())

})

output$kplot <- renderPlot({

input$showk

if(input$showk == 0)

return("Please click 'Show Plot' button to see plot") else isolate(humidity())

})

32

Lampiran 6 Kode program untuk menampilkan plot berdasarkan sosial ekonomi

selectedData5 <- reactive({

switch(input$firespot5,

fsss14 = myobj <- as.data.frame(read.csv('E:/Visualisasi SPADE/sosial ekonomi.csv', sep = ',', header = TRUE))

) })

school <- reactive({

# read shapefile

map <- readOGR(dsn="E:/Visualisasi SPADE", layer="sumatra")

#add to data a new column termed "id" composed of the rownames of data map@data$id <- rownames(map@data)

# convert to dataframe maps <- fortify(map)

#merge the fortified with data from spatial object mergemap <- merge(maps, map@data, by="id")

long <- selectedData5()$longitude lat <- selectedData5()$latitude

number_of_school <- selectedData5()$number_of_school hotspot <- data.frame(long,lat,number_of_school)

ggplot(mergemap, aes(long,lat)) +

geom_point(data=maps, aes(long, lat), color="grey") +

theme(legend.position = "right", legend.direction="horizontal") +

geom_point(data = hotspot, aes(long,lat, color=factor(number_of_school)), size=2) +

ylab("Latitude") + xlab("Longitude") +

guides(col = guide_legend(ncol=2, byrow = TRUE, override.aes = list(size=3))) +

guides(fill = guide_legend(ncol=2, byrow = TRUE), size=1) + coord_equal()

})

db_summaryse <- reactive({

land_fire <- selectedData5()$land_fire

income_source <- selectedData5()$income_source number_of_school <- selectedData5()$number_of_school

sumse <- data.frame(land_fire, income_source, number_of_school) tablesum <- summary.data.frame(sumse)

list(tablesum = tablesum) })

#output social economy output$ndplot <- renderPlot({

input$shownd

if(input$shownd == 0)

return("Please click 'Show Plot' button to see plot") else isolate(fire())

})

output$siplot <- renderPlot({

input$showsi

if(input$showsi == 0)

return("Please click 'Show Plot' button to see plot") else isolate(income())

})

output$nsplot <- renderPlot({

33 Lampiran 6 Lanjutan

input$showns

if(input$showns == 0)

return("Please click 'Show Plot' button to see plot") else isolate(school())

})

output$summaryse <- renderTable(

db_summaryse()$tablesum,options = list(paging = FALSE, searching = FALSE, searchable = FALSE, pageLength = -1, sort=FALSE))

34

Lampiran 7 Tampilan antarmuka aplikasi plot pola sekuens titik panas Sumatra 2014 berdasarkan cuaca

35 Lampiran 7 Lanjutan

36

Lampiran 8 Tampilan antarmuka aplikasi plot pola sekuens titik panas Sumatra 2014 berdasarkan sosial ekonomi

37 Lampiran 8 Lanjutan

38

Lampiran 9 Tampilan antarmuka tab Help pada aplikasi

39 Lampiran 10 Tampilan antarmuka tab About pada aplikasi

40

Dokumen terkait