API

BallroomSkatingSystem.get_rule11_tableMethod
get_rule11_table(results_single_dances)

Prepares a DataFrame with all judgements concatenated into a single table for use when applying Rule 11.

BallroomSkatingSystem.prepare_sumsMethod
prepare_sums(results, depth)

Returns the DataFrame for the calculation of the majority of votes, as well as the sum of evaluations up to a given rank.

BallroomSkatingSystem.skating_combinedMethod
skating_combined(dances, results_single_dances)

Calculates the final placement of competitors in a dancing competition based on the skating rules. dances is a vector of strings, containing the names of the dances. results_single_dances is a vector of DataFrames, containing the results for the individual dances. See skating_single_dance for the correct input format.

Outputs a DataFrame with the accumulated skating tableau as strings, a vector containing tableaus containing the application of Rule 10 and Rule 11, the skating results for the individual dances as well as a DataFrame with the starter numbers and final places.

BallroomSkatingSystem.skating_single_danceMethod
skating_single_dance(results)
skating_single_dance(results, majority_from; [initial_place, initial_column, depth])

Calculates a skating tableau and placement for judgment results of a single dance contained in the DataFrame results. It must contain the starter numbers of the dancers as a first column named :Numbers, and the places assigned by the different judges in the following columns, for example as in

DataFrame(Number = [11, 12, 13, 14, 15],
        JudgeA = [1, 2, 3, 4, 5],
        JudgeB = [1, 3, 2, 4, 5],
        JudgeC = [1, 3, 2, 5, 4],
        JudgeD = [5, 1, 2, 3, 4],
        JudgeE = [2, 1, 5, 3, 4])

Returns a DataFrame with the skating tableau represented as strings, as well as a DataFrame with the starter numbers and places.

For calculations on cropped tables, the majority of votes, the initial placement to fill, the initial column in the tableau where skating should start as well as the desired depth of the calculation can be defined by keyword arguments.

BallroomSkatingSystem.write_places!Method
write_places!(places, places_text, index, current_place)
write_places!(places, places_text, index, place_to_write, current_place)    
write_places!(places, places_text, index, place_to_write, place_to_write_text, current_place)

Write the result of the skating procedure to the DataFrames containing the final calculation.

BallroomSkatingSystem.write_result!Method
write_result!(calculation, calculation_text, sum_of_eval, id, current_place, current_col, tmp_col, max_cols; append_sum = false)

Write the result of the skating procedure to the DataFrames containing placement and summary information. Remove the parts that are not needed anymore.