Earthquakes

> data(quakes)
> head(quakes)

     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

6 -19.68 184.31   195 4.0       12

> 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  

> plot(quakes,     pch=20, col=rgb(0,0,0,.1) , lwd=.6) 

> require(ggplot2)
> qplot(data = quakes, x = lat, y = long, size = exp(mag), color = mag, alpha = I(.8))

UPDATE: In the comments, Sean Mulcahy shared his much better post on earthquakes: http://seanmulcahy.blogspot.com/2011/11/global-earthquakes-desktop.html. He shows how to grab up-to-date earthquake data from the U.S. Geological Survey and display it with R’s maps package. Hooray!

Advertisements

About isomorphismes

Argonaut: someone engaged in a dangerous but potentially rewarding adventure.
This entry was posted in Uncategorized and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s