first commit

This commit is contained in:
2026-05-21 08:40:24 -04:00
commit b084545275
711 changed files with 3659856 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# scripts/graph_generation_library/pyproject.toml
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "section_3_word_library_module"
version = "0.1.0"
description = "Internal PASBDC graph creation functions used to generate figures for the network wide desk reviews."
[tool.setuptools]
packages = ["section_3_word_library_module"]

View File

@@ -0,0 +1,4 @@
Metadata-Version: 2.4
Name: section_3_word_library_module
Version: 0.1.0
Summary: Internal PASBDC graph creation functions used to generate figures for the network wide desk reviews.

View File

@@ -0,0 +1,7 @@
pyproject.toml
section_3_word_library_module/__init__.py
section_3_word_library_module/trainings_center_specific.py
section_3_word_library_module.egg-info/PKG-INFO
section_3_word_library_module.egg-info/SOURCES.txt
section_3_word_library_module.egg-info/dependency_links.txt
section_3_word_library_module.egg-info/top_level.txt

View File

@@ -0,0 +1 @@
section_3_word_library_module

View File

@@ -0,0 +1,6 @@
from .trainings_center_specific import (
center_topic_analysis_page_one_maker,
center_topic_analysis_page_maker,
center_trainings_analysis_page_one_maker
)
__all__ = ['center_topic_analysis_page_one_maker', 'center_topic_analysis_page_maker', 'center_trainings_analysis_page_one_maker']

View File

@@ -0,0 +1,124 @@
# FILE: trainings_center_specific.py
# CREATED: 1/12/25
# AUTHOR: Vincent Allen
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
# PURPOSE:
# Contains the word document generation functions needed to generate the center specific training topic analysis looking at the counts
# of events and how many attendees there were compared to what primary topics those events had.
import argparse
from functools import partial
# import the word library
from pasbdc_word_library import WordDocumentBuilder, PageConfig
# import the word page generators
# import the variant naming map
from shared_tools_module import VARIANT_SUFFIX_MAP, StatChartVariants
# Third party libraries
from docx.shared import Inches
from shared_tools_module import ImageRegistry
def center_topic_analysis_page_one_maker(
builder: WordDocumentBuilder,
**kwargs
):
for section in builder.doc.sections:
section.top_margin = Inches(0.5)
section.bottom_margin = Inches(0.5)
section.left_margin = Inches(0.5)
section.right_margin = Inches(0.5)
builder.doc.add_heading(f"Per-Center Training Topic Analysis", level=1)
builder.doc.add_paragraph("All graphs only display data for funding sources: Core Services, LEXNET, PDA, and NAP.")
def center_trainings_analysis_page_one_maker(
builder:WordDocumentBuilder,
**kwargs
):
for section in builder.doc.sections:
section.top_margin = Inches(0.5)
section.bottom_margin = Inches(0.5)
section.left_margin = Inches(0.5)
section.right_margin = Inches(0.5)
builder.doc.add_heading(f"Per-Center Trainings Analysis", level=1)
def center_topic_analysis_page_maker(
builder: WordDocumentBuilder,
fiscal_year:str,
section_number:int,
center:str,
desk_review_section_number:int,
topic_event_count_chart:str,
topic_event_percent_chart:str,
topic_attendee_count_chart:str,
topic_attendee_percent_chart:str,
**kwargs
):
old_section = builder.current_section
builder.current_section = section_number
for section in builder.doc.sections:
section.top_margin = Inches(0.5)
section.bottom_margin = Inches(0.5)
section.left_margin = Inches(0.5)
section.right_margin = Inches(0.5)
builder.doc.add_heading(f"{center} Training Topic Analysis {fiscal_year}", level=2)
picture_table = builder.doc.add_table(rows=4, cols=2)
row1_cells = picture_table.rows[0].cells
row2_cells = picture_table.rows[1].cells
row3_cells = picture_table.rows[2].cells
row4_cells = picture_table.rows[3].cells
# Chart 1 - Attendee count per primary training topic
total_chart_paragraph = row1_cells[0].add_paragraph()
total_chart_run = total_chart_paragraph.add_run()
total_chart_run.add_picture(topic_attendee_count_chart, width=Inches(3.5))
label_paragraph = row2_cells[0].add_paragraph()
label_paragraph.add_run(f"Figure {desk_review_section_number}.{builder.current_section}.{builder.figure_number}").bold = True
label_paragraph.add_run(" displays how many attendees attended events with each primary training topic.")
builder.figure_number += 1
# Chart 2 - The percent version of that chart (out of entire network not out of center)
percent_chart_paragraph = row1_cells[1].add_paragraph()
percent_chart_run = percent_chart_paragraph.add_run()
percent_chart_run.add_picture(topic_attendee_percent_chart, width=Inches(3.5))
label_paragraph = row2_cells[1].add_paragraph()
label_paragraph.add_run(f"Figure {desk_review_section_number}.{builder.current_section}.{builder.figure_number}").bold = True
label_paragraph.add_run(f" displays percentage of all training event attendees across the network that attended events with each primary training topic at {center}.")
builder.figure_number += 1
# Chart 3 - SECOND ROW - Count of events by primary training topic
event_count_paragraph = row3_cells[0].add_paragraph()
event_count_run = event_count_paragraph.add_run()
event_count_run.add_picture(topic_event_count_chart, width=Inches(3.5))
label_paragraph = row4_cells[0].add_paragraph()
label_paragraph.add_run(f"Figure {desk_review_section_number}.{builder.current_section}.{builder.figure_number}").bold = True
label_paragraph.add_run(f" displays how many events at {center} had each primary training topic.")
builder.figure_number += 1
# Chart 4 - SECOND ROW - Percent of center events by primary training topic
event_count_paragraph = row3_cells[1].add_paragraph()
event_count_run = event_count_paragraph.add_run()
event_count_run.add_picture(topic_event_percent_chart, width=Inches(3.5))
label_paragraph = row4_cells[1].add_paragraph()
label_paragraph.add_run(f"Figure {desk_review_section_number}.{builder.current_section}.{builder.figure_number}").bold = True
label_paragraph.add_run(f" the percentage of {center} events that had each primary training topic.")
builder.figure_number += 1
builder.current_section = old_section