Skip to content

collections detail view: allow filtering for specific location #1117

@fhennig

Description

@fhennig

Currently for each variant in the details view, we show the count. But it'd be great if we could restrict it to a certain location, using the location filter.

Problem: At the moment we do not know the name of the location fields for each organism. For date, we have the 'mainDateField' in the config, but not for location fields.

Should we add this this to the dashboard config as well? Seems like the obvious way to go, only drawback is that the config is growing in size again. If we were to add this, I'd propose to call the new setting locationFields and it's a list, probably in most cases [region, country].

Edit: Turns out that in the staging application config, we already have a bunch more settings configured, but only for victoria:

    victoria:
      lapis:
        url: "https://api.loculus.staging.genspectrum.org/b-victoria"
        mainDateField: "sampleCollectionDateRangeLower"
        locationFields:
          - "country"
          - "division"
        authorAffiliationsField: "authorAffiliations"
        authorsField: "authors"
        ...

Interesting! This was added in 1d80909 — feat(website): add influenza B and B/Victoria dashboards (#615)

Edit2: Turns out that for denv there are also already location fields defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions