You are on page 1of 20

VIKAS The Concept School

Off Miyapur,Bahupally,Hyderabad-500090
Phones:7702900900, 9247799844

INFORMATICS PRACTICES PROJECT


XII
Prepared by

Daniel Sam Joseph


VIKAS The Concept School
Off Miyapur,Bahupally,Hyderabad-500090
Phones:7702900900, 9247799844

INFORMATICS PRACTICES PROJECT


REPORT
2023-2024
Name : ……………………….................
Class : ………………………………………
Reg.no : ……………………………………….

External Examiner Internal Examiner


VIKAS The Concept School
Off Miyapur,Bahupally,Hyderabad-500090
Phones:7702900900, 9247799844

DEPARTMENT OF COMPUTER SCIENCE

CERTIFICATE
This is to certify that this is the bonafide record
of project work done
in ................................................... Laboratory
during the academic year 2023-2024 by
Mr/Ms……………………………………………
of class XII with registration No……………………

EXTERNAL EXAMINER INTERNAL EXAMINER


ACKNOWLEDGEMENT

It is with great pleasure that I find myself penning


down these lines to express my sincere thanks to
various people helped me a long way in completing
this project.
The harmonious climate in our school provided a
proper guide for preparing the project. It was a
privilege to have been guided by Ms.P.Dhanya
Bhargavi.
I would also like to extend my gratitude to all my
faculty for helping me to complete my project
successfully.
Thanks to all my classmates who helped me during
the development of this project with their
constructive criticism and advice.

Name of the Student


Contents
S.No. Topic Page
Number
1. Abstract
2. System Requirements
3. Technology Used
a)Python
b)Pandas
c) Data Frames
d) CSV File
e) Data Visualisation and matplotlib

4. About The Project


5. Coding And Implementation
6. Bibliography
Abstract
This project is titled as “Air Quality Index AIQ”
designed using Anaconda Navigator. Its goal is
to show the quality of the air in the past nine
years (2014-2023). This is a sample Anaconda
Navigator-based analysis which is very easy to
understand.
SYSTEM REQUIREMENTS
Hardware Requirements:

Software Requirements
1.Python IDLE 3.8
2.Microsoft Excel
Technology Used
Python:

Python programming language was developed by Guido


Van Rossum in February 1991.
Python is an easy-to-learn yet powerful object-oriented
programming language.
It is a very high-level programming language yet as
powerful as many other middle-level not so high-level
languages like C, C++, Java etc.
Pandas:
Pandas is the most popular library in the scientific Python
Ecosystem for doing data analysis. Pandas is capable of many
tasks like it can read or write in many different data formats
(integer, float, double etc)
It can calculate in all the possible ways data is organised
i.e., across rows and down columns.
It can easily select subsets of data from bulky data sets
and even combine multiple datasets together.
It has functionality to find and fill missing data.
It allows you to apply operations to independent groups
within the data.
It supports reshaping of data into different forms.
It supports advanced time-series functionality (Time
series forecasting is the use of a model to predict future
values based on previously observed values).
It supports visualization by integrating matplotlib and
seaborn etc libraries.
DataFrame:
A DataFrame is a Pandas structure, which stores data in two-
dimensional way. It is a two-dimensional (tubular and
spreadsheet like) labelled array, which is an ordered
collection of columns may store different types of data,
example, Major characteristics of a DataFrame are:
It has two indexes, or we can say that two axes- a row
indexes (axis=0) and a column index (axis=1).
Conceptually it is like a spreadsheet where each value is
identifiable with the combination of row index and
column index. The row index is known as index in
general and the column index is called the column
name.
The indexes can be of numbers, letters, or strings.
There is no condition of having all data of same type
across columns; its columns can have data of different
types.
DataFrames are value-mutable (its values can be easily
changed)
DataFrames are size-mutable (rows/columns can be
easily added or deleted)
CSV File:
Refers to the tabular data saved as plain text where data
values are separated by commas. The CSV format is popular
as it offers following advantages:
A simple, compact, and ubiquitous format for data
storage.
A common format for data interchange.
It can be opened in popular spreadsheet packages like
MS-Excel, Calc etc.
Nearly all spreadsheets and databases support
import/export to csv format
Python’s Pandas Library offers two functions read_csv()
and to_csv() that help you bring data from a CSV File
into a DataFrame and write a DataFrame’s data to a CSV
File.
Data Visualization:
Data Visualization basically refers to the graphical
and visual representation of information and data
using visual elements like charts, graphs, and maps
etc.
Data Visualization is immensely useful in decision
making unveils patterns, trends, outliners,
correlation etc. in the data helping decision-makers
understand the meaning of data to drive decisions.

Matplotlib:
The matplotlib is a Python Library that provides many
interfaces and functionalities for 2D graphics.
Matplotlib is a high-quality plotting library of Python
that provides both very quick way to visualize data from
Python and publication-quality figures in many formats.
The matplotlib library offers many different names
collections of methods; PyPlot is one such interfaces, a
collection of methods within matplotlib which allows to
construct 2D plots easily and interactively.
About The Project
This project is titled as “Air Quality Index AIQ”
designed using Anaconda Navigator. Its goal is
to show top selling cars in the past nine years
(2014-2023). This is a sample Anaconda
Navigator-based analysis which is very easy to
understand.
It consists of: -
A DataFrame with dictionary of lists.
Converting the DataFrame into a csv
file.
Assigning the column names.
Using matplotlib and plotting graphs.
Coding and Implementation

DataFrame Design:
CODE:

import pandas as pd
aq={'Year':[2014,2015,2016,2017,2018,2019,2020,2021,2022,2023],\
'Delhi':[125.3,117.2,125.3,113.3,117.2,120.0,105.0,93.0,106.0,99.7],\
'Hyderabad':[36.2,34.0,32.3,29.3,29.2,27.6,30.4,33.0,26.7,29.2]}
df=pd.DataFrame(aq)
print(df)

OUTPUT:
DataFrame to CSV:
df.to_csv("C:\\Users\\rames\\Desktop\\AQI.csv ")
CODE:
import pandas as pd
aq={'Year':[2014,2015,2016,2017,2018,2019,2020,2021,2022,2023],\
'Delhi':[125.3,117.2,125.3,113.3,117.2,120.0,105.0,93.0,106.0,99.7],\
'Hyderabad':[36.2,34.0,32.3,29.3,29.2,27.6,30.4,33.0,26.7,29.2]}
df=pd.DataFrame(aq)
df.to_csv("C:\\Users\\rames\\Desktop\\AQI.csv")
print("done")

Output:
CSV to DataFrame:

CODE:
import pandas as pd
aqi=pd.read_csv("C:\\Users\\rames\\Desktop\\AQI.csv")
print(aqi)

OUTPUT:
Data Visualization

CODE:
import pandas as pd
import matplotlib.pyplot as p
df = pd.read_csv('C:\\Users\\rames\\Desktop\\AQI.csv')
df.plot(kind='line', x='Year', y=['Delhi', 'Hyderabad'], marker='o',\
color=['k', 'r'], linewidth=2, markerfacecolor='y', label=['AQI Data of Delhi', 'AQI Data of
Hyderabad'])
p.title('AQI Data Over Years in Delhi and Hyderabad')
p.xlabel('YEAR')
p.ylabel('AQI(PM2.5)')
p.ylim(0, 150)
p.xlim(2013, 2024)
p.legend(loc=1)

OUTPUT:
CODE:
import pandas as pd
import matplotlib.pyplot as p
df = pd.read_csv('C:\\Users\\rames\\Desktop\\AQI.csv')
df.plot(kind='bar', x='Year', y=['Delhi', 'Hyderabad'],\
color=['c', 'g'],width=0.8 ,label=['AQI Data of Delhi', 'AQI Data of Hyderabad'])
p.title('AQI Data Over Years in Delhi and Hyderabad')
p.xlabel('YEAR')
p.ylabel('AQI(PM2.5)')
p.legend(loc=1)

Output:
CODE:
import pandas as pd
import matplotlib.pyplot as p
df = pd.read_csv('C:\\Users\\rames\\Desktop\\AQI.csv')
df.plot(kind='barh', x='Year', y=['Delhi', 'Hyderabad'],\
color=['c', 'g'],width=0.8 ,label=['AQI Data of Delhi', 'AQI Data of Hyderabad'])
p.title('AQI Data Over Years in Delhi and Hyderabad')
p.xlabel('YEAR')
p.ylabel('AQI(PM2.5)')
p.legend(loc=1)

Output:
Bibliography:
https://urbanemissions.info/india-apna/hyderabad-
india/

https://urbanemissions.info/wp-
content/uploads/docs/2023-02-MDPI-Sus-DelhiAQ-
Review.pdf

Informatics Practices Class XII NCERT TextBook

You might also like