From 996b12ab9dbae549662d02dc6a6cfe39195f15c8 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 21 Jan 2025 09:58:16 -0500 Subject: [PATCH 1/3] Add a PR section for Evans in the README. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4aa8a5..81bfdb7 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,11 @@ Predictive Analysis: Incorporate external factors such as economic conditions us ![sale_trends_over_time](/screenshots/sales_trends_over_time.png)![sale_trends_over_time_plotly](/screenshots/sales_trends_over_time_plotly.png) ![total_value_by_category](/screenshots/total_value_by_category.png)![total_value_by_category_plotly](/screenshots/total_value_by_category_plotly.png) -![passing_pytests](/screenshots/tests_passing.png) +![passing_pytests](/screenshots/tests_passing.png) + +## PR Request: + +> Initiate a PR reequest to Evans Biwott on this private repo. ## ✨ Author From a9030a3f560da7fa007ac7d58498ebf486bae948 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 21 Jan 2025 11:09:56 -0500 Subject: [PATCH 2/3] Added an insights view to get a quick glance of the 'interesting' pieces of data. --- README.md | 6 +++--- src/kwanza_tukule_analysis.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81bfdb7..123bc1f 100644 --- a/README.md +++ b/README.md @@ -159,11 +159,11 @@ Predictive Analysis: Incorporate external factors such as economic conditions us ![sale_trends_over_time](/screenshots/sales_trends_over_time.png)![sale_trends_over_time_plotly](/screenshots/sales_trends_over_time_plotly.png) ![total_value_by_category](/screenshots/total_value_by_category.png)![total_value_by_category_plotly](/screenshots/total_value_by_category_plotly.png) -![passing_pytests](/screenshots/tests_passing.png) +![passing_pytests](/screenshots/tests_passing.png)![terminal_console-outputs](/screenshots/terminal_console_output.png) -## PR Request: +## PR Request and note: -> Initiate a PR reequest to Evans Biwott on this private repo. +> Initiate a PR reequest to Evans Biwott on this private repo. Along with the console output as seen in the screenshot there are also output files in the strategic_insights_recommendations/ folder and the bonus_questions/ folder along with the browser rendering via plotly which address the assessment questions and also some are extra work particularly the **/strategic_insights_recommendations/insights_overview.txt** file. Thanks for taking your time to go througn my work! ## ✨ Author diff --git a/src/kwanza_tukule_analysis.py b/src/kwanza_tukule_analysis.py index 7c5b947..0c591c1 100644 --- a/src/kwanza_tukule_analysis.py +++ b/src/kwanza_tukule_analysis.py @@ -16,6 +16,7 @@ class KwanzaTukuleAnalysis: cleaned_data (pd.DataFrame): Cleaned dataset after removing duplicates and handling missing values. monthly_data (pd.DataFrame): Aggregated dataset for monthly trends. stats_highlights (dict): Dictionary to store key statistics. + stats_highlights (dict): Dictionary to store key statistics. """ def __init__(self, file_path, sheet_name): @@ -255,6 +256,10 @@ def generate_recommendations(self): 'UNIT PRICE': 'sum', 'QUANTITY': 'sum' }).sort_values('UNIT PRICE', ascending=False).index[0] + + # Write initial message to file + with open('strategic_insights_recommendations/insights_overview.txt', 'a') as f: + f.write(f"Top Category: {top_category}\n with highest revenue potential based on historical sales data\n") # Write product strategy recommendations to file os.makedirs('strategic_insights_recommendations', exist_ok=True) From a03b2dfebc08b3bc8c93b57cd66a9ba2fc91d4ca Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 21 Jan 2025 11:35:38 -0500 Subject: [PATCH 3/3] Added an insights view to get a quick glance of the 'interesting' pieces of data - Merge conflict resolve --- src/kwanza_tukule_analysis.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/kwanza_tukule_analysis.py b/src/kwanza_tukule_analysis.py index 0c591c1..aae6ed8 100644 --- a/src/kwanza_tukule_analysis.py +++ b/src/kwanza_tukule_analysis.py @@ -256,10 +256,6 @@ def generate_recommendations(self): 'UNIT PRICE': 'sum', 'QUANTITY': 'sum' }).sort_values('UNIT PRICE', ascending=False).index[0] - - # Write initial message to file - with open('strategic_insights_recommendations/insights_overview.txt', 'a') as f: - f.write(f"Top Category: {top_category}\n with highest revenue potential based on historical sales data\n") # Write product strategy recommendations to file os.makedirs('strategic_insights_recommendations', exist_ok=True)