-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGIS.R
3692 lines (3571 loc) · 139 KB
/
GIS.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
library("ggplot2")
gis <- read.csv2("GIS13445.csv",header = TRUE,sep = ",")
K <- gis[1:779,]
KR <- gis[780:1148,]
KT <- gis[1149:1312,]
###############Temperature###############
KTemperature <- K[K$Parameter == 'Temperature',]
KTemperatureSample=data.frame(cbind(KTemperature$First.Sample,KTemperature$Second..Sample,KTemperature$Third.Sample,KTemperature$Fourth.Sample,KTemperature$Fifth.Sample))
names(KTemperatureSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTemperatureSample$First <- as.numeric(KTemperatureSample$First)
KTemperatureSample$Second <- as.numeric(KTemperatureSample$Second)
KTemperatureSample$Third <- as.numeric(KTemperatureSample$Third)
KTemperatureSample$Fourth <- as.numeric(KTemperatureSample$Fourth)
KTemperatureSample$Fifth <- as.numeric(KTemperatureSample$Fifth)
MeanKTemperature<-c()
for (i in 1:5) {
MeanKTemperature[i]=mean(KTemperatureSample[,i])
}
require(gridExtra)
KTemperatureggplot <- ggplot(data=data.frame(MeanKTemperature)
,aes(x=c(1:5),y=MeanKTemperature))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Temperature (C)')+
ggtitle("K")+
ylim(10,30)
#geom_hline(yintercept=KTemperature$Drinking.Standard)
KRTemperature <- KR[KR$Parameter == 'Temperature',]
KRTemperatureSample=data.frame(cbind(KRTemperature$First.Sample,KRTemperature$Second..Sample,KRTemperature$Third.Sample,KRTemperature$Fourth.Sample,KRTemperature$Fifth.Sample))
names(KRTemperatureSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRTemperatureSample$First <- as.numeric(KRTemperatureSample$First)
KRTemperatureSample$Second <- as.numeric(KRTemperatureSample$Second)
KRTemperatureSample$Third <- as.numeric(KRTemperatureSample$Third)
KRTemperatureSample$Fourth <- as.numeric(KRTemperatureSample$Fourth)
KRTemperatureSample$Fifth <- as.numeric(KRTemperatureSample$Fifth)
MeanKRTemperature<-c()
for (i in 1:5) {
MeanKRTemperature[i]=mean(KRTemperatureSample[,i])
}
KRTemperatureggplot <- ggplot(data=data.frame(MeanKRTemperature)
,aes(x=c(1:5),y=MeanKRTemperature))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Temperature (C)')+
ggtitle("KR")+
ylim(10,30)
#geom_hline(yintercept=KRTemperature$DrinKRing.Standard)
KTTemperature <- KT[KT$Parameter == 'Temperature',]
KTTemperatureSample=data.frame(cbind(KTTemperature$First.Sample,KTTemperature$Second..Sample,KTTemperature$Third.Sample,KTTemperature$Fourth.Sample,KTTemperature$Fifth.Sample))
names(KTTemperatureSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTTemperatureSample$First <- as.numeric(KTTemperatureSample$First)
KTTemperatureSample$Second <- as.numeric(KTTemperatureSample$Second)
KTTemperatureSample$Third <- as.numeric(KTTemperatureSample$Third)
KTTemperatureSample$Fourth <- as.numeric(KTTemperatureSample$Fourth)
KTTemperatureSample$Fifth <- as.numeric(KTTemperatureSample$Fifth)
MeanKTTemperature<-c()
for (i in 1:5) {
MeanKTTemperature[i]=mean(KTTemperatureSample[,i])
}
KTTemperatureggplot <- ggplot(data=data.frame(MeanKTTemperature)
,aes(x=c(1:5),y=MeanKTTemperature))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Temperature (C)')+
ggtitle("KT")+
ylim(10,30)
#geom_hline(yintercept=KTTemperature$DrinKTing.Standard)
grid.arrange(KTemperatureggplot,KRTemperatureggplot,KTTemperatureggplot,nrow=1)
###############Opacity###############
KOpacity <- K[K$Parameter == 'Opacity',]
KOpacitySample=data.frame(cbind(KOpacity$First.Sample,KOpacity$Second..Sample,KOpacity$Third.Sample,KOpacity$Fourth.Sample,KOpacity$Fifth.Sample))
names(KOpacitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KOpacitySample$First <- as.numeric(KOpacitySample$First)
KOpacitySample$Second <- as.numeric(KOpacitySample$Second)
KOpacitySample$Third <- as.numeric(KOpacitySample$Third)
KOpacitySample$Fourth <- as.numeric(KOpacitySample$Fourth)
KOpacitySample$Fifth <- as.numeric(KOpacitySample$Fifth)
MeanKOpacity<-c()
for (i in 1:5) {
MeanKOpacity[i]=mean(KOpacitySample[,i])
}
require(gridExtra)
KOpacityggplot <- ggplot(data=data.frame(MeanKOpacity)
,aes(x=c(1:5),y=MeanKOpacity))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Opacity (NTU)')+
ggtitle("K")+
ylim(0,70)+
geom_hline(yintercept=50,color="ORANGE")+
geom_hline(yintercept=1,color="PURPLE")+
geom_hline(yintercept=5,color="PURPLE")
KROpacity <- KR[KR$Parameter == 'Opacity',]
KROpacitySample=data.frame(cbind(KROpacity$First.Sample,KROpacity$Second..Sample,KROpacity$Third.Sample,KROpacity$Fourth.Sample,KROpacity$Fifth.Sample))
names(KROpacitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KROpacitySample$First <- as.numeric(KROpacitySample$First)
KROpacitySample$Second <- as.numeric(KROpacitySample$Second)
KROpacitySample$Third <- as.numeric(KROpacitySample$Third)
KROpacitySample$Fourth <- as.numeric(KROpacitySample$Fourth)
KROpacitySample$Fifth <- as.numeric(KROpacitySample$Fifth)
MeanKROpacity<-c()
for (i in 1:5) {
MeanKROpacity[i]=mean(KROpacitySample[,i])
}
KROpacityggplot <- ggplot(data=data.frame(MeanKROpacity)
,aes(x=c(1:5),y=MeanKROpacity))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Opacity (NTU)')+
ggtitle("KR")+
ylim(0,70)+
geom_hline(yintercept=50,color="ORANGE")+
geom_hline(yintercept=1,color="PURPLE")+
geom_hline(yintercept=5,color="PURPLE")
KTOpacity <- KT[KT$Parameter == 'Opacity',]
KTOpacitySample=data.frame(cbind(KTOpacity$First.Sample,KTOpacity$Second..Sample,KTOpacity$Third.Sample,KTOpacity$Fourth.Sample,KTOpacity$Fifth.Sample))
names(KTOpacitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTOpacitySample$First <- as.numeric(KTOpacitySample$First)
KTOpacitySample$Second <- as.numeric(KTOpacitySample$Second)
KTOpacitySample$Third <- as.numeric(KTOpacitySample$Third)
KTOpacitySample$Fourth <- as.numeric(KTOpacitySample$Fourth)
KTOpacitySample$Fifth <- as.numeric(KTOpacitySample$Fifth)
MeanKTOpacity<-c()
for (i in 1:5) {
MeanKTOpacity[i]=mean(KTOpacitySample[,i])
}
KTOpacityggplot <- ggplot(data=data.frame(MeanKTOpacity)
,aes(x=c(1:5),y=MeanKTOpacity))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Opacity (NTU)')+
ggtitle("KT")+
ylim(0,70)+
geom_hline(yintercept=50,color="ORANGE")+
geom_hline(yintercept=1,color="PURPLE")+
geom_hline(yintercept=5,color="PURPLE")
grid.arrange(KOpacityggplot,KROpacityggplot,KTOpacityggplot,nrow=1)
###############OxygenSolution###############
KOxygenSolution <- K[K$Parameter == 'Oxygen Solution',]
KOxygenSolutionSample=data.frame(cbind(KOxygenSolution$First.Sample,KOxygenSolution$Second..Sample,KOxygenSolution$Third.Sample,KOxygenSolution$Fourth.Sample,KOxygenSolution$Fifth.Sample))
names(KOxygenSolutionSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KOxygenSolutionSample$First <- as.numeric(KOxygenSolutionSample$First)
KOxygenSolutionSample$Second <- as.numeric(KOxygenSolutionSample$Second)
KOxygenSolutionSample$Third <- as.numeric(KOxygenSolutionSample$Third)
KOxygenSolutionSample$Fourth <- as.numeric(KOxygenSolutionSample$Fourth)
KOxygenSolutionSample$Fifth <- as.numeric(KOxygenSolutionSample$Fifth)
MeanKOxygenSolution<-c()
for (i in 1:5) {
MeanKOxygenSolution[i]=mean(KOxygenSolutionSample[,i])
}
require(gridExtra)
KOxygenSolutionggplot <- ggplot(data=data.frame(MeanKOxygenSolution)
,aes(x=c(1:5),y=MeanKOxygenSolution))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of OxygenSolution (PPM)')+
ggtitle("K")+
ylim(0,10)+
geom_hline(yintercept=2,color="ORANGE")
KROxygenSolution <- KR[KR$Parameter == 'Oxygen Solution',]
KROxygenSolutionSample=data.frame(cbind(KROxygenSolution$First.Sample,KROxygenSolution$Second..Sample,KROxygenSolution$Third.Sample,KROxygenSolution$Fourth.Sample,KROxygenSolution$Fifth.Sample))
names(KROxygenSolutionSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KROxygenSolutionSample$First <- as.numeric(KROxygenSolutionSample$First)
KROxygenSolutionSample$Second <- as.numeric(KROxygenSolutionSample$Second)
KROxygenSolutionSample$Third <- as.numeric(KROxygenSolutionSample$Third)
KROxygenSolutionSample$Fourth <- as.numeric(KROxygenSolutionSample$Fourth)
KROxygenSolutionSample$Fifth <- as.numeric(KROxygenSolutionSample$Fifth)
MeanKROxygenSolution<-c()
for (i in 1:5) {
MeanKROxygenSolution[i]=mean(KROxygenSolutionSample[,i])
}
KROxygenSolutionggplot <- ggplot(data=data.frame(MeanKROxygenSolution)
,aes(x=c(1:5),y=MeanKROxygenSolution))+
geom_line(color="RED")+
labs(x='Month',y='Mean of OxygenSolution (PPM)')+
ggtitle("KR")+
ylim(0,10)+
geom_hline(yintercept=2,color="ORANGE")
KTOxygenSolution <- KT[KT$Parameter == 'Oxygen Solution',]
KTOxygenSolutionSample=data.frame(cbind(KTOxygenSolution$First.Sample,KTOxygenSolution$Second..Sample,KTOxygenSolution$Third.Sample,KTOxygenSolution$Fourth.Sample,KTOxygenSolution$Fifth.Sample))
names(KTOxygenSolutionSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTOxygenSolutionSample$First <- as.numeric(KTOxygenSolutionSample$First)
KTOxygenSolutionSample$Second <- as.numeric(KTOxygenSolutionSample$Second)
KTOxygenSolutionSample$Third <- as.numeric(KTOxygenSolutionSample$Third)
KTOxygenSolutionSample$Fourth <- as.numeric(KTOxygenSolutionSample$Fourth)
KTOxygenSolutionSample$Fifth <- as.numeric(KTOxygenSolutionSample$Fifth)
MeanKTOxygenSolution<-c()
for (i in 1:5) {
MeanKTOxygenSolution[i]=mean(KTOxygenSolutionSample[,i])
}
KTOxygenSolutionggplot <- ggplot(data=data.frame(MeanKTOxygenSolution)
,aes(x=c(1:5),y=MeanKTOxygenSolution))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of OxygenSolution (PPM)')+
ggtitle("KT")+
ylim(0,10)+
geom_hline(yintercept=2,color="ORANGE")
grid.arrange(KOxygenSolutionggplot,KROxygenSolutionggplot,KTOxygenSolutionggplot,nrow=1)
###############TotalSolubleSolids###############
KTotalSolubleSolids <- K[K$Parameter == 'Total Soluble Solids',]
KTotalSolubleSolidsSample=data.frame(cbind(KTotalSolubleSolids$First.Sample,KTotalSolubleSolids$Second..Sample,KTotalSolubleSolids$Third.Sample,KTotalSolubleSolids$Fourth.Sample,KTotalSolubleSolids$Fifth.Sample))
names(KTotalSolubleSolidsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTotalSolubleSolidsSample$First <- as.numeric(KTotalSolubleSolidsSample$First)
KTotalSolubleSolidsSample$Second <- as.numeric(KTotalSolubleSolidsSample$Second)
KTotalSolubleSolidsSample$Third <- as.numeric(KTotalSolubleSolidsSample$Third)
KTotalSolubleSolidsSample$Fourth <- as.numeric(KTotalSolubleSolidsSample$Fourth)
KTotalSolubleSolidsSample$Fifth <- as.numeric(KTotalSolubleSolidsSample$Fifth)
MeanKTotalSolubleSolids<-c()
for (i in 1:5) {
MeanKTotalSolubleSolids[i]=mean(KTotalSolubleSolidsSample[,i])
}
require(gridExtra)
KTotalSolubleSolidsggplot <- ggplot(data=data.frame(MeanKTotalSolubleSolids)
,aes(x=c(1:5),y=MeanKTotalSolubleSolids))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of TotalSolubleSolids (PPM)')+
ggtitle("K")+
ylim(0,2000)+
geom_hline(yintercept=1000,color="PURPLE")+
geom_hline(yintercept=1500,color="PURPLE")
KRTotalSolubleSolids <- KR[KR$Parameter == 'Total Soluble Solids',]
KRTotalSolubleSolidsSample=data.frame(cbind(KRTotalSolubleSolids$First.Sample,KRTotalSolubleSolids$Second..Sample,KRTotalSolubleSolids$Third.Sample,KRTotalSolubleSolids$Fourth.Sample,KRTotalSolubleSolids$Fifth.Sample))
names(KRTotalSolubleSolidsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRTotalSolubleSolidsSample$First <- as.numeric(KRTotalSolubleSolidsSample$First)
KRTotalSolubleSolidsSample$Second <- as.numeric(KRTotalSolubleSolidsSample$Second)
KRTotalSolubleSolidsSample$Third <- as.numeric(KRTotalSolubleSolidsSample$Third)
KRTotalSolubleSolidsSample$Fourth <- as.numeric(KRTotalSolubleSolidsSample$Fourth)
KRTotalSolubleSolidsSample$Fifth <- as.numeric(KRTotalSolubleSolidsSample$Fifth)
MeanKRTotalSolubleSolids<-c()
for (i in 1:5) {
MeanKRTotalSolubleSolids[i]=mean(KRTotalSolubleSolidsSample[,i])
}
KRTotalSolubleSolidsggplot <- ggplot(data=data.frame(MeanKRTotalSolubleSolids)
,aes(x=c(1:5),y=MeanKRTotalSolubleSolids))+
geom_line(color="RED")+
labs(x='Month',y='Mean of TotalSolubleSolids (PPM)')+
ggtitle("KR")+
ylim(0,2000)+
geom_hline(yintercept=1000,color="PURPLE")+
geom_hline(yintercept=1500,color="PURPLE")
KTTotalSolubleSolids <- KT[KT$Parameter == 'Total Soluble Solids',]
KTTotalSolubleSolidsSample=data.frame(cbind(KTTotalSolubleSolids$First.Sample,KTTotalSolubleSolids$Second..Sample,KTTotalSolubleSolids$Third.Sample,KTTotalSolubleSolids$Fourth.Sample,KTTotalSolubleSolids$Fifth.Sample))
names(KTTotalSolubleSolidsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTTotalSolubleSolidsSample$First <- as.numeric(KTTotalSolubleSolidsSample$First)
KTTotalSolubleSolidsSample$Second <- as.numeric(KTTotalSolubleSolidsSample$Second)
KTTotalSolubleSolidsSample$Third <- as.numeric(KTTotalSolubleSolidsSample$Third)
KTTotalSolubleSolidsSample$Fourth <- as.numeric(KTTotalSolubleSolidsSample$Fourth)
KTTotalSolubleSolidsSample$Fifth <- as.numeric(KTTotalSolubleSolidsSample$Fifth)
MeanKTTotalSolubleSolids<-c()
for (i in 1:5) {
MeanKTTotalSolubleSolids[i]=mean(KTTotalSolubleSolidsSample[,i])
}
KTTotalSolubleSolidsggplot <- ggplot(data=data.frame(MeanKTTotalSolubleSolids)
,aes(x=c(1:5),y=MeanKTTotalSolubleSolids))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of TotalSolubleSolids (PPM)')+
ggtitle("KT")+
ylim(0,2000)+
geom_hline(yintercept=1000,color="PURPLE")+
geom_hline(yintercept=1500,color="PURPLE")
grid.arrange(KTotalSolubleSolidsggplot,KRTotalSolubleSolidsggplot,KTTotalSolubleSolidsggplot,nrow=1)
###############pH###############
KpH <- K[K$Parameter == 'pH',]
KpHSample=data.frame(cbind(KpH$First.Sample,KpH$Second..Sample,KpH$Third.Sample,KpH$Fourth.Sample,KpH$Fifth.Sample))
names(KpHSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KpHSample$First <- as.numeric(KpHSample$First)
KpHSample$Second <- as.numeric(KpHSample$Second)
KpHSample$Third <- as.numeric(KpHSample$Third)
KpHSample$Fourth <- as.numeric(KpHSample$Fourth)
KpHSample$Fifth <- as.numeric(KpHSample$Fifth)
MeanKpH<-c()
for (i in 1:5) {
MeanKpH[i]=mean(KpHSample[,i])
}
require(gridExtra)
KpHggplot <- ggplot(data=data.frame(MeanKpH)
,aes(x=c(1:5),y=MeanKpH))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of pH (-)')+
ggtitle("K")+
ylim(0,10)+
geom_hline(yintercept=6.5,color="PURPLE")+
geom_hline(yintercept=8.5,color="PURPLE")+
geom_hline(yintercept=9,color="PURPLE")+
geom_hline(yintercept=5.4,color="ORANGE")+
geom_hline(yintercept=6.8,color="ORANGE")
KRpH <- KR[KR$Parameter == 'pH',]
KRpHSample=data.frame(cbind(KRpH$First.Sample,KRpH$Second..Sample,KRpH$Third.Sample,KRpH$Fourth.Sample,KRpH$Fifth.Sample))
names(KRpHSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRpHSample$First <- as.numeric(KRpHSample$First)
KRpHSample$Second <- as.numeric(KRpHSample$Second)
KRpHSample$Third <- as.numeric(KRpHSample$Third)
KRpHSample$Fourth <- as.numeric(KRpHSample$Fourth)
KRpHSample$Fifth <- as.numeric(KRpHSample$Fifth)
MeanKRpH<-c()
for (i in 1:5) {
MeanKRpH[i]=mean(KRpHSample[,i])
}
KRpHggplot <- ggplot(data=data.frame(MeanKRpH)
,aes(x=c(1:5),y=MeanKRpH))+
geom_line(color="RED")+
labs(x='Month',y='Mean of pH (-)')+
ggtitle("KR")+
ylim(0,10)+
geom_hline(yintercept=6.5,color="PURPLE")+
geom_hline(yintercept=8.5,color="PURPLE")+
geom_hline(yintercept=9,color="PURPLE")+
geom_hline(yintercept=5.4,color="ORANGE")+
geom_hline(yintercept=6.8,color="ORANGE")
KTpH <- KT[KT$Parameter == 'pH',]
KTpHSample=data.frame(cbind(KTpH$First.Sample,KTpH$Second..Sample,KTpH$Third.Sample,KTpH$Fourth.Sample,KTpH$Fifth.Sample))
names(KTpHSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTpHSample$First <- as.numeric(KTpHSample$First)
KTpHSample$Second <- as.numeric(KTpHSample$Second)
KTpHSample$Third <- as.numeric(KTpHSample$Third)
KTpHSample$Fourth <- as.numeric(KTpHSample$Fourth)
KTpHSample$Fifth <- as.numeric(KTpHSample$Fifth)
MeanKTpH<-c()
for (i in 1:5) {
MeanKTpH[i]=mean(KTpHSample[,i])
}
KTpHggplot <- ggplot(data=data.frame(MeanKTpH)
,aes(x=c(1:5),y=MeanKTpH))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of pH (-)')+
ggtitle("KT")+
ylim(0,10)+
geom_hline(yintercept=6.5,color="PURPLE")+
geom_hline(yintercept=8.5,color="PURPLE")+
geom_hline(yintercept=9,color="PURPLE")+
geom_hline(yintercept=5.4,color="ORANGE")+
geom_hline(yintercept=6.8,color="ORANGE")
grid.arrange(KpHggplot,KRpHggplot,KTpHggplot,nrow=1)
###############ElectricalConductivity###############
KElectricalConductivity <- K[K$Parameter == 'Electrical Conductivity',]
KElectricalConductivitySample=data.frame(cbind(KElectricalConductivity$First.Sample,KElectricalConductivity$Second..Sample,KElectricalConductivity$Third.Sample,KElectricalConductivity$Fourth.Sample,KElectricalConductivity$Fifth.Sample))
names(KElectricalConductivitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KElectricalConductivitySample$First <- as.numeric(KElectricalConductivitySample$First)
KElectricalConductivitySample$Second <- as.numeric(KElectricalConductivitySample$Second)
KElectricalConductivitySample$Third <- as.numeric(KElectricalConductivitySample$Third)
KElectricalConductivitySample$Fourth <- as.numeric(KElectricalConductivitySample$Fourth)
KElectricalConductivitySample$Fifth <- as.numeric(KElectricalConductivitySample$Fifth)
MeanKElectricalConductivity<-c()
for (i in 1:5) {
MeanKElectricalConductivity[i]=mean(KElectricalConductivitySample[,i])
}
require(gridExtra)
KElectricalConductivityggplot <- ggplot(data=data.frame(MeanKElectricalConductivity)
,aes(x=c(1:5),y=MeanKElectricalConductivity))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Electrical Conductivity (mS.cm-1)')+
ggtitle("K")+
ylim(0,3.5)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=1.5,color="PURPLE")
KRElectricalConductivity <- KR[KR$Parameter == 'Electrical Conductivity',]
KRElectricalConductivitySample=data.frame(cbind(KRElectricalConductivity$First.Sample,KRElectricalConductivity$Second..Sample,KRElectricalConductivity$Third.Sample,KRElectricalConductivity$Fourth.Sample,KRElectricalConductivity$Fifth.Sample))
names(KRElectricalConductivitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRElectricalConductivitySample$First <- as.numeric(KRElectricalConductivitySample$First)
KRElectricalConductivitySample$Second <- as.numeric(KRElectricalConductivitySample$Second)
KRElectricalConductivitySample$Third <- as.numeric(KRElectricalConductivitySample$Third)
KRElectricalConductivitySample$Fourth <- as.numeric(KRElectricalConductivitySample$Fourth)
KRElectricalConductivitySample$Fifth <- as.numeric(KRElectricalConductivitySample$Fifth)
MeanKRElectricalConductivity<-c()
for (i in 1:5) {
MeanKRElectricalConductivity[i]=mean(KRElectricalConductivitySample[,i])
}
KRElectricalConductivityggplot <- ggplot(data=data.frame(MeanKRElectricalConductivity)
,aes(x=c(1:5),y=MeanKRElectricalConductivity))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Electrical Conductivity (mS.cm-1)')+
ggtitle("KR")+
ylim(0,3.5)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=1.5,color="PURPLE")
KTElectricalConductivity <- KT[KT$Parameter == 'Electrical Conductivity',]
KTElectricalConductivitySample=data.frame(cbind(KTElectricalConductivity$First.Sample,KTElectricalConductivity$Second..Sample,KTElectricalConductivity$Third.Sample,KTElectricalConductivity$Fourth.Sample,KTElectricalConductivity$Fifth.Sample))
names(KTElectricalConductivitySample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTElectricalConductivitySample$First <- as.numeric(KTElectricalConductivitySample$First)
KTElectricalConductivitySample$Second <- as.numeric(KTElectricalConductivitySample$Second)
KTElectricalConductivitySample$Third <- as.numeric(KTElectricalConductivitySample$Third)
KTElectricalConductivitySample$Fourth <- as.numeric(KTElectricalConductivitySample$Fourth)
KTElectricalConductivitySample$Fifth <- as.numeric(KTElectricalConductivitySample$Fifth)
MeanKTElectricalConductivity<-c()
for (i in 1:5) {
MeanKTElectricalConductivity[i]=mean(KTElectricalConductivitySample[,i])
}
KTElectricalConductivityggplot <- ggplot(data=data.frame(MeanKTElectricalConductivity)
,aes(x=c(1:5),y=MeanKTElectricalConductivity))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of ElectricalConductivity (mS.cm-1)')+
ggtitle("KT")+
ylim(0,3.5)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=1.5,color="PURPLE")
grid.arrange(KElectricalConductivityggplot,KRElectricalConductivityggplot,KTElectricalConductivityggplot,nrow=1)
###############TOC###############
KTOC <- K[K$Parameter == 'TOC',]
KTOCSample=data.frame(cbind(KTOC$First.Sample,KTOC$Second..Sample,KTOC$Third.Sample,KTOC$Fourth.Sample,KTOC$Fifth.Sample))
names(KTOCSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTOCSample$First <- as.numeric(KTOCSample$First)
KTOCSample$Second <- as.numeric(KTOCSample$Second)
KTOCSample$Third <- as.numeric(KTOCSample$Third)
KTOCSample$Fourth <- as.numeric(KTOCSample$Fourth)
KTOCSample$Fifth <- as.numeric(KTOCSample$Fifth)
MeanKTOC<-c()
for (i in 1:5) {
MeanKTOC[i]=mean(KTOCSample[,i])
}
require(gridExtra)
KTOCggplot <- ggplot(data=data.frame(MeanKTOC)
,aes(x=c(1:5),y=MeanKTOC))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of TOC (PPM)')+
ggtitle("K")+
ylim(0,54)+
geom_hline(yintercept=2,color="ORANGE")+
geom_hline(yintercept=4,color="PURPLE")
KRTOC <- KR[KR$Parameter == 'TOC',]
KRTOCSample=data.frame(cbind(KRTOC$First.Sample,KRTOC$Second..Sample,KRTOC$Third.Sample,KRTOC$Fourth.Sample,KRTOC$Fifth.Sample))
names(KRTOCSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRTOCSample$First <- as.numeric(KRTOCSample$First)
KRTOCSample$Second <- as.numeric(KRTOCSample$Second)
KRTOCSample$Third <- as.numeric(KRTOCSample$Third)
KRTOCSample$Fourth <- as.numeric(KRTOCSample$Fourth)
KRTOCSample$Fifth <- as.numeric(KRTOCSample$Fifth)
MeanKRTOC<-c()
for (i in 1:5) {
MeanKRTOC[i]=mean(KRTOCSample[,i])
}
KRTOCggplot <- ggplot(data=data.frame(MeanKRTOC)
,aes(x=c(1:5),y=MeanKRTOC))+
geom_line(color="RED")+
labs(x='Month',y='Mean of TOC (PPM)')+
ggtitle("KR")+
ylim(0,54)+
geom_hline(yintercept=2,color="ORANGE")+
geom_hline(yintercept=4,color="PURPLE")
KTTOC <- KT[KT$Parameter == 'TOC',]
KTTOCSample=data.frame(cbind(KTTOC$First.Sample,KTTOC$Second..Sample,KTTOC$Third.Sample,KTTOC$Fourth.Sample,KTTOC$Fifth.Sample))
names(KTTOCSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTTOCSample$First <- as.numeric(KTTOCSample$First)
KTTOCSample$Second <- as.numeric(KTTOCSample$Second)
KTTOCSample$Third <- as.numeric(KTTOCSample$Third)
KTTOCSample$Fourth <- as.numeric(KTTOCSample$Fourth)
KTTOCSample$Fifth <- as.numeric(KTTOCSample$Fifth)
MeanKTTOC<-c()
for (i in 1:5) {
MeanKTTOC[i]=mean(KTTOCSample[,i])
}
KTTOCggplot <- ggplot(data=data.frame(MeanKTTOC)
,aes(x=c(1:5),y=MeanKTTOC))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of TOC (PPM)')+
ggtitle("KT")+
ylim(0,54)+
geom_hline(yintercept=2,color="ORANGE")+
geom_hline(yintercept=4,color="PURPLE")
grid.arrange(KTOCggplot,KRTOCggplot,KTTOCggplot,nrow=1)
###############Ag###############
KAg <- K[K$Parameter == 'Ag',]
KAgSample=data.frame(cbind(KAg$First.Sample,KAg$Second..Sample,KAg$Third.Sample,KAg$Fourth.Sample,KAg$Fifth.Sample))
names(KAgSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KAgSample$First <- as.numeric(KAgSample$First)
KAgSample$Second <- as.numeric(KAgSample$Second)
KAgSample$Third <- as.numeric(KAgSample$Third)
KAgSample$Fourth <- as.numeric(KAgSample$Fourth)
KAgSample$Fifth <- as.numeric(KAgSample$Fifth)
MeanKAg<-c()
for (i in 1:5) {
MeanKAg[i]=mean(KAgSample[,i])
}
require(gridExtra)
KAgggplot <- ggplot(data=data.frame(MeanKAg)
,aes(x=c(1:5),y=MeanKAg))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Ag (PPM)')+
ggtitle("K")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")
KRAg <- KR[KR$Parameter == 'Ag',]
KRAgSample=data.frame(cbind(KRAg$First.Sample,KRAg$Second..Sample,KRAg$Third.Sample,KRAg$Fourth.Sample,KRAg$Fifth.Sample))
names(KRAgSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRAgSample$First <- as.numeric(KRAgSample$First)
KRAgSample$Second <- as.numeric(KRAgSample$Second)
KRAgSample$Third <- as.numeric(KRAgSample$Third)
KRAgSample$Fourth <- as.numeric(KRAgSample$Fourth)
KRAgSample$Fifth <- as.numeric(KRAgSample$Fifth)
MeanKRAg<-c()
for (i in 1:5) {
MeanKRAg[i]=mean(KRAgSample[,i])
}
KRAgggplot <- ggplot(data=data.frame(MeanKRAg)
,aes(x=c(1:5),y=MeanKRAg))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Ag (PPM)')+
ggtitle("KR")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")
KTAg <- KT[KT$Parameter == 'Ag',]
KTAgSample=data.frame(cbind(KTAg$First.Sample,KTAg$Second..Sample,KTAg$Third.Sample,KTAg$Fourth.Sample,KTAg$Fifth.Sample))
names(KTAgSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTAgSample$First <- as.numeric(KTAgSample$First)
KTAgSample$Second <- as.numeric(KTAgSample$Second)
KTAgSample$Third <- as.numeric(KTAgSample$Third)
KTAgSample$Fourth <- as.numeric(KTAgSample$Fourth)
KTAgSample$Fifth <- as.numeric(KTAgSample$Fifth)
MeanKTAg<-c()
for (i in 1:5) {
MeanKTAg[i]=mean(KTAgSample[,i])
}
KTAgggplot <- ggplot(data=data.frame(MeanKTAg)
,aes(x=c(1:5),y=MeanKTAg))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Ag (PPM)')+
ggtitle("KT")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")
grid.arrange(KAgggplot,KRAgggplot,KTAgggplot,nrow=1)
###############Al###############
KAl <- K[K$Parameter == 'Al',]
KAlSample=data.frame(cbind(KAl$First.Sample,KAl$Second..Sample,KAl$Third.Sample,KAl$Fourth.Sample,KAl$Fifth.Sample))
names(KAlSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KAlSample$First <- as.numeric(KAlSample$First)
KAlSample$Second <- as.numeric(KAlSample$Second)
KAlSample$Third <- as.numeric(KAlSample$Third)
KAlSample$Fourth <- as.numeric(KAlSample$Fourth)
KAlSample$Fifth <- as.numeric(KAlSample$Fifth)
MeanKAl<-c()
for (i in 1:5) {
MeanKAl[i]=mean(KAlSample[,i])
}
require(gridExtra)
KAlggplot <- ggplot(data=data.frame(MeanKAl)
,aes(x=c(1:5),y=MeanKAl))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Al (PPM)')+
ggtitle("K")+
ylim(0,5.1)+
geom_hline(yintercept=5,color="ORANGE")+
geom_hline(yintercept=0.1,color="PURPLE")+
geom_hline(yintercept=0.2,color="PURPLE")
KRAl <- KR[KR$Parameter == 'Al',]
KRAlSample=data.frame(cbind(KRAl$First.Sample,KRAl$Second..Sample,KRAl$Third.Sample,KRAl$Fourth.Sample,KRAl$Fifth.Sample))
names(KRAlSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRAlSample$First <- as.numeric(KRAlSample$First)
KRAlSample$Second <- as.numeric(KRAlSample$Second)
KRAlSample$Third <- as.numeric(KRAlSample$Third)
KRAlSample$Fourth <- as.numeric(KRAlSample$Fourth)
KRAlSample$Fifth <- as.numeric(KRAlSample$Fifth)
MeanKRAl<-c()
for (i in 1:5) {
MeanKRAl[i]=mean(KRAlSample[,i])
}
KRAlggplot <- ggplot(data=data.frame(MeanKRAl)
,aes(x=c(1:5),y=MeanKRAl))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Al (PPM)')+
ggtitle("KR")+
ylim(0,5.1)+
geom_hline(yintercept=5,color="ORANGE")+
geom_hline(yintercept=0.1,color="PURPLE")+
geom_hline(yintercept=0.2,color="PURPLE")
KTAl <- KT[KT$Parameter == 'Al',]
KTAlSample=data.frame(cbind(KTAl$First.Sample,KTAl$Second..Sample,KTAl$Third.Sample,KTAl$Fourth.Sample,KTAl$Fifth.Sample))
names(KTAlSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTAlSample$First <- as.numeric(KTAlSample$First)
KTAlSample$Second <- as.numeric(KTAlSample$Second)
KTAlSample$Third <- as.numeric(KTAlSample$Third)
KTAlSample$Fourth <- as.numeric(KTAlSample$Fourth)
KTAlSample$Fifth <- as.numeric(KTAlSample$Fifth)
MeanKTAl<-c()
for (i in 1:5) {
MeanKTAl[i]=mean(KTAlSample[,i])
}
KTAlggplot <- ggplot(data=data.frame(MeanKTAl)
,aes(x=c(1:5),y=MeanKTAl))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Al (PPM)')+
ggtitle("KT")+
ylim(0,5.1)+
geom_hline(yintercept=5,color="ORANGE")+
geom_hline(yintercept=0.1,color="PURPLE")+
geom_hline(yintercept=0.2,color="PURPLE")
grid.arrange(KAlggplot,KRAlggplot,KTAlggplot,nrow=1)
###############As###############
KAs <- K[K$Parameter == 'As',]
KAsSample=data.frame(cbind(KAs$First.Sample,KAs$Second..Sample,KAs$Third.Sample,KAs$Fourth.Sample,KAs$Fifth.Sample))
names(KAsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KAsSample$First <- as.numeric(KAsSample$First)
KAsSample$Second <- as.numeric(KAsSample$Second)
KAsSample$Third <- as.numeric(KAsSample$Third)
KAsSample$Fourth <- as.numeric(KAsSample$Fourth)
KAsSample$Fifth <- as.numeric(KAsSample$Fifth)
MeanKAs<-c()
for (i in 1:5) {
MeanKAs[i]=mean(KAsSample[,i])
}
require(gridExtra)
KAsggplot <- ggplot(data=data.frame(MeanKAs)
,aes(x=c(1:5),y=MeanKAs))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of As (PPM)')+
ggtitle("K")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")+
geom_hline(yintercept=0.01,color="PURPLE")
KRAs <- KR[KR$Parameter == 'As',]
KRAsSample=data.frame(cbind(KRAs$First.Sample,KRAs$Second..Sample,KRAs$Third.Sample,KRAs$Fourth.Sample,KRAs$Fifth.Sample))
names(KRAsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRAsSample$First <- as.numeric(KRAsSample$First)
KRAsSample$Second <- as.numeric(KRAsSample$Second)
KRAsSample$Third <- as.numeric(KRAsSample$Third)
KRAsSample$Fourth <- as.numeric(KRAsSample$Fourth)
KRAsSample$Fifth <- as.numeric(KRAsSample$Fifth)
MeanKRAs<-c()
for (i in 1:5) {
MeanKRAs[i]=mean(KRAsSample[,i])
}
KRAsggplot <- ggplot(data=data.frame(MeanKRAs)
,aes(x=c(1:5),y=MeanKRAs))+
geom_line(color="RED")+
labs(x='Month',y='Mean of As (PPM)')+
ggtitle("KR")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")+
geom_hline(yintercept=0.01,color="PURPLE")
KTAs <- KT[KT$Parameter == 'As',]
KTAsSample=data.frame(cbind(KTAs$First.Sample,KTAs$Second..Sample,KTAs$Third.Sample,KTAs$Fourth.Sample,KTAs$Fifth.Sample))
names(KTAsSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTAsSample$First <- as.numeric(KTAsSample$First)
KTAsSample$Second <- as.numeric(KTAsSample$Second)
KTAsSample$Third <- as.numeric(KTAsSample$Third)
KTAsSample$Fourth <- as.numeric(KTAsSample$Fourth)
KTAsSample$Fifth <- as.numeric(KTAsSample$Fifth)
MeanKTAs<-c()
for (i in 1:5) {
MeanKTAs[i]=mean(KTAsSample[,i])
}
KTAsggplot <- ggplot(data=data.frame(MeanKTAs)
,aes(x=c(1:5),y=MeanKTAs))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of As (PPM)')+
ggtitle("KT")+
ylim(0,0.15)+
geom_hline(yintercept=0.1,color="ORANGE")+
geom_hline(yintercept=0.01,color="PURPLE")
grid.arrange(KAsggplot,KRAsggplot,KTAsggplot,nrow=1)
###############B###############
KBb <- K[K$Parameter == 'B',]
KBbSample=data.frame(cbind(KBb$First.Sample,KBb$Second..Sample,KBb$Third.Sample,KBb$Fourth.Sample,KBb$Fifth.Sample))
names(KBbSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KBbSample$First <- as.numeric(KBbSample$First)
KBbSample$Second <- as.numeric(KBbSample$Second)
KBbSample$Third <- as.numeric(KBbSample$Third)
KBbSample$Fourth <- as.numeric(KBbSample$Fourth)
KBbSample$Fifth <- as.numeric(KBbSample$Fifth)
MeanKBb<-c()
for (i in 1:5) {
MeanKBb[i]=mean(KBbSample[,i])
}
require(gridExtra)
KBbggplot <- ggplot(data=data.frame(MeanKBb)
,aes(x=c(1:5),y=MeanKBb))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of B (PPM)')+
ggtitle("K")+
ylim(0,12)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=0.5,color="PURPLE")
KRBb <- KR[KR$Parameter == 'B',]
KRBbSample=data.frame(cbind(KRBb$First.Sample,KRBb$Second..Sample,KRBb$Third.Sample,KRBb$Fourth.Sample,KRBb$Fifth.Sample))
names(KRBbSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRBbSample$First <- as.numeric(KRBbSample$First)
KRBbSample$Second <- as.numeric(KRBbSample$Second)
KRBbSample$Third <- as.numeric(KRBbSample$Third)
KRBbSample$Fourth <- as.numeric(KRBbSample$Fourth)
KRBbSample$Fifth <- as.numeric(KRBbSample$Fifth)
MeanKRBb<-c()
for (i in 1:5) {
MeanKRBb[i]=mean(KRBbSample[,i])
}
KRBbggplot <- ggplot(data=data.frame(MeanKRBb)
,aes(x=c(1:5),y=MeanKRBb))+
geom_line(color="RED")+
labs(x='Month',y='Mean of B (PPM)')+
ggtitle("KR")+
ylim(0,12)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=0.5,color="PURPLE")
KTBb <- KT[KT$Parameter == 'B',]
KTBbSample=data.frame(cbind(KTBb$First.Sample,KTBb$Second..Sample,KTBb$Third.Sample,KTBb$Fourth.Sample,KTBb$Fifth.Sample))
names(KTBbSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTBbSample$First <- as.numeric(KTBbSample$First)
KTBbSample$Second <- as.numeric(KTBbSample$Second)
KTBbSample$Third <- as.numeric(KTBbSample$Third)
KTBbSample$Fourth <- as.numeric(KTBbSample$Fourth)
KTBbSample$Fifth <- as.numeric(KTBbSample$Fifth)
MeanKTBb<-c()
for (i in 1:5) {
MeanKTBb[i]=mean(KTBbSample[,i])
}
KTBbggplot <- ggplot(data=data.frame(MeanKTBb)
,aes(x=c(1:5),y=MeanKTBb))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of B (PPM)')+
ggtitle("KT")+
ylim(0,12)+
geom_hline(yintercept=3,color="ORANGE")+
geom_hline(yintercept=0.5,color="PURPLE")
grid.arrange(KBbggplot,KRBbggplot,KTBbggplot,nrow=1)
###############Ba###############
KBa <- K[K$Parameter == 'Ba',]
KBaSample=data.frame(cbind(KBa$First.Sample,KBa$Second..Sample,KBa$Third.Sample,KBa$Fourth.Sample,KBa$Fifth.Sample))
names(KBaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KBaSample$First <- as.numeric(KBaSample$First)
KBaSample$Second <- as.numeric(KBaSample$Second)
KBaSample$Third <- as.numeric(KBaSample$Third)
KBaSample$Fourth <- as.numeric(KBaSample$Fourth)
KBaSample$Fifth <- as.numeric(KBaSample$Fifth)
MeanKBa<-c()
for (i in 1:5) {
MeanKBa[i]=mean(KBaSample[,i])
}
require(gridExtra)
KBaggplot <- ggplot(data=data.frame(MeanKBa)
,aes(x=c(1:5),y=MeanKBa))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Ba (PPM)')+
ggtitle("K")+
ylim(0,1.5)+
geom_hline(yintercept=1,color="ORANGE")+
geom_hline(yintercept=0.7,color="PURPLE")
KRBa <- KR[KR$Parameter == 'Ba',]
KRBaSample=data.frame(cbind(KRBa$First.Sample,KRBa$Second..Sample,KRBa$Third.Sample,KRBa$Fourth.Sample,KRBa$Fifth.Sample))
names(KRBaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRBaSample$First <- as.numeric(KRBaSample$First)
KRBaSample$Second <- as.numeric(KRBaSample$Second)
KRBaSample$Third <- as.numeric(KRBaSample$Third)
KRBaSample$Fourth <- as.numeric(KRBaSample$Fourth)
KRBaSample$Fifth <- as.numeric(KRBaSample$Fifth)
MeanKRBa<-c()
for (i in 1:5) {
MeanKRBa[i]=mean(KRBaSample[,i])
}
KRBaggplot <- ggplot(data=data.frame(MeanKRBa)
,aes(x=c(1:5),y=MeanKRBa))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Ba (PPM)')+
ggtitle("KR")+
ylim(0,1.5)+
geom_hline(yintercept=1,color="ORANGE")+
geom_hline(yintercept=0.7,color="PURPLE")
KTBa <- KT[KT$Parameter == 'Ba',]
KTBaSample=data.frame(cbind(KTBa$First.Sample,KTBa$Second..Sample,KTBa$Third.Sample,KTBa$Fourth.Sample,KTBa$Fifth.Sample))
names(KTBaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTBaSample$First <- as.numeric(KTBaSample$First)
KTBaSample$Second <- as.numeric(KTBaSample$Second)
KTBaSample$Third <- as.numeric(KTBaSample$Third)
KTBaSample$Fourth <- as.numeric(KTBaSample$Fourth)
KTBaSample$Fifth <- as.numeric(KTBaSample$Fifth)
MeanKTBa<-c()
for (i in 1:5) {
MeanKTBa[i]=mean(KTBaSample[,i])
}
KTBaggplot <- ggplot(data=data.frame(MeanKTBa)
,aes(x=c(1:5),y=MeanKTBa))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Ba (PPM)')+
ggtitle("KT")+
ylim(0,1.5)+
geom_hline(yintercept=1,color="ORANGE")+
geom_hline(yintercept=0.7,color="PURPLE")
grid.arrange(KBaggplot,KRBaggplot,KTBaggplot,nrow=1)
###############Bi###############
KBi <- K[K$Parameter == 'Bi',]
KBiSample=data.frame(cbind(KBi$First.Sample,KBi$Second..Sample,KBi$Third.Sample,KBi$Fourth.Sample,KBi$Fifth.Sample))
names(KBiSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KBiSample$First <- as.numeric(KBiSample$First)
KBiSample$Second <- as.numeric(KBiSample$Second)
KBiSample$Third <- as.numeric(KBiSample$Third)
KBiSample$Fourth <- as.numeric(KBiSample$Fourth)
KBiSample$Fifth <- as.numeric(KBiSample$Fifth)
MeanKBi<-c()
for (i in 1:5) {
MeanKBi[i]=mean(KBiSample[,i])
}
require(gridExtra)
KBiggplot <- ggplot(data=data.frame(MeanKBi)
,aes(x=c(1:5),y=MeanKBi))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Bi (PPM)')+
ggtitle("K")+
ylim(0,0.6)+
geom_hline(yintercept=0.5,color="ORANGE")
KRBi <- KR[KR$Parameter == 'Bi',]
KRBiSample=data.frame(cbind(KRBi$First.Sample,KRBi$Second..Sample,KRBi$Third.Sample,KRBi$Fourth.Sample,KRBi$Fifth.Sample))
names(KRBiSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRBiSample$First <- as.numeric(KRBiSample$First)
KRBiSample$Second <- as.numeric(KRBiSample$Second)
KRBiSample$Third <- as.numeric(KRBiSample$Third)
KRBiSample$Fourth <- as.numeric(KRBiSample$Fourth)
KRBiSample$Fifth <- as.numeric(KRBiSample$Fifth)
MeanKRBi<-c()
for (i in 1:5) {
MeanKRBi[i]=mean(KRBiSample[,i])
}
KRBiggplot <- ggplot(data=data.frame(MeanKRBi)
,aes(x=c(1:5),y=MeanKRBi))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Bi (PPM)')+
ggtitle("KR")+
ylim(0,0.6)+
geom_hline(yintercept=0.5,color="ORANGE")
KTBi <- KT[KT$Parameter == 'Bi',]
KTBiSample=data.frame(cbind(KTBi$First.Sample,KTBi$Second..Sample,KTBi$Third.Sample,KTBi$Fourth.Sample,KTBi$Fifth.Sample))
names(KTBiSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTBiSample$First <- as.numeric(KTBiSample$First)
KTBiSample$Second <- as.numeric(KTBiSample$Second)
KTBiSample$Third <- as.numeric(KTBiSample$Third)
KTBiSample$Fourth <- as.numeric(KTBiSample$Fourth)
KTBiSample$Fifth <- as.numeric(KTBiSample$Fifth)
MeanKTBi<-c()
for (i in 1:5) {
MeanKTBi[i]=mean(KTBiSample[,i])
}
KTBiggplot <- ggplot(data=data.frame(MeanKTBi)
,aes(x=c(1:5),y=MeanKTBi))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Bi (PPM)')+
ggtitle("KT")+
ylim(0,0.6)+
geom_hline(yintercept=0.5,color="ORANGE")
grid.arrange(KBiggplot,KRBiggplot,KTBiggplot,nrow=1)
###############Ca###############
KCa <- K[K$Parameter == 'Ca',]
KCaSample=data.frame(cbind(KCa$First.Sample,KCa$Second..Sample,KCa$Third.Sample,KCa$Fourth.Sample,KCa$Fifth.Sample))
names(KCaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KCaSample$First <- as.numeric(KCaSample$First)
KCaSample$Second <- as.numeric(KCaSample$Second)
KCaSample$Third <- as.numeric(KCaSample$Third)
KCaSample$Fourth <- as.numeric(KCaSample$Fourth)
KCaSample$Fifth <- as.numeric(KCaSample$Fifth)
MeanKCa<-c()
for (i in 1:5) {
MeanKCa[i]=mean(KCaSample[,i])
}
require(gridExtra)
KCaggplot <- ggplot(data=data.frame(MeanKCa)
,aes(x=c(1:5),y=MeanKCa))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Ca (PPM)')+
ggtitle("K")+
ylim(0,400)+
geom_hline(yintercept=300,color="PURPLE")
KRCa <- KR[KR$Parameter == 'Ca',]
KRCaSample=data.frame(cbind(KRCa$First.Sample,KRCa$Second..Sample,KRCa$Third.Sample,KRCa$Fourth.Sample,KRCa$Fifth.Sample))
names(KRCaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRCaSample$First <- as.numeric(KRCaSample$First)
KRCaSample$Second <- as.numeric(KRCaSample$Second)
KRCaSample$Third <- as.numeric(KRCaSample$Third)
KRCaSample$Fourth <- as.numeric(KRCaSample$Fourth)
KRCaSample$Fifth <- as.numeric(KRCaSample$Fifth)
MeanKRCa<-c()
for (i in 1:5) {
MeanKRCa[i]=mean(KRCaSample[,i])
}
KRCaggplot <- ggplot(data=data.frame(MeanKRCa)
,aes(x=c(1:5),y=MeanKRCa))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Ca (PPM)')+
ggtitle("KR")+
ylim(0,400)+
geom_hline(yintercept=300,color="PURPLE")
KTCa <- KT[KT$Parameter == 'Ca',]
KTCaSample=data.frame(cbind(KTCa$First.Sample,KTCa$Second..Sample,KTCa$Third.Sample,KTCa$Fourth.Sample,KTCa$Fifth.Sample))
names(KTCaSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTCaSample$First <- as.numeric(KTCaSample$First)
KTCaSample$Second <- as.numeric(KTCaSample$Second)
KTCaSample$Third <- as.numeric(KTCaSample$Third)
KTCaSample$Fourth <- as.numeric(KTCaSample$Fourth)
KTCaSample$Fifth <- as.numeric(KTCaSample$Fifth)
MeanKTCa<-c()
for (i in 1:5) {
MeanKTCa[i]=mean(KTCaSample[,i])
}
KTCaggplot <- ggplot(data=data.frame(MeanKTCa)
,aes(x=c(1:5),y=MeanKTCa))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Ca (PPM)')+
ggtitle("KT")+
ylim(0,400)+
geom_hline(yintercept=300,color="PURPLE")
grid.arrange(KCaggplot,KRCaggplot,KTCaggplot,nrow=1)
###############Cd###############
KCd <- K[K$Parameter == 'Cd',]
KCdSample=data.frame(cbind(KCd$First.Sample,KCd$Second..Sample,KCd$Third.Sample,KCd$Fourth.Sample,KCd$Fifth.Sample))
names(KCdSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KCdSample$First <- as.numeric(KCdSample$First)
KCdSample$Second <- as.numeric(KCdSample$Second)
KCdSample$Third <- as.numeric(KCdSample$Third)
KCdSample$Fourth <- as.numeric(KCdSample$Fourth)
KCdSample$Fifth <- as.numeric(KCdSample$Fifth)
MeanKCd<-c()
for (i in 1:5) {
MeanKCd[i]=mean(KCdSample[,i])
}
require(gridExtra)
KCdggplot <- ggplot(data=data.frame(MeanKCd)
,aes(x=c(1:5),y=MeanKCd))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Cd (PPM)')+
ggtitle("K")+
ylim(0,5)+
geom_hline(yintercept=0.01,color="ORANGE")+
geom_hline(yintercept=3,color="PURPLE")
KRCd <- KR[KR$Parameter == 'Cd',]
KRCdSample=data.frame(cbind(KRCd$First.Sample,KRCd$Second..Sample,KRCd$Third.Sample,KRCd$Fourth.Sample,KRCd$Fifth.Sample))
names(KRCdSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRCdSample$First <- as.numeric(KRCdSample$First)
KRCdSample$Second <- as.numeric(KRCdSample$Second)
KRCdSample$Third <- as.numeric(KRCdSample$Third)
KRCdSample$Fourth <- as.numeric(KRCdSample$Fourth)
KRCdSample$Fifth <- as.numeric(KRCdSample$Fifth)
MeanKRCd<-c()
for (i in 1:5) {
MeanKRCd[i]=mean(KRCdSample[,i])
}
KRCdggplot <- ggplot(data=data.frame(MeanKRCd)
,aes(x=c(1:5),y=MeanKRCd))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Cd (PPM)')+
ggtitle("KR")+
ylim(0,5)+
geom_hline(yintercept=0.01,color="ORANGE")+
geom_hline(yintercept=3,color="PURPLE")
KTCd <- KT[KT$Parameter == 'Cd',]
KTCdSample=data.frame(cbind(KTCd$First.Sample,KTCd$Second..Sample,KTCd$Third.Sample,KTCd$Fourth.Sample,KTCd$Fifth.Sample))
names(KTCdSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTCdSample$First <- as.numeric(KTCdSample$First)
KTCdSample$Second <- as.numeric(KTCdSample$Second)
KTCdSample$Third <- as.numeric(KTCdSample$Third)
KTCdSample$Fourth <- as.numeric(KTCdSample$Fourth)
KTCdSample$Fifth <- as.numeric(KTCdSample$Fifth)
MeanKTCd<-c()
for (i in 1:5) {
MeanKTCd[i]=mean(KTCdSample[,i])
}
KTCdggplot <- ggplot(data=data.frame(MeanKTCd)
,aes(x=c(1:5),y=MeanKTCd))+
geom_line(color="BLUE")+
labs(x='Month',y='Mean of Cd (PPM)')+
ggtitle("KT")+
ylim(0,5)+
geom_hline(yintercept=0.01,color="ORANGE")+
geom_hline(yintercept=3,color="PURPLE")
grid.arrange(KCdggplot,KRCdggplot,KTCdggplot,nrow=1)
###############Co###############
KCo <- K[K$Parameter == 'Co',]
KCoSample=data.frame(cbind(KCo$First.Sample,KCo$Second..Sample,KCo$Third.Sample,KCo$Fourth.Sample,KCo$Fifth.Sample))
names(KCoSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KCoSample$First <- as.numeric(KCoSample$First)
KCoSample$Second <- as.numeric(KCoSample$Second)
KCoSample$Third <- as.numeric(KCoSample$Third)
KCoSample$Fourth <- as.numeric(KCoSample$Fourth)
KCoSample$Fifth <- as.numeric(KCoSample$Fifth)
MeanKCo<-c()
for (i in 1:5) {
MeanKCo[i]=mean(KCoSample[,i])
}
require(gridExtra)
KCoggplot <- ggplot(data=data.frame(MeanKCo)
,aes(x=c(1:5),y=MeanKCo))+
geom_line(color="GREEN")+
labs(x='Month',y='Mean of Co (PPM)')+
ggtitle("K")+
ylim(0,0.15)+
geom_hline(yintercept=0.05,color="ORANGE")
KRCo <- KR[KR$Parameter == 'Co',]
KRCoSample=data.frame(cbind(KRCo$First.Sample,KRCo$Second..Sample,KRCo$Third.Sample,KRCo$Fourth.Sample,KRCo$Fifth.Sample))
names(KRCoSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KRCoSample$First <- as.numeric(KRCoSample$First)
KRCoSample$Second <- as.numeric(KRCoSample$Second)
KRCoSample$Third <- as.numeric(KRCoSample$Third)
KRCoSample$Fourth <- as.numeric(KRCoSample$Fourth)
KRCoSample$Fifth <- as.numeric(KRCoSample$Fifth)
MeanKRCo<-c()
for (i in 1:5) {
MeanKRCo[i]=mean(KRCoSample[,i])
}
KRCoggplot <- ggplot(data=data.frame(MeanKRCo)
,aes(x=c(1:5),y=MeanKRCo))+
geom_line(color="RED")+
labs(x='Month',y='Mean of Co (PPM)')+
ggtitle("KR")+
ylim(0,0.15)+
geom_hline(yintercept=0.05,color="ORANGE")
KTCo <- KT[KT$Parameter == 'Co',]
KTCoSample=data.frame(cbind(KTCo$First.Sample,KTCo$Second..Sample,KTCo$Third.Sample,KTCo$Fourth.Sample,KTCo$Fifth.Sample))
names(KTCoSample)[1:5]=c("First","Second","Third","Fourth","Fifth")
KTCoSample$First <- as.numeric(KTCoSample$First)
KTCoSample$Second <- as.numeric(KTCoSample$Second)
KTCoSample$Third <- as.numeric(KTCoSample$Third)
KTCoSample$Fourth <- as.numeric(KTCoSample$Fourth)
KTCoSample$Fifth <- as.numeric(KTCoSample$Fifth)
MeanKTCo<-c()