shiny

Generate custom html per row of a data frame with pmap

Here is one way to generate dynamic html for your Shiny app from a reactive data frame using my favorite tidyverse package purrr and specifically the pmap function. I’ve created a shiny app that uses the starwars dataset included with dplyr. The user selects a species from a drop down. Then for each character who belongs to that species some sweet html is generated that displays their name in a <h1> tag, their home planet in a <h2> tag and their species in a <h3> tag.