This is Laksh Jain's DCC Assignment 4 website
To run the code successfully, please make sure that you have these python libraries pre installed:
1] PyMuPDF
2] Pandas
3] Flask
4] Flask-MySQLdb
PART1
Please download the following PDF's and run the 'PDF to CSV conversion.py':
1] Bonds encashed by political parties
2] Bonds purchased by Individuals and Companies
This is the PDF to CSV Conversion code:
Since the database is very large, the conversion process takes lot of time. Please wait patiently.(Max time: 10min for both files) The CSV files are saved.
PART2
Open MYSQL Workbench
Create a new database called 'electoral_bond'
Import the tables using the 'Table Import Wizard'
Keep clicking next until the tables are imported.
Change the Mysql user and password to your Mysql user and password to establish a successful connection to backend.
LINK TO WEBSITE: http://127.0.0.1:5000/
Select the option according to which table you want to search. If you want to search the table 'Bonds encashed by political parties' then click the first option. If you want to search the table 'Bonds purchased by Individuals and Companies' then click the second option.
We can search both the tables according to any column including bond number. There is also a button to CLEAR and another button HOME to redirect to homepage.
Select 'Total Values of Bonds Purchased by Individual/Companies' to select a Company/Individual from a drop-down/search, and show how many bonds and the total value of bonds purchased per year.
There is also a Bar graph and option to save the png/jpeg.
Select 'Total Values of Bonds Received by Political Parties' to select a political party from a drop-down/search, and show how many bonds and total value per year are in the timeline.
There is also a Bar graph and option to save the png/jpeg.
Select 'Pie Chart depicting the total amount of donations to all the parties'
You have the option to deselect the parties that you do not want to see.
Select the option to save either png or jpeg
I have plotted graphs which will get new color every time you refresh.
Also you have the ability to decide which party's data you want to see and which you dont want to see.
This has been done successfully!
------------------------------------------------THANK YOU---------------------------------------------------------------































