CS-340 Project Two: Building a Rescue-Dog Dashboard
• 6-8 min read
For my CS-340 Client/Server Development course, Project Two was to ship a small but real dashboard that helps Grazioso Salvare quickly find dogs suited for specific rescue scenarios using the Austin Animal Center Outcomes dataset. I connected a MongoDB data store to an interactive web UI so staff can filter animals, visualize top breeds, and see locations on a map—without touching the database.
What I built
The dashboard has four main features:
- Filter buttons for Water Rescue, Mountain/Wilderness, and Disaster/Individual Tracking (plus Reset).
- A responsive data table that updates to match the chosen filter.
- A bar chart of “Top Breeds” for the current filter.
- An interactive map that auto-centers when you select an animal in the table.
That mix came straight from the project brief and my ReadMe for the deliverable, which also outlines the toolchain and MVC-ish design I used.
Stack & architecture
- MongoDB + PyMongo for storage and queries.
- Dash (inside Jupyter via
jupyter-dash) for the reactive web UI. - Plotly for the bar chart and dash-leaflet for the map.
Data access is wrapped in an AnimalShelter class that exposes simple
CRUD methods. The pattern keeps the UI
callbacks clean and lines up nicely with the course’s MVC goals: MongoDB is the model,
Dash callbacks are the controller, and the Dash layout is the view.
The AnimalShelter class handles create, read, update, and delete
with clear checks and helpful output—handy when you’re iterating on queries
and need quick feedback.
Key interactions
Each rescue button triggers a query tailored to that scenario (e.g., age, breed, and outcome filters). When the results return:
- The table renders only the matching animals.
- The “Top Breeds” bar chart recomputes from the filtered set.
- Selecting a row pans/zooms the map to that animal’s coordinates.
It’s a tight loop: pick a rescue profile → skim candidates → click one → see it on the map.
What tripped me up (and how I fixed it)
- Coordinating multiple outputs. Dash callbacks are powerful, but you have to keep inputs/outputs straight. I split logic into small, single-purpose callbacks—one for table data, one for chart data, one for map state—then shared lightweight derived values between them.
- Query drift. It’s easy for UI filters and server-side Mongo queries to get out of sync. I centralized the “filter spec” and generated the MongoDB query from that single object so the UI and DB stay aligned.
- Geolocation edge cases. Not all rows had clean lat/long. I added basic validation so the map only places markers for valid coordinates, with a friendly message when none are available.
What I learned
- Designing to queries. UI is simpler when you start from “What question is the user asking the data?” then model the query and let the UI follow.
- Document DBs shine with varied records. The AAC dataset’s shape fits MongoDB well, and PyMongo made quick work of CRUD and filters.
- Small, composable callbacks > one giant function. It kept state bugs down and made testing bits in isolation easy.
- Maps + charts boost decision speed. The moment you see “top breeds” and a pin on a map for the selected dog, the task clicks.
What I’d improve next
- Add server-side caching for popular filters to speed up first render.
- Bundle the app as a lightweight container so it can run outside Jupyter more easily.
- Expand rescue profiles (e.g., “Urban Search”) and expose their criteria in the UI.
- Basic auth and role-based views for staff vs. admin tasks.
How to run it
The course deliverable runs in Jupyter with jupyter-dash, Dash, dash-leaflet, Plotly,
and PyMongo against a MongoDB that holds the Austin Animal Center dataset.
The ReadMe includes the quickstart and file list.
Screenshots above are from my local build. If you’d like the demo or code notes, feel free to reach out on the contact form.