Inspiration
Finding an open, clean, and accessible public restroom in New York City is a well-known daily hurdle for residents, commuters, delivery workers, tourists, parents with small children, and individuals with disabilities.
While the City of New York and its partner agencies maintain hundreds of facilities across city parks, public library branches, transit hubs, and Privately Owned Public Spaces (POPS), this critical information is often fragmented, outdated, or hard to navigate on mobile devices during times of urgent need.
We built NYC Restroom Finder to solve this civic challenge by unifying official city records into a fast, mobile-optimized, map-driven web application with instant proximity calculation, accessibility filters, and natural language search.
What It Does
- Comprehensive 5-Borough Directory: Directly connects to official NYC Open Data, indexing 1,066 public restroom facilities across Manhattan, Brooklyn, Queens, the Bronx, and Staten Island.
- GPS Proximity & Distance Calculation: Automatically calculates exact walking distances and estimated walking times from the user's current GPS location using the Haversine distance formula: $$d = 2R \arcsin\left(\sqrt{\sin^2\left(\frac{\Delta \text{lat}}{2}\right) + \cos(\text{lat}_1)\cos(\text{lat}_2)\sin^2\left(\frac{\Delta \text{lon}}{2}\right)}\right) $$
- Multi-Dimensional Accessibility Filtering: Users can filter specifically for ADA wheelchair-accessible facilities, infant diaper changing stations, single-stall/all-gender restrooms, and active operational status.
- Natural Language & AI-Assisted Matcher: Understands natural requirements (such as "accessible park restroom in Brooklyn with changing table" or "open library in Midtown") and returns relevant results with contextual explanations.
- Interactive Geospatial Mapping: Powered by Leaflet and OpenStreetMap with custom status pins (Operational, Library, or Maintenance) and 1-click Google Maps turn-by-turn walking directions.
- Resilient Offline Architecture: Features real-time Socrata API fetching with an automatic embedded snapshot fallback so the application works seamlessly under any network condition.
Best Use of NYC Open Data & Real-World Civic Impact
This project directly utilizes the official NYC Open Data Public Restrooms dataset (Dataset ID: i7jb-7jku). Rather than simply displaying raw data, NYC Restroom Finder adds civic value by:
- Resolving Geographic Boundaries: Dynamically mapping borough assignments using computed region codes (
:@computed_region_yeji_bk3q) and operator metadata. - Preventing Wasted Trips: Parsing operational and seasonal statuses to ensure New Yorkers are not directed to facilities closed for capital repairs.
- Empowering Vulnerable Communities: Highlighting ADA ramps, gender-neutral single stalls, and infant changing tables for families and individuals with special accessibility needs.
How We Built It & AI-Assisted "Vibe Coding" Disclosure
In alignment with the hackathon's "vibe coding" and generative AI prompt:
- AI Coding Assistant: Google AI Studio & Gemini were utilized as AI pair programmers to rapidly prototype the responsive layout, structure Socrata Open Data API transformations, implement the Haversine geospatial proximity algorithm, and refine accessible UX components.
- Frontend Architecture: Built with modern vanilla JavaScript (ES6+), HTML5, and clean CSS3 with zero framework overhead for sub-second mobile load times.
- Geospatial & Mapping: Integrated Leaflet.js and OpenStreetMap for interactive map rendering, marker clustering, and bounding box synchronization.
- Data Pipeline: Socrata Open Data API endpoint (
https://data.cityofnewyork.us/resource/i7jb-7jku.json).
Challenges We Ran Into
- Schema Normalization: Normalizing disparate data formats across different city agencies (NYC Parks, NYPL, Brooklyn Public Library, Queens Public Library, and private POPS operators).
- Resilience Against API Latency: Implementing an intelligent hybrid architecture that attempts live Socrata fetching while seamlessly falling back to an embedded 1,066-facility dataset snapshot if offline or rate-limited.
- Strict Accessibility & Clean UX: Eliminating emojis in favor of clean, professional SVG icons and high-contrast color palettes for improved readability.
Accomplishments That We're Proud Of
- Delivered a zero-dependency, ultra-fast web application that requires no installation and works across any desktop or mobile browser.
- Created an intuitive, mobile-friendly interface with custom SVG iconography and instant 1-click turn-by-turn directions.
- Successfully indexed and mapped 100% of NYC's public restrooms across all 5 boroughs with exact coordinates.
What We Learned
- How to query and transform complex NYC Open Data Socrata datasets efficiently on the client side.
- Techniques for optimizing geospatial calculations and Leaflet map rendering for mobile web performance.
- The power of AI-assisted "vibe coding" to accelerate development from ideation to a fully functional civic application in hours.
What's Next for NYC Restroom Finder
- Crowdsourced Cleanliness Ratings: Community-submitted cleanliness reviews and real-time status updates.
- Subway Commuter Offline PWA: Enhanced progressive web app caching for underground commuters without mobile connectivity.
- Multilingual Support: Translations in Spanish, Chinese, Russian, and Bengali to serve all diverse New York communities.
Built With
- ai
- civic-tech
- css3
- gemini
- gis
- html5
- javascript
- leaflet.js
- nyc-open-data
- open-data
- socrata-api


Log in or sign up for Devpost to join the conversation.