vikus-viewer icon indicating copy to clipboard operation
vikus-viewer copied to clipboard

How to specify hierarchical filters

Open amyisard opened this issue 1 year ago • 8 comments

Hi,

I see from some previous Issues that it's possible to have hierarchical filters for the keywords, but I haven't found information on how to specify them - is it possible using the main branch code?

Thanks,

Amy

amyisard avatar Oct 10 '24 16:10 amyisard

Hey, I am merging currently some features into main. Did you resolve the filters yourself ?

cpietsch avatar Nov 18 '24 11:11 cpietsch

Hi, I think I originally meant something different by hierarchical filters from what I had seen in the previous issues - we were thinknig of having for example a filter "langage" and when you click on that you see filters "german, english, hebrew, spanish" but we then realised it wasn't clear how that would interact with the other filter behaviour and decided we were happy with the way things were anyway! And on rereading the other issues I thought they were probably referring to the fact that when you select one keyword, the others only remain visible if they are relevant in the context of the one which has been selected.

amyisard avatar Nov 18 '24 12:11 amyisard

Is this similar to your expectations: https://vikus.kunst-im-oeffentlichen-raum-pankow.de/ ?

The other route would be to have custom filters like this: https://cpietsch.github.io/kunsthaus-viewer/

cpietsch avatar Nov 18 '24 14:11 cpietsch

Oh yes, the first one is exactly what I was thinking of - is that already possible?

amyisard avatar Nov 18 '24 14:11 amyisard

Yes, that should already work. You can try to pull the changes from here: https://github.com/cpietsch/vikus-viewer/compare/master...hierarchical-keywords

Your keywords in data.csv need this format then: level1:level2:level3,level1:level2,....

cpietsch avatar Nov 18 '24 17:11 cpietsch

If this does not work, let me know

cpietsch avatar Nov 18 '24 17:11 cpietsch

Thanks - I'm going to be away for a couple of weeks but I will try this out when I get back. Are you planning to merge the hierarchical filters into the main branch?

amyisard avatar Nov 19 '24 09:11 amyisard

I left certain features as branches so that the main Viewer does not get overloaded with options. I wanted to keep some flexibility. But I see more and more that those features should be integrated modular into the codebase.

cpietsch avatar Nov 19 '24 11:11 cpietsch

Hello--I'm trying to get hierarchical filters working with a similarity view, and I'm not having any luck. I tried replacing tags.js and utils.js from the hierarchical-filters branch--I see a console error. I tried installing the whole hierarchical-filters branch--the filters load, but images do not. Any tips? Thanks!

cweinard avatar Sep 29 '25 01:09 cweinard

Hi @cweinard, using the branch should work - but maybe something has changed in the config.

I have seen that @sebastianruffberlin did adapt the branch here: https://github.com/sebastianruffberlin/stadtmuseum-viewer (https://sebastianruffberlin.github.io/stadtmuseum-viewer/)

The other route for now would be trying the new crossfilter: https://github.com/cpietsch/vikus-viewer/issues/45

cpietsch avatar Sep 30 '25 09:09 cpietsch

you can now activate the hierarchical layout via the config.

  "filter": {
    "type": "hierarchical"
  },

example: https://cpietsch.github.io/vikus-viewer/?config=https://vikusviewer.fh-potsdam.de/vangogh/data/config-dummy.json

cpietsch avatar Sep 30 '25 11:09 cpietsch

Very cool! I'll give it a try. Thanks!

cweinard avatar Oct 01 '25 16:10 cweinard