Boston 311 Hotline Response Prediction¶

Boston 311 is a non-emergency hotline for constituents to request City services and information.

While there have been tens of thousands of requests submitted since the hotlines installation, not every request can be, or is completed. Some service requests are time sensitive for public health and safety, including reporting a broken traffic signal, requesting needle cleanup, and getting a pothole fixed. Click here to find out more information about Boston's 311 program.

There has been online debate surrounding the efficacy of the 311 hotline in completing requests. Some constituents argue 311 is an ineffective way to pacify the public. One UniversalHUB user stated they were still waiting for a solution after having sent in 50+ reports of an inaccessible wheelchair ramp on the street. Others staunchly defend 311. Another UniversalHUB poster said, "311 has become the elite's whipping boy that allows them to keep complaining about the same thing over and over." Read more of this discussion here.

Constituents should be able to predict the completion timeline of their request, (or whether their request will be completed at all). This prediction model will serve to hold the government accountable for completing 311 service requests in an appropriate time frame. This project will work to identify which service requests are prioritized and understand the relationship between a request's features (e.g. type, department, ward, source) and its expected completion timeframe. This will allow us to see which requests the City of Boston prioritizes.The ultimate goal of this project is to build a predictor that will allow constituents to know an expected timeline for their 311 request's completion.

Dataset¶

This project will use a dataset of all 311 service requests from 2011 to 2023, provided by the City of Boston to observe the following features for each request.

  • case_enquiry_id
    • identification number
  • open_dt
    • date of request submission
  • closed_dt
    • date of request colsure
  • ontime
    • request is either ontime or overdue
  • case_status
    • requests current status
  • closure_reason
    • text indicating findings or work done to close a given case
  • case_title
    • title given to a case, entered by call takers on a call to call basis
  • subject
    • part of a case classification hierarchy (subject -> reason -> type)
    • subject denotes which department a case is assigned to
  • reason
    • part of a case classification hierarchy (subject -> reason -> type)
    • this is an overall 'umbrella' for a collection of similar case types
  • type
    • part of a case classification hierarchy (subject -> reason -> type)
    • individual case type entered by call taxer
  • department
    • department a case is assigned to
  • fire_district
    • boston fire department fire district a case falls within
  • pwd_district
    • public works district a case falls within
  • city_council_district
    • city council district a case falls within
  • police_district
    • police district a case falls within
  • neighborhood
    • neighborhood relayed by caller
    • there are redundancies and missing values within this field
  • neighborhood_services_district
    • districts under the Office of Neighborhood Services, a City of Boston office that "encourages, facilitates, and maximizes citizen input and participation in all aspects of government through service requests, neighborhood meetings, mailings, and emergency responses."
  • ward
    • election ward a case falls within
  • precinct
    • election precinct a case falls within
  • location_zipcode
    • zip code a case falls within
case_enquiry_id open_dt target_dt closed_dt ontime case_status closure_reason case_title subject reason type queue department submittedphoto closedphoto location fire_district pwd_district city_council_district police_district neighborhood neighborhood_services_district ward precinct location_street_name location_zipcode latitude longitude source
1.01E+11 2/17/2023 7:54 2/21/2023 8:30 OVERDUE Open Pothole Public Works Department Highway Maintenance Request for Pothole Repair BWSC_All Cases BWSC INTERSECTION of Fenwood Rd & Huntington Ave Boston MA 9 10A 7 B2 Mission Hill 14 10 1003 INTERSECTION Fenwood Rd & Huntington Ave 42.3594 -71.0587 City Worker App
1.01E+11 2/20/2023 10:26 2/20/2024 10:26 ONTIME Open Tree Maintenance Requests Parks & Recreation Department Trees Tree Maintenance Requests PARK_Tree Maintenance Request PARK 280 W Broadway South Boston MA 02127 6 5 2 C6 South Boston / South Boston Waterfront 5 Ward 6 601 280 W Broadway 2127 42.3392 -71.051 Constituent Call
1.01E+11 2/25/2023 10:41 3/15/2023 8:30 ONTIME Open Abandoned Vehicles Transportation - Traffic Division Enforcement & Abandoned Vehicles Abandoned Vehicles BTDT_AVRS Interface Queue BTDT 45 Hobart St Brighton MA 02135 11 4 9 D14 Allston / Brighton 15 Ward 22 2211 45 Hobart St 2135 42.3551 -71.1594 Citizens Connect App
1.01E+11 1/1/2023 0:50 1/4/2023 8:30 1/3/2023 9:34 ONTIME Closed Case Closed. Closed date : 2023-01-03 09:34:10.27 Case Noted Parking Enforcement Transportation - Traffic Division Enforcement & Abandoned Vehicles Parking Enforcement BTDT_Parking Enforcement BTDT 6 Binford St Boston MA 02210 0 Boston 0 6 6 Binford St 2210 42.3594 -71.0587 Citizens Connect App
1.01E+11 2/25/2023 11:12 ONTIME Open Mattress Pickup Public Works Department Sanitation Mattress_Pickup PWDx_WM_Mattress_Pickup PWDx 12 Centre Ave Dorchester MA 02124 8 7 3 C11 Dorchester 8 Ward 16 1603 12 Centre Ave 2124 42.2926 -71.0632 Constituent Call
1.01E+11 1/1/2023 3:23 1/3/2023 13:17 ONTIME Closed Case Closed. Closed date : 2023-01-03 13:17:53.173 Case Resolved Emailed owner to see if dog was found. AT Animal Lost Animal Control Animal Issues Animal Lost ANML02_LostFound ANML 70 E India Row Boston MA 02110 3 1C 1 A1 Downtown / Financial District 3 Ward 3 306 70 E India Row 2110 42.3582 -71.0506 Constituent Call

There is potential to be concerned about a lack of correlation between features, such as location, and the completion time of a request. That being said, it is only logical that certain categories of requests (the reason feature of the dataset) will be prioritzed, such as needle pickup requests being fulfilled faster then tree maintence requests. Having this inherent inequalities in completion time will allow the project and prediction model to be completed, even if there are no further correlating features found after completing the linear regression models for each factor.

Method¶

This project will utilize machine learning prediction by grouping the data based on factor (i.e subject, reason, type, department, fire_district, etc.) and comparing it to completion time in a linear regression. After training, the models will be tested and we will identify which factors have the best ability to predict response rate/ completion, then we will build a final predictor using the most relevant factors.


Note: How to determine the model's accuracy will be a group discussion about sensitivity and specificity