The main purpose of this project is for me to learn how to build interactive web applications or dashboards with R. To do so, I set myself the target of roughly replicating the interactive elements of the Elections Ontario's Graphics & Charts portal using Shiny.
The data used is publically available and hosted by Elections Ontario. The shapefiles for electoral districts are governed by the Open Use Data Product License Agreement. I have not republished the data in this repo. The scripts used for ingesting and formatting data are provided, however.
This app will be built in stages with new main features and additions to existing features added regularly. As of v1.5, the app now contains all the expected main features, though additions and bugfixes are still expected. The most up-to-date functioning app is available to use here.
Note: In my experience, the renderLeaflet() function in Shiny did not play nicely with R 4.3 at the outset of this project. The reason appears related to the change in the handling of the && operator with vectors rather than scalars in R as of 4.3. This change is covered here. It is for this reason that a legacy version of R is used instead.
See Open Issues for more detail on proposed features (and known issues).