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

Add optional approaches to region configuration (XLSX template, GUI) #414

Open
3 tasks
carlhiggs opened this issue Apr 17, 2024 · 4 comments
Open
3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@carlhiggs
Copy link
Collaborator

The current approach to configuration involves editing a template YAML text file that contains a hierarchy of parameters, with descriptions and values for these.

Previously parts of the project had used an Excel xlsx file approach to make configuration easier for persons used to working in that format (e.g. here). Other parts of the project used text-based approaches to configuration (e.g. here). To simplify the approach for users, configuration was previously consolidated into the current approach. However, this still has limitations. For example, the formal requirements of YAML text entry (e.g. indentation, and spacing following colons) are not obvious to those not familiar with the format.

@eugenrb shared an updated Excel region configuration template that has been helpful for some regions, and the thought occurs that implementation of the option to load region configuration from an Excel file could be do-able in the short-medium term. For example, when loading a region a check would be made to see if a .yml file were present and loadable for that region's codename; if not, an attempt would be made to do the same with an .xlsx file of that name.

In the medium term, it would also be desirable to have a GUI for region configuration within the GHSCI web app. This would perhaps be most ideal, as feedback on validity of inputs could be provided to users in real time (e.g. path checking, correct type of inputs etc). However, it will take more time to develop the code for this.

So, this issue has three parts:

  • optional configuration via xlsx template
  • optional configuration via GUI
  • option to export/convert configuration files between formats as an additional helper utility
@carlhiggs carlhiggs added the enhancement New feature or request label Apr 17, 2024
@carlhiggs carlhiggs self-assigned this Apr 17, 2024
@ryn-trnr ryn-trnr self-assigned this Apr 18, 2024
@ryn-trnr
Copy link
Collaborator

As we discussed this week Carl, happy to assign myself to this.

@carlhiggs
Copy link
Collaborator Author

As we discussed this week Carl, happy to assign myself to this.

Hi Ryan, happy for you to work on this; although I think we discussed that it might be good for you to specifically to focus on implementation of the new indicators you've been developing that make use of additional sources like Google Earth Engine. That's a slightly different thing, and not necessarily straightforward either, so great if you could do that (happy if you want to make it an issue!).

Great if you want to work on this too of course, but given your work on the other indicators, it will be great to progress with a draft of how to integrate those into the workflow.

@ryn-trnr
Copy link
Collaborator

I see, apologies Carl, my misunderstanding. I'll make a seperate issue about integrating the new indicators and prioritise this.

@ryn-trnr ryn-trnr removed their assignment Apr 19, 2024
carlhiggs added a commit that referenced this issue Jul 19, 2024
carlhiggs added a commit that referenced this issue Jul 30, 2024
…dates, can apply for other aspects) and backwards/forwards transformation of values when bound to and read from configuration file. Towards #414
@carlhiggs
Copy link
Collaborator Author

I've implemented a sketch GUI for configuration -- not yet saving, but does the major aspect of providing a form that partitions up the configuration file for completion in logical steps. A configuration can be read from and written to in memory, and basic validation has been implemented (and can be expanded on), e.g. a warning if end date for GTFS analysis is earlier than start date. There are also some proof of concept linkages - e.g. if you select a country from a list, it will auto-populate the 2-letter country code saving someone looking this up.

To do
-[ ] expand look up table (e.g. include continent and income groups
-[ ] implement file picker
-[ ] use date picker for all dates
-[ ] implement more validation rules

Here is current look:
image

and for example, by select 'Sri Lanka', the country code was modified (as seen on right hand side below) to reflect this (although not yet the continent, but this could be done)
image

Users can skip between section headings

More work to be done, but its a proof of concept and broadly works. Idea is to include this in the GHSCI app.

carlhiggs added a commit that referenced this issue Aug 5, 2024
… of country-related data (income group, country code, CRS using UTM zone for country centroid --- not perfect, but potentially a useful starting point), file picker, date picker, some optional selection toggling, and formatting using cards. More work to do, but it is getting to a point where this will be a more intuitive and useful approach to use than the yml file. Addresses #414
carlhiggs added a commit that referenced this issue Aug 6, 2024
carlhiggs added a commit that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants