Executive-ready analytics platform for the MTA ACE Datathon 2025
This project was built for the MTA ACE Datathon 2025 to analyze and visualize Automated Bus Lane Enforcement (ACE) data, congestion pricing impacts, and CUNY student mobility patterns. It leverages modern web technologies, serverless databases, and AI integrations to provide real-time insights for executives, policy makers, and data scientists.
- Framework: Next.js 15 (App Router) + React 19 + TypeScript
- Styling: Tailwind CSS 4 + Radix UI + custom AI UI elements
- Database: Neon Postgres (serverless) with MCP (Model Context Protocol)
- AI Integration: Vercel AI SDK, OpenAI, Claude, Gemini, Grok, ElevenLabs (speech-to-text)
- Authentication: Stack Auth
- Hosting: Vercel (optimized for Edge Runtime)
- Next.js App Router for a modern serverless web app.
- Global dashboard shell layout with persistent filters.
- Serverless Neon Postgres with schema for violations, conversations, and messages.
- MCP Protocol for AI-to-database interaction.
- AI Copilot for SQL queries, visualization, speech-to-text, and report generation.
- NYC Open Data: ACE violations dataset (kh8p-hcbm)
- CUNY Data: Campus metrics and locations
- Socrata API: Real-time updates
- MTA Bus Speed Data: Historical and 2025 live data
- NYC Police Precinct Data: Violation enforcement context
- Home (
/): Persona navigation, business questions, prediction cards. - Executive Dashboard (
/executive): KPIs, trend analysis, AI-generated summaries. - Operations Dashboard (
/operations): Route benchmarking, ACE hotspots, exempt vehicle tracking. - ACE Copilot (
/chat): Multi-model AI chat, SQL execution, visualization, email export. - Additional Views:
/map– Spatial analysis/students– CUNY student routes/policy– CBD & congestion pricing/data-science– ML predictions & simulations/presentation– Animated business questions
/api/
├── chat/stream/ # AI streaming endpoint
├── violations/ # Violation data endpoints
├── insights/curated/ # Pre-computed insights
├── cuny/campuses/ # Campus data
├── mcp/ # Model Context Protocol
├── health/ # System health checks
└── email/ # Email functionality
- Multi-model support: GPT-5, Claude, Gemini, Grok
- Tool orchestration: SQL execution, web search, visualization
- Streaming responses: Real-time AI outputs with metadata
- Speech-to-text: ElevenLabs integration
- Email export: Send reports directly to stakeholders
-
Global Filtering System
- Date range, routes, campus type filters
- Persistent across views
-
Real-time Data Integration
- Live Neon database queries
- CUNY + Socrata APIs
- Health monitoring
-
Interactive Visualizations
- Sparklines, grouped bar charts, multi-line time series
- Mapbox-based hotspot and route maps
- Pie charts and custom charts
-
Authentication & Security
- Stack Auth with JWT tokens
- Row-level security (RLS)
- Environment variable validation
-
Responsive Design
- Mobile-first, dark/light mode
- Accessible via ARIA labels and keyboard navigation
# AI Gateway
AI_GATEWAY_API_KEY=
# Database
DATABASE_URL=
NEON_MCP_SSE_URL=
# External APIs
SOCRATA_APP_TOKEN=
ELEVENLABS_API_KEY=
EXA_API_KEY=
# Maps
NEXT_PUBLIC_MAPBOX_TOKEN=
# Auth
NEXT_PUBLIC_STACK_PROJECT_ID=
STACK_SECRET_SERVER_KEY=npm run dev # Start dev server
npm run build # Production build
npm run mcp:neon # Start local MCP server- Optimized for Vercel with Edge runtime.
- Supports static generation & CDN integration.
This project addresses MTA Datathon 2025’s three core business questions:
-
Student Routes
- How do ACE vs non-ACE corridors serving CUNY campuses compare?
- Analysis of bus speed changes over time.
-
Exempt Vehicles
- Which fleets repeatedly violate rules despite exemptions?
- Mapping hotspot violations across CUNY routes.
-
CBD Performance
- How have violations and speeds changed under congestion pricing?
- Mapping performance pre- and post-policy.
📌 ACE’s mission: Keep bus lanes clear, improve speeds (average +5%, up to +30% in some corridors).
- Event: MTA Datathon 2025 – Bring Data Science to Life with MTA & MHC
- Primary Dataset: Bus Automated Camera Enforcement (ACE) Violations
- Kickoff: Sep 19, 2025 | 2:00–4:00 PM EST
- Zoom Link: Join Meeting
- Passcode:
442832
- Thorough understanding of datasets & integration of relevant sources
- Clear, data-supported insights addressing business questions
- Effective visuals and well-organized GitHub project
- Recommendations tied directly to findings and MTA’s context
This project delivers real-time, AI-powered analytics to support MTA’s mission of improving bus speeds and reliability through ACE enforcement. It is designed to be scalable, production-ready, and executive-friendly for decision-making.
This project builds on dedicated API services developed for the datathon.
The following repositories contain the training, preprocessing, and API logic that power the insights in MTA ACE Insight Studio:
-
mta-ace-api
Backend service focused on Automated Camera Enforcement (ACE) violation data, including preprocessing, route-level aggregations, and enforcement metrics. -
mta-analytics-api
Analytics service providing curated insights, student route analysis, and congestion pricing comparisons. Designed to integrate directly with the Insight Studio dashboard for real-time analysis.