Open JoryGriffith opened 2 days ago
This is absolutely necessary! Current workaround is to use the markdown feature in the input description to link to the list of acceptable values.
Proposed solution 1:
Proposed solution 2:
options_example:
label: Options example
description: The user has to select between a fixed number of text options. Also called select or enum. The script receives the selected option as text.
type: options
options: http://site.com/api/optionList
example: third option
More expandable, but then we'd need to set expectations on the option formats we can read.
@glaroc, thoughts?
What about using GADM? They have a curated collection of territories and their subdivisions.
(and using the word "Country" may be debatable as well, not everyone agrees on what a country is...)
The complicated part is the dependent dropdowns. For example, the choice of states/provinces has to depend on the choice of country. For the dependent dropdown, we could have something like
options_country:
label: Country selector
description: Choice of countries
type: options
options: http://site.com/api/countryList
example: Colombia
options_province:
label: State/province selectore
description: Choice of state/province
type: options_dependence
options: http://site.com/api/provinceList/{options_country}
example: Putomayo
Quickest fix here is probably to query everything in GADM once and make a static JSON of the regions/subregions/subsubregions hierarchy
We have these endpoints already here: https://geoio.biodiversite-quebec.ca/country_list and https://geoio.biodiversite-quebec.ca/state_list?country_name=Colombia
(and using the word "Country" may be debatable as well, not everyone agrees on what a country is...)
Huge agree here. These are things that should be addressed at a higher level of governance within GEO-BON, but the choices we make here could absolutely impact the reception of this platform by national policy makers, e.g. the decision to include Taiwan in the country list above.
We obviously won't be the ones making those decisions. We could use the same country list the CBD/UN uses. Or change the title to Country/Territory
We could use the same country list the CBD/UN uses. Or change the title to Country/Territory
Agreed, and I think that's a decision for which we can ask advice from GEOBON leadership. Happy to bring it up on discourse for the IC.
We have these endpoints already here: https://geoio.biodiversite-quebec.ca/country_list and https://geoio.biodiversite-quebec.ca/state_list?country_name=Colombia
Bare minimum, these should be linked in the description of the scripts referring to this country list while we find a more permanent solution.
As for the debate on what a country is, I'd gladly wash my hands of it and refer to some international authority... as long as they provide the polygons along with the region names!
It would be great to have a drop down menu with searchable country names because it is too easy to miswrite.