Lembaga : Universitas Islam Negeri Maulana Malik Ibrahim Malang
Jurusan : Teknik Informatika
library(readxl)
datainflow <- read_excel(path = "book1.xlsx")
## New names:
## * `` -> ...2
datainflow
## # A tibble: 11 x 13
## Tahun ...2 Sumatera Aceh `Sumatera Utara` `Sumatera Barat` Riau
## <dbl> <lgl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011 NA 57900. 2308. 23238. 9385. 3012.
## 2 2012 NA 65911. 2620. 25981. 11192. 4447.
## 3 2013 NA 98369. 36337. 18120. 14056. 8933.
## 4 2014 NA 86024. 4567. 30503. 14103. 6358.
## 5 2015 NA 86549. 4710. 30254. 13309. 7156.
## 6 2016 NA 97764. 5775. 34427. 14078. 8211.
## 7 2017 NA 103748. 5514. 35617. 15312. 8553.
## 8 2018 NA 117495. 5799. 41769. 15058. 10730.
## 9 2019 NA 133762. 7509. 47112. 14750. 10915.
## 10 2020 NA 109345. 6641. 36609. 10696. 9148.
## 11 2021 NA 89270. 3702. 31840. 10748. 7769.
## # ... with 6 more variables: `Kep. Riau` <dbl>, Jambi <dbl>,
## # `Sumatera Selatan` <dbl>, Bengkulu <dbl>, Lampung <dbl>,
## # `Kep. Bangka Belitung` <dbl>
library(readxl)
dataoutflow <- read_excel(path = "book2.xlsx")
## New names:
## * `` -> ...2
dataoutflow
## # A tibble: 11 x 13
## Tahun ...2 Sumatera Aceh `Sumatera Utara` `Sumatera Barat` Riau
## <dbl> <lgl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011 NA 80092. 6338. 22176. 5300. 12434.
## 2 2012 NA 85235. 6378. 22495. 6434. 13014.
## 3 2013 NA 103288. 23278. 19235. 6511. 15460.
## 4 2014 NA 102338. 8630. 26391. 7060. 15158.
## 5 2015 NA 109186. 9637. 27877. 7471. 15789.
## 6 2016 NA 121992. 11311. 31959. 9198. 17645.
## 7 2017 NA 133606. 11760. 35243. 10754. 18128.
## 8 2018 NA 135676. 11450. 36908. 8447. 17926.
## 9 2019 NA 153484. 13087. 44051. 9465. 19277.
## 10 2020 NA 140589. 12874. 39758. 8763. 19139.
## 11 2021 NA 86627. 5770. 23453. 5941. 12631.
## # ... with 6 more variables: `Kep. Riau` <dbl>, Jambi <dbl>,
## # `Sumatera Selatan` <dbl>, Bengkulu <dbl>, Lampung <dbl>,
## # `Kep. Bangka Belitung` <dbl>
plot(datainflow$Tahun,datainflow$`Sumatera Selatan`,type = "l", col= "steelblue")
plot(dataoutflow$Tahun,dataoutflow$`Sumatera Selatan`,type = "l", col= "red")
plot(datainflow$Tahun,datainflow$`Sumatera Selatan`,type = "l", col= "steelblue")
lines(dataoutflow$Tahun,dataoutflow$`Sumatera Selatan`,col="red")
legend("top",c("Inflow","Outflow"),fill=c("steelblue","red"))
library(readxl)
datainflowperbulan <- read_excel(path = "inmount.xlsx")
dataoutflowperbulan <- read_excel(path = "outmount.xlsx")
datainflowperbulan
## # A tibble: 128 x 12
## keterangan Sumatera Aceh `Sumatera Utara` `Sumatera Barat` Riau
## <dttm> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011-01-01 00:00:00 4164. 124. 2068. 545. 94.2
## 2 2011-02-01 00:00:00 3338. 115. 1826. 450. 96.4
## 3 2011-03-01 00:00:00 4878. 154. 2028. 849. 288.
## 4 2011-04-01 00:00:00 3157. 122. 1429. 539. 160.
## 5 2011-05-01 00:00:00 3821. 123. 1539. 692. 195.
## 6 2011-06-01 00:00:00 3686. 151. 1637. 592. 101.
## 7 2011-07-01 00:00:00 4370. 107. 1791. 800. 143.
## 8 2011-08-01 00:00:00 3668. 184. 1256. 586. 134.
## 9 2011-09-01 00:00:00 12875. 606. 4172. 2176. 1014.
## 10 2011-10-01 00:00:00 4777. 158. 1941. 787. 341.
## # ... with 118 more rows, and 6 more variables: `Kep. Riau` <dbl>, Jambi <dbl>,
## # `Sumatera Selatan` <dbl>, Bengkulu <dbl>, Lampung <dbl>,
## # `Kep. Bangka Belitung` <dbl>
dataoutflowperbulan
## # A tibble: 128 x 12
## keterangan Sumatera Aceh `Sumatera Utara` `Sumatera Barat` Riau
## <dttm> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011-01-01 00:00:00 3442. 350. 941. 307. 478.
## 2 2011-02-01 00:00:00 3989. 193. 990. 228. 400.
## 3 2011-03-01 00:00:00 4229. 230. 1209. 347. 621.
## 4 2011-04-01 00:00:00 6721. 529. 1653. 336. 1006.
## 5 2011-05-01 00:00:00 5787. 523. 1465. 328. 1000.
## 6 2011-06-01 00:00:00 7395. 406. 2167. 399. 1366.
## 7 2011-07-01 00:00:00 7154. 958. 1695. 449. 815.
## 8 2011-08-01 00:00:00 16043. 1046. 4104. 1376. 2729.
## 9 2011-09-01 00:00:00 1915. 124. 824. 148. 154.
## 10 2011-10-01 00:00:00 5174. 634. 1392. 299. 830.
## # ... with 118 more rows, and 6 more variables: `Kep. Riau` <dbl>, Jambi <dbl>,
## # `Sumatera Selatan` <dbl>, Bengkulu <dbl>, Lampung <dbl>,
## # `Kep. Bangka Belitung` <dbl>
plot(datainflowperbulan$`Sumatera Selatan`, type = "l", col = "green")
lines(dataoutflowperbulan$`Sumatera Selatan`,col="yellow")
legend("top",c("Inflow","Outflow"),fill=c("green","yellow"))
SumateraSelatantimeseries <- datainflowperbulan$`Sumatera Selatan`
plot.ts(SumateraSelatantimeseries , type = "l", col = "green")
logSumateraSelatan <- log(datainflowperbulan$`Sumatera Selatan`)
plot.ts(logSumateraSelatan)