rstudio/rscloud

Add access to space and account level usage data.

Opened this issue · 6 comments

This came up when speaking to a customer. It would be helpful to provide access to the space and account usage endpoints through this package so that people could independently summarize their usage data.

Similarly, we would love to be able to summarize the amount of time each student is spending in the workspace.

erex commented

It is very useful for me to track student usage by project to help me identify students to whom I can reach out to ask if they need a bit of help. Currently, I do that manually, but for large classes, accessing this information via this package would enhance the educational benefit of the package.

Has this been addressed by 58c5cc6 from June2020?

another request see private ticket #61535

Currently we can use space_member_usage() to get at this:

space_member_usage(space)
#> # A tibble: 1 × 8
#>   active_projects compute active_spaces active_accounts last_activity active_users from                until              
#>             <dbl>   <dbl>         <dbl>           <dbl> <dttm>               <dbl> <dttm>              <dttm>             
#> 1               2   0.317             1               1 NA                       1 2021-09-30 20:00:00 2021-10-12 12:10:18

And when the fix from #46 is in place, we'll be able to get this information at the user level as well.

space_member_usage(space, filters = list(groupby = "user_id", from = "90d"))
#> # A tibble: 2 × 14
#>   user_id display_name          first_name last_name        last_activity compute active_projects active_spaces active_accounts active_users deleted deleted_time from                until              
#>     <int> <chr>                 <chr>      <chr>            <dttm>          <dbl>           <dbl>         <dbl>           <dbl>        <dbl> <lgl>   <lgl>        <dttm>              <dttm>             
#> 1   75777 Mine Çetinkaya-Rundel Mine       Çetinkaya-Rundel NA              0                   0             0               0            0 FALSE   NA           2021-07-14 12:10:45 2021-10-12 12:10:45
#> 2 1165199 RStudio Cloud Test 01 RStudio    Cloud Test 01    NA              0.317               2             1               1            1 FALSE   NA           2021-07-14 12:10:45 2021-10-12 12:10:45

I believe these address the requested functionality. If not, could you provide a bit more information on what other data would be useful?

@kputschko or @erex -- Are there any other fields not covered by the result of space_member_usage() that you're interested in?

erex commented

As I understand the function, it can generate total computing hours by user_id, which is useful. However, in my use case, the projects are practicals. With pedagogy in mind, I want to track student engagement by project, e.g. "did student X skip practical Y or spend twice as much time as others on practical Z".

Perhaps I can learn this from clever use of the filters argument to space_member_usage(), but I couldn't learn much about the function arguments. That is the functionality of interest to me, not necessarily additional fields.