<!DOCTYPE html “Hello Karim” “http://www.google.com”> Effets divers en Javascript

Quake dataset

lat : Latitude of event long : Longitude mag : Richter Magnitude `depth : Depth (km)

head(quakes, 5)
##      lat   long depth mag stations
## 1 -20.42 181.62   562 4.8       41
## 2 -20.62 181.03   650 4.2       15
## 3 -26.00 184.10    42 5.4       43
## 4 -17.97 181.66   626 4.1       19
## 5 -20.42 181.96   649 4.0       11

statistiques descriptives

summary(quakes)
##       lat              long           depth            mag      
##  Min.   :-38.59   Min.   :165.7   Min.   : 40.0   Min.   :4.00  
##  1st Qu.:-23.47   1st Qu.:179.6   1st Qu.: 99.0   1st Qu.:4.30  
##  Median :-20.30   Median :181.4   Median :247.0   Median :4.60  
##  Mean   :-20.64   Mean   :179.5   Mean   :311.4   Mean   :4.62  
##  3rd Qu.:-17.64   3rd Qu.:183.2   3rd Qu.:543.0   3rd Qu.:4.90  
##  Max.   :-10.72   Max.   :188.1   Max.   :680.0   Max.   :6.40  
##     stations     
##  Min.   : 10.00  
##  1st Qu.: 18.00  
##  Median : 27.00  
##  Mean   : 33.42  
##  3rd Qu.: 42.00  
##  Max.   :132.00
quakes1 <- quakes %>% filter(mag>5.5)
head(quakes1,5)
##      lat   long depth mag stations
## 1 -20.70 169.92   139 6.1       94
## 2 -13.64 165.96    50 6.0       83
## 3 -22.55 185.90    42 5.7       76
## 4 -23.34 184.50    56 5.7      106
## 5 -15.56 167.62   127 6.4      122

Visalusations: Quack with mag > 5.5

leaflet(data = quakes1) %>% addTiles() %>%
addMarkers(~long, ~lat, popup = ~as.character(mag))
pal <- colorFactor(palette = c("green","yellow","red" ),domain = quakes1$mag)