Module: panelist¶
This module provides objects used to retrieve panelists, panelist information and panelist details from a copy of the Wait Wait Don't Tell Me! Stats database.
Panelist¶
- class wwdtm.panelist.Panelist(connect_dict=None, database_connection=None)¶
Panelist information retrieval class.
Contains methods used to retrieve panelist information, including IDs, names, slug strings, appearances and scores.
- Parameters:
- retrieve_all()¶
Retrieve panelist information for all panelists.
- retrieve_all_details(use_decimal_scores=False)¶
Retrieves panelist information, appearances and scores for all panelists.
- Parameters:
use_decimal_scores (bool) -- A boolean to determine if decimal scores should be used and returned instead of integer scores
- Returns:
A list of dictionaries containing panelist ID, name, slug string, gender, pronouns, whether the panelist is also a guest, host or scorekeeper, scoring statistics and appearances for each panelist
- Return type:
- retrieve_all_ids()¶
Retrieves all panelist IDs, sorted by panelist name.
- retrieve_all_slugs()¶
Retrieves all panelist slug strings, sorted by panelist name.
- retrieve_by_id(panelist_id)¶
Retrieves panelist information.
- retrieve_by_slug(panelist_slug)¶
Retrieves panelist information.
- retrieve_details_by_id(panelist_id, use_decimal_scores=False)¶
Retrieves panelist information, appearances and scores.
- Parameters:
- Returns:
A dictionary containing panelist ID, name, slug string, gender, pronouns, whether the panelist is also a guest, host or scorekeeper, scoring statistics and appearances
- Return type:
- retrieve_details_by_slug(panelist_slug, use_decimal_scores=False)¶
Retrieves panelist information, appearances and scores.
- Parameters:
- Returns:
A dictionary containing panelist ID, name, slug string, gender, pronouns, whether the panelist is also a guest, host or scorekeeper, scoring statistics and appearances
- Return type:
- retrieve_random()¶
Retrieves information for a random panelist.
- retrieve_random_details(use_decimal_scores=False)¶
Retrieves information and appearances for a random panelist.
- retrieve_random_id()¶
Retrieves an ID for a random panelist.
- Returns:
ID for a random panelist.
- Return type:
PanelistAppearances¶
- class wwdtm.panelist.PanelistAppearances(connect_dict=None, database_connection=None)¶
Panelist appearance information retrieval class.
Contains methods used to retrieve panelist appearance information and statistics, scores and rankings.
- Parameters:
- retrieve_appearances_by_id(panelist_id, use_decimal_scores=False)¶
Retrieves panelist appearance information.
- retrieve_appearances_by_slug(panelist_slug, use_decimal_scores=False)¶
Retrieves panelist appearance information.
- retrieve_yearly_appearances_by_id(panelist_id)¶
Retrieves panelist appearance counts grouped by year.
PanelistDecimalScores¶
- class wwdtm.panelist.PanelistDecimalScores(connect_dict=None, database_connection=None)¶
Panelist decimal score retrieval class.
Contains methods used to retrieve panelist decimal scores and calculate scoring statistics.
- Parameters:
- retrieve_scores_by_id(panelist_id)¶
Retrieves a list of panelist decimal scores, sorted by show date.
- retrieve_scores_by_slug(panelist_slug)¶
Retrieves a list of panelist decimal scores, sorted by show date.
- retrieve_scores_grouped_list_by_id(panelist_id)¶
Retrieves panelist grouped decimal scores.
- retrieve_scores_grouped_list_by_slug(panelist_slug)¶
Retrieves panelist grouped decimal scores.
- retrieve_scores_grouped_ordered_pair_by_id(panelist_id)¶
Retrieves a list of panelist decimal scores and counts as a tuple.
- retrieve_scores_grouped_ordered_pair_by_slug(panelist_slug)¶
Retrieves a list of panelist decimal scores and counts as a tuple.
- retrieve_scores_list_by_id(panelist_id)¶
Retrieves panelist appearances and decimal scores as paired lists.
- retrieve_scores_list_by_slug(panelist_slug)¶
Retrieves panelist appearances and decimal scores as paired lists.
- retrieve_scores_ordered_pair_by_id(panelist_id)¶
Retrieves panelist appearances and decimal scores as a list of tuples.
PanelistScores¶
- class wwdtm.panelist.PanelistScores(connect_dict=None, database_connection=None)¶
Panelist score retrieval class.
Contains methods used to retrieve panelist scores and calculate scoring statistics.
- Parameters:
- retrieve_scores_by_id(panelist_id)¶
Retrieves a list of panelist scores, sorted by show date.
- retrieve_scores_by_slug(panelist_slug)¶
Retrieves a list of panelist scores, sorted by show date.
- retrieve_scores_grouped_list_by_id(panelist_id)¶
Retrieves panelist grouped scores.
- retrieve_scores_grouped_list_by_slug(panelist_slug)¶
Retrieves panelist grouped scores.
- retrieve_scores_grouped_ordered_pair_by_id(panelist_id)¶
Retrieves a list of panelist scores and counts as a tuple.
- retrieve_scores_grouped_ordered_pair_by_slug(panelist_slug)¶
Retrieves a list of panelist scores and counts as a tuple.
- retrieve_scores_list_by_id(panelist_id)¶
Retrieves panelist appearances and scores as paired lists.
- retrieve_scores_list_by_slug(panelist_slug)¶
Retrieves panelist appearances and scores as paired lists.
- retrieve_scores_ordered_pair_by_id(panelist_id)¶
Retrieves panelist appearances and scores as a list of tuples.
PanelistStatistics¶
- class wwdtm.panelist.PanelistStatistics(connect_dict=None, database_connection=None)¶
Panelist statistics information retrieval and calculation class.
Contains methods used to retrieve Bluff the Listener, ranking and scoring statistics.
- Parameters:
- retrieve_bluffs_by_id(panelist_id)¶
Retrieve panelist Bluff the Listener statistics.
- retrieve_bluffs_by_slug(panelist_slug)¶
Retrieve panelist Bluff the Listener statistics.
- retrieve_rank_info_by_id(panelist_id)¶
Retrieves panelist ranking information.
- retrieve_rank_info_by_slug(panelist_slug)¶
Retrieves panelist ranking information.
- retrieve_statistics_by_id(panelist_id, include_decimal_scores=False)¶
Retrieves and calculates panelist statistics.
- retrieve_statistics_by_slug(panelist_slug, include_decimal_scores=False)¶
Retrieves and calculates panelist statistics.
- Parameters:
- Returns:
A dictionary containing panelist scoring and ranking statistics
- Return type:
PanelistUtility¶
- class wwdtm.panelist.PanelistUtility(connect_dict=None, database_connection=None)¶
Panelist information and utilities class.
Contains methods used to convert between panelist ID and slug strings, and to check if panelist IDs and slug strings exist.
- Parameters:
- convert_id_to_slug(panelist_id)¶
Converts a panelist ID to the corresponding panelist slug string.
- convert_slug_to_id(panelist_slug)¶
Converts a panelist slug string to the corresponding panelist ID.
- id_exists(panelist_id)¶
Validates if a panelist ID exists.