cmkimber / Elections_Ontario_App

Webapp to explore Elections Ontario data
0 stars 0 forks source link

popup text for district does not update when year changes #2

Closed cmkimber closed 2 months ago

cmkimber commented 2 months ago

In the map_2018_data dev branch, the map popup displaying the winning candidate in a district does not change when the selectInput() for year is changed but the `selectizeInput()' for district remains unchanged. The DataTable showing results changes to reflect the new year correctly.

cmkimber commented 2 months ago

To address this, the handling of popups was moved into a new observer that responds to any change in either the selected year or district. This means that the popup will now refresh if either dropdown is changed. As a result, the filtering of the dataset to show only the winning candidates is now moved into server() and the factor levels of winning parties for colouration are hardcoded.