diff --git a/README.md b/README.md index 597b39b44..d2616bdeb 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,68 @@ frame (3) -# [Project Name] 🎯 +# [Oru Vazha Calculation!] 🎯 ## Basic Details -### Team Name: [Name] +### Team Name: techNOLOGIC ### Team Members -- Team Lead: [Name] - [College] -- Member 2: [Name] - [College] -- Member 3: [Name] - [College] +- Team Lead: Sofiya B - College of Engineering, Attingal +- Member 2: Niranjan S - College of Engineering, Attingal ### Project Description -[2-3 lines about what your project does] +Our parents always say "Oru vaazha vechal mathi aayirunnu.." We usually laugh and ignore it..But what if it was another timeline? What if our parents planted a vaazha instead.? We took that question seriously and worked for the solution.. + ### The Problem (that doesn't exist) -[What ridiculous problem are you solving?] +-Many of us often reflect on life choices and wonder, “What if things were different?”. +In a lighthearted context, we questioned: What if parents invested in something simple and sustainable, like planting a plantain tree on the day their child was born? +How much profit could that decision have generated today? +======= ### The Solution (that nobody asked for) -[How are you solving it? Keep it fun!] +-"Born or Grown...what's more profitable?" +Oru vazha is a fun web app that humorously estimates how much profit your parents could have earned if they had planted a plaintain tree on the day you born.Our "oru vazha calculation" is an interactive and humorous web application that: + +Collects user details (Name, Date of Birth, Place, and Tea/Coffee preference). + +Simulates analysis with witty loading messages (“Regressing… Regretting… Questioning life choices…”). + +Delivers a fun, nostalgic profit estimation of what a single plantain tree could have earned. + + +This solution turns a simple “what if” scenario into an engaging experience that blends humor, user interaction, and awareness of long-term investments and sustainability. ## Technical Details ### Technologies/Components Used For Software: -- [Languages used] -- [Frameworks used] -- [Libraries used] -- [Tools used] +- Python,HTML +- Flask,CORS +- pandas For Hardware: -- [List main components] -- [List specifications] -- [List tools required] +NIL ### Implementation -For Software: +For Software:VS code,GitHub # Installation -[commands] +-CORS +-pip # Run -[commands] +-website hosting ### Project Documentation For Software: # Screenshots (Add at least 3) -![Screenshot1](Add screenshot 1 here with proper name) -*Add caption explaining what this shows* + -![Screenshot2](Add screenshot 2 here with proper name) -*Add caption explaining what this shows* + -![Screenshot3](Add screenshot 3 here with proper name) -*Add caption explaining what this shows* + # Diagrams ![Workflow](Add your workflow/architecture diagram here) @@ -81,16 +89,18 @@ For Hardware: ### Project Demo # Video -[Add your demo video link here] -*Explain what the video demonstrates* + + + # Additional Demos [Add any extra demo materials/links] ## Team Contributions -- [Name 1]: [Specific contributions] -- [Name 2]: [Specific contributions] -- [Name 3]: [Specific contributions] +- [Sofiya B]: [Frontend,Documentation,Motivation] +- [Niranjan S]: [backend,Project Idea,data collection] --- Made with ❤️ at TinkerHub Useless Projects diff --git a/Recording 2025-08-02 163504.mp4 b/Recording 2025-08-02 163504.mp4 new file mode 100644 index 000000000..2b93110fd Binary files /dev/null and b/Recording 2025-08-02 163504.mp4 differ diff --git a/Screenshot 2025-08-02 160801.png b/Screenshot 2025-08-02 160801.png new file mode 100644 index 000000000..373499b8e Binary files /dev/null and b/Screenshot 2025-08-02 160801.png differ diff --git a/Screenshot 2025-08-02 163913.png b/Screenshot 2025-08-02 163913.png new file mode 100644 index 000000000..b2c6ddcf4 Binary files /dev/null and b/Screenshot 2025-08-02 163913.png differ diff --git a/Screenshot 2025-08-02 164959.png b/Screenshot 2025-08-02 164959.png new file mode 100644 index 000000000..1de5daa26 Binary files /dev/null and b/Screenshot 2025-08-02 164959.png differ diff --git a/Simulation.py b/Simulation.py new file mode 100644 index 000000000..95a6b6d5a --- /dev/null +++ b/Simulation.py @@ -0,0 +1,60 @@ +import pandas as pd +from datetime import datetime, timedelta + +SAPLING_COST = 50 +FERTILIZER_COST_PER_KG = 0.5 +CYCLE_MONTHS = 12 + +# Load your data once +DATA = pd.read_csv('C:/Users/Niranjan S/Useless Projects/Data Models/banana_growth_kerala_updated.csv') + +def simulate_growth(start_date_str): + current_date = datetime.today() + planting_date = datetime.strptime(start_date_str, "%Y-%m-%d") + + current_trees = 1 + total_profit = 0 + history = [] + + date = planting_date + while date <= current_date: + year = date.year + month = date.month + + row = DATA[(DATA["Year"] == year) & (DATA["Month"] == month)] + if row.empty: + break + + row = row.iloc[0] + yield_per_tree = row["Yield_per_Tree_kg"] + market_price = row["Market_Price_per_kg"] + fertilizer_kg = row["Fertilizer_Used_kg"] + suckers_per_tree = row["Suckers_per_Tree"] + + income = current_trees * yield_per_tree * market_price + fertilizer_cost = fertilizer_kg * current_trees * FERTILIZER_COST_PER_KG + profit = income - fertilizer_cost + + suckers_generated = int(current_trees * suckers_per_tree) + saplings_from_profit = int(profit // SAPLING_COST) + + new_trees = suckers_generated + saplings_from_profit + total_profit += profit + + history.append({ + "Cycle": date.strftime("%Y-%m"), + "Trees": current_trees, + "Income": round(income), + "Profit": round(profit), + "Total_Profit": round(total_profit), + "New_Trees": new_trees + }) + + current_trees = new_trees + date += timedelta(days=30 * CYCLE_MONTHS) + + return { + "profit": round(total_profit), + "history": history + } + diff --git a/__pycache__/Simulation.cpython-312.pyc b/__pycache__/Simulation.cpython-312.pyc new file mode 100644 index 000000000..6ae741a86 Binary files /dev/null and b/__pycache__/Simulation.cpython-312.pyc differ diff --git a/__pycache__/simulation2.cpython-312.pyc b/__pycache__/simulation2.cpython-312.pyc new file mode 100644 index 000000000..b68dde460 Binary files /dev/null and b/__pycache__/simulation2.cpython-312.pyc differ diff --git a/app.py b/app.py new file mode 100644 index 000000000..44952fa56 --- /dev/null +++ b/app.py @@ -0,0 +1,28 @@ +from flask import Flask, request, jsonify +from flask_cors import CORS +from Simulation import simulate_growth +import traceback # Add this + +app = Flask(__name__) +CORS(app) + +@app.route("/") +def home(): + return "✅ Banana Simulation API is running. Use /simulate?date=YYYY-MM-DD" + +@app.route("/simulate", methods=["GET"]) +def simulate_route(): + start_date = request.args.get('date') + if not start_date: + return jsonify({"error": "Missing date parameter"}), 400 + + try: + result = simulate_growth(start_date) + return jsonify(result) + except Exception as e: + traceback.print_exc() # 🔍 This shows the actual error in the console + return jsonify({"error": str(e)}), 500 + +if __name__ == "__main__": + app.run(debug=True, host="0.0.0.0", port=5000) + diff --git a/app2.py b/app2.py new file mode 100644 index 000000000..8020ce860 --- /dev/null +++ b/app2.py @@ -0,0 +1,27 @@ +from flask import Flask, request, jsonify +from flask_cors import CORS +from simulation2 import simulate_growth +import traceback + +app = Flask(__name__) +CORS(app) + +@app.route("/") +def home(): + return "✅ Banana & Child Simulation API is running. Use /simulate?date=YYYY-MM-DD" + +@app.route("/simulate", methods=["GET"]) +def simulate_route(): + start_date = request.args.get('date') + if not start_date: + return jsonify({"error": "Missing date parameter"}), 400 + + try: + result = simulate_growth(start_date) + return jsonify(result) + except Exception as e: + traceback.print_exc() + return jsonify({"error": str(e)}), 500 + +if __name__ == "__main__": + app.run(debug=True, host="0.0.0.0", port=5000) diff --git a/desktop.ini b/desktop.ini new file mode 100644 index 000000000..c5390456c --- /dev/null +++ b/desktop.ini @@ -0,0 +1,2 @@ +[LocalizedFileNames] +Screenshot 2025-08-02 164959.png=@Screenshot 2025-08-02 164959,0 diff --git a/index.html b/index.html new file mode 100644 index 000000000..2c06201ac --- /dev/null +++ b/index.html @@ -0,0 +1,188 @@ + + + + + + Plantain Profit Predictor + + + + + +
+

Oru vazha Calculation

+

For our beloved parent...

+ +
+ + +
+

If your parents had planted a plantain tree on your birthday...

+

We will predict the profit 🍌

+ Make it funny, make it nostalgic... and slightly life questioning 😅 +

+
+
+
+
+
+ +
+
+ + +
+
🍌
+
Loading...
+
+ + +
+

+

Signing off,
Sofiya & Niranjan
Team Tech No Logic

+ +
+ + + + + diff --git a/simulation2.py b/simulation2.py new file mode 100644 index 000000000..1bf7391ad --- /dev/null +++ b/simulation2.py @@ -0,0 +1,64 @@ +import random +import pandas as pd +from datetime import datetime, timedelta + +SAPLING_COST = 50 +FERTILIZER_COST_PER_KG = 0.5 +CYCLE_MONTHS = 12 +#heyhey +# Load data once +BANANA_DATA = pd.read_csv("C:/Users/Niranjan S/Useless Projects/Data Models/banana_growth_kerala_1990_2025_monthly_YM.csv") +CHILD_COST_DATA = pd.read_csv("C:/Users/Niranjan S/Useless Projects/Data Models/child_lifecycle_cost_simulation.csv") + +def simulate_growth(start_date_str): + planting_date = datetime.strptime(start_date_str, "%Y-%m-%d") + current_date = datetime.today() + + date = planting_date + current_trees = 1 + total_profit = 0 + age = 0 + history = [] + + while date <= current_date: + year = date.year + month = date.month + + row = BANANA_DATA[(BANANA_DATA["Year"] == year) & (BANANA_DATA["Month"] == month)] + if row.empty or age >= len(CHILD_COST_DATA): + break + + row = row.iloc[0] + yield_kg = row["Yield_per_Tree_kg"] + price = row["Market_Price_per_kg"] + fertilizer_kg = row["Fertilizer_Used_kg"] + suckers = row["Suckers_per_Tree"] + income = current_trees * yield_kg * price + fertilizer_cost = current_trees * fertilizer_kg * FERTILIZER_COST_PER_KG + child_cost = CHILD_COST_DATA.loc[CHILD_COST_DATA["Age"] == age, "Yearly_Expenditure_INR"].values[0] + profit = income - fertilizer_cost - child_cost + suckers_generated = int(current_trees * suckers) + total_profit = random.randint(10000000, 99999999) + saplings_from_profit = int(profit // SAPLING_COST) + new_trees = suckers_generated + saplings_from_profit + + history.append({ + "Cycle": date.strftime("%Y-%m"), + "Age": age, + "Trees": current_trees, + "Income": round(income), + "Fert_Cost": round(fertilizer_cost), + "Child_Cost": round(child_cost), + "Profit": round(profit), + "Total_Profit": round(total_profit), + "New_Trees": new_trees + }) + + current_trees = new_trees + age += 1 + date += timedelta(days=30 * CYCLE_MONTHS) + + return { + "total_profit": total_profit, + "history": history + } diff --git a/tempCodeRunnerFile.py b/tempCodeRunnerFile.py new file mode 100644 index 000000000..3494c5ece --- /dev/null +++ b/tempCodeRunnerFile.py @@ -0,0 +1,54 @@ +def simulate_growth(start_date_str): + planting_date = datetime.strptime(start_date_str, "%Y-%m-%d") + current_date = datetime.today() + + date = planting_date + current_trees = 1 + total_profit = 0 + age = 0 + history = [] + + while date <= current_date: + year = date.year + month = date.month + + row = BANANA_DATA[(BANANA_DATA["Year"] == year) & (BANANA_DATA["Month"] == month)] + if row.empty or age >= len(CHILD_COST_DATA): + break + + row = row.iloc[0] + yield_kg = row["Yield_per_Tree_kg"] + price = row["Market_Price_per_kg"] + fertilizer_kg = row["Fertilizer_Used_kg"] + suckers = row["Suckers_per_Tree"] + + income = current_trees * yield_kg * price + fertilizer_cost = current_trees * fertilizer_kg * FERTILIZER_COST_PER_KG + child_cost = CHILD_COST_DATA.loc[CHILD_COST_DATA["Age"] == age, "Yearly_Expenditure_INR"].values[0] + profit = income - fertilizer_cost - child_cost + + suckers_generated = int(current_trees * suckers) + saplings_from_profit = int(profit // SAPLING_COST) + new_trees = suckers_generated + saplings_from_profit + total_profit += profit + + history.append({ + "Cycle": date.strftime("%Y-%m"), + "Age": age, + "Trees": current_trees, + "Income": round(income), + "Fert_Cost": round(fertilizer_cost), + "Child_Cost": round(child_cost), + "Profit": round(profit), + "Total_Profit": round(total_profit), + "New_Trees": new_trees + }) + + current_trees = new_trees + age += 1 + date += timedelta(days=30 * CYCLE_MONTHS) + + return { + "total_profit": round(total_profit), + "history": history + } \ No newline at end of file