Audit the CMR revision/production lifecycle of a collection's granules.
cmr_audit_revisions.RdAudit the CMR revision/production lifecycle of a collection's granules.
Arguments
- short_name
CMR collection short name
- from, to
Date range to sweep, chunked into 3-month CMR requests
- provider
Optional CMR provider id (see
cmr_find_granules())- gran_date_fun
Function of the assembled tibble (with columns
granule_ur,temporal_start,data_url, ...) that returns the granule's nominal date. Defaults to parsing a leading YYYYMMDD out ofgranule_ur, which holds for GHRSST-style products (MUR, AVHRR_OI, ...); for collections with opaque GranuleURs, pass e.g.function(df) as.Date(df$temporal_start).- bounding_box, polygon
Optional spatial filters, passed through to every chunked
cmr_find_granules()call – seecmr_find_granules()for their formats. Mutually exclusive.
Value
A tibble::tibble() with one row per granule (deduplicated
across chunk boundaries), including gran_date and the lag columns
described in this file's header comment. Warns if gran_date comes
back entirely NA (see the MOD021KM example in the README).
See also
Other granule functions:
cmr_find_granules(),
plot_cmr_lifecycle()
Examples
# \donttest{
rev <- cmr_audit_revisions("MUR-JPL-L4-GLOB-v4.1", from = as.Date("2024-01-01"))
#> 2024-01-01 .. 2024-03-31 : 92 granules
#> 2024-04-01 .. 2024-06-30 : 92 granules
#> 2024-07-01 .. 2024-09-30 : 93 granules
#> 2024-10-01 .. 2024-12-31 : 93 granules
#> 2025-01-01 .. 2025-03-31 : 91 granules
#> 2025-04-01 .. 2025-06-30 : 92 granules
#> 2025-07-01 .. 2025-09-30 : 93 granules
#> 2025-10-01 .. 2025-12-31 : 93 granules
#> 2026-01-01 .. 2026-03-31 : 91 granules
#> 2026-04-01 .. 2026-06-30 : 92 granules
#> 2026-07-01 .. 2026-09-02 : 62 granules
plot_cmr_lifecycle(rev)
# opaque GranuleUR (e.g. LAADS swath products) needs an explicit gran_date_fun
cmr_audit_revisions("MOD021KM",
from = as.Date("2026-08-01"), to = as.Date("2026-08-02"),
gran_date_fun = function(df) as.Date(df$temporal_start))
#> 2026-08-01 .. 2026-08-02 : 1128 granules
#> # A tibble: 1,128 × 16
#> granule_ur concept_id n_rev rev_date insert_date update_date production
#> <chr> <chr> <int> <chr> <chr> <chr> <chr>
#> 1 LAADS:9975745835 G42694858… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 2 LAADS:9980651746 G42733712… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 3 LAADS:9975746411 G42694858… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 4 LAADS:9980653360 G42733715… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 5 LAADS:9975746412 G42694858… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 6 LAADS:9980649184 G42733683… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 7 LAADS:9975746413 G42694858… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 8 LAADS:9980651297 G42733712… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 9 LAADS:9975746414 G42694858… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 10 LAADS:9980652514 G42733714… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> # ℹ 1,118 more rows
#> # ℹ 9 more variables: temporal_start <chr>, data_url <chr>, s3_url <chr>,
#> # nc_bytes <dbl>, gran_date <date>, insert_lag <dbl>, update_lag <dbl>,
#> # rev_lag <dbl>, prod_lag <dbl>
# }