def get_data_and_plot(): workbooks = get_google_workbooks(DUES_WORKBOOK_NAME_DICTIONARIES) dues_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, DUES_CATEGORY, TOTAL_SHEET_TITLE) add_goal_column(dues_total_sheet_data_frame, NATIONAL_SECURITY_GOAL) national_security_goal = get_goal_column(dues_total_sheet_data_frame) dates = get_index(dues_total_sheet_data_frame) dues_total_column = get_series_by_column_title(dues_total_sheet_data_frame, TOTAL_COLUMN_TITLE) dues_national_column = get_series_by_column_title( dues_total_sheet_data_frame, NATIONAL_COLUMN_TITLE) dues_regional_column = get_series_by_column_title( dues_total_sheet_data_frame, REGIONAL_COLUMN_TITLE) dues_local_column = get_series_by_column_title(dues_total_sheet_data_frame, LOCAL_COLUMN_TITLE) plot_fcn_line(dates, dues_total_column, dues_national_column, dues_regional_column, dues_local_column, national_security_goal)
def create_report(): workbooks = get_google_workbooks(WORKBOOK_NAME_DICTIONARIES) dues_str, dues_str_stpete = get_workbook_values_str( workbooks, DUES_CATEGORY) fcn_str, fcn_str_stpete = get_workbook_values_str(workbooks, FCN_CATEGORY) foi_class_attendance_str, foi_class_attendance_str_stpete = get_workbook_values_str( workbooks, FOI_CLASS_ATTENDANCE_CATEGORY) date_str = get_report_date(workbooks) # values_str = f'{dues_str}\n{fcn_str}\n{foi_class_attendance_str}\n' # values_str_stpete = f'{dues_str_stpete}\n{fcn_str_stpete}\n{foi_class_attendance_str_stpete}\n' # values_str = f'{dues_str}\n{foi_class_attendance_str}\n' # values_str_stpete = f'{dues_str_stpete}\n{foi_class_attendance_str_stpete}\n' values_str = f'{dues_str}\n' values_str_stpete = f'{dues_str_stpete}\n' email_body_str = f'{GREETINGS}{date_str}.\n\n{values_str}\n{FOOTER_MESSAGE}' email_body_str_stpete = f'{GREETINGS_STPETE}{date_str}.\n\n{values_str_stpete}\n{FOOTER_MESSAGE}' full_email_str = f'Subject: {SUBJECT} {date_str}\n\n{email_body_str}' full_email_str_stpete = f'Subject: {SUBJECT} {date_str}\n\n{email_body_str_stpete}' return full_email_str, full_email_str_stpete
def get_data_and_plot(): workbooks = get_google_workbooks( FIRST_TIME_GUESTS_WORKBOOK_NAME_DICTIONARIES) first_time_guests_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, FIRST_TIME_GUESTS_CATEGORY, TOTAL_SHEET_TITLE) dates = get_index(first_time_guests_total_sheet_data_frame) first_time_guests_total_column = get_series_by_column_title( first_time_guests_total_sheet_data_frame, TOTAL_COLUMN_TITLE) plot_first_time_guests_line(dates, first_time_guests_total_column)
def get_data_and_plot(): workbooks = get_google_workbooks( LOST_FOUNDS_CALLED_WORKBOOK_NAME_DICTIONARIES) lost_founds_called_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, LOST_FOUNDS_CALLED_CATEGORY, TOTAL_SHEET_TITLE) dates = get_index(lost_founds_called_total_sheet_data_frame) lost_founds_called_total_column = get_series_by_column_title( lost_founds_called_total_sheet_data_frame, TOTAL_COLUMN_TITLE) plot_lost_founds_called_line(dates, lost_founds_called_total_column)
def get_data_and_plot(head_row_count=0, tail_row_count=0): workbooks = get_google_workbooks(DUES_WORKBOOK_NAME_DICTIONARIES) dues_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, DUES_CATEGORY, TOTAL_SHEET_TITLE) add_goal_column(dues_total_sheet_data_frame, TOTAL_GOAL) goal = get_goal_column(dues_total_sheet_data_frame) if tail_row_count: dues_total_sheet_data_frame, goal = slice_data_frames_by_tail( dues_total_sheet_data_frame, goal, tail_row_count) dates = get_index(dues_total_sheet_data_frame) dues_total_column = get_series_by_column_title(dues_total_sheet_data_frame, TOTAL_COLUMN_TITLE) plot_dues_line(dates, dues_total_column, goal)
def get_data_and_plot(): workbooks = get_google_workbooks(SOLDIERING_WORKBOOK_NAME_DICTIONARIES) hours_soldiered_corner_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, HOURS_SOLDIERED_CORNER_CATEGORY, TOTAL_SHEET_TITLE) hours_soldiered_door_to_door_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, HOURS_SOLDIERED_DOOR_TO_DOOR_CATEGORY, TOTAL_SHEET_TITLE) dates = get_index(hours_soldiered_corner_total_sheet_data_frame) hours_soldiered_corner_total_column = get_series_by_column_title( hours_soldiered_corner_total_sheet_data_frame, TOTAL_COLUMN_TITLE) hours_soldiered_door_to_door_total_column = get_series_by_column_title( hours_soldiered_door_to_door_total_sheet_data_frame, TOTAL_COLUMN_TITLE) plot_hours_soldiered_line(dates, hours_soldiered_corner_total_column, hours_soldiered_door_to_door_total_column)
def get_data_and_plot(head_row_count=0, tail_row_count=0): workbooks = get_google_workbooks( FOI_CLASS_ATTENDANCE_WORKBOOK_NAME_DICTIONARIES) foi_class_attendance_total_sheet_data_frame = get_data_frame_by_category_and_sheet_title( workbooks, FOI_CLASS_ATTENDANCE_CATEGORY, TOTAL_SHEET_TITLE) add_goal_column(foi_class_attendance_total_sheet_data_frame, FOI_CLASS_ATTENDANCE_GOAL) goal = get_goal_column(foi_class_attendance_total_sheet_data_frame) if tail_row_count: foi_class_attendance_total_sheet_data_frame, goal = slice_data_frames_by_tail( foi_class_attendance_total_sheet_data_frame, goal, tail_row_count) dates = get_index(foi_class_attendance_total_sheet_data_frame) foi_class_attendance_total_column = get_series_by_column_title( foi_class_attendance_total_sheet_data_frame, TOTAL_COLUMN_TITLE) plot_foi_class_attendance_line(dates, foi_class_attendance_total_column, goal)