Skip to content

MDIMs: Automatically expand indicator paths of dimensions other than y #5665

@lucasrodes

Description

@lucasrodes

One-liner

Expand the indicator paths of dimensions x, size, and color (currently only y is supported)

This would prevent us hardcoding complete ETL paths as in:

view.indicators.size = Indicator(
catalogPath="grapher/demography/2024-07-15/population/historical#population_historical"
)
view.indicators.color = Indicator(catalogPath="grapher/regions/2023-01-01/regions/regions#owid_region")

I think that what needs to change is the logic in build_views and the calls to _expand_indicator_path.

view = {
"dimensions": {dim_name: indicator[dim_name] for dim_name in self.dimension_names},
"indicators": {
"y": self._expand_indicator_path(
indicator.short_name
), # TODO: Add support for (i) support "x", "color", "size"; (ii) display settings
},
}

ranked as 4 in importance/annoyance (1-5 scale), from work in #5593

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions