US Map

maps <- leaflet(data = us) %>% addTiles() 

maps %>% 
  addPolygons(color = ~pal(cases), fillOpacity = 1, stroke = FALSE, group = "cases") %>%
  addPolygons(color = ~pal(deaths),fillOpacity = 1, stroke = FALSE, group = "deaths") %>%
  addPolygons(color = ~pal(per_cases), fillOpacity = 1, stroke = FALSE, group = "case %") %>%
  addPolygons(color = ~pal(per_deaths), fillOpacity = 1, stroke = FALSE, group = "death %") %>%
  addLayersControl(baseGroups = c("cases", "case %", "deaths", "death %"))

This is an interactive map called a leaflet. I set up overlay groups, you can choose between cases, case percent, deaths, death percent. The color defines the overall value of the group you select. The colors are green and red, with green being low value and red being high value.

See New York Times Maps for exact values.

Data Table

us %>% select(state, cases, deaths, pop, per_cases, per_deaths) %>% 
datatable(caption = 'This Tibble shows COVID-19 data in the states in the USA for yesterday',
          class = 'cell-border stripe', 
          rownames = FALSE, 
          filter = 'top', 
          extensions = 'Buttons',
          options = list(buttons = c('copy', 'csv', 'pdf'), 
                         pageLength = 5, 
                         autoWidth = TRUE, 
                         dom = 'Bfrtip'))



update()
## [1] "Last updated: Jul 21 2020"