<commit_before># bokeh-extensions
Hacks to extend Bokeh functionality

## Grid Selection Sorting
This tool requires the `div` containing the DataTable to have a `data` tag that indicates the unique identifier field for that table (i.e. `scholar_id`).
```html
<div class="plotdiv" data-sorting-matcher="[Field Name]">
```
This `sorting-matcher` field is used to filter out selected rows from the datasource and push them to the top of the table.<commit_msg>adds instructions for Value Sorting<commit_after># bokeh-extensions
Hacks to extend Bokeh functionality

## Grid Selection Sorting
This tool requires the `div` containing the DataTable to have a `data` tag that indicates the unique identifier field for that table (i.e. `scholar_id`).
```html
<div class="plotdiv" data-sorting-matcher="<Field Name>">
```
This `sorting-matcher` field is used to filter out selected rows from the datasource and push them to the top of the table.

## Value Soring
This requires another `data` tag:
```html
<div class="plotdiv" data-sorting-fields="[Array, Of, Field, Names]">
```
The array of field names is used to build drop down menus used to sort the data.
{'fraction_non_alphanumeric': 0.09320557491289198, 'fraction_numerical': 0.0, 'mean_word_length': 5.244565217391305, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '993803', 'n_tokens_mistral': 333, 'n_tokens_neox': 323, 'n_words': 156}