2025

Animal Shelter Analytics Dashboard

An interactive data analytics dashboard built with Dash and MongoDB that transforms static animal shelter data into actionable insights with real-time visualizations and geospatial mapping

Tech Stack

Python 3.13DashFlaskMongoDBPandasMatplotlibPlotlyDash LeafletHTML/CSSBase64 Encoding

Context

The Problem

Animal shelters need data-driven insights to optimize rescue operations, but traditional CRUD applications lack visualization capabilities and interactive analytics to identify adoption trends and geographic patterns.

Constraints

  • Transform existing Flask CRUD app into full analytics dashboard
  • Handle 2,000+ animal records with real-time filtering
  • Implement secure database operations (SEI CERT, OWASP standards)
  • Support specialized rescue type queries (Water, Mountain, Disaster)
  • Maintain modular, scalable MVC architecture

Stakes

Computer Science capstone project demonstrating software engineering principles, data visualization, database optimization, and secure coding practices for degree completion at Southern New Hampshire University

My Role

Title

Full-Stack Software Engineering

Team

Academic Capstone Project (Individual)

Ownership

Complete refactor of original artifact: system redesign, database optimization, visualization implementation, security hardening, and documentation

Approach & Key Decisions

Refactored a basic Flask CRUD application into an interactive analytics dashboard using Dash framework, MongoDB with aggregation pipelines, and multiple visualization libraries (Matplotlib, Plotly, Dash Leaflet) to provide rescue organizations with actionable data insights.

Dash framework for interactive analytics

Dash provides React-powered components without JavaScript, enabling rapid development of interactive dashboards with Python callbacks for real-time data updates and filtering.

MongoDB aggregation pipelines for analytics

Aggregation pipelines enable complex data transformations and grouping operations directly in the database, reducing application-layer processing and improving query performance.

Matplotlib + Plotly dual visualization approach

Matplotlib for static chart generation and Plotly for interactive visualizations provides flexibility for both reporting and exploratory data analysis.

Dash Leaflet for geospatial mapping

Interactive maps allow rescue coordinators to visualize animal locations, identify geographic patterns, and optimize rescue operations based on spatial distribution.

Parameterized queries with MongoDB $regex operators

Prevents NoSQL injection attacks while maintaining flexible search functionality across multiple fields with case-insensitive pattern matching.

MVC-inspired modular architecture

Separating CRUD operations (crud.py), application logic (app.py), and data import (load_csv.py) improves maintainability and enables independent testing of components.

Alternatives Considered

Considered using Streamlit for rapid prototyping but chose Dash for production-grade callback system and better control over component behavior

Challenges & Solutions

Challenge

Transforming static CRUD operations into dynamic analytics

Solution

Implemented MongoDB aggregation pipelines to compute breed distribution statistics, adoption trends by intake type, and time-series analysis directly in the database layer, then exposed results through reactive Dash callbacks.

Challenge

Real-time filtering across 2,000+ records without performance degradation

Solution

Combined server-side MongoDB queries with client-side Dash DataTable virtual pagination and derived data callbacks to minimize full dataset transfers while maintaining responsive UI.

Challenge

Specialized rescue type filtering with complex breed/age/gender criteria

Solution

Built parameterized query builders using MongoDB $and/$or operators with $regex for breed matching and $gte/$lte for age ranges, enabling precise filtering for Water, Mountain, and Disaster rescue classifications.

Challenge

Securing database operations against injection attacks

Solution

Implemented parameterized queries throughout the CRUD layer, applied input validation on user searches, and used MongoDB's built-in operators ($regex, $and, $or) instead of string concatenation to prevent NoSQL injection.

Challenge

Interactive geospatial visualization of shelter locations

Solution

Integrated Dash Leaflet with marker clustering and tooltips, using MongoDB geospatial data to render animal locations on interactive maps with breed/name metadata and coordinate-based zoom.

Outcomes & Impact

Capstone Completion

Successfully completed Computer Science B.S. capstone requirement, demonstrating mastery of software design, algorithms, databases, and security

Architecture Enhancement

Refactored monolithic Flask CRUD app into modular MVC architecture with separated concerns (CRUD operations, application logic, data import)

Data Visualization

Implemented interactive dashboards with Matplotlib bar charts (top 10 breeds), Plotly analytics, and Dash Leaflet geospatial mapping

Database Optimization

MongoDB aggregation pipelines for breed distribution, parameterized queries for security, and efficient filtering supporting 2,000+ records

Search Functionality

Cross-column case-insensitive search with MongoDB $regex, specialized rescue type filters (Water, Mountain, Disaster), and real-time result updates

Security Implementation

Applied SEI CERT and OWASP standards with parameterized queries, input validation, and NoSQL injection prevention

User Experience

Dark-themed responsive UI with interactive data tables, dynamic charts, and map-based location visualization

Project Links