Skip to contents

Retrieve earthquake information data from PHIVOLCS bulletins

Usage

eq_data_summary(
  .url = "https://earthquake.phivolcs.dost.gov.ph/",
  .year = NULL,
  .month = NULL,
  latest = TRUE
)

eq_data_bulletin(
  .url = "https://earthquake.phivolcs.dost.gov.ph/",
  .year = NULL,
  .month = NULL,
  latest = TRUE
)

Arguments

.url

Base URL for PHIVOLCS earthquake bulletins.

.year

A vector for year (in YYYY format) for which earthquake bulletins are to be retrieved. The earliest year that can be specified is 2018. If set to NULL (default), all years starting from 2018 to present year are used.

.month

A vector for month for which earthquake bulletins are to be retrieved. This can be set as either an integer index (1 for January) or abbreviation (Jan for January) for full name. If set to NULL (default), all months are used.

latest

Logical. Should the latest table of earthquake information be retrieved? Only evaluated if .year = NULL and .month = NULL. If TRUE (default), table of earthquake information for current year and current month is retrieved. Otherwise, all months for all possible years are retrieved.

Value

A tibble of processed earthquake data.

Examples

eq_data_summary()
#> # A tibble: 1,483 × 7
#>    date_time_retrieved date_time           latitude longitude depth magnitude
#>    <dttm>              <dttm>                 <dbl>     <dbl> <dbl>     <dbl>
#>  1 2024-08-19 21:08:04 2024-08-20 04:58:00     8.02      127.    11       2  
#>  2 2024-08-19 21:08:04 2024-08-20 04:54:00     8.38      127.     9       1.7
#>  3 2024-08-19 21:08:04 2024-08-20 04:53:00     8.22      127.    14       1.5
#>  4 2024-08-19 21:08:04 2024-08-20 04:44:00     8.05      127.     7       2.3
#>  5 2024-08-19 21:08:04 2024-08-20 04:42:00     9.67      127.    17       2.5
#>  6 2024-08-19 21:08:04 2024-08-20 04:42:00     8.02      127.    17       1.2
#>  7 2024-08-19 21:08:04 2024-08-20 04:40:00     7.92      127.     5       2.2
#>  8 2024-08-19 21:08:04 2024-08-20 04:37:00     7.94      126.    11       2.3
#>  9 2024-08-19 21:08:04 2024-08-20 04:34:00    12.8       125.    25       1.9
#> 10 2024-08-19 21:08:04 2024-08-20 04:30:00     8.02      127.     9       2.5
#> # ℹ 1,473 more rows
#> # ℹ 1 more variable: location <chr>