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

Project

The document thanks various individuals and organizations that supported the successful completion of a wildlife data analysis project. It acknowledges the guidance of the school principal and teacher, access to bird sighting data from eBird, and support from friends and family. The project aimed to analyze and compare bird sighting data during the COVID period to the present day.

Uploaded by

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

Project

The document thanks various individuals and organizations that supported the successful completion of a wildlife data analysis project. It acknowledges the guidance of the school principal and teacher, access to bird sighting data from eBird, and support from friends and family. The project aimed to analyze and compare bird sighting data during the COVID period to the present day.

Uploaded by

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

1

Acknowledgements

I extend my heartfelt gratitude to everyone who contributed to the successful completion of


this project. This endeavour would not have been possible without the support, guidance,
and collaboration of various individuals.
First and foremost, I express my sincere thanks to Mrs Rupan Jaiswal, principal Army Public
School Kirkee for giving me this opportunity. Secondly, I would like to thank Mrs Sandhya
Lad, my IP teacher, for providing invaluable insights, continuous encouragement, and expert
guidance throughout the development process. Her mentorship has been instrumental in
shaping the project and enhancing its overall quality.
I extend my appreciation to eBird for exceeding my request for granting access to their
database and permissions to access data essential for the completion of this project. The
collaborative environment fostered by my school Army Public School Kirkee played a crucial
role in the project's overall success.
I would like to acknowledge the support of my friends and family who supported me to bring
this program to life.

Thank you to all who I could not mention for being part of this journey and contributing
towards the realization of this project.

Sincerely,
Ritwik Gupta
XII- A
2

Table of Contents
S. No.
Topic
Page
1.
ACKNOWLEDGEMENT
1
2.
SYSTEM SPECIFICATIONS
3
3.
SOFTWARE USED
4
4
ABOUT THE PROJECT
5
5
Main.py

6-7
6
CSV FILE
8
7
Menu.py
9
8
VISUALIZE
10

BAR CHART
11

LINE CHART
3

12

HORIZONTAL BARGRAPH
13

LINE CHART
14

RETURN TO MAIN MENU


15
9
READ
16
10
DELETE ROW
17
11
DELETE COLUMN
18
12
ADD COLUMN
19
13
VIEW COLUMN
20
14
VIEW ROW
21
15
APPEND
22
16
BIBLIOGRAPHY
23
4

System Specifications

Hardware:

Software:
5

Software Used

PYTHON
Python, established in 1991 by Guido van Rossum, stands out as a user-friendly and
adaptable high-level programming language widely embraced by both
novices and seasoned developers. Renowned for its readability and
uncomplicated syntax, Python employs whitespace indentation for code
structure, deviating from conventional symbols like curly brackets. This
unique approach fosters clean and visually accessible code.
Python accommodates diverse programming paradigms, including
procedural, object-oriented, and functional programming, providing
developers with the flexibility to choose the most suitable method
for their projects. The language boasts an extensive standard library,
offering a plethora of modules and packages that expedite development by providing pre-
built solutions for common tasks. Additionally, Python's collaborative and community-driven
nature has resulted in a vast ecosystem of third-party libraries and frameworks, exemplified
by Django for web development, NumPy for scientific computing, and TensorFlow for
machine learning.
Recognized for cross-platform compatibility, Python ensures seamless execution on various
operating systems without necessitating modifications. Its interpreted nature facilitates swift
development cycles and straightforward debugging. Python's applications span a wide
spectrum, encompassing web development, data science, artificial intelligence, and
automation.
Python's recent surge in popularity can be attributed to its pivotal role in emerging
technologies and disciplines, solidifying its standing as the preferred language for a diverse
array of programming tasks.

CSV

CSV, or Comma-Separated Values, is a widely used file format for storing and exchanging
tabular data in a plain text format. The simplicity and universality of CSV
make it a popular choice for data storage and interchange between different
applications. In a CSV file, each line typically represents a row of data, and
individual values within a row are separated by commas.
The structure of a CSV file is straightforward, making it human-readable
and easy to create and modify using a simple text editor. While commas
are the most common delimiter, other characters like tabs or semicolons
can also be used depending on the specific requirements.
CSV files find extensive use in various domains, including data analysis, data import/export,
and spreadsheet applications. They provide a convenient way to represent structured data,
such as database exports or spreadsheet content, without the complexity of proprietary file
6

formats. Many programming languages, including Python, offer built-in libraries and
modules for efficiently reading and writing data in CSV format, further contributing to its
widespread adoption in software development.

About the project

Since childhood I have always been passionate about


wildlife photography. When this opportunity of creating a
program was brought presented to me, naturally I moulded this
project as to something related to Wildlife.

Animals are bigger and therefore more noticed and


widely known. But the average person can hardly identify more
than 3 birds. Birds are neglected and their conservation is not
really an attractive agenda in India. Birds, animals and nature in
general thrived during the COVID-19 pandemic and the irony
was that while we humans were trapped in our homes, wildlife
enjoyed their short-lived unrestricted freedom. We all noticed
the clean air, and more wildlife intrusions near urban life.

A perception emerged that the sightings of fauna


including birds increased even in urban areas in the COVID
duration and the period that followed. This belief was
strengthened due to the reduction of movements of vehicles and
other anthropogenic activities.

To validate this theory this python-based program aims


to analyze and compare data on sighting of birds during the
COVID period and the present day advocating for increased
awareness and conservation efforts. The database utilized for
this exercise has been drawn from a popular online citizen
science bird sightings project called eBird
7

Main.py
CODE:

import pandas as pd
import matplotlib.pyplot as plt
import menu as d
choice = d.main_menu()
aa=pd.read_csv(r"C:\Users\ritwi\Desktop\Grade 12\IP Project\Files\csvfile.csv")
while True:
if choice == "visualize": # Menu for choosing type of graph to see
print("Enter Choice to View the Type of Chart")
print("1 Bar-Chart \n2 Line-Chart \n3 Horizontal Bar-Chart \n4 Histogram \n5 Go back
to the Main Menu")
c=int(input(" Desired Type of Chart : "))
if c == 1:
aa.plot(kind="bar",x='name', width=0.7)
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()
elif c == 2:
aa.plot()
aa.xlabel = 'name of bird'
aa.ylabel = 'winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()
elif c == 3:
aa.plot(kind="barh", x='name', width=1.0)
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()
elif c == 4:
aa.plot(kind="hist",x='winter-2021', bins=15, histtype="step")
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()
elif c == 5:
choice=d.main_menu()
else:
print("wrong choice")
break
8

elif choice == "read":


print(aa)
break
elif choice == "deleteR": # to delete a row
data = pd.read_csv('C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv',
index_col ="name")
print(data)
nm=input("\nEnter name to delete : ")
data.drop([nm],inplace = True)
print("\n", data)
break
elif choice == "deleteC": # to delete a column
data = pd.read_csv("C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv",
index_col ="name" )
data.drop(["winter-2021"],axis =1,inplace = True)
print(data)
break
elif choice == "addC": # to add a column
aa['rarity'] = pd.Series(['R','C','C'])
print(aa)
break
elif choice == "viewC": # to view a single column
ncol=["name", "winter-2021", "winter-2023"]
ncol=input("Enter name of column to view : ")
print(aa[ncol])
break
elif choice == "viewR": # to view a single row nrow=int(input("Enter row no. to view: "))
nrow=int(input('Enter row number to view : '))
print(aa.loc[nrow])
break
elif choice == "append": # append a single row at the end of csv file
df = open("C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv", 'a') #
opening file in append mode "a"
df.write("Thick-Knee, 5,4 \n")
df.close()
print(aa)
break
else:

break
9

CSV FILE
10

menu.py
CODE:

def main_menu():
print("visualize --to visualize data in csv:")
print("read --to read a csv file")
print("deleteR --to delete a row from csv file")
print("addC --to add column to csv file")
print("deleteC --to delete a column from csv file")
print("viewC --to view a column from csv file")
print("viewR --to view a row from csv file")
print("append --to append a row in csv file")
print()
print()
ch=input("\nEnter your choice to process:")
return(ch)

OUTPUT:
11

VISUALIZE
CODE:

choice = d.main_menu()
aa=pd.read_csv(r"C:\Users\ritwi\Desktop\Grade 12\IP Project\Files\csvfile.csv")
while True:
if choice == "visualize": # Menu for choosing type of graph to see
print("Enter Choice to View the Type of Chart")
print("1 Bar-Chart \n2 Line-Chart \n3 Horizontal Bar-Chart \n4 Histogram \n5 Go back
to the Main Menu")
c=int(input(" Desired Type of Chart : "))

OUTPUT:
12

1. Bar-Chart
CODE:

if c == 1:
aa.plot(kind="bar",x='name', width=0.7)
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()

OUTPUT
13

2. Line-Chart
CODE:

elif c == 2:
aa.plot()
aa.xlabel = 'name of bird'
aa.ylabel = 'winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()

OUTPUT
14

3. Horizontal Bar-Graph

CODE:

elif c == 3:
aa.plot(kind="barh", x='name', width=1.0)
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()

OUTPUT
15

4. Histogram

CODE:

elif c == 4:
aa.plot(kind="hist",x='winter-2021', bins=15, histtype="step")
aa.xlabel='name of bird'
aa.ylabel='winter-2021'
plt.title("Bird Statistics Comparision in An Area over a Period of Time")
plt.show()

OUTPUT
16

5. Return To Main Menu


CODE:

elif c == 5:
choice=d.main_menu()

OUTPUT:
17

READ

CODE:

elif choice == "read":


print(aa)
break

OUTPUT:
18

DELETE ROW

CODE:

elif choice == "deleteR": # to delete a row


data = pd.read_csv('C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv',
index_col ="name")
print(data)
nm=input("\nEnter name to delete : ")
data.drop([nm],inplace = True)
print("\n", data)
break

OUTPUT:

will
delete
this
entry
19

DELETE COLUMN

CODE:

elif choice == "deleteC": # to delete a column


data = pd.read_csv("C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv",
index_col ="name" )
data.drop(["winter-2021"],axis =1,inplace = True)
print(data)
break

OUTPUT:
20

ADD COLUMN

CODE:

elif choice == "addC": # to add a column


aa['rarity'] = pd.Series(['R','C','C'])
print(aa)
break

New
Column
Added
OUTPUT:
21

VIEW COLUMN

CODE:

ncol=["name", "winter-2021", "winter-2023"]


ncol=input("Enter name of column to view : ")
print(aa[ncol])
break

OUTPUT:
22

VIEW ROW

CODE:

elif choice == "viewR": # to view a single row nrow=int(input("Enter row no. to view: "))
nrow=int(input('Enter row number to view : '))
print(aa.loc[nrow])
break

OUTPUT:
23

APPEND

CODE:

elif choice == "append": # append a single row at the end of csv file
df = open("C:\\Users\\ritwi\\Desktop\\Grade 12\\IP Project\\Files\\csvfile.csv", 'a') #
opening file in append mode "a"
df.write("Thick-Knee, 5,4 \n")
df.close()
print(aa)
break

OUTPUT:
24

BIBLOGRAPHY

1. https://ebird.org/

2. https://www.wwfindia.org/

3. https://www.bnhs.org/

4. https://en.wikipedia.org/wiki/Bhigwan

5. www.geeksforgeeks.org

6. Cover photo and other pictures- ©RitwikGupta

You might also like