Extract information from an Argo path

argo_path_info(path)

argo_extract_path_info(tbl)

as_argo_path(path)

as_argo_path_aux(path)

Arguments

path

A path relative to the root directory of argo_mirror() or argo_cache_dir(). This value can also be a data.frame with a file column (e.g., a global index as returned by argo_global_meta() and others).

tbl

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).

Value

A tibble::tibble() with columns file, file_float, file_type, file_cycle, file_data_mode, and file_modifier.

Examples

argo_path_info("dac/nmdis/2901633/profiles/R2901633_052.nc")
#> # A tibble: 1 × 7
#>   file              file_float file_type file_cycle file_data_mode file_modifier
#>   <chr>             <chr>      <chr>          <int> <chr>          <chr>        
#> 1 nmdis/2901633/pr… 2901633    prof              52 R              NA           
#> # … with 1 more variable: file_descending <lgl>

with_argo_example_cache({
  argo_extract_path_info(argo_global_meta())
})
#> # A tibble: 16,062 × 10
#>    file             file_float file_type file_cycle file_data_mode file_modifier
#>    <chr>            <chr>      <chr>          <int> <chr>          <chr>        
#>  1 aoml/13857/1385… 13857      meta              NA NA             NA           
#>  2 aoml/13858/1385… 13858      meta              NA NA             NA           
#>  3 aoml/13859/1385… 13859      meta              NA NA             NA           
#>  4 aoml/15819/1581… 15819      meta              NA NA             NA           
#>  5 aoml/15820/1582… 15820      meta              NA NA             NA           
#>  6 aoml/15851/1585… 15851      meta              NA NA             NA           
#>  7 aoml/15852/1585… 15852      meta              NA NA             NA           
#>  8 aoml/15853/1585… 15853      meta              NA NA             NA           
#>  9 aoml/15854/1585… 15854      meta              NA NA             NA           
#> 10 aoml/15855/1585… 15855      meta              NA NA             NA           
#> # … with 16,052 more rows, and 4 more variables: file_descending <lgl>,
#> #   profiler_type <dbl>, institution <chr>, date_update <dttm>