# KPI Score Analysis This project analyzes correlations between Lenovo KPI data (IPM scores) and axiia assessment scores. ## Files and Directories ### Core Analysis Scripts - `analyze_correlations.py` - Original script for correlation analysis - `analyze_correlations_v2.py` - Main script for calculating Pearson and Spearman correlations between KPI and score data with plotting support - `kpi_correlation_app.py` - Gradio web UI for interactive correlation analysis and visualization ### Utility Scripts - `csv_utils.py` - Helper functions for Excel to CSV conversion and data processing - `step0_fill_kpi_ratings.py` - Script to fill empty KPI values with random data for testing - `launch_gradio_app.sh` - Shell script to launch the Gradio app with instructions ### Test Scripts - `test_step3.py` - Tests correlation analysis with partial data and missing values - `test_plotting.py` - Tests the plotting functionality of the analysis script - `test_excel_conversion.py` - Tests Excel to CSV conversion functionality - `test_gradio_app.py` - Test script to verify Gradio app setup and provide usage instructions - `test_correlation_analysis.sh` - Shell script for running correlation tests - `example_usage.sh` - Example commands for running the analysis ### Data Files - `test_kpi.csv` - Sample KPI data file for testing - `lenovo-scores-0603.csv` - Axiia assessment scores data (used by Gradio app) ### Output Files - `score_corr.yaml` - Basic correlation analysis results - `score_corr_v2.yaml` - Enhanced correlation analysis results with data quality info - `score_corr_ipm.yaml` - Correlation results with IPM percentage formatting - `score_corr_with_plots.yaml` - Correlation results generated with plotting - `test_flags.yaml` - Test results with command line flags - `test_step3_output.yaml` - Output from step 3 testing ### Plots - `correlation_plots.png` - Combined plot showing all correlations - `correlation_AC.png` - Scatter plot of problem_score vs FY23/24 IPM - `correlation_AD.png` - Scatter plot of problem_score vs FY24/25 IPM - `correlation_BC.png` - Scatter plot of ability_score vs FY23/24 IPM - `correlation_BD.png` - Scatter plot of ability_score vs FY24/25 IPM ### Documentation - `kpi_socre_plan.md` - Step-by-step plan for the analysis project - `plotting_readme.md` - Documentation for the plotting functionality - `gradio_app_usage.md` - Usage guide for the Gradio web UI application - `step3_test_results.md` - Results from step 3 testing ## Usage Basic correlation analysis: ```bash python analyze_correlations_v2.py -k data/lenovo_kpi.csv -s data/lenovo-scores-0603.csv -o score_corr.yaml ``` With plotting: ```bash python analyze_correlations_v2.py -k data/lenovo_kpi.csv -s data/lenovo-scores-0603.csv -o score_corr.yaml -p ``` Gradio web UI: ```bash python kpi_correlation_app.py # or ./launch_gradio_app.sh ```