library(tidyverse)
library(readr)
library(rvest)
library(httr)
library(lubridate)
knitr::opts_chunk$set(
fig.width = 7,
fig.asp = .7,
out.width = "90%"
)
theme_set(theme_minimal() + theme(legend.position = "bottom"))
options(
ggplot2.continuous.colour = "viridis",
ggplot2.continuous.fill = "viridis",
scale_colour_discrete = scale_colour_viridis_d,
scale_fill_discrete = scale_fill_viridis_d
)
library(plotly)
p <- df2 %>% rowwise() %>%
mutate(not_hesitant = 1 - sum(estimated_hesitant_or_unsure, estimated_hesitant, estimated_strongly_hesitant)*100,
total = sum(not_hesitant, estimated_hesitant_or_unsure, estimated_hesitant, estimated_strongly_hesitant),
any_hesitant = sum(estimated_hesitant_or_unsure, estimated_hesitant, estimated_strongly_hesitant)*100) %>%
rename(`Total Hesitancy`= any_hesitant) %>%
ggplot(mapping = aes(x = long, y = lat, group= group,
fill = `Total Hesitancy`,
text = paste0("State: ", str_to_title(state), "<br>",
"County: ", str_to_title(county))))
p1 <- p + geom_polygon(color = "gray90", size = 0.1) +
coord_map(projection = "albers", lat0 = 39, lat1 = 45) +
labs(fill = "Percent hesitant",
x = " ",
y = " ")
ggplotly(p1)
Participants were asked to identify their level of hesitancy from “hesitant”, “hesitant or unsure”, and “strongly hesitant”. This map depicts the total percent of any type hesitancy (sum of percent “hesitant”, “hesitant or unsure”, and “strongly hesitant”). Most counties appear to have about 40% and <40% of the population hesitant about getting the COVID-19 vaccine. The Southeast along with areas in the North (around Montana, Idaho, and Wyoming) have greater proportions of vaccine hesitancy.