NASA Budget Recovery Skill
Recovers missing values in multi-sheet NASA budget workbooks where values are marked with '???'.
Approach
- Budget by Directorate: Use Total = sum(components) to recover missing components or totals
- YoY Changes (%): Use formula
100*(current-previous)/previouswith budget values - Directorate Shares (%): Use formula
100*component/totalwith budget values - Growth Analysis: Compute CAGR, differences, and averages from budget values
- Cross-sheet resolution: When a budget row has 2 unknowns, use YoY percentages to recover one, then derive the other from the total
- Recalculation: Use LibreOffice to recalculate the workbook after recovery
Usage
pythonimport sys sys.path.insert(0, '/app/environment/skills/evo-nasa-budget-recovery/scripts') from utils import run_full_pipeline input_path = '/root/nasa_budget_incomplete.xlsx' output_path = '/root/nasa_budget_recovered.xlsx' issues = run_full_pipeline(input_path, output_path) if not issues: print("All validations passed!")
Key Functions
run_full_pipeline(input_path, output_path)- Complete end-to-end pipeline with recalculationrun_recovery(input_path, output_path)- Recovery without recalculationvalidate_recovery(output_path)- Validate all constraints are satisfiedrecalculate_with_engine(output_path)- Recalculate with LibreOfficerecover_budget_values(wb)- Solve budget totals/componentsrecover_from_yoy(wb, budget_recovered)- Use YoY to fill budget gapsrecover_shares(wb, budget_recovered)- Compute share percentagesrecover_growth(wb, budget_recovered)- Compute growth metrics


