Shimoku docs
Search…
Filters

Multifilter bar

Suppose you have a multi-variable data set and want to compare, visualize and filter these more complex data. You can use the multifilter bar and build filters with different visualizations. The procedure is to use:
data_ = pd.read_csv('../data/test_multifilter.csv')
y: List[str] = [
'Acné', 'Adeslas', 'Asisa',
'Aspy', 'Caser', 'Clínica Navarra', 'Cualtis', 'Cáncer', 'DKV',
'Depresión', 'Dermatólogo', 'Dermatólogo Adeslas', 'Diabetes',
'Fundación Jiménez Díaz', 'Ginecólogo', 'Ginecólogo Adeslas',
'HM Hospitales', 'Hemorroides', 'IMQ', 'Preving', 'Psicólogo',
'Psiquiatra', 'Quirón', 'Quirón Prevención + quirónprevención',
'Quirón+Quirónsalud', 'Quirónsalud', 'Ruber', 'Ruber Internacional',
'Ruber Juan Bravo', 'Sanitas', 'Teknon', 'Traumatólogo', 'Vithas'
]
filters: Dict = {
'order': 0,
'filter_cols': [
'seccion', 'frecuencia', 'region',
],
}
data_1 = data_[data_['seccion'].isin(['Empresas hospitalarias', 'Empresas PRL'])]
menu_path = 'multifilter'
shimoku.plt.bar(
data=data_1,
x='fecha', y=y,
menu_path=menu_path,
order=1, # the filter is order=0
rows_size=2,
cols_size=12,
filters=filters,
)
The result looks like this:
Filters can be selected to show specific aspects.
The small squares can be clicked too to show or hide data.
Copy link