Creates an object of class "catalog" representing
an earthquake catalog dataset. An earthquake catalog is a
chronologically ordered list of time, epicenter and magnitude
of all recorded earthquakes in geographical region during
a specific time period.
A data.frame contaning date, time,
latitude, longitude and magnitude of earthquakes.
time.begin
The beginning of time span of the catalog.
A character string or an object that can be converted to
date-time (calendar dates plus time to the nearest second) by
as.POSIXlt. The default NULL sets it
to the date-time of the first event.
study.start
The start of the study period.
A character string or an object that can be converted to
date-time by as.POSIXlt. If not specified (NULL),
then time.begin is used.
study.end
The end of the study period.
A character string or an object that can be converted to
date-time by as.POSIXlt. The default NULL sets it
to the date-time of the last event.
study.length
A single numeric value specifying the length
of the study period in decimal days. Incompatible with
study.end: either study.end or study.length
can be specified, but not both.
lat.range
The latitude range of a rectangular study region.
A numeric vector of size 2 giving (latmin, latmax). By default
(NULL) the range of the latitudes of events is used.
long.range
The longitude range of a rectangular study region.
A numeric vector of size 2 giving (longmin, longmax). By default
(NULL) the range of the longitudes of events is used.
region.poly
Polygonal boundary of a non-rectangular
study region. A list with components lat and long
of equal length specifying the coordinates of the vertices of
a polygonal study region. The vertices must be listed in
anticlockwise order.
mag.threshold
The magnitude threshold of the catalog.
A positive numeric value. The default (NULL) sets it to
the minimum magnitude of all events.
flatmap
Logical flag indicating whether to adjust the
longitudes of events and the study region in order to have a
flat map coordinates.
tz
A character string specifying the time zone to be used
for the date-time conversion in as.POSIXlt.
The default "GMT" is the UTC (Universal Time, Coordinated).
Details
The data is required to have at least 5 columns with names
date, time, lat, long and mag
containing, respectively, the date, time, latitude, longitude
and magnitude of each event in the catalog.
The geographical study region can be rectangular or polygonal:
rectangular study region can be specified by lat.range
and long.range which must be numeric vectors of length 2.
polygonal study region can be specified by region.poly
which containst coordinates of the vertices of the polygon. It must
be eighter a list with components lat and long
of equal length or a data.frame with columns lat
and long. The vertices must be listed in
anticlockwise order and no vertex should be repeated
(i.e. do not repeat the first vertex).
The function inside.owin in the spatstat
is used to indicate whether events lie inside the study region.
Only events inside the study region and the study period
(study.start, study.end) are considered as
target events. Other events are assumed to be
complementary events.
If the events in data are not chronologically sorted,
then a warning will be produced and the events will be sorted
in ascending order with respect to time of occurrence.
If flatmap=TRUE, longitude-latitude coordinates convert to
flat map coordinates. The algorithm does not change the latitude
of points but adjust the longitude of points with respect to the
centroid of the target geographical region in order to
get coordinates on a flat surface.
Value
An object of class "catalog" containing an earthquake
catalog dataset.
Zhuang, J. (2012). Long-term earthquake forecasts based on the
epidemic-type aftershock sequence (ETAS) model for short-term
clustering. Research in Geophysics, 2(1), 8.
See Also
etas.
Examples
data(iran.quakes)
summary(iran.quakes)
# creating a catalog with rectangular study region
iran.cat <- catalog(iran.quakes, time.begin="1973/01/01",
study.start="1985/01/01", study.end="2016/01/01",
lat.range=c(25, 42), long.range=c(42, 63), mag.threshold=4.5)
print(iran.cat)
## Not run:
plot(iran.cat)
## End(Not run)
# equivalently, specifying the length of the study period
iran.cat2 <- catalog(iran.quakes, time.begin="1973/01/01",
study.start="1985/01/01", study.length=11322,
lat.range=c(25, 42), long.range=c(42, 63), mag.threshold=4.5)
print(iran.cat2)
data(jap.quakes)
summary(jap.quakes)
# specifying a polygonal geographical region
jpoly <- list(long=c(134.0, 137.9, 143.1, 144.9, 147.8,
137.8, 137.4, 135.1, 130.6), lat=c(31.9, 33.0, 33.2,
35.2, 41.3, 44.2, 40.2, 38.0, 35.4))
# creating a catalog with polygonal study region
jap.cat <- catalog(jap.quakes, time.begin="1966-01-01",
study.start="1970-01-01", study.end="2010-01-01",
region.poly=jpoly, mag.threshold=4.5)
print(jap.cat)
## Not run:
plot(jap.cat)
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ETAS)
Loading required package: maps
# maps v3.1: updated 'world': all lakes moved to separate new #
# 'lakes' database. Type '?world' or 'news(package="maps")'. #
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ETAS/catalog.Rd_%03d_medium.png", width=480, height=480)
> ### Name: catalog
> ### Title: Create an Earthquake Catalog
> ### Aliases: catalog
> ### Keywords: spatial math earthquake modeling
>
> ### ** Examples
>
> data(iran.quakes)
> summary(iran.quakes)
date time long lat
2014-08-18: 44 00:04:50.70: 2 Min. :40.01 Min. :22.13
2011-10-23: 42 04:46:33.00: 2 1st Qu.:48.34 1st Qu.:28.32
2013-04-09: 31 07:02:27.00: 2 Median :51.88 Median :32.13
2013-05-11: 27 00:00:19.42: 1 Mean :52.20 Mean :32.80
2011-10-24: 19 00:00:41.44: 1 3rd Qu.:56.39 3rd Qu.:37.52
1990-06-21: 18 00:00:46.52: 1 Max. :65.00 Max. :41.98
(Other) :5789 (Other) :5961
mag
Min. :4.000
1st Qu.:4.200
Median :4.400
Mean :4.468
3rd Qu.:4.700
Max. :6.200
>
> # creating a catalog with rectangular study region
> iran.cat <- catalog(iran.quakes, time.begin="1973/01/01",
+ study.start="1985/01/01", study.end="2016/01/01",
+ lat.range=c(25, 42), long.range=c(42, 63), mag.threshold=4.5)
>
> print(iran.cat)
earthquake catalog:
time begin 1973-01-01
study period: 1985-01-01 to 2016-01-01 (T = 11322 days)
geographical region:
rectangular = [ 42 , 63 ] x [ 25 25 ]
threshold magnitude: 4.5
number of events:
total events 2959 : 1932 target events, 1027 complementary events
( 111 events outside geographical region, 916 events outside study period)> ## Not run:
> ##D plot(iran.cat)
> ##D
> ## End(Not run)
>
> # equivalently, specifying the length of the study period
> iran.cat2 <- catalog(iran.quakes, time.begin="1973/01/01",
+ study.start="1985/01/01", study.length=11322,
+ lat.range=c(25, 42), long.range=c(42, 63), mag.threshold=4.5)
>
> print(iran.cat2)
earthquake catalog:
time begin 1973-01-01
study period: 1985-01-01 to 2016-01-01 (T = 11322 days)
geographical region:
rectangular = [ 42 , 63 ] x [ 25 25 ]
threshold magnitude: 4.5
number of events:
total events 2959 : 1932 target events, 1027 complementary events
( 111 events outside geographical region, 916 events outside study period)>
>
>
> data(jap.quakes)
> summary(jap.quakes)
date time lat long
2011-03-11: 385 03:03:54.95: 2 Min. :27.00 Min. :128.0
2011-03-12: 187 06:45:31.21: 2 1st Qu.:34.42 1st Qu.:140.0
2011-03-13: 129 07:25:10.70: 2 Median :37.10 Median :141.8
2011-03-14: 90 10:15:33.05: 2 Mean :36.55 Mean :140.6
2011-03-15: 59 12:38:07.51: 2 3rd Qu.:39.30 3rd Qu.:142.9
2011-03-16: 59 15:27:59.70: 2 Max. :44.98 Max. :145.0
(Other) :8280 (Other) :9177
mag depth
Min. :4.500 Min. : 0.00
1st Qu.:4.600 1st Qu.: 19.20
Median :4.800 Median : 32.00
Mean :4.948 Mean : 34.45
3rd Qu.:5.100 3rd Qu.: 47.70
Max. :9.000 Max. :100.00
>
> # specifying a polygonal geographical region
> jpoly <- list(long=c(134.0, 137.9, 143.1, 144.9, 147.8,
+ 137.8, 137.4, 135.1, 130.6), lat=c(31.9, 33.0, 33.2,
+ 35.2, 41.3, 44.2, 40.2, 38.0, 35.4))
> # creating a catalog with polygonal study region
> jap.cat <- catalog(jap.quakes, time.begin="1966-01-01",
+ study.start="1970-01-01", study.end="2010-01-01",
+ region.poly=jpoly, mag.threshold=4.5)
>
> print(jap.cat)
earthquake catalog:
time begin 1966-01-01
study period: 1970-01-01 to 2010-01-01 (T = 14610 days)
geographical region:
polygonal with vertices:
lat long
[1,] 31.9 134.0
[2,] 33.0 137.9
[3,] 33.2 143.1
[4,] 35.2 144.9
[5,] 41.3 147.8
[6,] 44.2 137.8
[7,] 40.2 137.4
[8,] 38.0 135.1
[9,] 35.4 130.6
threshold magnitude: 4.5
number of events:
total events 6032 : 4104 target events, 1928 complementary events
( 1265 events outside geographical region, 663 events outside study period)> ## Not run:
> ##D plot(jap.cat)
> ##D
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>