0.0.1 Dosen Pengampu : Prof. Dr. Suhartono, M.Kom

0.0.2 Lembaga : Universitas Islam Negeri Maulana Malik Ibrahim Malang

0.0.3 Jurusan : Teknik Informatika

0.0.4 Fakultas : Sains dan Teknologi


1 Pengertian Inflow-Outflow Uang Kartal

Inflows adalah uang yang masuk ke Bank Indonesia melalui kegiatan penyetoran, dan outflows adalah uang yang keluar dari Bank Indonesia melalui kegiatan penarikan. Setiap daerah memiliki prediksi data inflow-outflow uang kartal yang berbeda-beda. Berikut komparasi visualisasi prediksi data inflow-outflow uang kartal antara Aceh dengan Bengkulu menggunakan bahasa pemrograman R.

library(readxl)
## Warning: package 'readxl' was built under R version 4.1.2
## Warning: package 'readxl' was built under R version 4.1.2
datainflow <- read_excel(path = "C:/Users/shafira halmahera/Documents/LINEAR ALGEBRA/DatainBali.xlsx")
datainflow
library(readxl)
dataoutflow <- read_excel(path = "C:/Users/shafira halmahera/Documents/LINEAR ALGEBRA/DataoutBali.xlsx")
dataoutflow

1. Komparasi Visualisasi Prediksi Data Inflow Uang Kartal di Bali dan Nusa Tenggara Setiap Periode

plot(datainflow$Tahun,datainflow$Bali,type = "l", col= "dodgerblue")
lines(datainflow$Tahun,datainflow$Bali,col="red")
legend("top",c("Inflow Bali","Inflow Bali"),fill=c("dodgerblue","red"))

2. Komparasi Visualisasi Prediksi Data Outflow Uang Kartal di Bali dan Nusa Tenggara Setiap Periode

plot(dataoutflow$Tahun,dataoutflow$`Bali`,type = "l", col= "green")
lines(dataoutflow$Tahun,dataoutflow$Bali,col="mediumorchid")
legend("top",c("Outflow Bali","Outflow NusaTenggaraBarat"),fill=c("green","mediumorchid"))

3. Komparasi Visualisasi Prediksi Data Inflow-Outflow Uang Kartal di Bali dan Nusa Tenggara Setiap Periode

plot(datainflow$Tahun,datainflow$`Bali`,type = "l", col= "dodgerblue")
lines(datainflow$Tahun,datainflow$Bali,col="gold")
lines(dataoutflow$Tahun,dataoutflow$`Bali`, col= "green")
lines(dataoutflow$Tahun,dataoutflow$Bali,col="mediumorchid")
legend("top",c("Inflow Bali","Bali","Outflow Bali","Outflow Nusa Tenggara"),fill=c("dodgerblue","red","green","mediumorchid"))

4. Komparasi Visualisasi Prediksi Data Inflow-Outflow Uang Kartal di Bali dan Nusa Tenggara Setiap Bulan

library(readxl)
datainflowperbulan <- read_excel(path = "C:/Users/shafira halmahera/Documents/LINEAR ALGEBRA/DataPerbulanInflow Bali.xlsx")
dataoutflowperbulan <- read_excel(path = "C:/Users/shafira halmahera/Documents/LINEAR ALGEBRA/DataPerbulanOutflow Bali.xlsx")
datainflowperbulan
dataoutflowperbulan
plot(datainflowperbulan$`Bali`, type = "l", col = "tomato")
lines(datainflowperbulan$NusaTenggaraBarat,col="pink")
## Warning: Unknown or uninitialised column: `NusaTenggaraBarat`.
lines(dataoutflowperbulan$`Bali`, col = "green")
lines(dataoutflowperbulan$NusaTenggaraBarat,col="purple")
## Warning: Unknown or uninitialised column: `NusaTenggaraBarat`.
legend("top",c("Inflow Bali","Inflow NusaTenggaraBarat ","Outflow Bali","Outflow Nusa Tenggara Barat"),fill=c("tomato","pink","green","purple"))

Balitimeseries <- datainflowperbulan$`Bali`
NusaTenggaraTimurtimeseries <- datainflowperbulan$NusaTenggaraTimur
## Warning: Unknown or uninitialised column: `NusaTenggaraTimur`.
plot.ts(Balitimeseries , type = "l", col = "red")
lines(NusaTenggaraTimurtimeseries , type = "l", col = "darkorchid")
legend("top",c("Bali Timeseries","NusaTenggaraTimur Timeseries"),fill=c("red","darkorchid"))

library(TTR)
## Warning: package 'TTR' was built under R version 4.1.2
## Warning: package 'TTR' was built under R version 4.1.2
library(TTR)
BaliSMA3 <- SMA(datainflowperbulan$`Bali`,n=8)
BaliSMA3 <- SMA(datainflowperbulan$`Bali`,n=8)
plot.ts(BaliSMA3, type = "l", col = "black")
lines(BaliSMA3, type = "l", col = "red")
legend("top",c("BaliSMA3","BaliSMA3"),fill=c("black","red"))

5. Komparasi Visualisasi Prediksi Data Inflow-Outflow Time Series Uang Kartal di Bali dan Nusa Tenggara

NusaTenggaraBaratinflowtimeseries <- ts(datainflowperbulan$`Bali`, frequency=12, start=c(2011,1))
Baliinflowtimeseries <- ts(datainflowperbulan$Bali, frequency=12, start=c(2011,1))
NusaTenggaraBaratinflowtimeseries
##            Jan       Feb       Mar       Apr       May       Jun       Jul
## 2011  463.4942  401.2705  531.8321  430.9272  474.4475  393.3474  585.2862
## 2012  762.4934  914.6596  603.7560  585.8805  728.3468  587.1981  596.7980
## 2013  504.5470  225.2885  144.5615  138.7439  154.8955  140.1864  181.5579
## 2014 1580.2015 1062.1237  689.1191  989.9306  589.6238 1027.5450  499.7980
## 2015 2142.3029  977.6232  965.6738 1078.2866  916.6191  815.5232 1816.1220
## 2016 2074.5030 1651.8148 1349.2410 1088.3478 1353.8161  952.5911 2201.8241
## 2017 2052.4898 1421.0190 1101.7151 1574.5009 1468.2795  832.9708 2545.4088
## 2018 2241.5629 1242.8403 1018.0038 1503.9253  850.0291 2939.5841 1575.9134
## 2019 3472.2707 1615.9872 1701.0987 1460.2353 1252.9815 2856.2398 1316.8511
## 2020 2986.7851 1546.2565 1229.2731 1473.7059 1016.1529 1296.2055  835.0932
## 2021 2434.9203  871.2755  774.6759  852.3260 1078.5028  501.8520  395.7334
##            Aug       Sep       Oct       Nov       Dec
## 2011  328.0076 1434.0210  522.3054  515.8948  313.5151
## 2012  722.4166  871.1744  622.0534  802.9841  404.7057
## 2013  628.6199  741.6369  633.2221 1035.4237  537.7725
## 2014 1880.5043  878.8203  894.8855  995.4530  501.9600
## 2015 1003.7575  849.1843  865.9261  975.2170  665.4194
## 2016 1280.5338 1804.2490 1450.3419 1467.4868 1238.9536
## 2017 1177.3180 1206.4513 1048.4978 1787.1670  746.2877
## 2018 1537.0602 1540.6172 1925.8187 1558.4903  675.7620
## 2019 1640.0412 1524.4376 1758.9356 1566.7674 1255.8585
## 2020  832.4055 1163.7777  660.4813 1155.9158  539.1009
## 2021  595.8928
NusaTenggaraBaratinflowtimeseries
##            Jan       Feb       Mar       Apr       May       Jun       Jul
## 2011  463.4942  401.2705  531.8321  430.9272  474.4475  393.3474  585.2862
## 2012  762.4934  914.6596  603.7560  585.8805  728.3468  587.1981  596.7980
## 2013  504.5470  225.2885  144.5615  138.7439  154.8955  140.1864  181.5579
## 2014 1580.2015 1062.1237  689.1191  989.9306  589.6238 1027.5450  499.7980
## 2015 2142.3029  977.6232  965.6738 1078.2866  916.6191  815.5232 1816.1220
## 2016 2074.5030 1651.8148 1349.2410 1088.3478 1353.8161  952.5911 2201.8241
## 2017 2052.4898 1421.0190 1101.7151 1574.5009 1468.2795  832.9708 2545.4088
## 2018 2241.5629 1242.8403 1018.0038 1503.9253  850.0291 2939.5841 1575.9134
## 2019 3472.2707 1615.9872 1701.0987 1460.2353 1252.9815 2856.2398 1316.8511
## 2020 2986.7851 1546.2565 1229.2731 1473.7059 1016.1529 1296.2055  835.0932
## 2021 2434.9203  871.2755  774.6759  852.3260 1078.5028  501.8520  395.7334
##            Aug       Sep       Oct       Nov       Dec
## 2011  328.0076 1434.0210  522.3054  515.8948  313.5151
## 2012  722.4166  871.1744  622.0534  802.9841  404.7057
## 2013  628.6199  741.6369  633.2221 1035.4237  537.7725
## 2014 1880.5043  878.8203  894.8855  995.4530  501.9600
## 2015 1003.7575  849.1843  865.9261  975.2170  665.4194
## 2016 1280.5338 1804.2490 1450.3419 1467.4868 1238.9536
## 2017 1177.3180 1206.4513 1048.4978 1787.1670  746.2877
## 2018 1537.0602 1540.6172 1925.8187 1558.4903  675.7620
## 2019 1640.0412 1524.4376 1758.9356 1566.7674 1255.8585
## 2020  832.4055 1163.7777  660.4813 1155.9158  539.1009
## 2021  595.8928
NusaTenggaraTimuroutflowtimeseries <- ts(dataoutflowperbulan$`Bali`, frequency=12, start=c(2011,1))
Balioutflowtimeseries <- ts(dataoutflowperbulan$Bali, frequency=12, start=c(2011,1))
Balioutflowtimeseries
##             Jan        Feb        Mar        Apr        May        Jun
## 2011  177.04785  353.18190  580.84406  662.00472  652.35527  852.01834
## 2012  451.04246  341.39192  830.24284  688.71274  904.20054 1196.88221
## 2013   57.18282  214.88582  231.08275  240.06173  465.74861  437.29678
## 2014  539.79219  545.37326 1297.23545  706.53950 1253.95573  708.63728
## 2015  448.78833  824.46903  816.20727 1369.16692  887.81091 1207.45967
## 2016  467.61312 1284.03949 1185.71883 1072.46665 1332.92351 2701.59907
## 2017  664.22361  940.12622 2369.52057  911.87713 1340.86594 3569.26368
## 2018  441.30460 1156.29890 1850.51681 1273.03798 2789.95571 2614.49313
## 2019  362.28166 1287.88184 2032.19820 1594.95019 4132.40136  681.97264
## 2020  998.41301 1560.90210 1466.22016  771.87655 1129.30582  598.21047
## 2021  208.86741  606.52211  940.73108 1365.48474 1381.95964  839.89621
##             Jul        Aug        Sep        Oct        Nov        Dec
## 2011  745.90148 1888.16025  458.37649  608.86935  572.37848 1360.66160
## 2012  840.91454 1898.63637  387.91387  772.62723  857.06659 1612.13863
## 2013  674.75666  507.77241  922.70871  931.60575  804.41288 1760.04933
## 2014 2669.93489  733.76944 1017.97525 1149.32633  770.15061 1710.94016
## 2015 2976.88610  953.14580  968.62953  898.48387  948.15400 2171.43853
## 2016 1644.16987 1701.46965 1780.98094 1467.68976 1337.69222 2163.22355
## 2017  781.43826 1801.45865 1017.94123 1565.91417 1111.98409 1747.07757
## 2018 1206.27367 1944.98961 1483.80701 1389.89394 1240.50547 3042.89475
## 2019 1962.25710 1375.85971 1406.26619 1366.25863 1482.11267 2969.92057
## 2020 1147.79277 1027.66274 1053.31914 1419.90221  772.16276 2376.77159
## 2021  752.80505  434.30228
Balioutflowtimeseries
##             Jan        Feb        Mar        Apr        May        Jun
## 2011  177.04785  353.18190  580.84406  662.00472  652.35527  852.01834
## 2012  451.04246  341.39192  830.24284  688.71274  904.20054 1196.88221
## 2013   57.18282  214.88582  231.08275  240.06173  465.74861  437.29678
## 2014  539.79219  545.37326 1297.23545  706.53950 1253.95573  708.63728
## 2015  448.78833  824.46903  816.20727 1369.16692  887.81091 1207.45967
## 2016  467.61312 1284.03949 1185.71883 1072.46665 1332.92351 2701.59907
## 2017  664.22361  940.12622 2369.52057  911.87713 1340.86594 3569.26368
## 2018  441.30460 1156.29890 1850.51681 1273.03798 2789.95571 2614.49313
## 2019  362.28166 1287.88184 2032.19820 1594.95019 4132.40136  681.97264
## 2020  998.41301 1560.90210 1466.22016  771.87655 1129.30582  598.21047
## 2021  208.86741  606.52211  940.73108 1365.48474 1381.95964  839.89621
##             Jul        Aug        Sep        Oct        Nov        Dec
## 2011  745.90148 1888.16025  458.37649  608.86935  572.37848 1360.66160
## 2012  840.91454 1898.63637  387.91387  772.62723  857.06659 1612.13863
## 2013  674.75666  507.77241  922.70871  931.60575  804.41288 1760.04933
## 2014 2669.93489  733.76944 1017.97525 1149.32633  770.15061 1710.94016
## 2015 2976.88610  953.14580  968.62953  898.48387  948.15400 2171.43853
## 2016 1644.16987 1701.46965 1780.98094 1467.68976 1337.69222 2163.22355
## 2017  781.43826 1801.45865 1017.94123 1565.91417 1111.98409 1747.07757
## 2018 1206.27367 1944.98961 1483.80701 1389.89394 1240.50547 3042.89475
## 2019 1962.25710 1375.85971 1406.26619 1366.25863 1482.11267 2969.92057
## 2020 1147.79277 1027.66274 1053.31914 1419.90221  772.16276 2376.77159
## 2021  752.80505  434.30228
plot.ts(Baliinflowtimeseries,type = "l", col = "gold")
lines(Baliinflowtimeseries, type = "l", col = "sienna")
legend("top",c("Baliinflowtimeseries","NusaTengagraBaratinflowtimeseries"),fill=c("gold","sienna"))

Baliintimeseriescomponents <- decompose(Baliinflowtimeseries)
NusaTenggaraBaratintimeseriescomponents <- decompose(NusaTenggaraBaratinflowtimeseries)
Baliintimeseriescomponents$seasonal
##               Jan          Feb          Mar          Apr          May
## 2011  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2012  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2013  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2014  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2015  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2016  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2017  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2018  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2019  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2020  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2021  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
##               Jun          Jul          Aug          Sep          Oct
## 2011   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2012   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2013   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2014   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2015   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2016   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2017   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2018   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2019   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2020   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2021   87.0027243   86.0411832  -36.5302514                          
##               Nov          Dec
## 2011   36.4726582 -464.6427685
## 2012   36.4726582 -464.6427685
## 2013   36.4726582 -464.6427685
## 2014   36.4726582 -464.6427685
## 2015   36.4726582 -464.6427685
## 2016   36.4726582 -464.6427685
## 2017   36.4726582 -464.6427685
## 2018   36.4726582 -464.6427685
## 2019   36.4726582 -464.6427685
## 2020   36.4726582 -464.6427685
## 2021
Baliintimeseriescomponents$seasonal
##               Jan          Feb          Mar          Apr          May
## 2011  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2012  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2013  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2014  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2015  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2016  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2017  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2018  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2019  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2020  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
## 2021  872.9690241    0.3238317 -199.9542593  -78.1078782 -255.3564776
##               Jun          Jul          Aug          Sep          Oct
## 2011   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2012   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2013   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2014   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2015   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2016   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2017   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2018   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2019   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2020   87.0027243   86.0411832  -36.5302514   58.8700441 -107.0878307
## 2021   87.0027243   86.0411832  -36.5302514                          
##               Nov          Dec
## 2011   36.4726582 -464.6427685
## 2012   36.4726582 -464.6427685
## 2013   36.4726582 -464.6427685
## 2014   36.4726582 -464.6427685
## 2015   36.4726582 -464.6427685
## 2016   36.4726582 -464.6427685
## 2017   36.4726582 -464.6427685
## 2018   36.4726582 -464.6427685
## 2019   36.4726582 -464.6427685
## 2020   36.4726582 -464.6427685
## 2021
Baliouttimeseriescomponents <- decompose(Balioutflowtimeseries)
NusaTenggaraTimurouttimeseriescomponents <- decompose(NusaTenggaraTimuroutflowtimeseries)
Baliouttimeseriescomponents$seasonal
##             Jan        Feb        Mar        Apr        May        Jun
## 2011 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2012 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2013 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2014 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2015 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2016 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2017 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2018 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2019 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2020 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2021 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
##             Jul        Aug        Sep        Oct        Nov        Dec
## 2011  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2012  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2013  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2014  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2015  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2016  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2017  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2018  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2019  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2020  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2021  243.99203  161.06380
NusaTenggaraTimurouttimeseriescomponents$seasonal
##             Jan        Feb        Mar        Apr        May        Jun
## 2011 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2012 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2013 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2014 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2015 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2016 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2017 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2018 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2019 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2020 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
## 2021 -774.20251 -355.93538   90.15465 -299.71599  318.76860  255.21133
##             Jul        Aug        Sep        Oct        Nov        Dec
## 2011  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2012  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2013  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2014  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2015  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2016  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2017  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2018  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2019  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2020  243.99203  161.06380 -174.99194  -72.15735 -245.52369  853.33646
## 2021  243.99203  161.06380
plot(Baliintimeseriescomponents$random,type = "l", col = "purple")
lines(Baliintimeseriescomponents$random,col="palegreen")
lines(Baliouttimeseriescomponents$random, type = "l", col = "lightskyblue")
lines(Baliouttimeseriescomponents$random,col="orange")
legend("top",c("Bali Inflow","Nusa Tenggara Inflow", "Bali Outflow","NusaTenggara Outflow"),fill=c("purple","palegreen","lightskyblue","red"))

plot(Baliintimeseriescomponents$figure,type = "l", col = "green")
lines(Baliintimeseriescomponents$figure,col="palegreen")
lines(Baliouttimeseriescomponents$figure, type = "l", col = "lightskyblue")
lines(Baliouttimeseriescomponents$figure,col="orange")
legend("top",c("Bali Inflow","NusaTenggara Inflow", "Bali Outflow","NusaTenggara Outflow"),fill=c("purple","palegreen","lightskyblue","orange"))