Skip to content

Add logic to import "production_" runs into the VIEWS dashboard #70

@angelicalmcgowan

Description

@angelicalmcgowan

Description

As mentioned in Issue #69 , we must update the dashboard code in order to incorporate the new runs into the dashboard since they will follow a new naming structure and the dashboard currently uses a string-based filter approach to select which runs to import.

Upon previous consultations with the dashboard consultant, there are 2 realistic options ahead:

Option 1:

We add a hard-coded filter to how the dashboard looks up runs in the api, asking it to search for fatalities (like it does now) and for production.

Implications: With this option, the sorting function that currently organizes the list of models for which datasets are available in the advanced data selection menu on the VIEWS dashboard will no longer work properly. It currently sorts datasets based on the integer in their name (fatalities001, fatalities002 – placing the datasets with the highest integer on top). With this option, the sorting issue will not be solved until we have sufficient metadata in the api, planned for the next version of the API.

Cost with a consultant: A few hours, if we're lucky and nothing crashes. Previous contracts have been priced at around 700 SEK/hrs + VAT.

Alternative solution: We can also attempt to make this change ourselves, and hope that nothing breaks (the codebase is incredibly instable). The string that the importer searches for, which needs to be added to, can be found below (code here).

Image

This is the cheapest option, but adds more technical debt to an already fragile system.

Option 2:

We set up a look-up function instead of the string-based filtering that the dashboard currently uses. This would be a flat file somewhere on the dashboard's server, in which we – every time we launch a new model – add the string for the model name (probably a list). The dashboard will then only fetch datasets from the models that are a perfect match for those strings.

Implications: With this option, there is an opportunity to uphold logical sorting of available models in the dashboard's advanced data selection menu. It would entail adding such information to the flat file above, and use that for sorting instead of the current integer-based sorting.

Cost with a consultant: Likely 1-2 days, if we're lucky and nothing crashes. Not recommended to tackle ourselves.

This is the most expensive option, but clears some technical debt.

There are absolutely no funds for this in Uppsala, so any external services would have to come from a PRIO project.

Tasks

  • Choose option
  • Choose assignee for implementation, and–if relevant–set up new contract with consultant
  • Implement and test option

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions