Skip to content

[Feature Request]: Add admin level labels #1464

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

Open
wadhwamatic opened this issue Mar 21, 2025 · 2 comments
Open

[Feature Request]: Add admin level labels #1464

wadhwamatic opened this issue Mar 21, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request triage to be triaged for next action

Comments

@wadhwamatic
Copy link
Member

Provide a clear and concise description of what you want to happen.

Admin levels (i.e. admin 1, admin 2) are not terms that all users will be familiar with. They would instead know the local names for the admin levels, like province, district, etc.

  1. I want to be able to configure the labels in layers.json. For example, see the last line here:
  "admin_boundaries": {
    "type": "boundary",
    "path": "data/mozambique/moz_bnd_adm3_WFP.json",
    "admin_code": "adm3_source_id",
    "admin_level_codes": ["adm1_source_id", "adm2_source_id", "adm3_source_id"],
    "admin_level_names": ["adm1_name", "adm2_name", "adm3_name"],
    "admin_level_local_names": ["adm1_name", "adm2_name", "adm3_name"],
    "admin_level_labels": ["Province", "District", "Sub-district"]
    }
  }
  1. The labels should be translatable through the translation json files
  2. Users should see the labels instead of 'Admin x' in the PRISM UI. This includes in Charts > Admin selection; and Analysis > Baseline layer selection

Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.

No response

@wadhwamatic wadhwamatic added enhancement New feature or request triage to be triaged for next action labels Mar 21, 2025
@wadhwamatic wadhwamatic self-assigned this Mar 21, 2025
@ericboucher
Copy link
Collaborator

ericboucher commented Apr 3, 2025

Maybe we should switch to a map by level? Something like this?

"admin_boundaries": {
  "type": "boundary",
  "path": "data/mozambique/moz_bnd_adm3_WFP.json",
  "admin_levels": {
    "admin_1": {
      "code": "adm1_source_id",
      "local_name": "adm1_name",
      "label": "Province"
    },
    "admin_2": {
      "code": "adm2_source_id",
      "local_name": "adm2_name",
      "label": "District"
    },
    "admin_3": {
      "code": "adm3_source_id",
      "local_name": "adm3_name",
      "label": "Sub-district"
    }
  }
}

or even using numbers directly as keys 0, 1, ... Let's investigate if that would help make the admin logic and chart logic simpler

@wadhwamatic
Copy link
Member Author

Yes, that approach sounds good @ericboucher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage to be triaged for next action
Projects
None yet
Development

No branches or pull requests

2 participants