show¶
This module provides objects used to retrieve shows, show information, and show details from a copy of the Wait Wait Don’t Tell Me! Stats database.
Show¶
- class wwdtm.show.Show(connect_dict=None, database_connection=None)¶
This class contains functions used to retrieve show data from a copy of the Wait Wait Stats database.
- Parameters:
- retrieve_all()¶
Returns a list of dictionary objects containing show ID, show date, Best Of and Repeat Show information for all shows.
- retrieve_all_dates()¶
Returns a list of all show dates from the database, sorted by show date.
- retrieve_all_dates_tuple()¶
Returns a list of all show dates as a tuple of year, month, and day, sorted by show date.
- retrieve_all_details(include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for all shows.
- retrieve_all_ids()¶
Returns a list of all show IDs from the database, sorted by show date.
- retrieve_all_show_years_months()¶
Returns a list of all show years and months as a string, sorted by year and month.
- retrieve_all_shows_years_months_tuple()¶
Returns a list of all show years and months as a tuple of year and month, sorted by year and month.
- retrieve_by_date(year, month, day)¶
Returns a dictionary object containing show ID, show date, Best Of and Repeat Show information for the requested show date.
- retrieve_by_date_string(date_string)¶
Returns a dictionary object containing show ID, show date, Best Of and Repeat Show information for the requested show date string.
- retrieve_by_id(show_id)¶
Returns a dictionary object containing show ID, show date, Best Of and Repeat Show information for the requested show ID.
- retrieve_by_month_day(month, day)¶
Returns a list of dictionary objects containing with show information for the requested month and day, sorted by year.
- retrieve_by_year(year)¶
Returns a list of dictionary objects containing with show information for the requested year, sorted by show date.
- retrieve_by_year_month(year, month)¶
Returns a list of dictionary objects containing show information for the requested year and month, sorted by show date.
- retrieve_details_by_date(year, month, day, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested show date.
- Parameters:
- Return type:
- Returns:
Dictionary containing show information and details. If show information could not be retrieved, an empty dictionary will be returned.
- retrieve_details_by_date_string(date_string, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested show date string.
- Parameters:
- Return type:
- Returns:
Dictionary containing show information and details. If show information could not be retrieved, an empty dictionary will be returned.
- retrieve_details_by_id(show_id, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested show ID.
- retrieve_details_by_month_day(month, day, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested month and day, sorted by year.
- Parameters:
- Return type:
- Returns:
Dictionary containing show information and details. If show information could not be retrieved, an empty dictionary will be returned.
- retrieve_details_by_year(year, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested year, sorted by show date.
- Parameters:
- Return type:
- Returns:
List of shows for the requested year and corresponding details. If show information could not be retrieved, an empty list will be returned.
- retrieve_details_by_year_month(year, month, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for the requested year and month, sorted by show date.
- Parameters:
- Return type:
- Returns:
List of shows for the requested year and month, and corresponding details. If show information could not be retrieved, an empty list will be returned.
- retrieve_months_by_year(year)¶
Returns a list of show months available for the requested year, sorted by month.
- retrieve_recent(include_days_ahead=7, include_days_back=32)¶
Returns a list of dictionary objects containing show ID, show date, Best Of and Repeat Show information for recent shows.
- Parameters:
- Return type:
- Returns:
List of recent shows and corresponding information. If show information could not be retrieved, an empty list will be returned.
- retrieve_recent_details(include_days_ahead=7, include_days_back=32, include_decimal_scores=False)¶
Returns a list of dictionary objects containing show ID, show date, host, scorekeeper, panelist and guest information for recent shows.
- Parameters:
- Return type:
- Returns:
List of recent shows and corresponding details. If show information could not be retrieved, an empty list will be returned.
- retrieve_scores_by_year(year, use_decimal_scores=False)¶
Returns a list of tuples containing panelist scores for all shows in the requested year, sorted by show date.
- Parameters:
- Return type:
- Returns:
List of tuples each containing show date and panelist scores. If show scores could not be retrieved, an empty list will be returned.
ShowInfo¶
- class wwdtm.show.ShowInfo(connect_dict=None, database_connection=None)¶
This class contains functions that retrieve show supplemental show information, including panelist, guest and Bluff the Listener information from a copy of the Wait Wait Stats database.
- Parameters:
- retrieve_bluff_info_by_id(show_id)¶
Returns a dictionary containing Bluff the Listener information for the requested show ID.
- retrieve_core_info_by_id(show_id)¶
Returns a dictionary with core information for the requested show ID.
- retrieve_guest_info_by_id(show_id)¶
Returns a list of dictionary objects containing Not My Job guest information for the requested show ID.
- retrieve_panelist_info_by_id(show_id, include_decimal_scores=False)¶
Returns a list of dictionary objects containing panelist information for the requested show ID.
- Parameters:
- Return type:
- Returns:
List of panelists with corresponding scores and ranking information. If panelist information could not be retrieved, an empty list will be returned.
ShowInfoMultiple¶
- class wwdtm.show.ShowInfoMultiple(connect_dict=None, database_connection=None)¶
This class contains functions that retrieve show supplemental show information, including panelist, guest and Bluff the Listener information for multiple shows from a copy of the Wait Wait Stats database
- Parameters:
- retrieve_bluff_info_all()¶
Returns a dictionary containing Bluff the Listener information for all shows.
- retrieve_bluff_info_by_ids(show_ids)¶
Returns a dictionary containing Bluff the Listener information for the requested show IDs.
- retrieve_core_info_all()¶
Returns a dictionary with core information for all shows.
- retrieve_core_info_by_ids(show_ids)¶
Returns a dictionary with core information for the requested show IDs.
- retrieve_guest_info_all()¶
Returns a list of dictionary objects containing Not My Job guest information for all shows.
- retrieve_guest_info_by_ids(show_ids)¶
Returns a list of dictionary objects containing Not My Job guest information for the requested show IDs.
- retrieve_panelist_info_all(include_decimal_scores=False)¶
Returns a list of dictionary objects containing panelist information for all shows.
- Parameters:
include_decimal_scores (
bool
) – Flag set to include panelist decimal scores, if available- Return type:
- Returns:
List of panelists with corresponding scores and ranking information. If panelist information could not be retrieved, an empty list will be returned.
- retrieve_panelist_info_by_ids(show_ids, include_decimal_scores=False)¶
Returns a list of dictionary objects containing panelist information for the requested show IDs.
- Parameters:
- Return type:
- Returns:
List of panelists with corresponding scores and ranking information. If panelist information could not be retrieved, an empty list will be returned.
ShowUtility¶
- class wwdtm.show.ShowUtility(connect_dict=None, database_connection=None)¶
This class contains supporting functions used to check whether a show ID or show date exists or to convert between show ID, and show dates.
- Parameters:
- convert_date_to_id(year, month, day)¶
Converts a show date to the matching show ID value.
- convert_id_to_date(show_id)¶
Converts a show’s ID to the matching show date.
- date_exists(year, month, day)¶
Checks to see if a show date exists.