Add audio support and `display` parameter.
Currently, we determine the media type naively by checking if the file extension is included in:
[
"mp3",
"wav",
"aac",
"ogg",
"flac",
"wma",
"m4a",
"aiff",
"midi",
"ape",
"wavpack",
"alac",
"ac3",
"opus",
]
Audio is autoplayed on hover.
When displaying audio, the grid view doesn't have an image, but I can imagine it will be useful to display something there.
That's why there's a new parameter `display` added to all plot types that allows you to display the value of one or more columns in the grid view, as such:
<img width="1291" alt="image" src="https://github.com/gietema/clusterfun/assets/20994144/c33a7c98-d326-47e3-a3fc-37c890a9096f">
This can be created like this:
python
import pandas as pd
import clusterfun as clt
df = pd.read_parquet("https://raw.githubusercontent.com/gietema/clusterfun-data/main/libri_speech_test_clean.parquet")
print(clt.grid(
df,
title="LibriSpeech test-clean",
media="filepath",
show=False,
display="translation",
))
A less naive way of checking for audio support can be added later if this is not sufficient.