Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for customization of data catalog filters #573

Closed
2 tasks
danielfdsilva opened this issue Jun 30, 2023 · 3 comments
Closed
2 tasks

Allow for customization of data catalog filters #573

danielfdsilva opened this issue Jun 30, 2023 · 3 comments
Assignees

Comments

@danielfdsilva
Copy link
Collaborator

From discussion on: https://github.com/NASA-IMPACT/veda-architecture/issues/273

Each instance should be able to define what filters are available in the data catalog page based on dataset properties.
Filtering will be done on a direct property matching basis, without complex logic.

Defining filters

Automatically inferred

This option would have the users add values under a specific key in the dataset frontmatter (eg. taxonomy). The app would then gather all unique values and build a filtering system.

taxonomy:
  Sector:
    - Agriculture, Forestry and Land Use
    - Energy
  Producer:
    - NIST
  Gas Emission:
  -   COx

pros & cons

  • 💚 No need to have filters defined elsewhere
  • 💚 Easily readable
  • 💔 Prone to error, given that users have to spell the filter name exactly

Manual definition

This option requires the users to specify the the filter keys and labels in a separate file, besides adding the values to a dataset frontmatter.

filters = {
  sector: {
    label: 'Sector',
    key: `sector`,
    options : [] // Could be implemented to offer option validation
  },
  gas: {
    label: 'Gas Emission',
    key: `gas-emission`,
  }
}

On the dataset

id: dataset id
name: Some name
sector: Energy
gas-emission: COx

pros & cons

  • 💚 No need to rely on a specific dataset key to hold all values
  • 💚 Allows for values to be validated if array of options is provided
  • 💔 Requires maintenance of taxonomy source
  • 💔💚 Requires users to check file to know the keys, but it is less error prone

Design

The current UI does not accommodate a growing list of filters and has a pretty low hard limit.
We need to find a way to ensure a higher number of filters is supported.

image

Tasks

besides technical implementation

@danielfdsilva danielfdsilva self-assigned this Jun 30, 2023
@ricardoduplos ricardoduplos self-assigned this Jul 6, 2023
@hanbyul-here
Copy link
Collaborator

More related to the original issue: It could be from my ignorance, but can we add this taxonomy metadata to the searchable metadata so we don't need an unexpected number of dropdowns on the page? My preference for searching is always just a plain text search + no limit on the level of taxonomies sounds like it can become chaotic fast.
If we add something like the below in the dataset metadata, and text search would return this dataset when user types 'NIST'

...

taxonomy:
  Sector:
    - Agriculture, Forestry and Land Use
    - Energy
  Producer:
    - NIST
  Gas Emission:
  -   COx

related to this issue: I think the first approach is more aligned with how Veda handles with thematic now. It will be nice to add the validation step to check typos and mistakes in the building process.

@j08lue
Copy link
Contributor

j08lue commented Jul 12, 2023

Taxonomy specification

Hmm, tough choice. I would expect most instances to have a fixed/predefined set of filters, so a centrally maintained list of filters would make sense.

My personal preference would be that the filter values still live under a filters or taxonomy key in the dataset config YAML, instead of the root, but that is all up to you.

UI design

Please remember the two goals with this feature:

  1. Provide browsing users with an overview of the available categories / organization of the catalog
  2. Provide searching users with a quick way to get to what they look for

Filters are obviously the number 1 feature of eCommerce solutions, so perhaps we can learn from those?

Not Amazon

Image

Planetary computer has only one menu (of thematic areas) + a prominent text box for searching

Image

Nordic Nesting (random pick)

Image

danielfdsilva added a commit that referenced this issue Jul 14, 2023
@danielfdsilva
Copy link
Collaborator Author

danielfdsilva commented Jul 26, 2023

Completed by #583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants