Auditors reported only 1 percent of the crewmembers were rude, but "very friendly" experiences only accounted for 38.4 percent of interactions.
Question: Overall, how would you rate the service you received on this visit?
Click the header rows to sort the data.
'Chain', 'Total' => 'Total', 'very_friendly_count' => 'Count', 'very_friendly_percent' => 'Percent', 'pleasant_count' => 'Count', 'pleasant_percent' => 'Percent', 'average_count' => 'Count', 'average_percent' => 'Percent', 'lack_count' => 'Count', 'lack_percent' => 'Percent', 'rude_count' => 'Count', 'rude_percent' => 'Percent', ); $sort_whitelist = array( 'Chain', 'very_friendly_percent', 'pleasant_percent', 'average_percent', 'lack_percent', 'rude_percent' ); $header = json_decode( $header_json ); $data = json_decode( $data_json, TRUE ); $sort_field = 'Chain'; if ( isset( $_GET['sort'] ) && in_array( $_GET['sort'], $sort_whitelist ) ) { $sort_field = $_GET['sort']; } $sort_dir = 'asc'; if ( isset( $_GET['dir'] ) && in_array( $_GET['dir'], array( 'desc', 'asc' ) ) ) { $sort_dir = $_GET['dir']; } $header_row_data = array(); foreach ( $header as $field ) { $sort_indicator = ''; $dest_dir = 'asc'; if ( $sort_field == $field ) { $sort_indicator = theme_tablesort_indicator( array( 'style' => $sort_dir ) ); if ( $sort_dir == 'asc' ) { $dest_dir = 'desc'; } } if ( in_array( $field, $sort_whitelist ) ) { $header_row_data[] = array( 'data' => l( $full_headers[$field], $_GET['q'], array( 'query' => array( 'sort' => $field, 'dir' => $dest_dir), 'html' => TRUE ) ) . $sort_indicator, 'class' => 'top-header', ); } else { $header_row_data[] = array( 'data' => $full_headers[$field], 'class' => 'top-header', ); } } $table_rows = array(); $table_rows[] = array( array( 'data' => ' ', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Very Friendly', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Pleasant', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Average', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Lackadaisical/Mechanical', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Rude', 'colspan' => 2, 'class' => 'top-header' ), ); $table_rows[] = $header_row_data; $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$sort_field]; } if ( $sort_dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $sort_field ) { $class = 'data'; if ( $sort_field == 'Chain' ) { $class = 'company'; } $row_cells[] = array( 'data' => $data[$key][$sort_field], 'class' => $class ); } $sorted_rows[] = $row_cells; } foreach ( $sorted_rows as $data_row ) { $table_rows[] = $data_row; } $table_rows[] = array( array('data' => 'Summary','class' => 'total-row',), array('data' => '2,002','class' => 'total-row',), array('data' => '770','class' => 'total-row',), array('data' => '38.5%','class' => 'total-row',), array('data' => '771','class' => 'total-row',), array('data' => '38.5%','class' => 'total-row',), array('data' => '330','class' => 'total-row',), array('data' => '16.5%','class' => 'total-row',), array('data' => '110','class' => 'total-row',), array('data' => '5.5%','class' => 'total-row',), array('data' => '21','class' => 'total-row',), array('data' => '1.0%','class' => 'total-row',), ); // Summary 2002 770 0.385 771 0.385 330 0.165 110 0.055 21 0.01 print theme( 'table', array( 'header' => NULL, 'rows' => $table_rows, 'attributes' => array( 'id' => 'datatable' ) ) ); /* * this is a support function to sort the data based on the field & direction. * it returns an array that's used for the table row function get_2011_dt_cs_chart_sorted_rows( $data, $field, $dir, $header ) { $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$field]; } if ( $dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $field ) { $class = 'data'; $cell_data = $data[$key][$field]; if ( $field == 'Chain' ) { $class = 'company'; } if ( preg_match( '/percent/', $field ) ) { $cell_data .= '%'; } $row_cells[] = array( 'data' => $cell_data, 'class' => $class ); } $sorted_rows[] = $row_cells; } return $sorted_rows; } */ ?>Drive-Thru Benchmarks