Hong-Kong-Districts-Info/dashboard-hkdistrictcouncillors

Select by region

Closed this issue · 4 comments

Some people do not know what district they belong to so enable them to guess better by enabling ability filter dropdown by region such as New Territories, Kowloon etc.

Linked to #35. Makes sense to resolve them both together.

Having optional and dependent search boxes aren't super easy! The below doesn't work.

selectizeInput(inputId = "input_dropdowntext",
                       label = "請選擇選區 / Please type or select a district",
                       choices = list(Region = sort(unique(data_master_raw$Region)),
                                      Constituency = sort(unique(data_master_raw$DropDownText)),
                                      DC = sort(unique(data_master_raw$DC)))
                       ), #selectizeInput

image

Made this a spike because what you want is different ways to filter, but at the same time, these filters can impact the choices in a different filter *e.g. Someone chooses Region = "Hong Kong Islands" and then the list of DCs becomes smaller.

From previous experience in my old company, this was quite difficult to achieve.

We should add a filter for "District" before "Constituency"
Capscreen from MyMapHK, Mobile Map App by HK Gov's Lands Dept
IMG_6630
IMG_6631