88import pandas as pd
99
1010# Add src to path
11- sys .path .append (str (Path (__file__ ).parent .parent / ' src' ))
11+ sys .path .append (str (Path (__file__ ).parent .parent / " src" ))
1212
1313from competitive_analyzer import CompetitiveAnalyzer
1414from market_sizer import MarketSizer
@@ -23,17 +23,17 @@ def main():
2323 print (" REPORT GENERATION SCRIPT" )
2424 print ("=" * 80 )
2525 print ()
26-
26+
2727 # Check if data exists
2828 required_files = [
29- PROCESSED_DATA_DIR / ' competitive_overview.csv' ,
30- PROCESSED_DATA_DIR / ' feature_matrix.csv' ,
31- PROCESSED_DATA_DIR / ' positioning_data.csv' ,
32- PROCESSED_DATA_DIR / ' financial_projections_24m.csv'
29+ PROCESSED_DATA_DIR / " competitive_overview.csv" ,
30+ PROCESSED_DATA_DIR / " feature_matrix.csv" ,
31+ PROCESSED_DATA_DIR / " positioning_data.csv" ,
32+ PROCESSED_DATA_DIR / " financial_projections_24m.csv" ,
3333 ]
34-
34+
3535 missing_files = [f for f in required_files if not f .exists ()]
36-
36+
3737 if missing_files :
3838 print ("❌ Missing required data files:" )
3939 for f in missing_files :
@@ -43,82 +43,86 @@ def main():
4343 print (" python scripts/run_full_analysis.py" )
4444 print ()
4545 return
46-
46+
4747 print ("✅ All required data files found" )
4848 print ()
49-
49+
5050 # Load data
5151 print ("Loading data..." )
52- competitors_df = pd .read_csv (PROCESSED_DATA_DIR / ' competitive_overview.csv' )
53- features_matrix = pd .read_csv (PROCESSED_DATA_DIR / ' feature_matrix.csv' )
54- positioning = pd .read_csv (PROCESSED_DATA_DIR / ' positioning_data.csv' )
55- financial = pd .read_csv (PROCESSED_DATA_DIR / ' financial_projections_24m.csv' )
56-
52+ competitors_df = pd .read_csv (PROCESSED_DATA_DIR / " competitive_overview.csv" )
53+ features_matrix = pd .read_csv (PROCESSED_DATA_DIR / " feature_matrix.csv" )
54+ positioning = pd .read_csv (PROCESSED_DATA_DIR / " positioning_data.csv" )
55+ financial = pd .read_csv (PROCESSED_DATA_DIR / " financial_projections_24m.csv" )
56+
5757 print ("✅ Data loaded successfully" )
5858 print ()
59-
59+
6060 # Generate reports
6161 print ("-" * 80 )
6262 print ("Generating Reports" )
6363 print ("-" * 80 )
6464 print ()
65-
65+
6666 # 1. Competitive Analysis Report
6767 print ("1. Competitive Analysis Summary..." )
6868 analyzer = CompetitiveAnalyzer (competitors_df , features_matrix )
6969 analyzer .positioning_data = positioning
7070 summary = analyzer .generate_competitive_summary ()
71-
72- with open (REPORTS_DIR / 'competitive_analysis_summary.txt' , 'w' , encoding = 'utf-8' ) as f :
71+
72+ with open (
73+ REPORTS_DIR / "competitive_analysis_summary.txt" , "w" , encoding = "utf-8"
74+ ) as f :
7375 f .write (summary )
7476 print (" ✅ Saved: competitive_analysis_summary.txt" )
75-
77+
7678 # 2. Market Sizing Report
7779 print ("\n 2. Market Sizing Report..." )
7880 sizer = MarketSizer ()
7981 sizer .calculate_tam ()
8082 sizer .calculate_sam ()
8183 sizer .calculate_som ()
8284 report = sizer .generate_market_sizing_report ()
83-
84- with open (REPORTS_DIR / ' market_sizing_report.txt' , 'w' , encoding = ' utf-8' ) as f :
85+
86+ with open (REPORTS_DIR / " market_sizing_report.txt" , "w" , encoding = " utf-8" ) as f :
8587 f .write (report )
8688 print (" ✅ Saved: market_sizing_report.txt" )
87-
89+
8890 # 3. Pricing Strategy Report
8991 print ("\n 3. Pricing Strategy Recommendation..." )
9092 strategy = PricingStrategy ()
9193 strategy .analyze_competitor_pricing (competitors_df )
9294 strategy .calculate_value_metrics ()
9395 strategy .validate_unit_economics ()
9496 pricing_report = strategy .generate_pricing_recommendation ()
95-
96- with open (REPORTS_DIR / 'pricing_strategy_recommendation.txt' , 'w' , encoding = 'utf-8' ) as f :
97+
98+ with open (
99+ REPORTS_DIR / "pricing_strategy_recommendation.txt" , "w" , encoding = "utf-8"
100+ ) as f :
97101 f .write (pricing_report )
98102 print (" ✅ Saved: pricing_strategy_recommendation.txt" )
99-
103+
100104 # 4. GTM Strategy Report
101105 print ("\n 4. GTM Strategy Report..." )
102106 planner = GTMPlanner ()
103107 planner .create_weekly_breakdown ()
104108 planner .define_channel_strategy ()
105109 gtm_report = planner .generate_gtm_report ()
106-
107- with open (REPORTS_DIR / ' gtm_strategy_report.txt' , 'w' , encoding = ' utf-8' ) as f :
110+
111+ with open (REPORTS_DIR / " gtm_strategy_report.txt" , "w" , encoding = " utf-8" ) as f :
108112 f .write (gtm_report )
109113 print (" ✅ Saved: gtm_strategy_report.txt" )
110-
114+
111115 # 5. Financial Model Report
112116 print ("\n 5. Financial Projections Report..." )
113117 model = FinancialModel ()
114118 model .monthly_projections = financial
115119 model .calculate_break_even ()
116120 financial_report = model .generate_financial_report ()
117-
118- with open (REPORTS_DIR / ' financial_model_report.txt' , 'w' , encoding = ' utf-8' ) as f :
121+
122+ with open (REPORTS_DIR / " financial_model_report.txt" , "w" , encoding = " utf-8" ) as f :
119123 f .write (financial_report )
120124 print (" ✅ Saved: financial_model_report.txt" )
121-
125+
122126 print ()
123127 print ("=" * 80 )
124128 print (" REPORT GENERATION COMPLETE" )
@@ -140,4 +144,4 @@ def main():
140144
141145
142146if __name__ == "__main__" :
143- main ()
147+ main ()
0 commit comments