Create a responsive web application called “NYC Neighborhood Pulse” using HTML, CSS, and vanilla JavaScript. Build the app on top of the NYC Open Data API and use datasets such as 311 Service Requests and Restaurant Inspection Results.
The application should allow users to enter a NYC address, ZIP code, or neighborhood and view an easy-to-understand dashboard about that area. Include:
An interactive map showing nearby 311 complaints and restaurants, with color-coded markers.
Filters for date range, complaint type, city agency, borough, and restaurant inspection grade.
Summary cards showing the total number of complaints, the most common complaint type, the agency receiving the most requests, and the number of restaurants with A, B, or C grades.
Interactive bar and line charts that update whenever the user changes a filter.
A comparison feature that lets users compare two neighborhoods.
A “What does this mean?” section that explains the results in plain language without making unsupported claims.
Dataset information showing the source, last-updated date, update frequency, and links to the relevant NYC Open Data pages and data dictionaries.
Loading indicators, clear error messages, and a friendly empty state when no records are found.
A mobile-friendly, accessible design with keyboard navigation, high color contrast, readable labels, and text alternatives that do not rely only on color.
Use the NYC Open Data Socrata API rather than storing a static copy of the data. Query only the records needed for the selected location, dates, and filters. Organize the JavaScript into reusable functions for API requests, filtering, data processing, map rendering, and chart rendering. Add comments explaining where the dataset IDs and API endpoints are configured. If an API request fails, display sample data clearly labeled “Demo Data” so the interface can still be tested.
First provide the complete project structure, and then write the full code for each file. The finished application should run locally by opening index.html and should not require a paid service.