Description Usage Arguments Value Examples
View source: R/submission_goal_donut.R
The pie plot this function creates is generated by comparing the number of received submissions with the number of targeted submissions.
The target is calculated by multiplying the number-of-submissions goal per day times the number of days the data collection has been ongoing.
The number of days are determined using the function collection_period
If the targeted number of submissions has been exceeded the plot is all green and additionally provides the info by how many submissions the target number was exceeded.
Please note, that one and only one of the three data arguments (df, csv, svc) must be specified.
1 2 3 4 5 6 7 8 |
df |
Data frame containing the ODK data that is to be used. Optional, defaults to NULL. |
csv |
Character that specifies the path to the csv file that is to be read. Optional, defaults to NULL. |
svc |
Logical that indicates whether the data shall be parsed using ruODK's |
daily_submission_goal |
Integer or float that reflects the targeted number of daily submissions. |
date_col |
String that specifies the date or time stamp column in the data which is to be examined. |
exclude_wday |
Integer (for one day) or integer vector (for multiple days) containing the day(s) of the week that shall not be included when generating the plot, defaults to NULL. Specify the days as following: 1 = Sun, 2 = Mon, ..., 7 = Sun. |
Plotly html-widget
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# 1. with SVC
# ruODK needs to be set up for this function to work
repvisforODK::setup_ruODK(svc = 'example/svc.svc', un = 'exampleusername', pw = 'examplepassword', tz = 'Europe/Berlin', verbose = TRUE)
submission_goal_donut(svc = TRUE, daily_submission_goal = 4, date_col = 'start', exclude_wday = c(1, 7))
# 2. with data frame
submission_goal_donut(df = df_odk_data, daily_submission_goal = 4, date_col = 'start', exclude_wday = c(1, 7))
# 3. with csv
submission_goal_donut(csv = 'example/file/odk_data.csv', daily_submission_goal = 4, date_col = 'start', exclude_wday = c(1, 7))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.