Plotly Graph
## Change this to read in whatever data you're using
covid = read_csv("../lab5/covid_data.csv")
covid %>%
group_by(geo_value, signal) %>%
summarize(
avg = mean(value, na.rm = T)
) %>%
pivot_wider(id_cols = geo_value, names_from = signal, values_from = avg) %>%
ungroup() -> state_avg
## Change this to make your plot
p2 = state_avg %>%
mutate(state = str_to_upper(geo_value)) %>%
ggplot(aes(x = smoothed_wearing_mask, y = smoothed_cli)) +
geom_point(aes(text = toupper(geo_value))) +
theme_minimal()
ggplotly(p2, tooltip = "text")
p3 = ggplot(starwars,
aes(x = height, y = mass, color = gender, size = birth_year)) +
geom_point(aes(text = name,alpha = .8),color = "red")
## Warning: Ignoring unknown aesthetics: text
ggplotly(p3,tooltip = "text")