Building my first web app with Shiny which uses plot() to display a map. I am hoping for some guidance on the most suitable way to render a map in this way based on user input in the UI component (it is a dashboard). An example of my data frame :
> Age Sex Region 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992
> 1 0 - 4 years F North West 4437 4502 4431 4340 4251 4145 4028 3904 3747 3591 3455 3339 3241
> 2 0 - 4 years F South West 5258 5319 5324 5302 5281 5235 5171 5028 4841 4655 4493 4356 4239
> 3 0 - 4 years F North East 9186 9293 9211 9087 8965 8805 8617 8318 7948 7586 7267 6992 6947
> 4 0 - 4 years F South East 40251 40533 40061 39407 38766 37965 37049 36009 34649
As you can see there is a column which contains gender info, one for age info (in groups) and then each column after region contains data for the year and corresponds to data on that observation.
Please advise on the best function / packages to render a map in the UI based on the user input for this type of operation on the data frame.
My code so far uses plotOutput in the UI to display the map with the data frame and a shapefile for each region. I would like to allow the user to select age group and sex and year to toggle with.