| Title: | Visualize Your 'RStudio Connect' Server Usage Data |
|---|---|
| Description: | A collection of helper functions and 'htmlwidgets' to help admins or user better understand how 'RStudio Connect' is used in their organization. The package provides plug and play visualizations that can be customized depending on needs. |
| Authors: | David Granjon [aut, cre], Christophe Regouby [ctb] |
| Maintainer: | David Granjon <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9146 |
| Built: | 2026-05-24 07:14:48 UTC |
| Source: | https://github.com/RinteRface/connectviz |
Generic calendar chart generator
create_app_daily_session_chart( calendar_data, title = "Cumulated daily usage", subtitle = "time units: minutes", start_date = NULL, end_date = NULL, callback = NULL )create_app_daily_session_chart( calendar_data, title = "Cumulated daily usage", subtitle = "time units: minutes", start_date = NULL, end_date = NULL, callback = NULL )
calendar_data |
Calendar chart data. |
title |
Chart title. |
subtitle |
Chart subtitle. |
start_date |
Default to minimum calendar_data date. Could also be an input value with Shiny. |
end_date |
Default to maximum calendar_data date. Could also be an input value with Shiny. |
callback |
JS function to pass to onRender. This is useful to access the widget API on the R side at render time and add events on the fly. |
An echarts4r line chart
Leverages echarts4r. See https://echarts4r.john-coene.com/articles/chart_types.html#calendar-1. .
create_app_daily_usage_chart(app_usage, ...)create_app_daily_usage_chart(app_usage, ...)
app_usage |
Returned by get_app_daily_usage. |
... |
Pass down any param to create_calendar_chart. |
A calendar chart displaying daily app usage.
create_app_ranking(content, users, apps, start_date = NULL, end_date = NULL)create_app_ranking(content, users, apps, start_date = NULL, end_date = NULL)
content |
Get from get_content. Can be reactive. |
users |
Get from get_users. Can be reactive. |
apps |
Get from get_usage_shiny. Can be reactive. |
start_date |
Default to minimum calendar_data date. Could also be an input value with Shiny. |
end_date |
Default to maximum calendar_data date. Could also be an input value with Shiny. |
A list containing: [[1]] merged data between app usage and users data.
[[2]]: data to be digested by create_app_ranking_table.
Leverages the toastui htmlwidget. See https://dreamrs.github.io/toastui/articles/extras/grid.html.
create_app_ranking_table(ranking, pagination = 10, height = NULL)create_app_ranking_table(ranking, pagination = 10, height = NULL)
ranking |
Ranked data from create_app_ranking. |
pagination |
Control number of lines to display per page. If NULL, all data are displayed. |
height |
Table height. CSS units. |
An htmlwidget table containing app ranking, owner sorted by usage.
Sort consumers by number of views.
create_apps_consumer_ranking(apps, users)create_apps_consumer_ranking(apps, users)
apps |
Get from get_usage_shiny. Can be reactive or not. |
users |
Get from get_users. Can be reactive or not. |
A 3 columns tibble with apps consumer sorted by number of view. The role columns allows further analysis.
Create apps consumer ranking bar chart
create_apps_consumer_ranking_chart(ranking, threshold)create_apps_consumer_ranking_chart(ranking, threshold)
ranking |
Data obtained from create_apps_consumer_ranking. |
threshold |
Minimum number of app threshold. You'll need a numericInput wrapped by reactive. |
A bar chart with consumer sorted by descending number of total views.
Generic calendar chart generator
create_calendar_chart( calendar_data, title, subtitle = NULL, start_date = NULL, end_date = NULL, callback = NULL )create_calendar_chart( calendar_data, title, subtitle = NULL, start_date = NULL, end_date = NULL, callback = NULL )
calendar_data |
Calendar chart data. |
title |
Chart title. |
subtitle |
Chart subtitle. |
start_date |
Default to minimum calendar_data date. Could also be an input value with Shiny. |
end_date |
Default to maximum calendar_data date. Could also be an input value with Shiny. |
callback |
JS function to pass to onRender. This is useful to access the widget API on the R side at render time and add events on the fly. |
An echarts4r calendar chart
Bar chart
create_cumulated_duration_per_user( apps_usage, start_date = NULL, end_date = NULL, selected_app )create_cumulated_duration_per_user( apps_usage, start_date = NULL, end_date = NULL, selected_app )
apps_usage |
First element returned by create_app_ranking. Can be reactive. |
start_date |
Default to minimum calendar_data date. Could also be an input value with Shiny. |
end_date |
Default to maximum calendar_data date. Could also be an input value with Shiny. |
selected_app |
Selected app name (string). You'll need a selectInput for instance wrapped by reactive. |
An echarts4r barchart.
Bar chart
create_cumulated_hits_per_user( apps_usage, start_date = NULL, end_date = NULL, selected_app )create_cumulated_hits_per_user( apps_usage, start_date = NULL, end_date = NULL, selected_app )
apps_usage |
First element returned by create_app_ranking. Can be reactive. |
start_date |
Default to minimum calendar_data date. Could also be an input value with Shiny. |
end_date |
Default to maximum calendar_data date. Could also be an input value with Shiny. |
selected_app |
Selected app name (string). You'll need a selectInput for instance wrapped by reactive. |
An echarts4r barchart.
Leverages visNetwork.
create_dev_project_overview(client, apps_usage, selected_dev)create_dev_project_overview(client, apps_usage, selected_dev)
client |
RSC client. See create_rsc_client. |
apps_usage |
First element returned by create_app_ranking. Can be reactive. |
selected_dev |
Developer to select. You'll need a selectInput wrapped by reactive. |
A visNetwork htmlwidget with developer projects.
Rank developers by number of published apps
create_dev_ranking(users, content)create_dev_ranking(users, content)
users |
Get from get_users. |
content |
Get from get_content. |
A tibble with developer ranked by decreasing number of apps.
Devs are ranked by number of developed apps. See create_dev_ranking.
create_dev_ranking_chart(ranking, threshold)create_dev_ranking_chart(ranking, threshold)
ranking |
Obtained after calling create_dev_ranking. Can be reactive. |
threshold |
Minimum number of app threshold. You'll need a numericInput wrapped by reactive. |
An echarts4r bar chart.
Pie chart with percentage data
create_pie_chart(data, x_axis)create_pie_chart(data, x_axis)
data |
Get from sort_users_by_role. |
x_axis |
x variable. |
A pie chart.
Leverages connectapi toolkit. Expect to have Sys.getenv("CONNECT_SERVER") and
Sys.getenv("CONNECT_API_KEY") properly setup.
create_rsc_client()create_rsc_client()
Daily app consumption for selected user
create_user_daily_consumption_chart(usage)create_user_daily_consumption_chart(usage)
usage |
Get from get_user_daily_consumption. |
An echarts4r calendar chart
Leverage toastui API.
generate_table(logs, sparkline = FALSE, pagination = 10, height = NULL)generate_table(logs, sparkline = FALSE, pagination = 10, height = NULL)
logs |
Obtained with |
sparkline |
Whether to draw a sparkline. |
pagination |
Control number of lines to display per page. If NULL, all data are displayed. |
height |
Table height. CSS units. |
An htmlwidget table.
Used by create_app_daily_usage_chart .
get_app_daily_usage(apps_usage, selected_app)get_app_daily_usage(apps_usage, selected_app)
apps_usage |
Second element returned by create_app_ranking. Can also be reactive. |
selected_app |
Selected app name (string). You'll need a selectInput for instance. wrapped by reactive. |
Calendar data for daily app usage.
Get most used app
get_max_rsc_apps_usage(logs)get_max_rsc_apps_usage(logs)
logs |
Obtained after calling |
A numeric value.
Extract app usage dates
get_rsc_app_dates(app, logs)get_rsc_app_dates(app, logs)
app |
app_name to filter. |
logs |
Given by RSC database. |
A tibble containing dates of usage for the given app as well as the correponding session duration.
Called on apps_usage data
get_rsc_apps_usage(logs)get_rsc_apps_usage(logs)
logs |
Given by RSC database. |
A 3 columns tibble with app name, usage and date of usage (nested tibble).
Get app count for each developer
get_rsc_developer_apps_count(developer, logs)get_rsc_developer_apps_count(developer, logs)
developer |
Developer unique id. |
logs |
All data logs. |
A number with all apps
Get app list for each developer + usage
get_rsc_developer_apps_list(developer, logs)get_rsc_developer_apps_list(developer, logs)
developer |
Unique user id. Typically app_developer_id key. |
logs |
RSC logs. |
Tibble containing app name + count
Get daily shiny app usage for a given user
get_user_daily_consumption(content, users, apps, selected_user)get_user_daily_consumption(content, users, apps, selected_user)
content |
Get from get_content. Can be reactive. |
users |
Get from get_users. Can be reactive. |
apps |
Get from get_usage_shiny. Can be reactive. |
selected_user |
User to select. You'll need a selectInput wrapped by reactive. |
A list. [[1]] contains the row events filtered for the
given user. [[2]] is 2 columns tibble containing daily app consumption
for given user (grouped by dates).
See create_app_ranking.
merge_rsc_data(content, users, apps)merge_rsc_data(content, users, apps)
content |
Get from get_content. Can be reactive. |
users |
Get from get_users. Can be reactive. |
apps |
Get from get_usage_shiny. Can be reactive. |
A list of 3 tibbles. [[1]]: light RSC content data (less columns);
[[2]]: light RSC users data (less columns); [[3]]: merged apps_usage data.
Select relevant information for RSC content data. See merge_rsc_data.
process_rsc_content(content)process_rsc_content(content)
content |
Get from get_content. |
A 3 columns tibble with content guid, app_name and owner guid. Owner guid is the same returned in process_rsc_user.
Select relevant information for RSC users data. See merge_rsc_data.
process_rsc_user(users)process_rsc_user(users)
users |
Get from get_users. |
A 2 columns tibble with user guid and username.
Sort RStudio Connect content by access type
sort_content_by_access(content, start_date = NULL, end_date = NULL)sort_content_by_access(content, start_date = NULL, end_date = NULL)
content |
Get from get_content. |
start_date |
Date filter. |
end_date |
Date filter. |
A tibble with content grouped by access type.
Sort RStudio Connect content by app mode
sort_content_by_appmode(content, start_date = NULL, end_date = NULL)sort_content_by_appmode(content, start_date = NULL, end_date = NULL)
content |
Get from get_content. |
start_date |
Date filter. |
end_date |
Date filter. |
A tibble with content grouped by app mode.
Sort RStudio Connect content by python version
sort_content_by_pyversion(content)sort_content_by_pyversion(content)
content |
Get from get_content. |
A tibble with content grouped by python version.
Sort RStudio Connect content by R version
sort_content_by_rversion(content, start_date = NULL, end_date = NULL)sort_content_by_rversion(content, start_date = NULL, end_date = NULL)
content |
Get from get_content. |
start_date |
Date filter. |
end_date |
Date filter. |
A tibble with content grouped by R version.
Users are grouped by user_role to check the server role repartition. Using start_date and end_date allows to filter data given a specific time range.
sort_users_by_role(users, start_date = NULL, end_date = NULL)sort_users_by_role(users, start_date = NULL, end_date = NULL)
users |
Get from get_users. |
start_date |
Date filter. |
end_date |
Date filter. |
A tibble with user grouped by role.