Create a GUI Python application
Create a GUI Python application that fulfils the following requirements:
1. Displays a form with a text box (where user should write the name of the excel file to save)and the following 4 buttons (0,2 p):
a. Retrieve data
b. Create the graph
c. Display the matrix
d. Save to Excel file
2. Button 1 will retrieve product names and product prices from a page on a specific e-commerce website allocated to you (0,4 p)
a. Retrieve product names (0,1 p)
b. Retrieve product prices (0,3 p)
3. Button 2 will display a bar chart showing the products and their prices (0,1)
4. Button 3 will display the matrix containing the products and their prices (0,1)
5. Button 4 will save the matrix to an excel file (0,1). The folder where the excel file will besaved must be chosen interactively, using openfiledialog. The name of the file will be theone that the user wrote in the textbox with .xlsx extension (0.1).
All variables must contain your initials in their names.
my initials: iu
My site is : https://www.ddcomputer.com.au/parts_NOTEBOOK_Noteb…
the algorithm is:
import tkinter
from selenium import webdriver
from selenium.webdriver.chrome.service importervice
from webdriver_manager.chrome import
hromeDriverManager
1. Visual side of the project
# visual text box
# button – retrieve data
# button – create the graph
# button – display the matrix
# button – save to excel
form = tkinter.Tk(
# instatiate a blank GUI
form.title(“Awesome GUI app”)
00t00form.geometry(“600
label_name=ttkinter.Label(form, text=”Please enterthe name of the new excel file: “)
ext_name = tkinter.Entry(form)
label_name.pack()
text_name.pack()
2. Scrapping of a website for products and pricesef scrape_website():
driver = webdriver.Chrome(service=
ervice(ChromeDriverManager().install()))
driver.implicitly_wait(100)
driver.get(“https://www.asus.
om/ro/store/accessories/”)
products = driver.find_elements(“class name”,”store_content_product ProductCardNormalStore2_productCardContainer_3YjØI ProductCardNormalStore2isWhiteCard_3ijE2 ProductCardNormalStore2_isNew_105EA ProductCardNormalStore2StoreContent_3HXex undefined”)
print(products[1].get_attribute(“innerText”))iterate over the list of products and create aataframe with the products
ef show_graph():
# bring the DF and based on the data frameinvoke a specific method for plotting ex:f.plot(x=”name of column”,y=”naname of the otherolumn”)
print(“test graph”)
button_retrieveieve = tkinterkinter.Button(form,
text=”Re
‘Retrieve data”, comman
mand=scra
rape_website)
utton_retrieve.pack()
utton_ggraph = tkinter.Buton(form, tetext=”Showraph”, concommand=show_graph)
utton_graph.pack()
utton_mamatrix = tkinteron(form,ttext=”Showtrix”)atrix
utton_matrix.pack()
uttonn._excel = tkinterButonform,text=”Savetoxcel”)
_eon_excel.p.pack()# 3. Generate graphs (bar chart, matrix)→>seemethod show_graph()
# 4. I/0 saving the matrix to an excel file→>usesomething like: df1.to_excel(“output,xlsx”)
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.