import streamlit as st
# ── Ole Miss brand colors ──────────────────────────────────────────────────────
st.set_page_config(page_title="Ole Miss Degree Planner", page_icon="🎓", layout="wide")
st.markdown("""
""", unsafe_allow_html=True)
# ── Course Data ────────────────────────────────────────────────────────────────
GRADE_MAP = {"A": 4.0, "B": 3.0, "C": 2.0, "D": 1.0, "F": 0.0, "W": None, "In Progress": None}
MAJORS = {
"Accountancy (B.Accy.)": {
"General Education / Core": [
"WRIT 100/101 – First Year Writing I",
"WRIT/LIBA 102 – First Year Writing II",
"Natural Science with Lab I",
"Natural Science with Lab II",
"MATH 167 – Business Mathematics",
"MATH 267 – Business Calculus I",
"ECON 202 – Principles of Microeconomics",
"Humanities (3 hrs)",
"Fine Arts (3 hrs)",
"Humanities or Fine Arts – Additional (3 hrs)",
],
"Additional Core Requirements": [
"ACCY 201 – Principles of Accounting I",
"ACCY 202 – Principles of Accounting II",
"ECON 203 – Principles of Macroeconomics",
"BUS 250 – Legal Environment of Business",
"BUS 271 / SPCH 102 / SPCH 105 – Business Communication or Speech",
"BUS 230 / ECON 230 – Economic Statistics I",
"ACCY 302 – Fundamentals of Data Analytics",
],
"Major Course Requirements": [
"ACCY 303 – Financial Accounting I",
"ACCY 304 – Financial Accounting II",
"ACCY 309 – Cost Accounting",
"ACCY 310 – Systems",
"ACCY 401 – Auditing",
"ACCY 402 – Advanced Accounting",
"ACCY 405 – Income Tax",
"ACCY 407 – Governmental Accounting",
"ACCY 411 – Business Law",
],
"Business Core & Other Requirements": [
"ACCY 520 – Internship OR MGMT 493 – Strategic Planning",
"MKTG 351 – Marketing Principles",
"BUS/ECON 302 – Economic Statistics II",
"FIN 331 – Business Finance I",
"MKTG 372 – Intro to Operations & Supply Chain Management",
"MGMT 371 – Principles of Management",
"MIS 309 – Management Information Systems",
"WRIT 440 – Writing for Accountancy",
],
"Minor Requirements": [
"Minor Course 1 (3 hrs)",
"Minor Course 2 (3 hrs)",
"Minor Course 3 (3 hrs)",
],
},
"Banking and Finance (B.B.A.)": {
"General Education Requirements": [
"WRIT 100/101 – First Year Writing I",
"WRIT/LIBA 102 – First Year Writing II",
"Humanities I (3 hrs)",
"Humanities II (3 hrs)",
"Fine Arts (3 hrs)",
"Natural Science with Lab I",
"Natural Science with Lab II",
"MATH 167 – Business Mathematics",
"MATH 267 – Business Calculus I",
"ECON 202 – Principles of Microeconomics",
"ECON 203 – Principles of Macroeconomics",
],
"B.B.A. Core Requirements": [
"ACCY 201 – Accounting I",
"ACCY 202 – Accounting II",
"BUS 250 – Legal Environment of Business",
"BUS 271 – Business Communication",
"BUS/ECON 230 – Economic Statistics I",
"MKTG 351 – Principles of Marketing",
"FIN 331 – Principles of Finance",
"MGMT 371 – Principles of Management",
"ECON/BUS 302 – Economic Statistics II",
"MKTG 372 – Intro to Operations and Supply Chain Management",
"BAIS 309 – Business Analytics and Information Systems",
"MGMT 493 – Management of Strategic Planning",
"MKTG 354 – Professional Selling and Relationship Marketing",
"300+ Elective (3 hrs)",
"300+ Business Elective (3 hrs)",
],
"Major Requirements": [
"ECON/FIN 303 – Money and Banking OR FIN 333 – Financial Markets & Institutions",
"FIN 334 – Investments",
"FIN 338 – Intermediate Finance Management",
"FIN 537 – Banking and Finance I",
"FIN 538 – Banking and Finance II",
"Finance Major Elective I (3 hrs)",
"Finance Major Elective II (3 hrs)",
"Finance Major Elective III (3 hrs)",
],
},
"Business Analytics & Information Systems (B.B.A.)": {
"General Education Requirements": [
"WRIT 100/101 – First Year Writing I",
"WRIT/LIBA 102 – First Year Writing II",
"Humanities I (3 hrs)",
"Humanities II (3 hrs)",
"Fine Arts (3 hrs)",
"Natural Science with Lab I",
"Natural Science with Lab II",
"MATH 167 – Business Mathematics",
"MATH 267 – Business Calculus I",
"ECON 202 – Principles of Microeconomics",
"ECON 203 – Principles of Macroeconomics",
],
"B.B.A. Core Requirements": [
"ACCY 201 – Accounting I",
"ACCY 202 – Accounting II",
"BUS 250 – Legal Environment of Business",
"BUS 271 – Business Communication",
"BUS/ECON 230 – Economic Statistics I",
"MKTG 351 – Principles of Marketing",
"FIN 331 – Principles of Finance",
"MGMT 371 – Principles of Management",
"ECON/BUS 302 – Economic Statistics II",
"MKTG 372 – Intro to Operations and Supply Chain Management",
"BAIS 309 – Business Analytics and Information Systems",
"MGMT 493 – Management of Strategic Planning",
"300+ Elective (3 hrs)",
"300+ Business Elective I (3 hrs)",
"300+ Business Elective II (3 hrs)",
],
"Major Requirements": [
"BAIS Major Elective I (3 hrs)",
"BAIS Major Elective II (3 hrs)",
"BAIS Major Elective III (3 hrs)",
"BAIS Major Elective IV (3 hrs)",
"BAIS Major Elective V (3 hrs)",
"BAIS Major Elective VI (3 hrs)",
"BAIS Major Elective VII (3 hrs)",
"BAIS Major Elective VIII (3 hrs)",
],
},
}
# ── Session state init ─────────────────────────────────────────────────────────
if "selected_major" not in st.session_state:
st.session_state.selected_major = None
if "completed" not in st.session_state:
st.session_state.completed = {}
if "grades" not in st.session_state:
st.session_state.grades = {}
# ── Header ─────────────────────────────────────────────────────────────────────
st.markdown("""
🎓 Ole Miss Degree Planner
University of Mississippi · School of Business · Track your progress toward graduation
""", unsafe_allow_html=True)
# ── Major Selection ────────────────────────────────────────────────────────────
col_sel, col_info = st.columns([2, 1])
with col_sel:
major_choice = st.selectbox(
"Select Your Major",
options=["— Choose a major —"] + list(MAJORS.keys()),
key="major_dropdown"
)
if major_choice == "— Choose a major —":
st.info("👆 Select your major above to get started.")
st.stop()
# Reset completed/grades when major changes
if st.session_state.selected_major != major_choice:
st.session_state.selected_major = major_choice
st.session_state.completed = {}
st.session_state.grades = {}
major_data = MAJORS[major_choice]
all_courses = [c for cats in major_data.values() for c in cats]
# Quick stats
total_courses = len(all_courses)
completed_keys = [k for k, v in st.session_state.completed.items() if v]
num_done = len(completed_keys)
num_remaining = total_courses - num_done
hrs_done = num_done * 3
hrs_remaining = num_remaining * 3
with col_info:
st.markdown(f"""
{num_done}/{total_courses}
Courses Completed
""", unsafe_allow_html=True)
# ── Tabs ───────────────────────────────────────────────────────────────────────
tab1, tab2, tab3 = st.tabs(["📋 Course Checklist", "📌 Remaining Courses", "📊 GPA Calculator"])
# ══════════════════════════════════════════════════════════════════════════════
# TAB 1 – CHECKLIST
# ══════════════════════════════════════════════════════════════════════════════
with tab1:
st.markdown("**Check off every course you have already completed. Then enter your grade.**")
st.markdown('
', unsafe_allow_html=True)
for category, courses in major_data.items():
cat_done = sum(1 for c in courses if st.session_state.completed.get(c, False))
cat_total = len(courses)
st.markdown(f"""
""", unsafe_allow_html=True)
for course in courses:
c1, c2 = st.columns([3, 1])
with c1:
checked = st.checkbox(
course,
key=f"chk_{course}",
value=st.session_state.completed.get(course, False)
)
st.session_state.completed[course] = checked
with c2:
if checked:
grade = st.selectbox(
"Grade",
options=list(GRADE_MAP.keys()),
key=f"grade_{course}",
index=list(GRADE_MAP.keys()).index(
st.session_state.grades.get(course, "A")
),
label_visibility="collapsed"
)
st.session_state.grades[course] = grade
st.markdown("
", unsafe_allow_html=True)
# ══════════════════════════════════════════════════════════════════════════════
# TAB 2 – REMAINING COURSES
# ══════════════════════════════════════════════════════════════════════════════
with tab2:
remaining_by_cat = {}
done_by_cat = {}
for category, courses in major_data.items():
rem = [c for c in courses if not st.session_state.completed.get(c, False)]
done = [c for c in courses if st.session_state.completed.get(c, False)]
remaining_by_cat[category] = rem
done_by_cat[category] = done
total_rem = sum(len(v) for v in remaining_by_cat.values())
if total_rem == 0:
st.success("🎉 Congratulations! You've completed all course requirements for this major!")
else:
st.markdown(f"You have **{total_rem} courses** ({total_rem * 3} credit hours) remaining.")
st.markdown('
', unsafe_allow_html=True)
for category, rem_courses in remaining_by_cat.items():
done_courses = done_by_cat[category]
if not rem_courses and not done_courses:
continue
st.markdown(f"""
""", unsafe_allow_html=True)
pills_html = ""
for c in rem_courses:
pills_html += f'{c}'
for c in done_courses:
pills_html += f'✓ {c}'
st.markdown(pills_html, unsafe_allow_html=True)
st.markdown("
", unsafe_allow_html=True)
# Summary stats row
c1, c2, c3 = st.columns(3)
c1.markdown(f'', unsafe_allow_html=True)
c2.markdown(f'', unsafe_allow_html=True)
c3.markdown(f'{total_rem * 3}
Hours Left
', unsafe_allow_html=True)
# ══════════════════════════════════════════════════════════════════════════════
# TAB 3 – GPA CALCULATOR
# ══════════════════════════════════════════════════════════════════════════════
with tab3:
graded_courses = [
c for c in completed_keys
if st.session_state.grades.get(c) in GRADE_MAP
and GRADE_MAP[st.session_state.grades.get(c)] is not None
]
if not graded_courses:
st.info("✏️ Complete courses and enter grades in the **Course Checklist** tab to see your GPA here.")
else:
total_points = sum(GRADE_MAP[st.session_state.grades[c]] for c in graded_courses)
gpa = total_points / len(graded_courses)
# GPA color
if gpa >= 3.5:
gpa_status = "Dean's List 🏆"
elif gpa >= 3.0:
gpa_status = "Good Standing 👍"
elif gpa >= 2.0:
gpa_status = "Satisfactory ✓"
else:
gpa_status = "Below Minimum ⚠️"
col_gpa, col_breakdown = st.columns([1, 2])
with col_gpa:
st.markdown(f"""
{gpa:.2f}
Cumulative GPA
{gpa_status}
Based on {len(graded_courses)} graded course(s)
""", unsafe_allow_html=True)
with col_breakdown:
st.markdown('', unsafe_allow_html=True)
grade_counts = {}
for c in graded_courses:
g = st.session_state.grades[c]
grade_counts[g] = grade_counts.get(g, 0) + 1
for grade, count in sorted(grade_counts.items()):
pct = count / len(graded_courses)
bar_color = {"A": "#16A34A", "B": "#2563EB", "C": "#D97706", "D": "#EA580C", "F": "#DC2626"}.get(grade, "#6B7280")
st.markdown(f"""
{grade}
{count} course(s)
""", unsafe_allow_html=True)
st.markdown('
', unsafe_allow_html=True)
st.markdown("**Course-by-Course Detail**")
for c in graded_courses:
g = st.session_state.grades[c]
pts = GRADE_MAP[g]
st.markdown(f"""
{c}
{g} ({pts:.1f})
""", unsafe_allow_html=True)
st.markdown("
", unsafe_allow_html=True)
st.markdown("""
⚠️ Note: A minimum 2.0 GPA is required for graduation. All 300+ level courses must be taken in residence at UM.
""", unsafe_allow_html=True)
# ── Footer ─────────────────────────────────────────────────────────────────────
st.markdown('
', unsafe_allow_html=True)
st.markdown("""
University of Mississippi · School of Business Administration · Degree requirements effective Fall 2025 – Summer 2026
Always verify requirements with your academic advisor.
""", unsafe_allow_html=True)