first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# FILE: counselling_interval_analysis.py
|
||||
# CREATED: 1/12/25
|
||||
# AUTHOR: Vincent Allen
|
||||
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
|
||||
|
||||
# Calls the word document builder with the necessary functions and files extracted from the target image door, to create a final word document for the Neoserra counseling interval scorecard report.
|
||||
|
||||
import argparse
|
||||
from pasbdc_word_library import WordDocumentBuilder, PageConfig
|
||||
from section_1_word_library_module import counselling_interval_analysis
|
||||
|
||||
from shared_tools_module import ImageRegistry
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--images", required=True)
|
||||
parser.add_argument("--reportname", required=False, help="The filename prefix identifying images for this report.", default="counselling-interval")
|
||||
parser.add_argument("--output", required=True, help="The name to give the output file")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
registry = ImageRegistry(args.images, args.reportname)
|
||||
|
||||
builder = WordDocumentBuilder()
|
||||
|
||||
builder.create_document(
|
||||
[
|
||||
PageConfig(page_function=counselling_interval_analysis, add_page_break=False)
|
||||
],
|
||||
args.output,
|
||||
section_number=2,
|
||||
desk_review_section_number=1,
|
||||
|
||||
days_client_signup_to_client_start=registry.get("signuptostart", ""),
|
||||
days_client_signup_to_first_counseling=registry.get("signuptocounselling", ""),
|
||||
days_client_start_to_first_counseling=registry.get("starttocounselling", ""),
|
||||
days_initial_to_followup_counseling=registry.get("initialtofollowup", ""),
|
||||
days_training_to_counseling=registry.get("trainingtocounselling", "")
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
57
section_1_word_export_scripts/generate_naics_word.py
Normal file
57
section_1_word_export_scripts/generate_naics_word.py
Normal file
@@ -0,0 +1,57 @@
|
||||
# FILE: generate_naics_word.py
|
||||
# CREATED: 1/12/25
|
||||
# AUTHOR: Vincent Allen
|
||||
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
|
||||
|
||||
# Calls the word document builder with the necessary functions and files extracted from the target image door, to create a final word document for the NAICS census report.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
# import the word library
|
||||
from pasbdc_word_library import WordDocumentBuilder, PageConfig
|
||||
|
||||
# import the word page generators
|
||||
from section_1_word_library_module import (
|
||||
naics_penetration_page_one,
|
||||
naics_penetration_page_two
|
||||
)
|
||||
|
||||
from shared_tools_module import ImageRegistry
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--images", required=True)
|
||||
parser.add_argument("--reportname", required=False, help="The filename prefix identifying images for this report.", default="naicsanalysis")
|
||||
parser.add_argument("--output", required=True, help="The name to give the output file")
|
||||
|
||||
# Configuration arguments
|
||||
parser.add_argument("--section", type=int, default=1, help="The section number for this report.")
|
||||
parser.add_argument("--desk_review_section", type=int, default=1, help="The top-level desk review section number.")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
registry = ImageRegistry(args.images, args.reportname)
|
||||
|
||||
builder = WordDocumentBuilder()
|
||||
|
||||
builder.create_document(
|
||||
[
|
||||
PageConfig(page_function=naics_penetration_page_one, add_page_break=True),
|
||||
PageConfig(page_function=naics_penetration_page_two, add_page_break=False)
|
||||
],
|
||||
args.output,
|
||||
# Report Configuration
|
||||
section_number=args.section,
|
||||
desk_review_section_number=args.desk_review_section,
|
||||
percent_missing_naics=0.0,
|
||||
# naicsanalysis_naicsdescriptiontable_.png (Cat: naicsdescriptiontable, Var: "")
|
||||
# naicsanalysis_pasbdccensuscomparisongraph_.png (Cat: pasbdccensuscomparisongraph, Var: "")
|
||||
# naicsanalysis_county_heatmap_naics_.png (Cat: county_heatmap, Var: naics)
|
||||
sector_table=registry.get("naicsdescriptiontable", ""),
|
||||
penetration_graph=registry.get("pasbdccensuscomparisongraph", ""),
|
||||
county_map=registry.get("countyheatmapnaics", "")
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,115 @@
|
||||
# FILE: generate_trainings_analysis_word.py
|
||||
# CREATED: 1/12/25
|
||||
# AUTHOR: Vincent Allen
|
||||
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
|
||||
|
||||
# Calls the word document builder with the necessary functions and files extracted from the target image door, to create a final word document for the trainings analysis report (including the center specific topic analysis as well).
|
||||
|
||||
import argparse
|
||||
from functools import partial
|
||||
|
||||
# import the word library
|
||||
from pasbdc_word_library import WordDocumentBuilder, PageConfig
|
||||
|
||||
# import the word page generators
|
||||
from section_1_word_library_module import *
|
||||
|
||||
# import the variant naming map
|
||||
from shared_tools_module import VARIANT_SUFFIX_MAP
|
||||
|
||||
# import the chart variants enum
|
||||
from section_1_graph_library_module import ( # pyright:ignore
|
||||
StatChartVariants
|
||||
)
|
||||
|
||||
from shared_tools_module import ImageRegistry
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--images", required=True)
|
||||
parser.add_argument("--reportname", required=False, help="The filename prefix identifying images for this report. Defaults to trainingsreport", default="trainingsreport")
|
||||
parser.add_argument("--centerchartcategorybase", required=False, type=str, default="topicanalysis",
|
||||
help="The chart category to use for the center specific graphs to find the chart images with ImageRegistry. The center name will be appended to the end of this value and should be the second part of the filename.")
|
||||
|
||||
parser.add_argument("--output", required=True, help="The name to give the output file")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Parse the image paths in the selected dir and build the dictionary
|
||||
registry = ImageRegistry(args.images, args.reportname)
|
||||
|
||||
builder = WordDocumentBuilder()
|
||||
|
||||
builder.create_document(
|
||||
[
|
||||
PageConfig(page_function=training_events_page_one, add_page_break=False),
|
||||
PageConfig(page_function=attendee_bin_charts_page_maker, add_page_break=True),
|
||||
PageConfig(page_function=event_count_attendee_count_page_maker, add_page_break=True),
|
||||
PageConfig(page_function=primary_topic_analysis_page_maker, add_page_break=True),
|
||||
PageConfig(page_function=attendee_counts_page_maker, add_page_break=False),
|
||||
PageConfig(page_function=event_count_page_maker, add_page_break=True),
|
||||
PageConfig(page_function=zero_attendee_events_page_maker, add_page_break=True),
|
||||
],
|
||||
args.output,
|
||||
fiscal_year="FY25",
|
||||
section_number=7,
|
||||
desk_review_section_number=1,
|
||||
|
||||
center="Network Wide",
|
||||
|
||||
# Get the paths of all network wide graphs
|
||||
total_trainings_count_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_COUNT]),
|
||||
total_trainings_percent_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_PERCENT]),
|
||||
total_trainings_no_first_count_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_COUNT]),
|
||||
total_trainings_no_first_percent_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_PERCENT]),
|
||||
total_trainings_no_first_no_pre_count_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_COUNT]),
|
||||
total_trainings_no_first_no_pre_percent_chart=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_PERCENT]),
|
||||
total_trainings_first_pre_only_count=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY]),
|
||||
total_trainings_first_pre_only_percent=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY_PERCENT]),
|
||||
total_trainings_ondemand_count=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_COUNT]),
|
||||
total_trainings_ondemand_percent=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_PERCENT]),
|
||||
total_trainings_ondemand_no_first_count=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_NO_FIRST_STEPS_COUNT]),
|
||||
total_trainings_ondemand_no_first_percent=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_NO_FIRST_STEPS_PERCENT]),
|
||||
total_trainings_ondemand_no_first_no_pre_count=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_NO_FIRST_STEPS_NO_PREPLANNING_COUNT]),
|
||||
total_trainings_ondemand_no_first_no_pre_percent=registry.get("center-statistics", VARIANT_SUFFIX_MAP[StatChartVariants.ON_DEMAND_NO_FIRST_STEPS_NO_PREPLANNING_PERCENT]),
|
||||
|
||||
attendee_bin_chart_total_count=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_COUNT]),
|
||||
attendee_bin_chart_total_percent=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_PERCENT]),
|
||||
|
||||
attendee_bin_chart_no_first_no_pre_total_count=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_COUNT]),
|
||||
attendee_bin_chart_no_first_no_pre_total_percent=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_PERCENT]),
|
||||
attendee_bin_chart_first_pre_total_count=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY]),
|
||||
attendee_bin_chart_first_pre_total_percent=registry.get("attendee-bins", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY_PERCENT]),
|
||||
|
||||
primary_topic_pie_total=registry.get("topics-pie", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_PERCENT]),
|
||||
primary_topic_pie_no_first_total=registry.get("topics-pie", VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_PERCENT]),
|
||||
primary_topic_bar_small_topics_total=registry.get('training-topics', VARIANT_SUFFIX_MAP[StatChartVariants.SMALL_BARS_TRAININGS]),
|
||||
primary_topic_bar_small_topics_percent=registry.get('training-topics', VARIANT_SUFFIX_MAP[StatChartVariants.SMALL_BARS_TRAININGS_PERCENT]),
|
||||
|
||||
attendee_counts_total=registry.get("center-attendees", VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_COUNT]),
|
||||
attendee_counts_percent=registry.get('center-attendees', VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_PERCENT]),
|
||||
attendee_counts_first_pre_count=registry.get('center-attendees', VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY]),
|
||||
attendee_counts_first_pre_percent=registry.get('center-attendees', VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY_PERCENT]),
|
||||
|
||||
event_count_attendee_count_total=registry.get('attendee-ranges', VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_COUNT]),
|
||||
event_count_attendee_count_first_pre_total=registry.get('attendee-ranges', VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY]),
|
||||
|
||||
event_counts_total=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_COUNT]),
|
||||
event_counts_percent=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_PERCENT]),
|
||||
event_counts_attended_total=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.TOTAL_ATTENDED]),
|
||||
event_counts_attended_percent=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.PERCENT_ATTENDED]),
|
||||
event_counts_no_first_total=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_COUNT]),
|
||||
event_counts_no_first_percent=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_PERCENT]),
|
||||
event_counts_no_first_attended_total=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_ATTENDED_COUNT]),
|
||||
event_counts_no_first_attended_percent=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_STEPS_ATTENDED_PERCENT]),
|
||||
event_counts_no_first_no_pre_total=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_COUNT]),
|
||||
event_counts_no_first_no_pre_percent=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.NO_FIRST_NO_PREPLANNNG_PERCENT]),
|
||||
|
||||
event_counts_first_only=registry.get("event-counts", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_ONLY]),
|
||||
event_counts_first_only_percent=registry.get("event-counts", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_ONLY_PERCENT]),
|
||||
event_counts_first_pre_only=registry.get('event-counts', VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY]),
|
||||
event_counts_first_pre_only_percent=registry.get("event-counts", VARIANT_SUFFIX_MAP[StatChartVariants.FIRST_AND_PREPLANNING_ONLY_PERCENT]),
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
60
section_1_word_export_scripts/make_nbs_funding_analysis.py
Normal file
60
section_1_word_export_scripts/make_nbs_funding_analysis.py
Normal file
@@ -0,0 +1,60 @@
|
||||
# FILE: make_nbs_funding_analysis.py
|
||||
# CREATED: 1/12/25
|
||||
# AUTHOR: Vincent Allen
|
||||
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
|
||||
# PURPOSE:
|
||||
|
||||
# Calls the word document builder with the necessary functions and files extracted from the target image door, to create a final word document for the milestone attribution report.
|
||||
# Creates both the NBS and funding report.
|
||||
|
||||
import argparse
|
||||
from pasbdc_word_library import WordDocumentBuilder, PageConfig
|
||||
|
||||
from section_1_word_library_module import (
|
||||
capital_acquisition_analysis_page,
|
||||
new_business_start_analysis_page
|
||||
)
|
||||
from shared_tools_module import ImageRegistry
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--images", required=True)
|
||||
parser.add_argument("--output", required=True, help="The name to give the output file")
|
||||
|
||||
# Added report name parameters with defaults matching the provided file list
|
||||
parser.add_argument("--funding_reportname", required=False, default="fundinganalysis",
|
||||
help="The filename prefix identifying funding images. Defaults to fundinganalysis")
|
||||
parser.add_argument("--nbs_reportname", required=False, default="nbsanalysis",
|
||||
help="The filename prefix identifying NBS images. Defaults to nbsanalysis")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize registries using the arguments
|
||||
funding_registry = ImageRegistry(args.images, args.funding_reportname)
|
||||
nbs_registry = ImageRegistry(args.images, args.nbs_reportname)
|
||||
|
||||
builder = WordDocumentBuilder()
|
||||
|
||||
builder.create_document(
|
||||
[
|
||||
PageConfig(page_function=capital_acquisition_analysis_page, add_page_break=True),
|
||||
PageConfig(page_function=new_business_start_analysis_page, add_page_break=False)
|
||||
],
|
||||
args.output,
|
||||
# Report Configuration
|
||||
section_number=5,
|
||||
desk_review_section_number=1,
|
||||
|
||||
# Funding Chart Paths
|
||||
funding_overview_graph=funding_registry.get("fundingattributionnetworkwide", ""),
|
||||
funding_attribution_chart=funding_registry.get("fundingattributionrate", ""),
|
||||
funding_attribution_potential_chart=funding_registry.get("theoreticalfundingattributionrate", ""),
|
||||
|
||||
# NBS Chart Paths
|
||||
nbs_overview_graph=nbs_registry.get("nbsattributionnetworkwide", ""),
|
||||
nbs_attribution_chart=nbs_registry.get("nbsattributionrate", ""),
|
||||
nbs_attribution_potential_chart=nbs_registry.get("theoreticalnbsattributionrate", ""),
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
57
section_1_word_export_scripts/satisfaction_survey_word.py
Normal file
57
section_1_word_export_scripts/satisfaction_survey_word.py
Normal file
@@ -0,0 +1,57 @@
|
||||
# FILE: satisfaction_survey_report_controller.py
|
||||
# CREATED: 2/2/26
|
||||
# AUTHOR: Vincent Allen
|
||||
# CONTACT: valle276@live.kutztown.edu vincent@vtallen.com
|
||||
# PURPOSE:
|
||||
# Controller script that generates a satisfaction survey report Word document.
|
||||
# Uses ImageRegistry to discover survey graph images and calls the
|
||||
# satisfaction_survey_analysis_word functions to create the formatted report.
|
||||
|
||||
# Custom modules
|
||||
from section_1_word_library_module import client_survey_analysis_page_one
|
||||
from pasbdc_word_library import WordDocumentBuilder, PageConfig
|
||||
from shared_tools_module import ImageRegistry
|
||||
|
||||
import argparse
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--images", type=str, required=True, help="The path to the folder contining the images for this report.")
|
||||
parser.add_argument("--output", type=str, required=True, help="The .docx file to save the final report to. Must end in .docx")
|
||||
parser.add_argument("--sectionnumber", type=int, required=False, default=10, help="The subsection that this report represents of the desk reviews. Defaults to 10")
|
||||
parser.add_argument("--deskreviewsectionnumber", type=int, required=False, default=1, help="The parent section that this report is a part of. Defaults to 1.")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize the image registry
|
||||
registry = ImageRegistry(
|
||||
image_folder=args.images,
|
||||
report_name="satisfactionsurvey"
|
||||
)
|
||||
|
||||
# Retrieve image paths using the registry
|
||||
responses_count_chart = registry.get("surveyresponsecounts", "")
|
||||
recommendation_chart = registry.get("surveyaveragescore", "")
|
||||
per_client_chart = registry.get("surveyresponsesperclient", "")
|
||||
nps_chart = registry.get("surveynpsscore", "")
|
||||
|
||||
# Create document builder
|
||||
builder = WordDocumentBuilder()
|
||||
|
||||
# Generate the document
|
||||
builder.create_document(
|
||||
[
|
||||
PageConfig(page_function=client_survey_analysis_page_one, add_page_break=False)
|
||||
],
|
||||
args.output,
|
||||
# Report Configuration
|
||||
responses_count_chart=responses_count_chart,
|
||||
recommendation_chart=recommendation_chart,
|
||||
per_client_chart=per_client_chart,
|
||||
nps_chart=nps_chart,
|
||||
section_number=args.sectionnumber,
|
||||
desk_review_section_number=args.deskreviewsectionnumber
|
||||
)
|
||||
|
||||
print("Satisfaction survey report created successfully!")
|
||||
Reference in New Issue
Block a user