示例#1
0
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 plot_individual_lines_by_category(workbook_name_dictionaries,
                                      category,
                                      columns_to_drop,
                                      tail_row_count=0):
    data_frame = get_concatenated_data_frame_of_non_total_sheets_by_category(
        workbook_name_dictionaries,
        category,
        columns_to_drop,
    )

    add_goal_column(data_frame, DUES_INDIVIDUAL_GOAL)
    goal = get_goal_column(data_frame)

    if tail_row_count:
        data_frame, goal = slice_data_frames_by_tail(data_frame, goal,
                                                     tail_row_count)

    plot_all_columns(data_frame, goal)
示例#3
0
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(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)