library(maps)
library(cluster)
library(fpc)
library(fields)
boston = read.csv("boston6k.csv")
boston.use = boston[,-c(1:8)]
boston.use = scale(boston.use)
sil.out = rep(NA,20)
for (i in 2:20) {
boston.kmeans = kmeans(boston.use, centers=i, nstart=50)
tmp = silhouette(boston.kmeans$cluster, dist(boston.use))
sil.out[i] = mean(tmp[,3])
}
plot(1:20,sil.out, type='b', lwd=2,
xlab="N Groups", ylab="C", main="Average silhouette index")
Based on the plot results, it seems that 2 clusters is the best solution followed by the next best cluster as 11. 2 clusters though isn’t a sufficient amount of data reduction and 11 has higher computation costs, so I will use 6 since it’s the next best cluster in the silhouette index.
ngrp = 6
boston.kmeans = kmeans(boston.use, ngrp, nstart=50, iter.max = 20)
table(boston.kmeans$cluster)
##
## 1 2 3 4 5 6
## 38 91 34 173 109 61
b6k.centers <- aggregate(boston.use, list(boston.kmeans$cluster ),median)
b6k.centers
## Group.1 CRIM ZN INDUS CHAS NOX RM
## 1 1 1.0778501 -0.4872402 1.0149946 -0.2723291 1.07272553 -0.12401404
## 2 2 0.4912834 -0.4872402 1.0149946 -0.2723291 1.19354259 -0.28982269
## 3 3 -0.3638042 -0.4872402 0.4013236 3.6647712 -0.04051738 -0.07633515
## 4 4 -0.4077644 -0.4872402 -0.7691701 -0.2723291 -0.71364099 0.05887362
## 5 5 -0.3817574 -0.4872402 -0.1642450 -0.2723291 0.15796779 -0.46061271
## 6 6 -0.4159350 2.7285450 -1.1933466 -0.2723291 -1.24005818 0.64667596
## AGE DIS RAD TAX PTRATIO B LSTAT
## 1 0.8659355 -0.8881292 1.6596029 1.5294129 0.8057784 -3.4056574 1.0190273
## 2 0.9742880 -0.8756394 1.6596029 1.5294129 0.8057784 0.3731422 0.7193520
## 3 0.7096237 -0.3924532 -0.5224844 -0.6006817 -0.3951756 0.3713897 -0.2328874
## 4 -0.5106743 0.3539696 -0.5224844 -0.7371501 -0.2104134 0.4053456 -0.6291870
## 5 0.8250813 -0.6520568 -0.6373311 -0.1022751 0.3438730 0.3754425 0.2712393
## 6 -1.4449928 1.6679681 -0.6373311 -0.4701466 -0.9494620 0.3954874 -1.0450916
Overall there seems to be homogeneity between clusters.The positive values in the table above indicate for a given cluster it is above the overall mean. Cluster 2 has the highest positive proportion of residential land zoned (ZN) as well as weighted distances to five Boston employment centers (DIS) where other clusters are negative. Cluster 1 has the highest positive crime rate.
boston.agg = aggregate(boston, list(boston.kmeans$cluster), mean)
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
boston.agg
## Group.1 ID TOWN TOWNNO TRACT LON LAT MEDV
## 1 1 70.81579 NA 81.89474 799.5789 -71.08169 42.32164 12.51053
## 2 2 73.54945 NA 82.04396 815.0659 -71.07597 42.32936 16.51648
## 3 3 281.47059 NA 46.52941 2875.9412 -71.17256 42.34603 27.80588
## 4 4 328.01156 NA 32.60694 3424.2428 -71.09563 42.38061 26.25434
## 5 5 263.87156 NA 32.74312 3069.7064 -71.05453 42.40161 19.52569
## 6 6 390.31148 NA 43.95082 3886.0820 -71.15354 42.30682 29.63115
## CMEDV CRIM ZN INDUS CHAS NOX RM
## 1 12.48421 20.27734737 0.0000000 18.100000 0.00000000 0.6683158 6.074789
## 2 16.47692 9.54108637 0.0000000 18.629670 0.00000000 0.6668132 5.924374
## 3 27.80588 1.90568971 5.2941176 13.057647 1.00000000 0.5990853 6.478324
## 4 26.25145 0.19343769 8.6878613 6.185549 0.00000000 0.4829925 6.491832
## 5 19.59083 0.81043807 0.1146789 14.226789 0.00000000 0.5986055 5.997064
## 6 29.56557 0.05031049 66.4672131 3.070984 0.01639344 0.4168049 6.771066
## AGE DIS RAD TAX PTRATIO B LSTAT
## 1 90.30789 1.948447 24.000000 666.0000 20.20000 80.52026 21.127105
## 2 89.73956 2.116189 22.901099 668.4725 20.19451 371.70582 18.436593
## 3 79.05000 2.945729 9.558824 391.7941 17.60588 372.33500 11.479412
## 4 53.55780 4.732037 4.676301 281.8439 17.77399 390.37636 8.599422
## 5 86.75413 2.703088 4.366972 357.6972 18.77156 364.39991 15.509450
## 6 27.72951 7.217108 3.704918 317.3770 16.61639 388.16344 5.792787
boston.agg[,8]
## [1] 12.51053 16.51648 27.80588 26.25434 19.52569 29.63115
bos.lm = lm(boston$CMEDV ~ boston.kmeans$cluster)
bos.lm
##
## Call:
## lm(formula = boston$CMEDV ~ boston.kmeans$cluster)
##
## Coefficients:
## (Intercept) boston.kmeans$cluster
## 13.297 2.427
anova(bos.lm)
## Analysis of Variance Table
##
## Response: boston$CMEDV
## Df Sum Sq Mean Sq F value Pr(>F)
## boston.kmeans$cluster 1 6322 6322.4 87.89 < 2.2e-16 ***
## Residuals 504 36255 71.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Values between clusters are significantly different based on the p-value of 0.04154.
climate = read.csv("wnaclim2.csv")
climate2 = climate[3:26]
clim.pca = prcomp(climate2, scale=TRUE)
summary(clim.pca)
## Importance of components:
## PC1 PC2 PC3 PC4 PC5 PC6 PC7
## Standard deviation 3.4612 2.8065 1.5846 0.84733 0.63986 0.51316 0.29261
## Proportion of Variance 0.4992 0.3282 0.1046 0.02992 0.01706 0.01097 0.00357
## Cumulative Proportion 0.4992 0.8274 0.9320 0.96190 0.97896 0.98993 0.99350
## PC8 PC9 PC10 PC11 PC12 PC13 PC14
## Standard deviation 0.20707 0.17437 0.15014 0.13534 0.10798 0.09353 0.08322
## Proportion of Variance 0.00179 0.00127 0.00094 0.00076 0.00049 0.00036 0.00029
## Cumulative Proportion 0.99528 0.99655 0.99749 0.99825 0.99874 0.99910 0.99939
## PC15 PC16 PC17 PC18 PC19 PC20 PC21
## Standard deviation 0.06116 0.05676 0.04584 0.04161 0.03439 0.02946 0.02562
## Proportion of Variance 0.00016 0.00013 0.00009 0.00007 0.00005 0.00004 0.00003
## Cumulative Proportion 0.99955 0.99968 0.99977 0.99984 0.99989 0.99993 0.99995
## PC22 PC23 PC24
## Standard deviation 0.02411 0.01802 0.01392
## Proportion of Variance 0.00002 0.00001 0.00001
## Cumulative Proportion 0.99998 0.99999 1.00000
screeplot(clim.pca)
biplot(clim.pca)
summary(clim.pca)
## Importance of components:
## PC1 PC2 PC3 PC4 PC5 PC6 PC7
## Standard deviation 3.4612 2.8065 1.5846 0.84733 0.63986 0.51316 0.29261
## Proportion of Variance 0.4992 0.3282 0.1046 0.02992 0.01706 0.01097 0.00357
## Cumulative Proportion 0.4992 0.8274 0.9320 0.96190 0.97896 0.98993 0.99350
## PC8 PC9 PC10 PC11 PC12 PC13 PC14
## Standard deviation 0.20707 0.17437 0.15014 0.13534 0.10798 0.09353 0.08322
## Proportion of Variance 0.00179 0.00127 0.00094 0.00076 0.00049 0.00036 0.00029
## Cumulative Proportion 0.99528 0.99655 0.99749 0.99825 0.99874 0.99910 0.99939
## PC15 PC16 PC17 PC18 PC19 PC20 PC21
## Standard deviation 0.06116 0.05676 0.04584 0.04161 0.03439 0.02946 0.02562
## Proportion of Variance 0.00016 0.00013 0.00009 0.00007 0.00005 0.00004 0.00003
## Cumulative Proportion 0.99955 0.99968 0.99977 0.99984 0.99989 0.99993 0.99995
## PC22 PC23 PC24
## Standard deviation 0.02411 0.01802 0.01392
## Proportion of Variance 0.00002 0.00001 0.00001
## Cumulative Proportion 0.99998 0.99999 1.00000
clim.pca$rotation
## PC1 PC2 PC3 PC4 PC5
## tjan 0.27154635 -0.07007925 0.080386417 -0.1634473814 0.29901716
## tfeb 0.27524689 -0.07830351 0.051384208 -0.0792929685 0.26587174
## tmar 0.27484658 -0.09367701 -0.001067899 0.0006366441 0.19086484
## tapr 0.26473010 -0.12257641 -0.076298000 0.1052955242 0.03981628
## tmay 0.23877755 -0.16889072 -0.127271902 0.1251598792 -0.21848109
## tjun 0.20220435 -0.21701738 -0.139841033 0.0811805985 -0.44268300
## tjul 0.20390908 -0.22851811 -0.090041235 0.0981226254 -0.35337585
## taug 0.22863878 -0.20271341 -0.057726655 0.1081761983 -0.22777782
## tsep 0.25186014 -0.16881584 -0.031188367 -0.0252319485 -0.11100418
## toct 0.26714245 -0.12423680 -0.014213457 0.0039586317 0.12864795
## tnov 0.27214789 -0.09552584 0.029032040 -0.0776651476 0.26276447
## tdec 0.27301687 -0.07380880 0.068758839 -0.1472904833 0.28523902
## pjan 0.16803736 0.25995212 0.198293078 -0.0491302786 -0.14878411
## pfeb 0.17102216 0.26393484 0.174815508 -0.0779200398 -0.13546314
## pmar 0.17796187 0.25650454 0.169544577 -0.0684787805 -0.08941670
## papr 0.17074339 0.27824680 0.066073520 0.0873621609 -0.01709438
## pmay 0.14748106 0.25905950 -0.096201569 0.4454588155 0.21475276
## pjun 0.05730680 0.23790590 -0.271290553 0.6551603362 0.14238968
## pjul 0.01369406 0.10097126 -0.573535723 -0.1391139500 0.07054361
## paug 0.03206302 0.14782502 -0.519764989 -0.4064516753 0.01206271
## psep 0.10354548 0.26528778 -0.300542026 -0.1481576621 -0.04780745
## poct 0.13939969 0.28759576 -0.081905529 -0.1479311802 -0.16441200
## pnov 0.16303542 0.27829605 0.141217106 -0.0566592085 -0.16857230
## pdec 0.16860662 0.26639834 0.170927455 -0.0622112513 -0.15532094
## PC6 PC7 PC8 PC9 PC10
## tjan -0.0284108206 0.006685677 0.150748941 -0.03370819 0.295282973
## tfeb 0.0003503783 0.136618117 0.096325727 0.05374427 0.146770345
## tmar 0.0472553831 0.299836795 0.107879864 0.12796171 -0.002868388
## tapr 0.1142053327 0.361840941 0.005051047 0.18027931 -0.245606706
## tmay 0.1162681105 0.391610249 0.152998679 0.14131428 -0.153895952
## tjun 0.0336846593 0.059413350 0.153361302 0.08729649 0.185251391
## tjul -0.0968873526 -0.282122219 0.078633470 -0.02281332 0.111072241
## taug -0.1100855056 -0.269202717 -0.078353138 -0.16060487 0.002348289
## tsep -0.0494334800 -0.197844681 -0.135371606 -0.17154105 0.019210005
## toct -0.0108001461 -0.228312237 -0.393469988 -0.13609013 -0.315583081
## tnov -0.0341735253 -0.123895015 -0.174524477 -0.10198795 -0.168381612
## tdec -0.0376637342 -0.070659399 0.019616400 -0.04699441 0.196876851
## pjan 0.2458067285 0.032089376 -0.048645619 -0.21338581 0.001100698
## pfeb 0.1820140769 -0.040185881 -0.011301000 0.07554311 -0.126403221
## pmar 0.2288319443 -0.177170757 0.160725487 0.13544683 -0.309717304
## papr -0.0925172437 -0.305189314 0.271689204 0.39781282 -0.204745692
## pmay -0.1948655497 -0.258064679 0.241986147 0.13372542 0.183453709
## pjun 0.1213474134 0.141181422 -0.086059500 -0.36227611 0.043038183
## pjul 0.4811346946 -0.176731790 -0.383344278 0.38567024 0.178533100
## paug 0.0604580646 -0.072069255 0.509760728 -0.38851386 -0.032443473
## psep -0.4843787725 0.196824537 -0.149665107 -0.09624515 -0.407497122
## poct -0.4759093700 0.159625862 -0.266370371 0.26037169 0.346421923
## pnov 0.0644439203 0.128788161 -0.117454901 -0.17604085 0.237115136
## pdec 0.1871590345 0.094644125 -0.105030745 -0.21895144 0.170211499
## PC11 PC12 PC13 PC14 PC15
## tjan -0.3177818979 0.084717452 -0.198073796 0.0306128664 -0.12524773
## tfeb -0.0850920746 0.207170982 0.215049963 -0.0248132032 0.07177408
## tmar 0.0837891432 0.151198192 0.338194830 -0.1213396869 -0.04343164
## tapr 0.2429592526 -0.018873516 0.244346289 0.0007484506 0.04381860
## tmay 0.0431667637 -0.232783794 -0.291244671 0.0480458427 -0.18616504
## tjun -0.0987876247 -0.033840012 -0.422444222 -0.0105642695 0.31526141
## tjul -0.0486904501 0.283065952 0.298939526 -0.0044454340 0.14450174
## taug -0.0152404625 0.136111286 0.291708371 -0.0496293283 -0.21486141
## tsep -0.0444107836 -0.120942065 -0.094460420 0.0209592856 -0.41993874
## toct 0.2093561076 -0.231921667 -0.011130377 0.0997939913 0.27607606
## tnov 0.1006998972 -0.233238733 -0.174605090 -0.0378639293 0.02149880
## tdec -0.1909224250 0.002929791 -0.196357064 0.0633928569 0.15143733
## pjan -0.0005762763 0.039714713 0.006401917 -0.3431345819 0.49814932
## pfeb -0.1595286785 0.149113176 0.045518203 0.2980140260 0.07726715
## pmar -0.0295711250 0.194223506 -0.064458463 0.5326818242 -0.13153712
## papr -0.3048488853 -0.403344025 0.133363364 -0.4467304855 -0.08102153
## pmay 0.5520813847 0.203821338 -0.246609418 0.0048849326 0.02882245
## pjun -0.4115111702 -0.123357939 0.112057802 0.1724675213 0.02767334
## pjul -0.0309151580 0.137303662 -0.039627958 -0.1174288399 -0.07339510
## paug 0.1609697226 -0.224188960 0.158706743 0.0989438683 0.06477934
## psep -0.1703085895 0.441341096 -0.234474281 -0.2164132305 -0.05426607
## poct 0.0248821147 -0.304950065 0.205141127 0.3425036906 0.16345751
## pnov 0.1821268769 -0.095799139 0.015392954 -0.1184016248 -0.41165840
## pdec 0.1898709898 0.053178843 -0.055907092 -0.2039300913 -0.10002376
## PC16 PC17 PC18 PC19 PC20
## tjan 0.148674822 -0.107041343 0.160823567 -0.0269825468 0.4272858093
## tfeb -0.017002651 0.234367308 -0.030332072 0.0627361960 0.0203446585
## tmar -0.035352024 -0.000212998 -0.023742455 -0.0452842790 -0.2687836322
## tapr 0.022030975 0.145866305 0.006613803 -0.0184863673 -0.0467386911
## tmay 0.142255714 -0.298105316 0.126282045 0.0006562435 0.3387549738
## tjun -0.160935797 0.249990410 -0.191135211 0.0289864553 -0.2723565962
## tjul -0.238251861 -0.162051895 -0.033972474 0.1319965479 0.2737881475
## taug 0.106065552 -0.250950490 0.035001101 -0.1434759326 -0.0549829727
## tsep 0.390707549 0.327566676 0.244781447 -0.0916673160 -0.3538791803
## toct 0.018144251 0.349455508 -0.075056635 0.0788151267 0.4142142645
## tnov -0.264971834 -0.588989556 -0.143864858 0.0332551632 -0.3245451022
## tdec -0.157870134 0.092966911 -0.097722453 0.0092514596 -0.1416159968
## pjan 0.206879187 -0.141990574 0.530872235 0.0890666735 -0.0947536147
## pfeb 0.530999363 -0.151466383 -0.533289719 0.2207678709 -0.0675137256
## pmar -0.380592388 0.074655676 0.335006369 -0.1362476881 -0.0616168429
## papr -0.056901612 0.106755938 -0.084786785 -0.0375141498 0.0485745440
## pmay 0.177758906 -0.022014450 0.025024070 0.0376327473 -0.0093294644
## pjun -0.094904165 0.013377094 -0.016298342 -0.0261197497 -0.0346808089
## pjul -0.005543386 -0.049203713 0.044870954 0.0112968029 0.0096717843
## paug 0.047348123 0.015708070 -0.052098593 0.0046396787 0.0009636633
## psep -0.040657537 0.041970363 -0.011347466 0.0246969815 0.0132694536
## poct 0.027120678 -0.090538295 0.148875670 -0.1375823255 -0.0299283689
## pnov -0.283906262 0.105283956 -0.052183791 0.6219718414 0.0532889852
## pdec -0.122022282 0.048156966 -0.325075890 -0.6730608587 0.1687923951
## PC21 PC22 PC23 PC24
## tjan 0.110569448 -0.174362955 0.466461484 0.1410538810
## tfeb 0.411083337 0.195963582 -0.553989382 0.3303973610
## tmar 0.190517645 -0.117562888 0.219088103 -0.6511559490
## tapr -0.404433770 -0.108135234 0.270516403 0.5155541679
## tmay -0.037106821 0.143632598 -0.348991274 -0.1986853412
## tjun 0.254278010 0.063546212 0.239743583 0.0692545700
## tjul -0.179763796 -0.459394939 -0.200353045 -0.0523957985
## taug 0.026308260 0.644090923 0.223105697 0.0795298706
## tsep -0.041652632 -0.338752088 -0.179241161 -0.0007117746
## toct 0.159245830 0.068434255 0.090617300 -0.2078886850
## tnov 0.183602516 -0.198760485 -0.051768256 0.1951652783
## tdec -0.671182075 0.274168418 -0.167825018 -0.2131251230
## pjan -0.025665936 0.023245016 -0.023533194 -0.0018978335
## pfeb -0.017169890 -0.043847725 0.001437087 -0.0140109546
## pmar 0.073977731 0.042827913 0.030519916 -0.0138651710
## papr -0.008348023 0.008701196 -0.001837501 0.0129567032
## pmay -0.007890496 0.009175983 -0.014398707 -0.0095682867
## pjun 0.019589810 -0.050004246 -0.001155038 -0.0001735104
## pjul -0.003853114 0.023997896 -0.014147625 -0.0044508995
## paug 0.004197034 0.012388955 0.011866533 0.0056221737
## psep -0.017989679 -0.007676584 -0.001546521 -0.0008137329
## poct 0.026887105 -0.009846198 -0.006560772 0.0004372792
## pnov -0.015092274 0.074152159 0.081791929 0.0084156928
## pdec -0.018484850 -0.087548286 -0.071983057 0.0171497426
sort(clim.pca$rotation[,1])
## pjul paug pjun psep poct pmay pnov
## 0.01369406 0.03206302 0.05730680 0.10354548 0.13939969 0.14748106 0.16303542
## pjan pdec papr pfeb pmar tjun tjul
## 0.16803736 0.16860662 0.17074339 0.17102216 0.17796187 0.20220435 0.20390908
## taug tmay tsep tapr toct tjan tnov
## 0.22863878 0.23877755 0.25186014 0.26473010 0.26714245 0.27154635 0.27214789
## tdec tmar tfeb
## 0.27301687 0.27484658 0.27524689
sort(clim.pca$rotation[,2])
## tjul tjun taug tmay tsep toct
## -0.22851811 -0.21701738 -0.20271341 -0.16889072 -0.16881584 -0.12423680
## tapr tnov tmar tfeb tdec tjan
## -0.12257641 -0.09552584 -0.09367701 -0.07830351 -0.07380880 -0.07007925
## pjul paug pjun pmar pmay pjan
## 0.10097126 0.14782502 0.23790590 0.25650454 0.25905950 0.25995212
## pfeb psep pdec papr pnov poct
## 0.26393484 0.26528778 0.26639834 0.27824680 0.27829605 0.28759576
Variables highly associated with axis are tfeb = 0.2752 tmar = 0.2748. Variables highly associated with axis 2 are poct = 0.28759 pnov = 0.27824680
clim.pca.score = clim.pca$x[,1]
quilt.plot(climate$Longitude, climate$Latitude, clim.pca.score)
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [8] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [15] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [22] 0.0000000 0.0000000 0.0000000 0.0627451 0.1254902 0.1882353 0.2509804
## [29] 0.3137255 0.3764706 0.4392157 0.5019608 0.5607843 0.6235294 0.6862745
## [36] 0.7490196 0.8117647 0.8745098 0.9372549 1.0000000 1.0000000 1.0000000
## [43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [50] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [57] 0.9372549 0.8745098 0.8117647 0.7490196 0.6862745 0.6235294 0.5607843
## [64] 0.5019608
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [8] 0.0000000 0.0627451 0.1254902 0.1882353 0.2509804 0.3137255 0.3764706
## [15] 0.4392157 0.5019608 0.5607843 0.6235294 0.6862745 0.7490196 0.8117647
## [22] 0.8745098 0.9372549 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.9372549 0.8745098
## [43] 0.8117647 0.7490196 0.6862745 0.6235294 0.5607843 0.5019608 0.4392157
## [50] 0.3764706 0.3137255 0.2509804 0.1882353 0.1254902 0.0627451 0.0000000
## [57] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [64] 0.0000000
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.5607843 0.6235294 0.6862745 0.7490196 0.8117647 0.8745098 0.9372549
## [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [22] 1.0000000 1.0000000 1.0000000 0.9372549 0.8745098 0.8117647 0.7490196
## [29] 0.6862745 0.6235294 0.5607843 0.5019608 0.4392157 0.3764706 0.3137255
## [36] 0.2509804 0.1882353 0.1254902 0.0627451 0.0000000 0.0000000 0.0000000
## [43] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [50] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [57] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [64] 0.0000000
world(add=TRUE)
Axis 1 variation in temperature site scores generally makes sense and follows predicted weather groupings in North America. In the Pacific Northwest and Southwest desert there are positive values. This makes sense because there is less temperature variation throughout the year. In Alaska and Northern Canada, there are negative values where temperature variation is higher because of its range of high and low elevations.Categorizing the Southern desert areas with British Columbia coast though doesn’t quite make sense.
clim.pca.score = clim.pca$x[,2]
quilt.plot(climate$Longitude, climate$Latitude, clim.pca.score)
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [8] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [15] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [22] 0.0000000 0.0000000 0.0000000 0.0627451 0.1254902 0.1882353 0.2509804
## [29] 0.3137255 0.3764706 0.4392157 0.5019608 0.5607843 0.6235294 0.6862745
## [36] 0.7490196 0.8117647 0.8745098 0.9372549 1.0000000 1.0000000 1.0000000
## [43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [50] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [57] 0.9372549 0.8745098 0.8117647 0.7490196 0.6862745 0.6235294 0.5607843
## [64] 0.5019608
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [8] 0.0000000 0.0627451 0.1254902 0.1882353 0.2509804 0.3137255 0.3764706
## [15] 0.4392157 0.5019608 0.5607843 0.6235294 0.6862745 0.7490196 0.8117647
## [22] 0.8745098 0.9372549 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.9372549 0.8745098
## [43] 0.8117647 0.7490196 0.6862745 0.6235294 0.5607843 0.5019608 0.4392157
## [50] 0.3764706 0.3137255 0.2509804 0.1882353 0.1254902 0.0627451 0.0000000
## [57] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [64] 0.0000000
## [1] 0.00000000 0.01587302 0.03174603 0.04761905 0.06349206 0.07936508
## [7] 0.09523810 0.11111111 0.12698413 0.14285714 0.15873016 0.17460317
## [13] 0.19047619 0.20634921 0.22222222 0.23809524 0.25396825 0.26984127
## [19] 0.28571429 0.30158730 0.31746032 0.33333333 0.34920635 0.36507937
## [25] 0.38095238 0.39682540 0.41269841 0.42857143 0.44444444 0.46031746
## [31] 0.47619048 0.49206349 0.50793651 0.52380952 0.53968254 0.55555556
## [37] 0.57142857 0.58730159 0.60317460 0.61904762 0.63492063 0.65079365
## [43] 0.66666667 0.68253968 0.69841270 0.71428571 0.73015873 0.74603175
## [49] 0.76190476 0.77777778 0.79365079 0.80952381 0.82539683 0.84126984
## [55] 0.85714286 0.87301587 0.88888889 0.90476190 0.92063492 0.93650794
## [61] 0.95238095 0.96825397 0.98412698 1.00000000
## [1] 0.5607843 0.6235294 0.6862745 0.7490196 0.8117647 0.8745098 0.9372549
## [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [22] 1.0000000 1.0000000 1.0000000 0.9372549 0.8745098 0.8117647 0.7490196
## [29] 0.6862745 0.6235294 0.5607843 0.5019608 0.4392157 0.3764706 0.3137255
## [36] 0.2509804 0.1882353 0.1254902 0.0627451 0.0000000 0.0000000 0.0000000
## [43] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [50] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [57] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
## [64] 0.0000000
world(add=TRUE)
Axis 2 sites scores shows participation patterns across North America. Along the pacific north west coast, there is generally high precipitation that varies minimally throughout the year.