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

EPIC: Plot refactor metadata #493

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open

EPIC: Plot refactor metadata #493

wants to merge 115 commits into from

Conversation

M-Kusumgar
Copy link
Contributor

@M-Kusumgar M-Kusumgar commented Feb 7, 2024

This can be the temp branch for the plot cleanup and we can just freely push what we want to this whenever we need it during the plot cleanup epic, for reference, the type of metadata is:

type Warning = {
    locations: string[],
    text: string
};

type FilterId = string

type StateFilterId = string

type FilterType = {
    id: FilterId,
    column_id: string,
    options: FilterOption[]
}

type FilterRef = {
    filterId: FilterId,
    label: string,
    stateFilterId: string
}

type PlotSettingEffect = {
    setFilters?: FilterRef[],
    setMultiple?: StateFilterId[],
    setFilterValues?: Record<StateFilterId, string[]>,
    setVisible?: StateFilterId[]
}

type PlotSettingOption = {
    id: string,
    label: string,
    effect: PlotSettingEffect
}

type PlotSetting = {
    id: string,
    label: string,
    options: PlotSettingOption[],
   value?: string,
    visible?: boolean
}

type PlotSettingsControl = {
    defaultEffect: PlotSettingEffect,
    plotSettings: PlotSetting
}

type NewMetadata = {
    // this has all possible filter types i.e.
    // area_id, area_level, calendar_quarter, indicator, sex, age_group
    filterTypes: FilterType[],

    // this has extra info about indicators such as scale, format, accuracy, but
    // this will have the same length as the indicator filter type options
    // we just dont need everything in here in the filterTypes
    indicators: Indicator[],

    plotSettingsControl: {
        choropleth: PlotSettingsControl,
        barchart: PlotSettingsControl,
        table: PlotSettingsControl,
        bubble: PlotSettingsControl
    },

    warnings: Warning[]
}

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 98.69281% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 98.53%. Comparing base (f5c5736) to head (db7779b).
Report is 3 commits behind head on master.

Files Patch % Lines
R/endpoints.R 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #493      +/-   ##
==========================================
+ Coverage   98.49%   98.53%   +0.03%     
==========================================
  Files          29       29              
  Lines        2389     2449      +60     
==========================================
+ Hits         2353     2413      +60     
  Misses         36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@r-ash r-ash changed the title Tmp epic plot cleanup EPIC: Plot refactor metadata Sep 6, 2024
@r-ash r-ash self-requested a review September 10, 2024 15:48
@r-ash r-ash marked this pull request as ready for review September 10, 2024 16:24
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

Successfully merging this pull request may close these issues.

2 participants