QuestionQuestion

Create a User-Interface [UI python project that determines what subway station at what given time of day is best to hand advertise at, at any given time. You can use turnstile data for example. You should use Python language, mySQL and a User Interface.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

# user interface components are available in this package
import tkinter as tk
# Table widget
from tkinter.ttk import Treeview
# Figure canvas on which charts/figure are renered
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
# Figure to draw charts
from matplotlib.figure import Figure
# library to connect with mysql database server
import mysql.connector
# pandas library to represent data in data frame
import pandas as pd
# numpy library
import numpy as np

# Database connection parameters
db = mysql.connector.connect(
    host="localhost",
    user="root",
    passwd="password",
    database="RouteDB"
)

# Attributes or fields of the table.
cols = ["C/A", "UNIT", "SCP", "STATION", "LINENAME", "DIVISION", "DATE", "TIME", "DESC", "ENTRIES", "EXITS"]

# Main User interface window
root = tk.Tk()
root.title('Route Information')
root.geometry("1000x800")
root.resizable(0, 0)

# Building search filter, adding to and from time frame.
tk.Label(root, text="From - ").grid(row=0, column=0, padx=10, pady=10, sticky=(tk.W, tk.E))
tk.Label(root, text="Hour: ").grid(row=0, column=1, padx=4, pady=10, sticky=(tk.W, tk.E))
tk.Label(root, text="Minutes: ").grid(row=0, column=3, padx=10, pady=10, sticky=(tk.W, tk.E))

tk.Label(root, text="To - ").grid(row=0, column=5, padx=30, pady=10, sticky=(tk.W, tk.E))
tk.Label(root, text="Hour: ").grid(row=0, column=7, padx=4, pady=10, sticky=(tk.W, tk.E))
tk.Label(root, text="Minutes: ").grid(row=0, column=9, padx=10, pady=10, sticky=(tk.W, tk.E))

# Values to get to and from time values
from_hour = tk.StringVar(root)
from_minute = tk.StringVar(root)

# default from time 12:05
from_hour.set('12')
from_minute.set('05')

to_hour = tk.StringVar(root)
to_minute = tk.StringVar(root)

# default to time 12:10
to_hour.set('12')
to_minute.set('10')...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$150.00 $75.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats