def add_previous_traffic(index, incidents):
  """Adds traffic level for the preceeding hour to the incident"""
  incidents[index]['previous_traffic'] = [incident['traffic_level'] for incident in reversed(incidents[index-6:index])]
  
  return incidents[index]