Clusters de Acidentes por Affinity Propagation

library(leaflet.extras)
## Loading required package: leaflet
library(apcluster)
## 
## Attaching package: 'apcluster'
## The following object is masked from 'package:stats':
## 
##     heatmap
library(magrittr)
library(dplyr)   
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(leaflet)
library(rgdal)
## Loading required package: sp
## Please note that rgdal will be retired by the end of 2023,
## plan transition to sf/stars/terra functions using GDAL and PROJ
## at your earliest convenience.
## 
## rgdal: version: 1.5-27, (SVN revision 1148)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
## Path to GDAL shared files: C:/Users/fagne/Documents/R/win-library/4.1/rgdal/gdal
## GDAL binary built with GEOS: TRUE 
## Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
## Path to PROJ shared files: C:/Users/fagne/Documents/R/win-library/4.1/rgdal/proj
## PROJ CDN enabled: FALSE
## Linking to sp version:1.4-5
## To mute warnings of possible GDAL/OSR exportToProj4() degradation,
## use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
## Overwritten PROJ_LIB was C:/Users/fagne/Documents/R/win-library/4.1/rgdal/proj
library(rgeos)
## rgeos version: 0.5-8, (SVN revision 679)
##  GEOS runtime version: 3.9.1-CAPI-1.14.2 
##  Please note that rgeos will be retired by the end of 2023,
## plan transition to sf functions using GEOS at your earliest convenience.
##  GEOS using OverlayNG
##  Linking to sp version: 1.4-5 
##  Polygon checking: TRUE
library(geojsonio)
## Registered S3 method overwritten by 'geojsonsf':
##   method        from   
##   print.geojson geojson
## 
## Attaching package: 'geojsonio'
## The following object is masked from 'package:base':
## 
##     pretty
library(mapview)
library(contoureR)
## Loading required package: geometry
library(geosphere)
## 
## Attaching package: 'geosphere'
## The following object is masked from 'package:geojsonio':
## 
##     centroid
library(cluster)
library(sp)
library(rgdal)
library(RColorBrewer)
library(sp)
library(foreign)

Carga de Dados

#dados = read.dbf("~/OneDrive/r-files/CIET/acidentes2020/_Base/acidentes_2014a2020_WGS84.dbf")
dados = read.dbf("/Users/fagne/OneDrive/r-files/CIET/acidentes2020/_Base/acidentes_2014a2020_WGS84.dbf")
anos = length(unique(dados$ANO))

class(dados)
## [1] "data.frame"
x2 <- cbind(dados$LONGITUDE, dados$LATITUDE)
x2 <- x2[complete.cases(x2), ]
#dim(x2)
#head(x2)

Preparação

x1 <- x2
#x2 <- x2[sample(nrow(x2), 13000), ]
#x2 = as.data.frame(x2)
load("data/x2.rda")
load("data/apres2.rda")
#names(x2) = c("LONGITUDE", "LATITUDE" )
head(x2)
#save(x2, file = "data/x2.rda")
dim(x1)
## [1] 92699     2
dim(x2)
## [1] 13000     2

Treino

#apres <- apcluster(negDistMat(r=2), x2, q=0.999)
plot(apres, x2)
A caption

A caption

summary(apres)
##   Length    Class     Mode 
##     2965 APResult       S4
#save(apres, file = "data/apres2.rda")

Obtenção de Centróides

centroides = unique(apres@exemplars)
poly = data.frame()
centr_indice = 0
for (i in centroides){
  centr_indice = centr_indice + 1
  centr_lat=x2[i,1]
  centr_lon=x2[i,2]
  poly = rbind(poly, c(centr_lat, centr_lon, centr_indice))
}
names(poly) = c("Lat", "Lon", "Cluster")
head(poly)
dim(poly)
## [1] 2965    3
exemplars = poly
save(exemplars, file = "data/exemplars.rda")

Classificação Global

predict.apcluster <- function(s, exemplars, newdata){
  simMat <- s(rbind(exemplars, newdata), sel=(1:nrow(newdata)) + nrow(exemplars))[1:nrow(exemplars), ]
  unname(apply(simMat, 2, which.max))
}
resultado <- list()

dados$cluster = 0
for(i in seq(from=1, to=length(dados$ID)-1000, by=1000)){
  inicio = i
  final = i+999
  resultado = predict.apcluster(negDistMat(r=2), x2[apres@exemplars, ],  dados[inicio:final, 2:3])
  dados$cluster[inicio:final] = resultado
}
controle = length(dados$cluster)  - final

resultado = predict.apcluster(negDistMat(r=2), x2[apres@exemplars, ],  dados[(final + 1):length(dados$cluster), 2:3])
dados$cluster[(final + 1):length(dados$cluster)] = resultado
head(dados)
tail(dados)
save(dados, file = "data/acidentes.rda")

Acidentes por Cluster

pal <- colorFactor(
  palette = 'Dark2',
  domain = dados$cluster
)

leaflet(dados) %>%
  addTiles(group="Mapa") %>% 
  addCircles(group="Acidentes", ~LONGITUDE, ~LATITUDE, weight = 0.1, radius=7, color=~pal(cluster),
             stroke = TRUE, fillOpacity = 0.8, popup=~paste("Cluster Nº: ", cluster,  
            "<br>Ano: ", ANO, "<br>Tipo: ", TIPO_ACID, "<br>Local: ", LOG1,  "<br>UPS: ", UPS,   sep = " ")) %>% 
  addLegend(group="Legenda", "topright", colors= "", labels=paste("Classificados em meio a ", summary(apres)[1], "Clusters"), title="Acidentes em Porto Alegre") %>% 
  addLayersControl(overlayGroups = c("Mapa", "Acidentes", "Legenda"),
                   options = layersControlOptions(collapsed = FALSE)) %>% 
  addProviderTiles(providers$CartoDB.DarkMatter)

A caption

Enriquecimento Informacional

rm(apres)
clusters_encontrados = sort(unique(dados$cluster))
#clusters_encontrados
parq = dados
poly = data.frame()
for (i in clusters_encontrados){
  temp = parq[parq$"cluster" == i,  ]
  ch1 = convexHullAM_Indexes(temp[,2],temp[,3], includeColinear=FALSE,zeroBased = FALSE)
  #print(i)
  #print(ch1)
  poligono = temp[ch1, 2:3 ]
  area <- geosphere::areaPolygon(x = poligono)
  acidentes = nrow(temp)
  pol = temp
  coordinates(pol) = ~LONGITUDE+LATITUDE
  centr_lat=gCentroid(pol, byid=FALSE)$x
  centr_lon=gCentroid(pol, byid=FALSE)$y
  if(nrow(temp) >= anos) {
    for (ii in ch1) {
    polying = temp[ii,]
    polying$area = area
    polying$acidentes = acidentes
    polying$centroide_lat = centr_lat
    polying$centroide_lon = centr_lon
    poly = rbind(poly, polying)
    }  
  }
}
head(poly)
tail(poly)
mean(poly$area)
## [1] 20404.69
median(poly$area)
## [1] 9208.097
minimoquantil = quantile(poly$area, probs = 0.01)
maximoquantil = quantile(poly$area, probs = 0.90)
quantile(poly$area, probs = c(0.01, 0.25, 0.5,0.75,0.99))
##          1%         25%         50%         75%         99% 
##    216.4713   3922.3344   9208.0973  17704.6301 192127.6200
poly = poly[(poly$area < maximoquantil) & (poly$area > minimoquantil), ]
dim(poly)
## [1] 15338    48
class(poly)
## [1] "data.frame"
pol = poly

Combinando Informações

#save(pol, file = "data/pol.Rds")
#load("data/acidentes.rda")
#load("data/apres2.rda")
#load("data/exemplars.rda")
#load("data/x2.rda")
dados = poly[,c(1:9, 11:13,38,41,44:48)]
head(dados)
names(dados) = c("ID","lat", "lon", "log1", "Log2", "Pred", "Local", "Tipo", "Via", "Data", "Dia", "Hora", 
                 "Fx_horaria","UPS", "box_id", "Area", "Acidentes", "CentLon", "CentLat")
dados$id = (dados$box_id * 11)
dados$group = dados$id
head(dados)
dadostemp = dados[, c(15:21)]
coordinates(dados)=c("lat","lon")
df = dados
df
## class       : SpatialPointsDataFrame 
## features    : 15338 
## extent      : -51.26617, -51.08306, -30.23911, -29.96753  (xmin, xmax, ymin, ymax)
## crs         : NA 
## variables   : 19
## names       :     ID,               log1,           Log2,  Pred,      Local,         Tipo,                        Via,       Data,         Dia,  Hora, Fx_horaria, UPS, box_id,             Area, Acidentes, ... 
## min values  : 582137, AC A AV A J RENNER,     AC HAMMOND,     0, Cruzamento, ABALROAMENTO, 0 AV JORGE BENJAMIN ECKERT, 01/01/2014,     DOMINGO, 00:00,          0,   1,      1, 219.139385845512,         7, ... 
## max values  : 683132, VDT LEONEL BRIZOLA, VE DE SAO BRAZ, 90100, Logradouro,   TOMBAMENTO,         VDT LEONEL BRIZOLA, 31/12/2020, TERCA-FEIRA, 23:55,         23,  13,   2964, 33794.6412400901,       334, ...
data <- data.frame(box_id=unique(df$box_id),row.names=unique(df$id))
head(data)
dadostemp2 = dados[!duplicated(dados$id),]
#head(dadostemp2, 15)
data = cbind(data, dadostemp2)

Criação de Polígonos

points2polygons <- function(df,data) {
  get.grpPoly <- function(group,ID,df) {
    Polygon(coordinates(df[df$id==ID & df$group==group,]))
  }
  get.spPoly  <- function(ID,df) {
    Polygons(lapply(unique(df[df$id==ID,]$group),get.grpPoly,ID,df),ID)
  }
  spPolygons  <- SpatialPolygons(lapply(unique(df$id),get.spPoly,df))
  SpatialPolygonsDataFrame(spPolygons,match.ID=T,data=data)
}

#Criamos o SpatialPolygonsDataFrame
data$Log2 = NULL
spDF <- points2polygons(df,data)
spDF
## class       : SpatialPolygonsDataFrame 
## features    : 2336 
## extent      : -51.26617, -51.08306, -30.23911, -29.96753  (xmin, xmax, ymin, ymax)
## crs         : NA 
## variables   : 22
## names       : box_id,     ID,               lat,               lon,                    log1,  Pred,      Local,         Tipo,                                 Via,       Data,         Dia,         Hora, Fx_horaria, UPS, box_id.1, ... 
## min values  :      1, 582241,        -51.266174, -30.2387516523691, AC B VILA NOVA BRASILIA,     0, Cruzamento, ABALROAMENTO, 10 AV AURELIANO DE FIGUEIREDO PINTO, 01/01/2015,     DOMINGO,        00:00,          0,   1,        1, ... 
## max values  :   2964, 683131, -51.0847904837036, -29.9675320000004,      VDT LEONEL BRIZOLA, 21010, Logradouro,   TOMBAMENTO,                  VDT LEONEL BRIZOLA, 31/12/2020, TERCA-FEIRA, 23:50:01.000,         23,  13,     2964, ...
class(spDF)
## [1] "SpatialPolygonsDataFrame"
## attr(,"package")
## [1] "sp"
spDF@data$group = 1
spDF@data$box_id = NULL
dim(spDF@data)
## [1] 2336   21
dadostemp = unique(dadostemp)
spDF@data = merge(spDF@data, dadostemp, by = "box_id")
dim(spDF@data)
## [1] 2336   27
plot(spDF,col=spDF$box_id+1)
A caption

A caption

library(rgdal)
rgdal::writeOGR(obj = spDF,
                dsn = "data/myParq.json",
                layer = "myParq",
                driver = "GeoJSON",
                overwrite_layer = TRUE)

Acidentes por Cluster

#carregamos os dados SpatialPolygonsDataFrame
parqs <- geojsonio::geojson_read("data/myParq.json",
                                 what = "sp")
#Verificamos o objeto
parqs
## class       : SpatialPolygonsDataFrame 
## features    : 2336 
## extent      : -51.26617, -51.08306, -30.23911, -29.96753  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs 
## variables   : 27
## names       : box_id,     ID,               lat,               lon,                    log1,  Pred,      Local,         Tipo,                                 Via,       Data,         Dia,     Hora, Fx_horaria, UPS,           Area.x, ... 
## min values  :      1, 582241,        -51.266174, -30.2387516523691, AC B VILA NOVA BRASILIA,     0, Cruzamento, ABALROAMENTO, 10 AV AURELIANO DE FIGUEIREDO PINTO, 01/01/2015,     DOMINGO, 00:00:00,          0,   1, 219.139385845512, ... 
## max values  :   2964, 683131, -51.0847904837036,        -29.967532,      VDT LEONEL BRIZOLA, 21010, Logradouro,   TOMBAMENTO,                  VDT LEONEL BRIZOLA, 31/12/2020, TERCA-FEIRA, 23:50:01,         23,  13, 33794.6412400901, ...
dim(parqs)
## [1] 2336   27
library(raster)
## 
## Attaching package: 'raster'
## The following object is masked from 'package:dplyr':
## 
##     select
## The following object is masked from 'package:magrittr':
## 
##     extract
projection(parqs)
## [1] "+proj=longlat +datum=WGS84 +no_defs"
library(mapview)
mapviewPalette(name = "Viridis")
library(RColorBrewer)
mapview(parqs, zcol = "Acidentes.x", col.regions=brewer.pal(9, "YlOrRd"))

Acidentes por m2

parqs@data$densidade = (parqs@data$Acidentes.x/parqs@data$Area.x)*1000000
mapview(parqs, zcol = "densidade", col.regions=brewer.pal(9, "YlOrRd"))

Acidentes por poligono

hist(parqs@data$Acidentes.x, col = "magenta")
A caption

A caption

Acidentes por KM2

hist(parqs@data$densidade, col = "orange")
A caption

A caption

Locais mais densos

quantile(parqs$densidade, probs = 0.99)
##      99% 
## 92437.45
temp = parqs[parqs$densidade > quantile(parqs$densidade, probs = 0.99), ]
mapview(temp, zcol = "densidade")

Calculando a matriz de vizinhanças

ccods = coordinates(parqs)
points = cbind(ccods[,1],ccods[,2])
head(points)
##        [,1]      [,2]
## 1 -51.20763 -30.05156
## 2 -51.21667 -30.08712
## 3 -51.16635 -30.01000
## 4 -51.22908 -30.07897
## 5 -51.18949 -30.00954
## 6 -51.20034 -30.00438
library(spdep)
## Loading required package: spData
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
## Loading required package: sf
## Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
dnb = dnearneigh(points,0,0.1)
class(dnb)
## [1] "nb"

Matriz de Vizinhanca

Matriz Binária

W.Bin= nb2mat(neighbours = dnb, style = "B")
#head(W.Bin)

Matriz Normalizada

W.Normal= nb2mat(neighbours = dnb, style = "W")
#head(W.Normal)

KNN

vizinhos_4 <- knearneigh(points, k = 4)
class(vizinhos_4)
## [1] "knn"
head(vizinhos_4$nn)
##      [,1] [,2] [,3] [,4]
## [1,] 1966 1008 2121 2183
## [2,]  837  201 1643 1961
## [3,] 1331 2125  383   83
## [4,] 2232  960  324 1909
## [5,] 1009 1090 1489 1823
## [6,]  561  115 1548  418
vizinhanca_4 <- knn2nb(vizinhos_4)
class(vizinhanca_4)
## [1] "nb"

Preparação para Análisis Global e Local

mv_simpl = st_as_sf(parqs)
plot(mv_simpl)
A caption

A caption

class(mv_simpl)
## [1] "sf"         "data.frame"
library(dplyr)
mv_simpl =  mv_simpl %>% dplyr::select(Acidentes.y)
#mv_simpl <- st_simplify(mv_simpl, preserveTopology = FALSE,                  dTolerance = 1)
class(mv_simpl)
## [1] "sf"         "data.frame"
mapview::mapview(mv_simpl)
sf::sf_use_s2(FALSE)#trips and tiks
## Spherical geometry (s2) switched off
mv_simpl = st_as_sf(mv_simpl)
vizinhanca_neig <- poly2nb(mv_simpl)
## although coordinates are longitude/latitude, st_intersects assumes that they are planar
ShapeNEIG = parqs
ShapeNEIG$vizinhos = card(vizinhanca_neig)
ShapeNEIG <- subset(ShapeNEIG, parqs$vizinhos != 0)
#vizinhanca2neig <- poly2nb(ShapeNEIG)

Calculando o Índice de Moran Global

Pelo teste de Normalidade

moran.test(parqs$Acidentes.y,listw=nb2listw(dnb, style = "W"), randomisation= FALSE)
## 
##  Moran I test under normality
## 
## data:  parqs$Acidentes.y  
## weights: nb2listw(dnb, style = "W")    
## 
## Moran I statistic standard deviate = 21.156, p-value < 2.2e-16
## alternative hypothesis: greater
## sample estimates:
## Moran I statistic       Expectation          Variance 
##      7.773250e-03     -4.282655e-04      1.502881e-07

Pelo teste de Permutação

moran.test(parqs$Acidentes.y,listw=nb2listw(dnb, style = "W"), randomisation= TRUE)
## 
##  Moran I test under randomisation
## 
## data:  parqs$Acidentes.y  
## weights: nb2listw(dnb, style = "W")    
## 
## Moran I statistic standard deviate = 21.216, p-value < 2.2e-16
## alternative hypothesis: greater
## sample estimates:
## Moran I statistic       Expectation          Variance 
##      7.773250e-03     -4.282655e-04      1.494420e-07

Por simulação de Monte-Carlo

moran.mc(parqs$Acidentes.y, listw=nb2listw(dnb, style = "W"), nsim=999)
## 
##  Monte-Carlo simulation of Moran I
## 
## data:  parqs$Acidentes.y 
## weights: nb2listw(dnb, style = "W")  
## number of simulations + 1: 1000 
## 
## statistic = 0.0077732, observed rank = 1000, p-value = 0.001
## alternative hypothesis: greater

Pelo teste de Permutação

EBImoran.mc(parqs$Acidentes.y,parqs$Area.y,
            nb2listw(dnb, style="B", zero.policy=TRUE), nsim=999, zero.policy=TRUE)
## The default for subtract_mean_in_numerator set TRUE from February 2016
## 
##  Monte-Carlo simulation of Empirical Bayes Index (mean subtracted)
## 
## data:  cases: parqs$Acidentes.y, risk population: parqs$Area.y
## weights: nb2listw(dnb, style = "B", zero.policy = TRUE)
## number of simulations + 1: 1000
## 
## statistic = -0.0013074, observed rank = 1, p-value = 0.999
## alternative hypothesis: greater

Por simulação de Monte-Carlo

shapeCG.p=parqs$Acidentes.y/parqs$Area.y
moran.mc(shapeCG.p, nb2listw(dnb, style="B", zero.policy=TRUE),
         nsim=999, zero.policy=TRUE)
## 
##  Monte-Carlo simulation of Moran I
## 
## data:  shapeCG.p 
## weights: nb2listw(dnb, style = "B", zero.policy = TRUE)  
## number of simulations + 1: 1000 
## 
## statistic = -0.0012859, observed rank = 1, p-value = 0.999
## alternative hypothesis: greater

Calculando a Estatística C de Geary Global

Pelo teste de Normalidade

geary.test(parqs$Acidentes.y, listw=nb2listw(dnb, style = "W"), randomisation= FALSE)
## 
##  Geary C test under normality
## 
## data:  parqs$Acidentes.y 
## weights: nb2listw(dnb, style = "W") 
## 
## Geary C statistic standard deviate = -1.8699, p-value = 0.9692
## alternative hypothesis: Expectation greater than statistic
## sample estimates:
## Geary C statistic       Expectation          Variance 
##      1.005167e+00      1.000000e+00      7.635184e-06

Pelo teste de Permutação

geary.test(parqs$Acidentes.y, listw=nb2listw(dnb, style = "W"), randomisation=TRUE)
## 
##  Geary C test under randomisation
## 
## data:  parqs$Acidentes.y 
## weights: nb2listw(dnb, style = "W") 
## 
## Geary C statistic standard deviate = -0.67264, p-value = 0.7494
## alternative hypothesis: Expectation greater than statistic
## sample estimates:
## Geary C statistic       Expectation          Variance 
##      1.005167e+00      1.000000e+00      5.900344e-05

Por simulação de Monte-Carlo

geary.mc(parqs$Acidentes.y, listw=nb2listw(dnb, style = "W"),nsim=999)
## 
##  Monte-Carlo simulation of Geary C
## 
## data:  parqs$Acidentes.y 
## weights: nb2listw(dnb, style = "W") 
## number of simulations + 1: 1000 
## 
## statistic = 1.0052, observed rank = 733, p-value = 0.733
## alternative hypothesis: greater

Calculando Índice de Getis e Ord Global

globalG.test(parqs$Acidentes.y, nb2listw(dnb, style="B"))
## 
##  Getis-Ord global G statistic
## 
## data:  parqs$Acidentes.y 
## weights: nb2listw(dnb, style = "B") 
## 
## standard deviate = 7.7073, p-value = 6.425e-15
## alternative hypothesis: greater
## sample estimates:
## Global G statistic        Expectation           Variance 
##       8.404005e-01       7.933205e-01       3.731373e-05

Getis e Ord Local

localG(parqs$Acidentes.y, nb2listw(dnb, style="B"), zero.policy=NULL, spChk=NULL, return_internals=FALSE)
##    [1]  5.67829090  6.30847300  5.13028334  6.65180810  5.72249474  6.04044752
##    [7]  5.25951891  4.52075833  2.05426014  3.21804636  5.25952184  4.89753792
##   [13]  2.63560666  2.25372200 -2.30837160  6.32692441  3.76459368 -5.24577766
##   [19]  5.18084060  4.53325646  6.21851581  2.39029782  2.38276575  5.55637003
##   [25]  3.97197000  2.70185810  3.68934952  5.37446772  5.28527383  4.63086182
##   [31]  5.72569763 -0.63077859  5.84163611  5.81664025 -1.10932942  5.32540206
##   [37]  5.81504668  2.91307467  7.10244728  2.20218457  5.02673145  6.56307254
##   [43]  6.27797550  5.36743279  5.74794724  5.24241184  6.23525253  5.58415132
##   [49]  5.83922506  5.73762387  6.42312406  1.48735945  5.18495048  0.72961753
##   [55]  6.19341415  5.49659398  5.22677922  5.07778600  5.48876406  6.76148166
##   [61] -5.53259496  6.68294167  6.30161850  2.09550070  3.89750687 -3.79216185
##   [67]  5.60533374  6.19194610  4.72205454  4.08006897  7.11319118  5.04481535
##   [73]  6.06433104  5.00993953  5.29772965  5.81018191  2.55052577 -1.95026873
##   [79] -2.09109474  5.93816747  0.21922493  5.56931115  5.09342194  5.37139662
##   [85]  5.82620382  5.75642272  5.03377290  6.13546210 -4.82890562  5.08072549
##   [91]  0.01709019  6.78639248  4.83058120  6.36074663  5.60400618  3.63938615
##   [97] -6.10008989  4.42636235  3.49135886  5.50523344  5.29780563  6.72469639
##  [103]  5.89842507  4.38772074  2.38962340  6.99628325  6.98898126  5.71443049
##  [109]  6.51656526  2.88655492  6.35884318  5.22966225  4.98538407  5.26007652
##  [115]  5.86523113  3.20487678  6.23873316  3.66941265  5.14640001  5.88147513
##  [121]  6.01201327  5.44199964  0.60318338  5.82652559  3.48914177  0.42776057
##  [127]  6.23214388  5.99946187  6.41791939  2.13768810  5.94480596  6.36966640
##  [133]  6.63129784  5.04041767  6.60966590  6.66931240  5.26580213 -2.22063406
##  [139]  4.71926604  4.44097417  5.79262205  4.79012284  3.83658283  5.44472172
##  [145]  2.27000482  3.49269608  5.44436798  6.79513921 -1.02656298  5.50882606
##  [151]  5.56455977  5.22420882  5.03757528  4.83409312  4.50877032  5.49135826
##  [157]  5.56262599  2.45347658 -1.02997470 -3.21508611  4.98924897  4.44792702
##  [163]  5.69576947  6.18851664  5.29634491  3.15356028  5.34191379  4.97871266
##  [169]  6.02991808  2.59607470 -1.10189697  5.48603316  2.43531100 -4.55393176
##  [175]  5.76131425  5.77777954  6.25297873  5.29810565  6.15396596  1.43333894
##  [181]  3.51762084  3.02282886  2.70706400  6.11963763  3.84219806  5.24288059
##  [187]  5.00556755 -1.13981024  6.77537368  3.43829209  5.43294987  6.01320703
##  [193]  4.65653273  6.67584327 -1.99323689  3.80275967  5.94674319  3.05263891
##  [199]  6.11003401  5.41329554  6.13048927 -4.09282621  6.63326398  6.19212331
##  [205]  5.66213423  3.81768755  4.44109901  6.10800916  4.51367191  6.57874604
##  [211]  5.13159829  5.87894615  6.78294280  6.03688828  5.89410389  1.05672629
##  [217]  4.36154952  5.90552755  5.00698102 -3.52250447  6.01941289  6.03583494
##  [223]  5.97641060  2.49359116  3.44842588  5.09721204  4.00109962  2.04653337
##  [229]  5.20605871  4.64999497 -2.45743459  5.96313297  3.02448661  4.85494002
##  [235]  6.58140707  6.16043023  6.38607142 -1.85717015  6.47521738  5.83432455
##  [241] -1.69395504 -4.71218776  2.56675142  4.04173089  6.18109906 -2.12229743
##  [247]  5.53807563  6.43906632 -2.80792643  6.61647420  5.42415467  6.53824004
##  [253]  1.72743680  4.09173043 -2.47823802  6.23692177  5.57987342  5.91602595
##  [259]  5.65249551  5.41176015  4.87266033  5.17538778  4.41491714 -5.61020866
##  [265]  5.67971525  5.66904546  5.74336111  5.57755015  6.32479065  5.39610276
##  [271]  4.81094467 -1.53772448  5.09997699  5.60490052  1.78916784  5.66684002
##  [277]  5.30758565  6.62704551  5.83133313  4.84218089  4.88913095  5.87431748
##  [283]  2.58996095  6.92763753  5.11592088  6.41418341  5.23634762  5.78958647
##  [289]  6.59867130  5.01487633  2.21190648  6.02695786  2.90650062  4.48754148
##  [295]  5.17138865  5.34164099  5.17595322  4.83551442  2.85044644  5.18865145
##  [301]  5.05079852  2.52268660 -2.78300981  3.90654007  3.87489882  5.34265781
##  [307]  4.57552003  6.23857705 -4.75600208  0.68927769  6.35066497  5.59277723
##  [313]  5.53509975  4.97374638 -5.16509771 -4.15722152 -1.63161546 -3.37945963
##  [319]  5.21346538  6.60394769  6.75492747  3.60868602  4.02619656  6.54910564
##  [325]  2.52560512  5.81616384  4.55680624  6.64182798  6.55931906  4.94981000
##  [331] -4.85319091  4.13871448  5.12410041  6.57245218  6.03645600 -1.08318770
##  [337]  0.87117357  5.13084861  3.74191358 -1.82072802  2.91767078  3.75473272
##  [343]  6.30541997  6.92487911  5.51383187  5.88979288  4.42950111  5.47485908
##  [349]  6.50766882  4.62595773  3.86414556  4.23325589  6.48405408  3.62988529
##  [355]  5.09115695  5.33974469  5.35821988  5.41721897  4.77819871  4.49324329
##  [361]  4.10391331  5.31449353 -2.39403038  4.13733965  5.52005260  5.07528294
##  [367] -4.15116320  6.43503941  5.13082121  3.22564051  6.27626829 -5.07692703
##  [373]  6.90245263  5.09649640  5.66879867 -1.95388311  6.58255899  5.55105283
##  [379]  5.51507778  5.05170980  5.91289956  6.25260671  4.96029808  7.10483979
##  [385]  4.98799646  5.65290712 -2.30699847  3.40869383  5.09555747  5.56302240
##  [391] -1.83639775  5.31764423  4.78969463  4.57754838  6.76989449  6.24189639
##  [397]  5.28209366 -4.62741700  5.17233941  3.92027489  5.42219099 -5.63649260
##  [403]  5.59620795  3.66478956  6.65827933 -5.30024824  4.27069971  0.37634189
##  [409]  6.71525027  6.27001482  6.58785434  4.75236369 -2.21154930  4.96648775
##  [415]  3.72000987 -5.25675989  6.55195918  6.03349255  6.15408766  4.30003389
##  [421]  5.40551707 -1.91412491  2.62174877  5.90496876  2.14643535  4.53294384
##  [427]  5.81112017  5.87929547  3.78734630  5.45174759  5.25726385  6.78289023
##  [433]  6.02617176  4.94079028  2.28353420  2.64728223  6.29599379 -2.01299595
##  [439]  5.75271077  4.40798380  5.32749012  5.82142848  2.76973430  4.38063356
##  [445]  4.73670978  5.76065913  3.70937331  4.73499468  5.74876153  4.36618068
##  [451]  6.17829380  4.51955277 -2.32145784  6.91173689  4.83798463  5.62584274
##  [457]  3.44655720  5.38792786  4.84283334  5.70695920  5.43053872 -3.93031807
##  [463]  6.12011901  6.49831836  6.29050291  5.74759129  5.69918964  6.79294790
##  [469]  5.08814668  6.06074717  6.41408646  4.31496902  4.90127839 -0.55337344
##  [475]  5.34766630  5.31794396  4.44448787  4.55258479  5.65961443  6.73854346
##  [481]  6.11146778  5.41508772  5.29278574  6.13764147  5.49260999  5.50932055
##  [487]  5.69495316  6.49063296  5.03527993  2.65358204  5.28168941  3.71916838
##  [493]  6.54687122  4.93148457  6.48306284  6.21607585  6.27518688  3.58102073
##  [499]  2.91880695  4.14324389  5.99158543  5.46501144  5.53767924  4.86917843
##  [505]  5.67745706  5.97138676  4.04002167  2.83538631  5.22945869  4.86185414
##  [511]  5.07694161  4.72532628  4.33210471  5.68503157  5.34842288  5.68727637
##  [517] -1.18715247  6.69430966  1.99578109  2.84660053  6.64854266  6.29123245
##  [523]  5.62968443  5.93218798  6.34328797  4.90041799  6.55397357 -5.24146671
##  [529]  4.43015611  4.08828622  6.59546338  3.65654612  5.47017028 -2.18750714
##  [535] -1.67569475  4.80236055  5.69473182  2.96021949  6.39505291  5.86288207
##  [541]  5.48702738  6.75348094  1.87675894  5.40233805  5.65002968  6.51381735
##  [547]  5.36763650 -1.80343026  5.51004790 -1.88454820 -5.18552215 -1.42734376
##  [553]  3.37159181 -1.84644257  3.36848746  6.04010262  6.98171522  4.02632363
##  [559]  6.16251797  5.31077520  6.42291694 -2.34699640  5.52171291  5.61190503
##  [565]  4.76408232  4.67473360 -5.91423663  5.89373985  6.61351587  6.64892264
##  [571]  5.61545316 -6.55070581  6.23412158  6.05821216  3.10814058  5.03647709
##  [577]  3.09548796  5.82426637  6.17519048  3.07029889  6.19023412  6.01903027
##  [583]  2.55388438  4.77369953 -3.10892211  6.45249815  5.19142118  6.30518650
##  [589]  6.61103374  7.08535906  3.61534776  5.48905887  3.53488332  5.27873125
##  [595]  5.54949043  5.60960412  6.10217011  5.22823616 -4.94757339  3.74915613
##  [601]  4.81926368 -2.34988317 -3.79979459  5.37956450  6.31764417 -0.37862925
##  [607] -2.33670087  6.32325718  5.01090679  5.43531190  3.19525085  6.69018004
##  [613]  4.22425941  6.04382662  6.68224822  5.73319289  5.92669413  5.65785854
##  [619]  6.32132077  6.99450073  5.40957907  6.63517391  5.40952876 -5.23415421
##  [625]  5.54865139  0.63257794  5.37770468  6.63100257 -1.18319871  3.13636331
##  [631]  5.91204981  5.81422046  5.57981764  2.82867168  6.08329926  5.47211974
##  [637]  5.46333770  2.89307798  6.64947131  3.86249823  4.11669572  5.27343361
##  [643]  4.37508569  5.57847170 -1.67396355  2.86956939  5.39425773  3.36371167
##  [649]  6.72196295  4.80515104 -1.51885943  2.75589529  5.45298067  6.19257056
##  [655]  4.57733988 -0.67659693  6.15802429  5.75901830  5.85975577  5.21335594
##  [661]  5.47483111  6.68737673  4.84329344  4.53560730  6.15242602  5.92248146
##  [667]  5.47796631  6.95972736  6.47292496  1.79591051  5.59405294  5.59835384
##  [673] -3.18272154  2.60108823  5.00435393 -1.32594357  4.44378653  6.53390823
##  [679] -1.69953228 -1.06199791  4.71931494  6.68209448  2.88303195 -4.29722632
##  [685]  6.51061599  6.42567339  5.86909674 -1.89452140  2.17703872  5.56888728
##  [691]  5.95879178  2.87949976  6.99541837 -1.24955181  5.89146884  5.43321584
##  [697]  5.63528008 -3.74479026  6.46257633  0.86326386 -0.90499974  5.92980686
##  [703]  5.11359572  4.33924286  6.09567651 -5.08858689  5.55982109  3.01186481
##  [709] -2.12383124 -5.16928443  5.88671511  5.79834499  6.79899913  5.78806258
##  [715]  4.07395500  5.34193818  5.47215841  2.15600167  1.12044458  3.27114795
##  [721]  6.23871935 -4.15344200  4.68431979  3.65598750  5.41112920  6.09990251
##  [727]  4.81477085  3.75143237 -5.37808615  5.93660859  6.07224698  5.61441603
##  [733]  1.18646098  5.72284182  5.05331912  5.50074417  2.90043567  4.83197804
##  [739]  4.98160185  6.02410985  5.77941167  4.86068540  5.76124524  5.76334774
##  [745]  4.62255115  4.94049380  5.60603594  4.61825257  1.19161398  6.20259554
##  [751]  6.90157142  0.30601876  5.14957403  5.21021506  5.47069136  5.71200091
##  [757] -3.90551909  6.77819923  4.78258325  5.54537653  6.68681344 -3.64253845
##  [763]  6.47651240 -1.77198844  1.74772174  6.30565206  3.53299000  5.52785335
##  [769]  2.59733417  6.34106700 -6.13986266  6.34337637  6.26432146  6.36220298
##  [775]  6.66359506  6.59834656 -3.41586781 -5.65032574  6.08759467 -1.72752088
##  [781]  5.53159309  6.23369614  2.44409841  6.19308617  5.96396744  5.53589121
##  [787]  6.07061705  4.84252863  4.72405412  5.02919150  4.88964826  3.06485146
##  [793]  6.44117312  6.19009565  6.70534641  5.63377280  5.92251855  6.55307362
##  [799]  2.78992487  5.81098200  5.06266357  3.01966315  5.64469381  5.57214196
##  [805]  5.32993670  5.12023283  3.43652442  6.25696671  4.87028533  6.29297393
##  [811]  5.10616527  4.54794976  4.79866053  5.04289361  6.41254759  5.89903870
##  [817]  6.27600812  6.12309334  2.47131368 -1.82421396  6.24252097  6.16579496
##  [823]  3.50874689  5.16418980  2.97204751  4.63428075  6.57542242 -5.80677138
##  [829]  5.50310020 -1.82565770  5.98785536  6.10222914 -3.84699537  1.46408741
##  [835]  2.72969294  5.48158948  6.28694650 -4.17005789  6.34794055  2.81988834
##  [841]  5.71698499  6.83755286 -2.31334841  5.85149235  6.69292685  4.63920577
##  [847]  5.08224137  4.29959828  4.16453858 -5.14724720  4.80822787  4.87025378
##  [853] -0.78715569  6.82776656  5.72373213  5.42660139  5.86944179  6.49654181
##  [859]  6.87195069  5.28295685  5.89892104  6.68590427  6.81966325  4.81223684
##  [865]  3.94880325  6.01076985  5.54706044 -2.08722366  5.69064333  5.29887867
##  [871]  5.29399613  6.01209360  2.82022039  6.74246282  5.78258299  3.10149120
##  [877]  2.33327273  6.13558105  6.07981957  5.98958091  5.40593970  3.16229490
##  [883]  6.51357485  6.13903722  6.32774564  6.17028257  4.31303561 -1.95535558
##  [889] -0.85350352  5.99502368  5.67781271  5.20292433  5.96850973  5.07857959
##  [895]  6.31288577  6.25591811  6.56152133  4.32016320  6.17800813  4.33778554
##  [901]  3.63474520  2.51745869  6.32067157  4.00444348  6.68982654  5.83215856
##  [907] -1.47442753  5.10407279  4.89950414  5.46390595 -2.18894049  6.17094695
##  [913]  2.39779197  6.05058848  3.76723224  4.58358077  6.20654180  5.15422172
##  [919] -5.55468458  5.71065461  5.76887664 -1.39290699 -4.84009794  2.75760408
##  [925]  5.21338131  5.59414054  5.45399103  3.18222163  2.56306545  6.74617072
##  [931]  5.64600451 -5.05049879 -5.29116973  5.06506292  5.89076182 -1.97971688
##  [937]  1.27046583  6.91154788  6.13119070  5.88570944  5.35189958  5.26897478
##  [943]  6.98377291 -0.28199864  0.04765929  4.34774329  0.88010996  6.47196687
##  [949]  5.06249673  5.38613474  4.55704098  6.63557424  5.26589548 -3.16303124
##  [955]  7.10730782  5.70919591  5.44900577  4.62589458  5.25220527  6.48596655
##  [961] -1.79653714  7.27180967 -0.77358348  4.17219967  5.70617940  5.14995471
##  [967]  3.89079403  6.15877877  5.81418959  3.38290797  5.34959008  6.06201432
##  [973]  6.17292251  5.41817551  6.96512195  5.13365472  4.49119241  5.06711675
##  [979]  5.81679435  6.58776613  5.33856838  6.74785622  4.76517050  6.64070654
##  [985] -1.89894747  5.26285513  4.27845534  0.49320566 -6.06969671  6.15146179
##  [991]  4.22804054  6.22490455  6.90710930  2.25563585  4.92556193  5.50438882
##  [997]  4.49430727  4.28726227  5.51068203  5.77811300 -2.27218729  5.51653838
## [1003]  4.39277365  5.84067568  1.80565530  3.86855034  4.22174730  5.71048229
## [1009]  5.79841305  6.40232545  6.39036316  5.44026299  5.35134729  5.15187433
## [1015]  5.97950578  4.80524045  6.41069007  6.65744037 -1.58898607  4.04408691
## [1021]  5.69128935  5.81081835  5.27174364  5.13346098  5.74955105  5.91245416
## [1027]  5.08450395 -1.90447007  5.35834453  5.70199238  5.67171176 -4.77576343
## [1033] -0.69402795  5.71403043  5.07306409  3.17153888  4.20205151  6.00438049
## [1039]  6.50457436  5.69695457  5.06040415  3.07053831  2.62073001  4.41032904
## [1045]  4.88714881  2.70689386  5.17317503 -3.46029947  5.43637095  5.20509489
## [1051]  5.05021767  6.28220277  6.35980630  3.73362807 -4.31562929  3.73929253
## [1057]  6.80062705  5.48988101 -2.67444946  5.83091248  5.79656362  5.14362318
## [1063] -2.04308772  4.99038791  6.86575496  6.68732088 -5.10025830  5.71749039
## [1069] -4.58100493 -3.67250964  6.18903712  6.12856810  2.19199019  7.02167537
## [1075]  5.11285146  5.94865334  4.06665073  6.57616218  6.32341245  6.15330795
## [1081]  5.98608555  4.83526428  5.16345236  5.64155098  0.55981644  3.34153165
## [1087]  4.73140651 -1.58665719  6.27351417  5.62902668  5.69309746  4.74101163
## [1093]  5.74014980  4.96423338  5.12982481  5.78158021 -0.13465301 -5.27813610
## [1099]  2.71668323  6.13411741 -2.73017269 -1.91999892  6.37493858  2.63632743
## [1105]  6.06194106  2.99714327  5.03516737  2.37361899  6.36614014  5.37133326
## [1111]  6.25986369  5.75464239  5.20623779  6.51734031  3.16695250  6.77255284
## [1117] -1.80528110  0.12784650  6.26367416  6.43931813  7.13964701  4.51850800
## [1123]  5.89510332  0.03470422  4.54861169  3.34710668  5.59870203  3.13307470
## [1129]  4.85021050  5.59787177  4.98623634  1.72487173  5.68706031 -3.41477971
## [1135]  6.39698740 -1.94428499  5.76823221  3.34619415  4.81431209 -1.86128000
## [1141]  5.15974782  5.98810975  1.45206780  6.37776885  5.86829067  6.77743802
## [1147]  4.35789633  6.76433293  6.02534868  6.19792239 -2.30308422  5.67910789
## [1153]  5.28591616  5.75271418  5.95505908 -5.65974882 -2.05483808  5.74240172
## [1159]  4.71211392  5.59626276  5.76471881  5.34038809  5.06596543  5.47065757
## [1165]  5.94417296  5.22104628  5.46698133  4.66207642  4.22688092  1.23945831
## [1171] -1.42289053 -0.18042146  2.74481233  5.62245311 -2.93621628  5.70457103
## [1177]  5.05505956  5.98340953  6.68427306  0.77817177  5.13901163 -1.90104633
## [1183]  3.00417389  2.27546050  4.51624512  5.25859630  3.94910395  5.00521153
## [1189]  5.96654066  5.47842656  5.21095160  3.40439401  6.62030182  5.31314521
## [1195]  5.13673637  5.20112732  6.14176505  4.22646841  5.70392485  5.12134020
## [1201]  5.58722466  5.32557537  5.17932305  6.70804666  6.96771113  0.04909488
## [1207]  5.43638315  4.55997749  4.76274786  2.79929384  4.12934494  5.73210620
## [1213]  4.79430032  2.91464369  3.30637896  5.62420248  5.84023806  6.23091515
## [1219]  5.01314149  4.75324054 -4.89206842  3.99985998  6.14312282  4.89028940
## [1225]  5.67038844  6.01086680  6.60605508  6.29247706  3.82294850  3.57713761
## [1231]  5.98747170 -5.50467471  5.30617489  3.79042579  5.93091729  6.11561524
## [1237] -1.77410649  5.63961180  6.64995962  5.69814348  4.01928277  5.32102750
## [1243]  4.48962059  4.82534083 -0.24642326 -3.62323532  5.94286776 -2.11510617
## [1249]  5.49781574  6.35653760  2.92747353  5.26968390  2.31517138  5.80681226
## [1255]  5.55631566  5.41900372  5.59191913  5.45279565  4.94407387  6.61180147
## [1261]  5.34157062  5.94001379  3.94899886  5.64212099  3.83153825  5.22496497
## [1267]  6.36469666  6.07207438 -3.70663663  5.34161396  5.85991276  4.64901877
## [1273]  6.24691440  5.18911545  4.96653542 -0.95855413  5.32312486 -1.69071811
## [1279]  5.62497719  6.65932763  3.62762160 -5.27081303  7.26315628 -5.96972948
## [1285]  2.67452998  2.99510963  5.63202736  5.22444190  5.09745968  3.63234387
## [1291]  3.54427788  5.81867547  5.21801003  5.79451660  4.59700524  5.48970505
## [1297]  6.94862346  5.12654973 -1.49651885  5.39239152  6.89464122  4.26710857
## [1303]  5.74789342  2.32542177  3.90369139  6.52914364  5.06504289  5.55880392
## [1309]  6.43565760 -6.01753718  2.68246886  2.42379960  5.98441132  4.12322434
## [1315]  5.11620477  5.39304327  6.46589080  6.37899122  0.02706671  5.23805978
## [1321]  5.58758831  5.04172790  4.31355656  6.25605108  5.85699379  6.53023509
## [1327]  4.01444661  3.88862543 -5.94545852  5.04366160  4.95881474  5.36002563
## [1333] -2.17041410  5.61589141  5.69010935  6.09166878  2.62049405  3.87906571
## [1339]  6.81570276  4.81295377  6.45387074  6.13864384  5.33703189  6.76083798
## [1345]  5.81949629 -0.16001836  5.01020157  4.69313313  6.18809358  5.47771657
## [1351]  5.15561779  5.26436620  2.83483001  5.77275831  4.93067800  5.73498854
## [1357]  2.31129682  6.54002719  6.61015828  3.27451075 -3.64694887  0.97434213
## [1363]  6.17681787  2.77060478  0.02452795 -5.26671865  2.62693824  5.64223353
## [1369]  5.33935206  3.51081041  6.55944337  5.01225367 -5.34272707  5.12370243
## [1375]  5.22582790  5.76210363  5.83591436  5.46893302  5.79542275 -1.84456165
## [1381] -1.53220935  6.59215279  2.66699707  5.82027284  5.53023319  5.47095806
## [1387]  2.10806110  3.20802715  4.75620691  6.52174170  6.14333855 -5.70147903
## [1393]  5.65394515  3.43363171  5.34605867 -4.78049714  2.14932264  6.04162627
## [1399]  0.48203697  6.29623994  4.08266529  5.48132913  6.46110434  5.84589506
## [1405] -2.39676237 -1.28543730  4.71747198  6.29455485  5.60994980 -3.97262194
## [1411]  5.18615942  5.34393595 -1.37970416  5.27386184  4.10901303  4.77126194
## [1417]  6.63834774  5.76871212  6.12404629  6.39629914 -5.11342398  5.06342948
## [1423]  2.83628928  4.10550228  4.92417087  6.05602441  3.45692854  4.39249985
## [1429]  6.45472250  6.81011232 -4.45415479  5.87804001  2.54466874 -6.17068004
## [1435]  5.56767664  5.66498915  6.62484835  6.29520595  6.21187771  2.91784683
## [1441]  4.86263317  6.37280359  4.78202222  5.75125313 -1.33721322  4.66021850
## [1447]  6.39615388  5.38176927  6.42004248  6.20321178 -2.11813051  6.50622155
## [1453]  6.27887152  4.68627259  3.22092071  5.33390504  1.92314456  5.99214628
## [1459] -1.91751852 -3.46935105 -0.76586660  2.77979480  3.37087319 -1.82178939
## [1465]  5.39449390  6.27810799  5.80757279  2.95234052  2.41660448  5.52597508
## [1471]  6.34536301  5.82183511  5.70301963  6.54537119  6.64525733  6.34943038
## [1477]  5.48379842  5.02067965  6.13828726 -1.28411007 -1.30825276  5.60126237
## [1483] -0.42756133  3.21457234  6.15993365  4.92235317  7.16702337  4.42009266
## [1489]  5.89588454  4.71139507  6.00193884  5.93522093  5.77686063  5.56984225
## [1495]  5.52761904  5.74716364  3.88345203  4.89776788  5.42716256  2.74644457
## [1501] -2.13574581  6.53478717  6.62919096  4.88922612  4.66261210  2.44378597
## [1507] -1.69065971 -4.42343268 -5.46035257  5.75730793  5.74720800  5.03260755
## [1513]  5.90673311 -5.05695982  5.22438103  6.49973424  0.10362144  5.59777386
## [1519]  4.57074690  3.97211877  2.07476316  4.09598410  6.93296725  5.55115921
## [1525]  6.30441465  3.33593365 -5.30698620  2.28111984  6.21222017 -0.54760347
## [1531]  5.53306119 -1.41616833  3.85533222  5.17721644  5.30236734 -6.52898821
## [1537]  5.13889310  5.25569760  1.68708372  6.33164789  5.36519195  2.51907361
## [1543]  4.06483759  5.09857966  4.91580025  5.24206246 -2.94676374  6.04601075
## [1549]  0.29470221  6.19958389  5.22419939  6.05188457  7.09101033  5.45684516
## [1555]  5.11550134  5.23723701  6.93016422  6.20794768  6.42187078  6.45667659
## [1561]  6.01413032 -6.60056749  2.11684283  3.35474711  3.35131041  5.59055187
## [1567]  4.55617854  3.14105672  6.46678719  6.57299801  6.12934564  4.64136486
## [1573]  2.68970428  4.41415127  3.99912201  4.69722195  5.62675283  6.21062512
## [1579]  2.61660909  6.56467919  1.16009810  0.06286429  6.61079731  4.35641170
## [1585]  6.18370938  6.30075123  7.17636316  6.66199804  6.86569559  6.26275389
## [1591] -5.52844454  5.10151345  6.00977343  0.46388808  5.82175500  5.05846283
## [1597]  3.90864732  5.65511855  3.81083779  5.75635232 -5.58076380  2.98339896
## [1603]  6.05533193  2.24089579  4.36501630  3.53601117  4.99575948  3.60261071
## [1609] -4.28189994  3.81649079  6.29699721  2.81758708  3.99152318  4.73949176
## [1615]  5.94501198  6.02417644  4.63800809  4.41118175  5.78924234  3.76803734
## [1621]  3.90493041  5.41236175  6.04928840  5.64088945  5.90155347  5.95540737
## [1627]  6.07294993  3.20347707  5.35103299  4.77384936  6.81129103  6.79183212
## [1633]  5.86813058  5.55544617  5.54976254  5.11440005  5.79802960  6.13393133
## [1639]  4.96463836  4.76738556  5.74430232  5.92208681  6.32372573  5.31709688
## [1645]  5.08090048  4.52186138  5.02516955  5.96626756  3.81281183  4.70940653
## [1651]  4.59237212  3.16062454  5.44832660  6.27645832  5.26688511  5.16347760
## [1657]  6.33360749  6.68405430  6.40936709 -1.31292254  5.84261322  5.07453017
## [1663]  6.58966820 -5.52800901  5.99307402  6.86427916  6.00356342  5.49670028
## [1669]  4.42711730  5.41240557 -6.42315129 -0.49540631  6.15165496  5.35107103
## [1675]  2.97533649 -2.01948724  4.83124507  4.12336019  4.45798792  6.00924323
## [1681]  2.73719274  5.28989638  7.29221332  4.53770457  6.24984346  6.42659093
## [1687]  5.89765161  4.92282397  5.48244696  6.80725768  1.55117217  5.82858014
## [1693]  3.65744374 -2.39317253  0.99305819  4.94563201  4.03472578  6.68883954
## [1699]  5.27793585  5.28939017  5.63184419  5.43809472  6.09179966 -0.16607872
## [1705]  5.74004517  5.24630196 -2.01355025  3.06839957  6.46445550  6.32507827
## [1711] -3.74322858  5.20272282  6.93997689 -1.87451576  2.63687723  5.74916702
## [1717]  6.51906781  5.63779905  5.61571856  4.78399501  5.97211240  5.13705673
## [1723]  5.43777303 -1.67587511  4.91232395 -1.68357753 -2.36377095 -4.31385825
## [1729]  6.07051703  5.79447839  6.06389188 -5.41204751 -0.80570647 -1.82921549
## [1735]  5.85401331 -2.46611486 -2.12084881  6.26137939  4.91918914  5.43636249
## [1741]  5.74251898 -4.82906730  6.58056271  5.59730974  2.61569121  5.72992572
## [1747]  2.22665649  6.61325908  5.90730627  5.41172855 -2.12102793  2.53092532
## [1753]  5.69964416  5.08589002  4.78789911  5.90142025  2.98413290  4.61257084
## [1759]  2.01649642  5.02390310  6.41114567  5.97469038  5.06210918  6.55971568
## [1765]  5.09900939  5.18753971  6.51698415  6.12899326  5.44531892  5.17849835
## [1771]  5.43854601  3.47345159  4.84988090  5.56449748  5.90852709  6.00614852
## [1777]  5.25405362  4.46687272  5.12114096  1.42834614  6.18667469  2.96011964
## [1783]  4.65631116  2.45465631  6.06433237 -0.08161860  3.14664712  6.29122888
## [1789]  5.64758979 -5.40953231  3.08920898  2.62677852  5.44167320 -5.95636698
## [1795]  5.95415709 -1.88932961  5.31132618 -3.48267597  5.70525991  4.73720279
## [1801]  5.20785885  2.90361232  2.93056289  6.32300679  5.72059407  4.62628621
## [1807]  4.78089396 -5.35055156  3.10127137  4.94410677  2.89299078  4.31387941
## [1813]  5.06067132  0.04090649  5.54532944  6.05215321  5.01897984 -3.57475864
## [1819]  3.57692275  5.62063610  2.42928321  6.43991557  5.50746717  6.08651755
## [1825]  6.38691866  7.06733141  4.72430875  5.09957624  4.93172361  5.39675224
## [1831] -1.89524028  6.33163067  6.11088773  6.12230844  5.13144912  2.56783105
## [1837] -0.75510684  4.64560257  6.75290614  5.76913164  4.57616627  4.71960385
## [1843]  5.62938708  4.97402063  5.95724228  5.04352217 -0.79031190  6.16887597
## [1849] -3.88748414  5.61168281  6.29392214  5.28320829  5.86764079  5.11249085
## [1855] -2.05712400  3.51853064  5.22185519 -5.43494089  6.58423902  4.65083486
## [1861] -2.08004888  6.17228388  5.36733004  3.04154629  5.78034251  6.03616025
## [1867]  1.50595909  5.10083479  5.24904299  6.25678549  5.59878948  2.30826893
## [1873]  5.18928957  2.94574803  5.02813577  4.23990476 -5.62062566  2.80668558
## [1879]  5.44507616  6.19078305  5.87503053  5.38776342 -0.48284576  5.98149684
## [1885]  5.83298306  6.10794227  6.49892109  2.65951885  6.04329920  5.39038268
## [1891] -0.64750475  3.40105381  5.46481865  3.92240014  1.95482292 -1.61736407
## [1897]  5.23212430  6.30035686 -4.60848734  6.16523608  5.23992370 -2.43060145
## [1903]  5.73297653  6.27443623  5.43549036  4.81838319  5.39617325  5.39391306
## [1909]  6.41443391  5.32230742  4.42329178  2.14954141 -4.95740093  1.46106556
## [1915]  5.34916317  4.60061414 -5.52757590 -3.86221842  4.46334244  6.18795253
## [1921] -4.41317095  7.30380285  5.53713535  6.36579926  6.58363599  4.84048141
## [1927]  4.84543656  5.25420172  5.70918516  5.97474767  4.23358263  6.02667856
## [1933]  6.11279144  6.68149017  3.07575000  4.00902593  6.44427501  4.74755067
## [1939]  3.69766679 -4.90985040  5.87798446  5.19488513  2.05088362  6.58379681
## [1945]  5.55519579 -0.99998415  3.63616023  3.72511388  4.03722698  5.67679298
## [1951]  6.28655816 -2.11366933  5.06243617  2.97640205 -5.21540225  6.10454751
## [1957] -2.10730977  4.86355468  5.52426400  6.64062043  6.40824873  5.89044646
## [1963]  3.38713805  5.23424876 -1.81460777  5.62968189  5.34738855  5.44258143
## [1969]  5.23322865  4.58109453 -4.11327169  2.71082340  5.57146973  5.44345794
## [1975]  5.64657373  6.11185815  5.70610620 -6.14283125  6.88414532  5.72919037
## [1981]  4.99908351  6.17662861  6.03486547 -6.22418942 -2.37021672 -4.60226440
## [1987]  6.69094522  5.43748701  6.46939329  4.55078063  5.46982606  6.56855346
## [1993]  3.35452218  6.70492949  6.10354486  6.80733437  4.67543179  3.28054495
## [1999]  5.99622832 -1.78289044  5.02351307 -1.85300757  4.98000153  5.96244473
## [2005]  5.89896590  6.17753417  6.66079496  6.35297637  5.37595158  5.76810463
## [2011] -0.92902683  5.53605896 -5.21815164 -1.12517059  4.66621015  5.36682223
## [2017]  3.65975040  6.44575041  4.94613858  6.08093827 -5.06621367  5.36802208
## [2023]  2.22652618 -4.21026090  4.91162367  5.51160098  5.92015051  5.17501510
## [2029]  5.45431328  4.80649831  6.63261132  6.71498748  3.32148093  5.99735348
## [2035]  5.53928282  4.92779300  7.23432229  3.80963099  6.81714559  4.20912466
## [2041]  6.27300729  6.24015590  5.24317889 -5.19276156  6.26604980  2.83463294
## [2047]  5.43302991  3.86629914  5.32106154  5.37458106  3.07158651  4.44663673
## [2053]  6.18605132 -2.17111924  6.69885212 -0.38182695  4.24796855  6.26944288
## [2059]  5.42346190  5.28982599  5.44755761  5.21207557  6.19207459  5.49426456
## [2065]  4.87936553  4.35524132 -1.37164607  5.60834840  5.69687748  5.63323772
## [2071]  0.72878097  5.84596190  5.21982312  5.25889056  4.09875691  5.32114454
## [2077]  5.44159044 -1.98894437  6.07389440  5.67133733  6.22235085  5.40463788
## [2083]  5.35321068  6.54656584  5.90746512 -0.03606891  4.54937908  3.14609183
## [2089] -4.40409112  5.97411275  5.40878318  6.35264832  5.34713399  6.48969487
## [2095]  6.21539909  5.16836677  5.05101341  5.35483143  5.71941057  6.29736479
## [2101]  6.38672928  4.17774030  5.10239905  6.83700155  3.61891641  4.33526418
## [2107]  5.15409477  3.59676365  6.02533579  4.57073299  6.11485396 -5.58564959
## [2113]  5.11737504  4.86663939  6.24450894 -4.06024905  6.36065537 -1.97984539
## [2119]  5.33411662 -4.66750707  5.76649425  5.66647086  4.83238843  5.28506876
## [2125]  4.85013942  4.80003322  0.68298404 -0.64035955  5.24527082  6.91145737
## [2131]  5.11089198  5.64596381  5.43078532  4.51208940  6.17698007  3.11699451
## [2137]  5.13147033  4.02844574  6.49071006  3.82832757  4.95435669  4.17550027
## [2143]  6.23772164  6.58680840  5.97124416  3.17158991  6.38726622 -1.53274904
## [2149] -5.28277293  5.97994706  5.28372746  5.59920843  6.65517633  6.72494324
## [2155]  4.77877615  6.29155538  6.26777181  5.17045968 -1.85642610  4.74353406
## [2161]  1.64113376  4.69029041  3.36069747 -2.38349347  3.22573696  4.17258890
## [2167]  2.93685957  4.17305149  6.45330979 -5.35159918  3.19719246 -6.07616604
## [2173]  5.34496947  6.28225457  3.96144321  5.64607603  5.51632072  6.41583218
## [2179] -2.03159623  2.35249831  6.85355774  5.21571705  5.60287684  5.96357164
## [2185]  6.26953041  5.81528053  6.18748385  5.97422524  4.71686531 -4.25111700
## [2191]  5.42945089  4.19452287 -1.92490215  4.83423575  3.28597311 -1.23343852
## [2197]  1.87542888  2.49809043  5.91200823  6.09219447  5.65931654  5.16888018
## [2203]  6.73339675  4.24368149  5.42729933  3.81514191  5.60746481  5.59945654
## [2209]  5.14206660  5.66483834  5.35432751  0.40713363  6.64565354  6.38533431
## [2215]  4.84840386 -1.82842253  5.89438423  4.00351334  5.29760626  2.91652485
## [2221] -4.27647906  5.17070035 -2.63035635  4.02719395 -0.15820973  3.63266604
## [2227]  5.79534179  4.65817763 -1.31274854  6.31421964  4.80436993  6.70692995
## [2233]  6.27070751 -2.15165173  4.41986958  5.15015394  5.33987692  5.32594968
## [2239]  2.20072518  5.07198115  4.89256164  6.57752609  4.46518646  5.90708816
## [2245]  5.19952428  4.48983522  6.48577245  3.16504492  5.33531114  4.91251789
## [2251]  5.91245998 -1.23662295  4.72153307  5.30439322  5.76485818  6.06951812
## [2257]  6.41481937  5.73365548  4.93349144  5.45752981  5.39372288  6.45852264
## [2263]  3.49592312 -0.70816090  2.70959557 -2.12678377  6.23768945  5.94073888
## [2269]  5.47356503  5.20737194  5.55259943  5.91289604  6.26865837  5.34487579
## [2275]  6.54072158  5.15823841  3.02587514  6.85524378 -1.52880302  4.97933569
## [2281]  3.82924491  5.56519566  6.18695930  5.57668080  5.29958973  4.14294414
## [2287]  4.51337000  4.75510876 -4.92980714  4.14180231  5.54176547  6.01660218
## [2293]  3.31962412  5.26552496 -2.66638959  3.15886531  5.85892179  4.53413616
## [2299]  5.42854867  4.86482351  4.70509265  4.79416875  5.48630034 -4.32428035
## [2305] -4.63935469  6.28940288  4.89388392  5.16732464  6.79451695  6.02712271
## [2311]  6.41116438  5.02712207  5.08590658  5.43202334  4.71910073  5.81831490
## [2317]  4.72193143  6.26979626  3.13361881  1.50462849  1.09787993  5.73915604
## [2323]  5.64402437  5.57246065 -4.32810558  5.04792129 -5.89000423  5.34357151
## [2329] -6.04799885  5.45909079 -2.57071144  6.85058463  6.35549956  5.34949714
## [2335]  6.17669944  3.99322993
## attr(,"gstari")
## [1] FALSE
## attr(,"call")
## localG(x = parqs$Acidentes.y, listw = nb2listw(dnb, style = "B"), 
##     zero.policy = NULL, spChk = NULL, return_internals = FALSE)
## attr(,"class")
## [1] "localG"

Moran Local

ShapePB.mloc <- localmoran(parqs$Acidentes.y, listw=nb2listw(dnb, style="W")) 
head(ShapePB.mloc)
##             Ii          E.Ii       Var.Ii      Z.Ii Pr(z != E(Ii))
## 1  0.013672186 -5.614880e-05 5.845214e-06  5.678291   1.360472e-08
## 2  0.014074812 -2.235885e-05 4.993620e-06  6.308473   2.818019e-10
## 3  0.008552752 -1.630004e-05 2.789863e-06  5.130283   2.893064e-07
## 4 -0.062163126 -3.269065e-04 8.641844e-05 -6.651808   2.895140e-11
## 5  0.054554710 -6.484170e-04 9.305861e-05  5.722495   1.049711e-08
## 6  0.153730469 -3.942329e-03 6.813579e-04  6.040448   1.536874e-09

Mapa das probabilidades (Signific?ncias do I de Moral Local)

library(classInt)
INT4 <- classIntervals(ShapePB.mloc[,5], style="fixed", 
                       fixedBreaks=c(0,0.01, 0.05, 0.10))
CORES.4 <- c(rev(brewer.pal(3, "Reds")), brewer.pal(3, "Blues"))
COL4 <- findColours(INT4, CORES.4)
plot(parqs, col=COL4)
title("P-valores do I de Moran Local por Distäncia de Centróides")
TB4 <- attr(COL4, "table")
legtext <- paste(names(TB4))
legend("bottomright", fill=attr(COL4, "palette"), legend=legtext, 
       bty="n", cex=0.7, y.inter=0.7)
A caption

A caption

Montando matrix W de vizinhança

ShapeCG.nb1.mat <- nb2mat(dnb)

Incidência de acidentes padronizada

Acidentes_SD <- scale(parqs$Acidentes.y)

Média das incidências de acedentes padronizada

Acidentes_W <- ShapeCG.nb1.mat %*% Acidentes_SD

Diagrama de espalhamento de Moran

plot(Acidentes_SD, Acidentes_W,xlab="Z",ylab="WZ")
abline(v=0, h=0)
title("Diagrama de Espalhamento de Moran por Distancia de Centróides")
A caption

A caption

Q <- vector(mode = "numeric", length = nrow(ShapePB.mloc))
Q[(Acidentes_SD>0  & Acidentes_W > 0)] <- 1            
Q[(Acidentes_SD<0  & Acidentes_W < 0)] <- 2
Q[(Acidentes_SD>=0 & Acidentes_W < 0)] <- 3
Q[(Acidentes_SD<0  & Acidentes_W >= 0)]<- 4
signif=0.05

Mapa LISA

Q[ShapePB.mloc[,5]>signif]<-5
CORES.5 <- c("blue", "green" , "red", "yellow", "gray", rgb(0.95,0.95,0.95))
plot(parqs, col=CORES.5[Q])
title("Mapa LISA por Distancia Centroides")
legend("bottomright", c("Q1(+/+)", "Q2(-/-)", "Q3(+/-)", "Q4(-/+)","NS"), 
       fill=CORES.5)
A caption

A caption