Skip to content

UsmanAsghar23/Academic

Repository files navigation

Academic World Multi Database Dashboard

A CSS-styled Dash (Plotly) dashboard for CS students to discover potential faculty collaborators through overlap in research topics, co-authorship links, and university partnerships.

Purpose

  • Scenario:

    • Explore and manage the Academic World dataset across three databases to understand faculty profiles, keyword trends, and collaborations.
  • Target users:

    • Prospective graduate students exploring programs and potential advisors
    • Academic administrators or database managers reviewing, updating, or enhancing faculty profiles
  • Objectives:

    • Query insights (keywords, publications) with interactive filters.
    • Edit data (faculty info, collaborations) to see immediate effects.
    • Demonstrate use of three different database systems in a single dashboard.

Demo

Installation

  1. Create and activate a Python 3.10+ virtual environment.
  2. Install dependencies:
    pip install -r requirements.txt
  3. Create a .env file and set credentials:
    MYSQL_HOST=localhost
    MYSQL_PORT=3306
    MYSQL_USER=root
    MYSQL_PASSWORD=your_mysql_password
    MYSQL_DATABASE=academicworld
    
    MONGODB_URI=mongodb://localhost:27017/
    MONGODB_DATABASE=academicworld
    
    NEO4J_URI=bolt://localhost:7687
    NEO4J_USER=neo4j
    NEO4J_PASSWORD=your_neo4j_password
    NEO4J_DATABASE=neo4j
  4. (Optional) Verify connectivity:
    python3 test_connections.py

Usage

Run the dashboard:

python3 dashboard.py

Open your browser at http://127.0.0.1:8050.

Inputs are unified at the top (University → Faculty). Widgets auto-refresh every 30 seconds.

Widget 1: Faculty Profile (MongoDB)

Screenshot 2025-08-09 at 10 23 39 AM

Select University → Faculty to view profile from MongoDB.

  • What: Detailed profile card for the selected faculty (name, email, position, affiliation, keywords).
  • Inputs: University → Faculty.
  • Database: MongoDB
  • Purpose: Immediate context for the selected person; keywords also populate Widget 4.

Widget 2: Faculty Keywords by University (MySQL)

Screenshot 2025-08-09 at 10 24 49 AM

Select a University to see top keywords by number of faculty.

  • What: Bar chart of top keywords among faculty at the selected university (faculty count per keyword).
  • Inputs: University.
  • Database: MySQL with prepared statements.
  • Purpose: Snapshot of research themes at a school; helps choose a direction to drill down.

Widget 3: Top Keywords by Year (MySQL View)

Screenshot 2025-08-09 at 10 25 12 AM

Select a Year to see top keywords by paper count (powered by view vw_keywords_by_year).

  • What: Bar chart of the year’s most frequent keywords by publication count.
  • Inputs: Year.
  • Database: MySQL
  • Purpose: Fast analytics for yearly trends via a reusable view; complements Widgets 2 and 4.

Widget 4: Keyword Popularity Over Years (MySQL)

Screenshot 2025-08-09 at 10 25 49 AM

Select a keyword to view trend across years.

  • What: Line chart of publication frequency for a chosen keyword across years.
  • Inputs: Keyword (from selected faculty’s profile in Widget 1).
  • Database: MySQL
  • Purpose: Visualize topic momentum over time; identify emerging or declining areas.

Widget 5: Collaborations (View & Edit) (Neo4j)

Screenshot 2025-08-09 at 10 26 56 AM

View top collaborators by joint publications.

  • Add collaboration between the selected faculty and another faculty.
  • What: Bar chart of top collaborators (joint publication counts) with controls to Add/Remove collaborations.
  • Inputs: Faculty (via unified filters), collaborator target (dropdown), Add/Remove buttons.
  • Database: Neo4j
  • Purpose: Explore and manage collaboration networks; demonstrates graph reads/writes.

Widget 6: Edit Faculty Information (MySQL, MongoDB, Neo4j)

Screenshot 2025-08-09 at 10 27 34 AM

Edit name, email, position, research interest, affiliation, keywords; updates all three DBs.

  • What: Form to edit faculty profile fields; persists to all three databases.
  • Inputs: Editable text fields + Update button.
  • Databases: MySQL (transactional update), MongoDB (document update), Neo4j (node/relations update).
  • Purpose: Keep profiles consistent across stores; demonstrates cross-DB updates and a MySQL transaction.

Design

Project Structure

├── assets/
│   ├── style.css
├── env
├── config.py
├── dashboard.py
├── mongodb_utils.py
├── mysql_utils.py
├── neo4j_utils.py
├── README.md
├── requirements.txt
├── test_connections.py

Architecture:

  • Frontend: Dash/Plotly web app (dashboard.py, assets/style.css).
  • Data Access:
    • mysql_utils.py for MySQL queries and updates.
    • mongodb_utils.py for MongoDB profile reads/updates.
    • neo4j_utils.py for Neo4j graph queries and collaboration edits.
  • Config via environment variables in config.py.

Data flow:

  • User inputs → callbacks → DB utilities → results plotted or persisted.
  • Collaboration edits trigger immediate chart refresh via a hidden store.

Implementation

  • Frameworks/Libraries:
    • Dash
    • Plotly
    • mysql-connector-python
    • pymongo
    • Neo4j
    • Python driver
    • python-dotenv
  • Key files:
    • dashboard.py: layout + callbacks for 6 widgets.
    • mysql_utils.py, mongodb_utils.py, neo4j_utils.py: database logic.
    • assets/style.css: UI styles (centered buttons, smaller tiles).

Database Techniques

  • View (MySQL):
    • vw_keywords_by_year used by Widget 3 to compute keyword counts per year.
  • Transaction (MySQL):
    • update_faculty performs atomic updates to faculty and keywords.
  • Indexing (MongoDB):
    • Indexes on faculty.id (unique) and keywords.name to speed lookups/updates.
  • Constraint (Neo4j):
    • Unique constraint on (:Faculty {id}) for consistent identity.
  • Prepared Statements (MySQL):
    • Parameterized queries used across utilities to avoid injection.

Contributions

  • Usman Asghar

    • Developed database access and integration for MySQL, MongoDB, and Neo4j.
    • Completed the functionality for Widgets 1,2 and 4
    • Added styling and fixed the layout of how the dashboard is presented
    • Added the filters on top to select university first then proffesor from that university
    • Keyword Popularity widget 4 is filtered to select only from the keywords of that proffesor
    • Made the ReadME file
    • Time Spent: 22 Hours
  • Fahad Khan

    • Completed the functionality for Widgets 3,5 and 6
    • Fixed the stlying to get design of each card that holds each widget
    • Added the callback functionality to retrieve the information from each databases
    • Recorded, edited, and narrated the demo video and uploaded it to Illinois Media
    • Added the backend logic for the widgets 5 and 6 to updated that database with the changes in the data
    • Time Spent: 20 Hours
  • Combined Time Spent: 42 hours

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors