Context
The country view of frequencies and GAs lists all countries alphabetically such that geographically adjacent countries can place far apart in the visualization. Users want to compare variant circulation patterns for countries in the same region (e.g., USA, Canada, and Mexico for North America).
Description
The visualization should place countries from the same regions together.
Possible solutions
Some possible solutions in the order they occurred to me:
Option 1. Add a new UI grouping level for region and plot panels per country within that grouping. The UI would need to know the distinct list of regions from a country-specific JSON and the mapping of country to region.
Option 2. Sort countries in the MLR JSON alphabetically by region and then country and force the viz app to plot countries in the order they appear in the JSON without any change to the grouping of the panels. The region information would not be available to the UI or the user, so users would need to know which countries map to which regions (or at least which countries map to to different regions).
Option 3. Prepend the region name to the country name in the MLR JSON (e.g., "North America: USA") and continue to sort panels alphabetically by location label. The region/country mapping would be explicitly included in the JSON and displayed to the user. The location labels would be more verbose and long names would obscure patterns in the frequency forecasts or GAs.
Option 4. Combine option 1 and 3. Add the region name to the country name in the MLR JSON in the workflow. Parse the region and country names from the location name in the viz app and plot a subheader per new region name encountered while looping through location names. Regions will be sorted alphabetically and countries will appear alphabetically within regions. The viz app logic would be custom to the country-level view with the current logic for the region view. Country names will not be any more verbose.
Options 1 and 4 require changes to the viz, JSON, and workflow. Options 2 and 3 require changes to the workflow and JSON.
Context
The country view of frequencies and GAs lists all countries alphabetically such that geographically adjacent countries can place far apart in the visualization. Users want to compare variant circulation patterns for countries in the same region (e.g., USA, Canada, and Mexico for North America).
Description
The visualization should place countries from the same regions together.
Possible solutions
Some possible solutions in the order they occurred to me:
Option 1. Add a new UI grouping level for region and plot panels per country within that grouping. The UI would need to know the distinct list of regions from a country-specific JSON and the mapping of country to region.
Option 2. Sort countries in the MLR JSON alphabetically by region and then country and force the viz app to plot countries in the order they appear in the JSON without any change to the grouping of the panels. The region information would not be available to the UI or the user, so users would need to know which countries map to which regions (or at least which countries map to to different regions).
Option 3. Prepend the region name to the country name in the MLR JSON (e.g., "North America: USA") and continue to sort panels alphabetically by location label. The region/country mapping would be explicitly included in the JSON and displayed to the user. The location labels would be more verbose and long names would obscure patterns in the frequency forecasts or GAs.
Option 4. Combine option 1 and 3. Add the region name to the country name in the MLR JSON in the workflow. Parse the region and country names from the location name in the viz app and plot a subheader per new region name encountered while looping through location names. Regions will be sorted alphabetically and countries will appear alphabetically within regions. The viz app logic would be custom to the country-level view with the current logic for the region view. Country names will not be any more verbose.
Options 1 and 4 require changes to the viz, JSON, and workflow. Options 2 and 3 require changes to the workflow and JSON.