0% found this document useful (0 votes)
15 views47 pages

Fin Ip

Uploaded by

vinaysree2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views47 pages

Fin Ip

Uploaded by

vinaysree2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

Informatics Practices

Employee Management System

NAME : S. Vinay
CLASS : XII-G
ROLL NO :

1
2
ACKNOWLEDGMENT:

I would like to express my special thanks to our


school Principal Mrs. Katheeja. J. A and to my IP
teacher Mrs. B.Vasupriya for supporting and leading
me by providing all valuable exhortations to do this
project on the topic Employee Management System
which was a great phase for learning out of the box.
This project involved me doing a lot of research and
I came to learn many things through this project.

3
INDEX:

S.No Contents Page. No


1 Brief Description
2 Data Set
3 Hardware Requirement
4 Software Requirement
5 Python
6 Pandas
7 Series
8 DataFrame
9 CSV
10 Tkinter
11 Matplotlib
12 Source Code
13 Output Screen
14 Data Visualisation
15 Conclusion
16 Bibliography

4
Brief Description:
This Employee Management System is a Python-
based GUI project developed using tkinter for
managing employee data efficiently. It leverages
pandas for data handling, matplotlib for data
visualization, and stores employee records in a CSV
file for persistence. The project provides the
following functionalities:
1.Add New Employees: Input employee details
like ID, Name, Position, and Salary and store
them in a CSV file.
2.Display All Employees: View all stored
employee records in a tabular format.
3.Search Employees: Find an employee using their
unique ID.
4.Remove Employees: Delete employee records
by ID.
5.Export Data: Save the current employee data
into a separate CSV file for external use.
6.Data Visualization:

5
o Display employee salaries as a line chart and
bar chart.
o Plot the distribution of employees across
departments using a histogram.
The user-friendly GUI has a slate gray background
with aquamarine text for aesthetics, and it ensures
data consistency and integrity through a file-based
system. This project is useful for small-scale
organizations or educational purposes to understand
GUI programming and data handling in Python.

6
DATA SET:

7
HARDWARE REQUIREMENTS:

 PROCESSOR : Intel core i5 12th generation


 GRAPHICS : Intel® UHD Graphics 720
 RAM : 8GB
 STORAGE : 256GB
 PEN DRIVE
 PRINTER

8
SOFTWARE REQUIREMENTS:

 OPERATING SYSTEM : Windows 11 Pro


 PYTHON 3.12.7
 MICROSOFT WORD Microsoft office LTSC
professional plus 2021
 MICROSOFT EXCEL Microsoft office LTSC
professional plus 2021

9
PYTHON:
Python is a high-level, interpreted programming
language known for its simplicity, readability, and
versatility.

Created by Guido van Rossum and released in 1991,


Python is designed to be easy to learn and use, with
a syntax that closely resembles plain English.

This makes it an ideal language for beginners, while


its powerful features are also well-suited for
experienced developers.

Python is dynamically typed, meaning that you


don\'t need to declare variable types explicitly, and
its interpreted nature allows for easier debugging
since code is executed line by line.

Python is widely used in many fields such as web


development, data science, machine learning,

10
automation, software development, etc. It has a rich
ecosystem of libraries and frameworks such as
Django for web development, Pandas and NumPy
for data analysis, and TensorFlow for machine
learning, making it incredibly versatile.

Python is also cross-platform, running on Windows,


macOS, and Linux without
significant modification. The language's large and
active community contributes to its continued
growth and support, making Python one of the most
popular and widely used programming
languages in the world today.

11
PANDAS:
Pandas is an open-source Python library primarily
used for data science. It provides powerful, flexible,
and easy-to-use data structures, such
as DataFrames and Series, that make it easy to work
with structured data such as tables and time series.
A DataFrame is a two-dimensional, labeled data
structure that can store data of different types ,such
as integers, strings, floats, in columns, much like a
spreadsheet or SQL table.
Pandas simplifies tasks such as reading and writing
data from various file formats ,for example CSV,
Excel, SQL databases, cleaning and transforming
data, handling missing values, filtering and grouping
data, and performing complex operations such
as merging and joining datasets.
Pandas is widely used in data science, machine
learning, and financial analysis
to efficiently manipulate and analyze large
datasets due to its intuitive syntax and integration
with other scientific libraries such as NumPy and
Matplotlib. Its ability to handle time-series data and
12
perform complex operations on large datasets makes
it a cornerstone of the Python data science
ecosystem.

13
SERIES:
In Pandas, a Series is a one-dimensional labeled
array capable of holding data of any type, such as
integers, floats, strings, or even Python objects.
It is similar to a list or an array, but with the added
benefit of having an associated index, which allows
for more flexible and efficient data manipulation.
Each element in the series is assigned an index,
which can be either a custom label or a default
integer index (starting at 0).
Series objects provide a wide range
of functionality, including mathematical operations,
filtering, and applying functions on an element-by-
element basis. They can be created from a variety
of data sources, including lists, NumPy arrays, or
dictionaries, and are often used to represent a single
column of data in a DataFrame.

14
Series are very efficient for working with one-
dimensional data, and their indexing capabilities
make it easy to access and modify individual items
or subsets of data. In fact, the series is usually used
for tasks such as time -series analysis, data index
creation, or higher datasets, such as extraction
of specific columns.

15
DATAFRAME:
In Pandas, a DataFrame is a two-dimensional labeled
data structure, essentially an array of rows
and columns similar to a spreadsheet or SQL table.
It is the most commonly used object in Pandas for
data science.
The data frame may contain different types of data ,
namely: whole, float, line, etc., in each column, and
each column is displayed as
a series. DataFrames can perform powerful
operations such as data indexing,
filtering, changing, grouping, and fusion.
This is ideal for operating structured data.
They can be created from a variety of data
sources such as CSV files, Excel spreadsheets, SQL
databases, Python dictionaries, etc.
A DataFrame's labels, also known as indexes, make
it easy to reference data by rows and
columns, making it more flexible compared to
traditional tables.

16
DataFrame also supports handling missing data
and allows for vectorized operations, enabling
efficient computations on large data sets. Due
to its intuitive structure and wide range of
capabilities, DataFrame is widely used in data
analysis, machine learning, financial analysis, and
many other fields.

17
CSV:
CSV (Comma Separated Values) is a simple and
widely used file format for storing and exchanging
tabular data.
Each line in the file represents one row, and each
value within a row is separated by a comma.
The format is in plain text, making it easy for
humans and machines to read and write. CSV files
are usually used to display data such as spreadsheets,
databases, and lists, and can be easily opened and
edited with applications such as Microsoft
Excel and Google sheets. Each line in the CSV
file supports data records, and the first row often
contains headlines that determine the column
name. CSV is a popular choice for data exchange
due to its simplicity and compatibility with a wide
range of software, and is supported by most
programming languages, including Python, which
provides libraries such as Pandas to easily read and
write CSV files.

18
Although CSV files do not support advanced
features such as formatting, data types, or data
relationships, their simplicity, ease of use, and
compatibility with many tools and platforms make
them widely used.

19
TKINTER:

Tkinter is a standard Python library for creating


graphical user interfaces (GUIs).

It acts as a bridge between Python and the Tk GUI


toolkit, enabling developers to easily
develop interactive applications. Tkinter is cross-
platform, works well on Windows, macOS, and
Linux, and comes pre-installed with Python, making
it easily accessible
without any additional configuration. It provides a
wide range of widgets that can be used to create
user-friendly interfaces, including buttons, labels,
text boxes, and menus. Its simplicity and intuitive
syntax make it ideal for beginners, while flexibility
allows you to create more complex applications.

In addition, developers can configure provisions,


styles and event processing to respond
to specific applications.

20
Due to its efficiency and easy integration with
Python, Tkinter is widely used for
desktop applications including utilities such
as calculators, text editors, and basic tools.

21
MATPLOTLIB:
Matplotlib is a powerful and widely used Python
library for creating static, animated and interactive
visualizations in a variety of forms such as
line graphs, bar charts, histograms, scatter
plots, etc. It provides a flexible and customizable
framework for creating high-quality charts,
graphs, and graphics for visual representation of
data.
The main component of Matplotlib is
the PYPLOT module, which offers
a matrix interface for creating and
manipulating graphs in a simple, intuitive way.
Users can manage all aspects of the plot, from the
style and color of the lines to marks, names and axis.
Library supports various output formats, such
as PNG, PDF, SVG, and interactive format running
on
the web browser or graphic user interface. Matplotli
b is often used in data analysis, scientific research,
and automatic learning, and supports data research,
expression, and interpretation. It easily integrates
22
with other Python libraries such as NumPy for
numerical data and Pandas for working with tabular
datasets, making it an ideal choice for
data visualization in a wide range of domains.

23
SOURCE CODE:
import pandas as pd
import tkinter as tk
from tkinter import messagebox
import matplotlib.pyplot as plt
import csv

Employeedata = {}

#About The Project


print("This Project is Developed by S.Vinay on
Employee Management System")
print("It contains 8 Options and Uses a CSV file for
Data Storage")
print("This Projects uses 4 Libraries : pandas ,
tkinter , matplotlib , csv")
print("This is a GUI project")

#Function To Load The Data


24
def load_data():
try:
return pd.read_csv('EMP.csv')
except FileNotFoundError:
return pd.DataFrame(columns=['ID', 'Name',
'Position', 'Salary'])

#Function To Save The Data


def save_data(df):
df.to_csv('EMP.csv', index=False)

#Function to Display All Employee


def display_employees():
df = load_data()
messagebox.showinfo("Employee Details",
df.to_string(index=False))

#Function To Add A New Employee


def add_employee():
25
Employeedata['ID'] = id_entry.get()
Employeedata['Name'] = name_entry.get()
Employeedata['Position'] =
Department_entry.get()
Employeedata['Salary'] = float(salary_entry.get())
df = load_data()

df_new = pd.DataFrame(Employeedata,
index=[0])
df = pd.concat([df, df_new], ignore_index=True)
save_data(df)

messagebox.showinfo("Success", "Employee
added successfully!")

#Function To Remove An Existing Employee


def remove_employee():
df = load_data()
26
df = df[df['ID'] != id_entry.get()]
save_data(df)
messagebox.showinfo("Success", "Employee
removed successfully!")

#Function To Search For a Employee Using Their


ID
def search_employee():
df = load_data()
emp_id = id_entry.get()
result = df[df['ID'] == emp_id]
if not result.empty:
messagebox.showinfo("Employee Found",
result.to_string(index=False))
else:
messagebox.showinfo("Not Found",
"Employee not found.")

#Function To Export Data To Another CSV File


27
def export_data():

df = load_data()

if df.empty:
messagebox.showwarning("No Data", "No
employee data available to export.")
return

file_path = "employee_data_export.csv"

df.to_csv(file_path, index=False)

messagebox.showinfo("Export Success",
f"Employee data successfully exported to
{file_path}")

28
#Function To Display Line Graph of Salaries
def display_salaries_line():
df = load_data()

if df.empty:
messagebox.showwarning("No Data", "No
employee data available.")
return

plt.plot(df['Name'], df['Wage'],
marker='*',color='g')
plt.title('Salaries of Employees (Line Chart)')
plt.xlabel('Employee Names')
plt.ylabel('Salaries')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()

#Function To Display Bar Graph Of Salaries

29
def display_salaries_bar():
df = load_data()

if not df.empty:

plt.bar(df['Name'],df['Wage'],color='r')

plt.title('Salaries of Employees')
plt.xlabel('Employee Names')
plt.ylabel('Salaries')

plt.tight_layout()
plt.show()

#Function To Display Histogram of Number of


Employees Per Department
def display_DeptNo_histogram():
df = load_data()

30
if df.empty:
messagebox.showwarning("No Data", "No
employee data available.")
return

plt.hist(df['Department'], bins=10,
edgecolor='black')
plt.title('Salary Distribution (Histogram)')
plt.xlabel('Salary')
plt.ylabel('Number of Employees')
plt.tight_layout()
plt.show()

#Initialise The GUI and Set Background Color


root = tk.Tk()
root.configure(background="slate gray")
root.title("Employee Management System")

31
#Add The Buttons And Add Color, Update Font
tk.Label(root, font=('Times New
Roman',10,'bold'),bg='slate gray',
fg='aquamarine',text="ID:").grid(row=0, column=0)
id_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
id_entry.grid(row=0, column=1)

tk.Label(root, font=('Times New


Roman',10,'bold'),bg='slate gray',
fg='aquamarine',text="Name:").grid(row=1,
column=0)
name_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
name_entry.grid(row=1, column=1)

tk.Label(root, font=('Times New


Roman',10,'bold'),bg='slate gray',
fg='aquamarine',text="Position:").grid(row=2,
column=0)

32
Department_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
Department_entry.grid(row=2, column=1)

tk.Label(root, font=('Times New


Roman',10,'bold'),bg='slate gray',
fg='aquamarine',text="Salary:").grid(row=3,
column=0)
salary_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
salary_entry.grid(row=3, column=1)

tk.Button(root, bg='slate gray',


fg='aquamarine',text="Display Employees",
font=('Times New Roman',10,'bold'),
command=display_employees).grid(row=4,
column=0)
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Add Employee", font=('Times
New Roman',10,'bold'),
command=add_employee).grid(row=4, column=1)
33
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Remove Employee",
font=('Times New Roman',10,'bold'),
command=remove_employee).grid(row=5,
column=0)
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Search Employee",
font=('Times New
Roman',10,'bold'),command=search_employee).grid(
row=5, column=1)
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Export Data", font=('Times
New
Roman',10,'bold'),command=export_data).grid(row=
6, column=0, columnspan=2)

tk.Button(root, bg='slate gray',


fg='aquamarine',text="Display Salaries as Line
Chart", font=('Times New
Roman',10,'bold'),command=display_salaries_line).g
rid(row=7, column=0, columnspan=2)
34
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Display Salaries as Bar
Chart", font=('Times New
Roman',10,'bold'),command=display_salaries_bar).g
rid(row=8, column=0, columnspan=2)
tk.Button(root, bg='slate gray',
fg='aquamarine',text="Display Number of
Employees per Department", font=('Times New
Roman',10,'bold'),command=display_DeptNo_histo
gram).grid(row=9, column=0, columnspan=2)

root.mainloop()

OUTPUT SCREEN:

35
36
37
38
39
40
CSV Files:
41
EMP.csv

42
employee_data_export.csv

DATA VISUALISATION:
43
44
45
CONCLUSION:
A GUI-based Employee Management System is a
highly effective solution for modern workforce
management. Its intuitive interface simplifies tasks
such as attendance tracking, payroll processing, and
performance evaluation, reducing the time and effort
required for these operations. By minimizing errors
through automation it ensures data accuracy and
operational efficiency.
The system's ability to present real-time data and
analytics in a visual format aid in better decision-
making, enabling managers to address workforce
needs proactively.
By automating repetitive tasks and creating
transparent processes, the system not only boosts
productivity but also enhances employee satisfaction
and trust.
Ultimately, a GUI-based EMS helps organizations
maintain a well-organized, motivated workforce and
provides a foundation for sustained growth and
efficiency.

46
BIBLIOGRAPHY:

https://pandas.pydata.org/docs/index.html

https://www.scaler.com/topics/matplotlib/
matplotlib-in-python/

NCERT IP Textbook

47

You might also like