R/hrvar_count_all.R
hrvar_count_all.Rd
This function enables you to create a summary table to validate
organizational data. This table will provide a summary of the data found in
the Viva Insights Data sources page. This function will return a summary
table with the count of distinct fields per HR attribute and the percentage
of employees with missing values for that attribute. See hrvar_count()
function for more detail on the specific HR attribute of interest.
hrvar_count_all(
data,
n_var = 50,
return = "message",
threshold = 100,
maxna = 20
)
A Standard Person Query dataset in the form of a data frame.
number of HR variables to include in report as rows. Default is set to 50 HR variables.
String to specify what to return
The max number of unique values allowed for any attribute. Default is 100.
The max percentage of NAs allowable for any column. Default is 20.
Returns an error message by default, where 'text' is passed in return
.
'table'
: data frame. A summary table listing the number of distinct
fields and percentage of missing values for the specified number of HR
attributes will be returned.
'message'
: outputs a message indicating which values are
beyond the specified thresholds.
Other Data Validation:
check_query()
,
extract_hr()
,
flag_ch_ratio()
,
flag_em_ratio()
,
flag_extreme()
,
flag_outlooktime()
,
hr_trend()
,
hrvar_count()
,
hrvar_trend()
,
identify_churn()
,
identify_holidayweeks()
,
identify_inactiveweeks()
,
identify_nkw()
,
identify_outlier()
,
identify_privacythreshold()
,
identify_query()
,
identify_shifts_wp()
,
identify_shifts()
,
identify_tenure()
,
remove_outliers()
,
standardise_pq()
,
subject_validate_report()
,
subject_validate()
,
track_HR_change()
,
validation_report()
# Return a summary table of all HR attributes
hrvar_count_all(sq_data, return = "table")
#> # A tibble: 9 × 4
#> Attributes `Unique values` `Total missing values` `% missing values`
#> <chr> <dbl> <dbl> <dbl>
#> 1 Domain 1 0 0
#> 2 FunctionType 8 0 0
#> 3 IsActive 2 0 0
#> 4 IsInternal 1 0 0
#> 5 LevelDesignation 6 0 0
#> 6 Organization 15 0 0
#> 7 Region 1 0 0
#> 8 TimeZone 1 0 0
#> 9 attainment 0 13442 100