Skip to contents

get_db_stats returns basic summary information about the institutions, people, and data hosted on 'Databrary.org'.

Usage

get_db_stats(type = "stats", vb = options::opt("vb"), rq = NULL)

Arguments

type

Type of Databrary report to run "institutions", "people", "data"

vb

Show verbose messages. (Defaults to FALSE, overwritable using option 'databraryr.vb' or environment variable 'R_DATABRARYR_VB')

rq

An httr2 request object.

Value

A data frame with the requested data or NULL if there is no new information.

Examples

# \donttest{
get_db_stats()
#> # A tibble: 1 × 9
#>   date                investigators affiliates institutions datasets_total
#>   <dttm>                      <int>      <int>        <int>          <int>
#> 1 2024-09-18 12:25:58          1805        622          807           1754
#> # ℹ 4 more variables: datasets_shared <int>, n_files <int>, hours <dbl>,
#> #   TB <dbl>
get_db_stats("stats")
#> # A tibble: 1 × 9
#>   date                investigators affiliates institutions datasets_total
#>   <dttm>                      <int>      <int>        <int>          <int>
#> 1 2024-09-18 12:25:58          1805        622          807           1754
#> # ℹ 4 more variables: datasets_shared <int>, n_files <int>, hours <dbl>,
#> #   TB <dbl>
get_db_stats("people") # Information about the newest authorized investigators.
#> # A tibble: 4 × 5
#>      id sortname prename   affiliation                     time                 
#>   <int> <chr>    <chr>     <chr>                           <chr>                
#> 1 10687 Addyman  Caspar    Stellenbosch University         2024-09-16T15:32:55.…
#> 2 22783 Mielke   Alexander Queen Mary University of London 2024-09-16T14:13:57.…
#> 3 22864 Hojeij   Zeina     Zayed University                2024-09-13T12:14:27.…
#> 4 22658 Fusi     Stefano   Columbia University             2024-09-12T17:53:58.…
get_db_stats("places") # Information about the newest institutions.
#> # A tibble: 3 × 5
#>      id sortname                           url                 institution time 
#>   <int> <chr>                              <chr>               <lgl>       <chr>
#> 1 22916 Stellenbosch University            http://www.sun.ac.… TRUE        2024…
#> 2 22908 Zayed University                   https://www.zu.ac.… TRUE        2024…
#> 3 22880 University of Texas at San Antonio https://www.utsa.e… TRUE        2024…
# }