These functions are intended to be applied to argo_global_meta()
and
other global index tables in the argo_global_*()
family.
argo_filter_radius(tbl, latitude, longitude, radius_km)
argo_filter_rect(tbl, latitude_min, latitude_max, longitude_min, longitude_max)
argo_filter_date(tbl, date_min, date_max = Sys.time())
argo_filter_updated(tbl, date_update_min, date_update_max = Sys.time())
argo_filter_float(tbl, float)
argo_filter_parameter(tbl, parameter)
argo_filter_data_mode(tbl, data_mode)
argo_filter_parameter_data_mode(tbl, parameter, data_mode)
argo_filter_direction(tbl, direction)
A data.frame, ideally derived from argo_global_meta()
and family. The column conventions used by the global indexes is assumed
(e.g., columns latitude
and longitude
exist).
A location.
A radius from the point described by latitude
and
longitude
.
A rectangle
describing the desired bounds. A rectangle where longitude_min
is greater
than longitude_max
are interpreted as wrapping across the international
date line.
A range of datetimes. Users are responsible for setting the timezone for these objects and are encouraged to used UTC.
A float identifier.
One or more (case insensitive) parameter names in which
to search the parameters
column of the bio-prof and synthetic-prof
index files.
One of "realtime" or "delayed".
One of "ascending" or "descending"
tbl
with rows that match the search criteria.
library(dplyr, warn.conflicts = FALSE)
if (FALSE) {
argo_global_prof() %>%
# within 500 km of Halifax, Nova Scotia
argo_filter_radius(45, -64, 500)
}
with_argo_example_cache({
argo_global_traj() %>%
argo_filter_rect(40, 60, -64, -54)
})
#> Loading argo_global_traj()
#> # A tibble: 669 × 8
#> file latitude_max latitude_min longitude_max longitude_min profiler_type
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 aoml/190… 52.6 33.5 -40.1 -74.0 851
#> 2 aoml/190… 40.5 25.6 -57.3 -75.3 851
#> 3 aoml/390… 41.8 1.42 180. -180. 846
#> 4 aoml/390… 42.4 28.4 -47.1 -75.3 851
#> 5 aoml/390… 40.9 27.7 -49.9 -76.6 852
#> 6 aoml/390… 45.6 19.9 -27.8 -75.9 851
#> 7 aoml/390… 41.8 33.8 -44.1 -74.3 854
#> 8 aoml/490… 58.0 52.9 180. -180. 846
#> 9 aoml/490… 60.4 53.9 180. -180. 846
#> 10 aoml/490… 54.6 51.1 180. -180. 846
#> # … with 659 more rows, and 2 more variables: institution <chr>,
#> # date_update <dttm>
with_argo_example_cache({
argo_global_traj() %>%
argo_filter_updated("2020-01-01 00:00") %>%
select(date_update, everything())
})
#> # A tibble: 5,695 × 8
#> date_update file latitude_max latitude_min longitude_max
#> <dttm> <chr> <dbl> <dbl> <dbl>
#> 1 2020-06-25 20:34:53 aoml/1900959/190… 21.0 17.1 40.7
#> 2 2020-06-25 20:35:16 aoml/1900960/190… 21.7 19.5 38.7
#> 3 2020-08-04 20:00:59 aoml/1900978/190… -42.3 -61.3 177.
#> 4 2020-04-10 20:01:01 aoml/1900979/190… -38.9 -48.8 143.
#> 5 2020-01-20 21:01:32 aoml/1901117/190… -23.5 -40.8 81.3
#> 6 2020-03-06 21:01:34 aoml/1901393/190… -21.9 -49.7 143.
#> 7 2020-01-16 21:01:19 aoml/1901441/190… 2.84 -2.66 98.6
#> 8 2020-10-14 20:02:02 aoml/1901443/190… -3.62 -9.50 94.7
#> 9 2020-10-13 20:02:00 aoml/1901444/190… -1.54 -9.69 107.
#> 10 2020-10-14 20:02:12 aoml/1901445/190… 1.73 -12.9 112.
#> # … with 5,685 more rows, and 3 more variables: longitude_min <dbl>,
#> # profiler_type <dbl>, institution <chr>
with_argo_example_cache({
argo_global_traj() %>%
argo_filter_float(c("13857", "15851"))
})
#> # A tibble: 2 × 8
#> file latitude_max latitude_min longitude_max longitude_min profiler_type
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 aoml/1385… 6.93 0.008 -15.0 -33.8 845
#> 2 aoml/1585… -2.73 -6.22 3.33 -21.1 845
#> # … with 2 more variables: institution <chr>, date_update <dttm>
with_argo_example_cache({
argo_global_traj() %>%
argo_filter_data_mode("delayed")
})
#> # A tibble: 1,986 × 8
#> file latitude_max latitude_min longitude_max longitude_min profiler_type
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 aoml/190… 6.56 -9.67 -14.0 -50.6 851
#> 2 aoml/190… -1.56 -6.07 -18.6 -43.2 851
#> 3 aoml/190… 5.13 0.824 -27.4 -35.4 851
#> 4 aoml/190… -35.6 -47.1 80.4 21.1 851
#> 5 aoml/190… -33.5 -40.3 41.1 18.1 851
#> 6 aoml/190… -34.7 -53.9 95.6 20.8 851
#> 7 aoml/190… -25.7 -44.0 42.6 16.4 851
#> 8 aoml/190… -22.3 -28.7 83.3 73.9 851
#> 9 aoml/190… -19.8 -41.1 72.0 16.8 851
#> 10 aoml/190… -22.8 -32.1 67.0 47.2 851
#> # … with 1,976 more rows, and 2 more variables: institution <chr>,
#> # date_update <dttm>