0% found this document useful (0 votes)
5 views

Time Task Analysis

Uploaded by

minijoseph936
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Time Task Analysis

Uploaded by

minijoseph936
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

AL ALIA INTERNATIONAL INDIAN SCHOOL RIYADH, KSA

2024-25

INFORMATICS PRACTICES

PROJECT REPORT ON

Time Task An a lys is

Submitted By:

Name:

Class: Div.

Register Number:

Date of Examination:

Center of Examination:
CERTIFICATE

This is to certify that,


………………………….……………….. of
……………………. has satisfactorily completed
the Project work of Informatics Practices prescribed by the
Central Board of Secondary Education (C.B.S.E.) course
for the year 2024-25.

Teacher-in-charge

External Examiner:

Signature:
Date:

Signature of the Principal


ACKNOWLEDGEMENT

First of all, we thank our Principal Dr. Kavitha Latha Kadhiresan and
Academic Supervisor Mr. Sreekanth. R for their motivation and
support and providing us the infrastructure and facilities for the
timely completion of our report.

It gives us immense pleasure to express our gratitude towards our


Computer Faculty in Informatics Practices Ms. Niha Shibu for all her
guidance, support and encouragement throughout the duration of
the project.
Time Task Analysis
CONTENTS


PROJECT DESCRIPTION


MODULES USED


SOFTWARE SPECIFICATION


FRONT END AND BACK END


CODING


OUTPUT SCREEN SHOTS


BIBLIOGRAPHY
Project Description:
Task Management and Analysis System

The Task Management and Analysis System is a Python-based project designed to help individuals and teams

efficiently track, manage, and analyze tasks using pandas for data handling and matplotlib for visualizing task

data. This project offers an interactive, menu-driven interface that allows users to easily add, display, search,

update, and delete tasks. It also provides advanced analytical features, such as calculating task durations,

visualizing task data through bar graphs, line graphs, and pie charts, and examining task-related trends for

better insights.

The system enables users to record key details about tasks, including task name, priority, duration, category,

completion status, and more. Each task's start and end times are tracked, allowing for real-time analysis of the

time spent on each task. The system offers various data visualizations, such as:

• Bar Graphs: To compare task durations.

• Line Graphs: To observe trends in task completion over time.

• Pie Charts: To visualize the distribution of time spent based on task priority.

Additionally, the application allows for searching tasks by specific keywords, analyzing total and average task

durations, and categorizing tasks by their priority or completion status. The system also supports task deletion,

ensuring that users can maintain an up-to-date record of their tasks.

Persistent storage is handled through CSV files, ensuring that all data is securely saved and can be accessed for

future use. This makes the system particularly useful for professionals looking to improve time management,

teams aiming to monitor project progress, or individuals seeking a better understanding of their daily

productivity.

By combining task tracking, analysis, and visualization, this project serves as a powerful tool for managing

time effectively and optimizing productivity. It also offers a solid foundation for further enhancements, such

as additional filtering options, improved error handling, and extended analysis features to provide even deeper

insights into task management.


SYSTEM SPECIFICATION


Operating System : Windows 7


Processor: Intel core i3-4150 or higher


RAM:4 GB or higher


Platform : Python IDLE 3.7


Languages:

This application is done with the help of python which includes:

(i) Python Pandas

(ii) CSV file (Comma-Separated Values)


FRONT END AND BACK END INTERFACE:

FRONT END: Python


While designing real-life applications, certain situations arise pertaining to storing some

important and necessary information by the user. Usually, the data inputted by the user along

with the generated output are displayed but are not stored, since all the program execution takes

place inside the RAM, which is a temporary memory, and as soon as we close the form, its

contents (form input and generated output) get erased. They can’t be retrieved since they are not

getting saved on a hard disk (or any secondary storage device). Thus, when the application is

executed for the second time, it requires a new set of inputs from the user. This limitation can

be overcome by sending the output generated and saving the input fetched from the user in a

database created at the back-end of the application. The input is fetched from the user using

Python Interface. This is termed as the Front End Interface of the application.

BACK END: csv File

While working with an application, it is required to save data permanently on some secondary

storage device, which is usually the hard disk, so that the data can be retrieved for future

reference, modification, deletion, etc.

A comma-separated values file is a delimited text file that uses a comma to separate values. Each

line of the file is a data record. Each record consists of one or more fields, separated by commas.

The use of the comma as a field separator is the source of the name for this file format.
CODING
import pandas as pd
import matplotlib.pyplot as plt
import datetime

# Set global font size for better readability in graphs


plt.rcParams.update({'font.size': 12})

# CSV file name for storing tasks


CSV_FILE = 'task_analysis.csv'

# Display menu for user


menu = """
Task Time Analysis - Menu
1. Add a New Task
2. Display All Tasks
3. Analyze Tasks - Graphical Representation
a. Bar Graph
b. Line Graph
c. Pie Chart
4. Search Tasks by Keyword
5. Analyze Task Duration (Total, Average)
6. Delete Task
7. Exit
"""

# Function to initialize the CSV file


def initialize_csv():
try:
# Check if file exists
pd.read_csv(CSV_FILE)
except FileNotFoundError:
# Create a file with predefined columns if it doesn't exist
df = pd.DataFrame(columns=['Task Name', 'Start Time', 'End Time', 'Duration (seconds)', 'Priority',
'Notes', 'Due Date', 'Category', 'Completed'])
df.to_csv(CSV_FILE, index=False)

# Function to add a new task


def add_task():
task_name = input("Enter the task name: ")
priority = input("Set the priority (High, Medium, Low): ")
notes = input("Add any notes for this task: ")
due_date = input("Enter the due date (YYYY-MM-DD): ")
category = input("Enter the category (e.g., Work, Personal, Health): ")
completed = input("Is the task completed? (Yes/No): ")

# Record start and end times


start_time = datetime.datetime.now()
input("Press Enter to stop the task...")
end_time = datetime.datetime.now()

# Calculate task duration in seconds


duration = (end_time - start_time).total_seconds()

# Create a new row for the task


new_row = {
'Task Name': task_name,
'Start Time': start_time.strftime('%Y-%m-%d %H:%M:%S'),
'End Time': end_time.strftime('%Y-%m-%d %H:%M:%S'),
'Duration (seconds)': duration,
'Priority': priority,
'Notes': notes,
'Due Date': due_date,
'Category': category,
'Completed': completed
}

# Append to CSV
df = pd.read_csv(CSV_FILE)
df = pd.concat([df, pd.DataFrame([new_row])], ignore_index=True)
df.to_csv(CSV_FILE, index=False)
print(f"Task '{task_name}' added successfully!\n")

# Function to display all tasks


def display_tasks():
df = pd.read_csv(CSV_FILE)
if df.empty:
print("No tasks recorded yet.\n")
else:
print("All Tasks:\n", df)

# Function to generate bar graph


def bar_graph():
df = pd.read_csv(CSV_FILE)
if df.empty:
print("No data available for graph.\n")
return

plt.bar(df['Task Name'], df['Duration (seconds)'], color='blue')


plt.xlabel("Task Name")
plt.ylabel("Duration (seconds)")
plt.title("Task Durations - Bar Graph")
plt.xticks(rotation=45)
plt.show()

# Function to generate line graph


def line_graph():
df = pd.read_csv(CSV_FILE)
if df.empty:
print("No data available for graph.\n")
return

plt.plot(df['Task Name'], df['Duration (seconds)'], marker='o', linestyle='-', color='green')


plt.xlabel("Task Name")
plt.ylabel("Duration (seconds)")
plt.title("Task Durations - Line Graph")
plt.xticks(rotation=45)
plt.show()

# Function to generate pie chart


def pie_chart():
df = pd.read_csv(CSV_FILE)
if df.empty:
print("No data available for graph.\n")
return

df_grouped = df.groupby('Priority')['Duration (seconds)'].sum()


plt.pie(df_grouped, labels=df_grouped.index, autopct='%1.1f%%', colors=['red', 'orange', 'green'])
plt.title("Time Distribution by Priority")
plt.show()

# Function to search tasks by keyword


def search_task():
keyword = input("Enter a keyword to search for: ")
df = pd.read_csv(CSV_FILE)
results = df[df['Task Name'].str.contains(keyword, case=False, na=False)]
if results.empty:
print("No tasks found matching the keyword.\n")
else:
print("Search Results:\n", results)

# Function to calculate and display task duration analysis


def analyze_task_duration():
df = pd.read_csv(CSV_FILE)
if df.empty:
print("No tasks to analyze.\n")
return

total_time = df['Duration (seconds)'].sum()


average_time = df['Duration (seconds)'].mean()
print(f"Total Time Spent on Tasks: {total_time:.2f} seconds")
print(f"Average Time Spent per Task: {average_time:.2f} seconds\n")

# Function to delete a task


def delete_task():
task_name = input("Enter the task name to delete: ")
df = pd.read_csv(CSV_FILE)
df = df[df['Task Name'] != task_name] # Filter out the task
df.to_csv(CSV_FILE, index=False)
print(f"Task '{task_name}' deleted successfully!\n")

# Main program logic


def main():
initialize_csv()
while True:
print(menu)
choice = input("Enter your choice: ").strip().lower()

if choice == '1':
add_task()
elif choice == '2':
display_tasks()
elif choice == '3a':
bar_graph()
elif choice == '3b':
line_graph()
elif choice == '3c':
pie_chart()
elif choice == '4':
search_task()
elif choice == '5':
analyze_task_duration()
elif choice == '6':
delete_task()
elif choice == '7':
print("Exiting the program. Goodbye!")
break
else:
print("Invalid choice. Please try again.\n")

if __name__ == "__main__":
main()

CSV FILE
OUTPUT SCREENSHOTS
.
Conclusion:
This script serves as a comprehensive task management and analysis tool,
designed to help users track, analyse, and visualize their task-related data.
The program allows for easy task entry, including capturing details like
task name, priority, notes, duration, and other relevant information.
Through the use of pandas and matplotlib, the application enables users
to visualize task durations in multiple forms such as bar graphs, line
graphs, and pie charts.
The key functionality of the script revolves around effectively managing
time spent on tasks. By allowing users to input and track the start and
end times for each task, it calculates the total duration spent on individual
tasks. The analysis of task durations provides valuable insights into time
management and task efficiency, which is crucial for improving
productivity.
Furthermore, the ability to categorize tasks by priority and completion
status, as well as the option to search for tasks based on specific
keywords, adds significant versatility to the tool. The task deletion feature
ensures that users can easily maintain an up-to-date task list.
Visualizing the data through graphical representations enhances the
usability of the program by offering clear insights into task patterns, time
allocation, and priority-based distribution. The graphs and charts
empower users to make informed decisions about their task management
strategies.
Overall, this task tracking system is an effective solution for individuals or
teams looking to optimize their workflow. By incorporating both time
tracking and data visualization, it provides a straightforward and
accessible way to monitor and improve productivity. However, there is
potential for enhancement, including improved error handling, input
validation, and advanced sorting features to further streamline the user
experience.

You might also like