covid = read_csv("covid_data.csv")
## Parsed with column specification:
## cols(
## signal = col_character(),
## geo_value = col_character(),
## time_value = col_date(format = ""),
## value = col_double(),
## stderr = col_double(),
## sample_size = col_double()
## )
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
## `summarise()` regrouping output by 'geo_value' (override with `.groups` argument)
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()
## Warning: Ignoring unknown aesthetics: text
ggplotly(p2, tooltip = "text")
#Part 2: Doing my own Plotly Graph
p = ggplot(starwars,
aes(x = height, y = mass, color = gender, size = birth_year)) +
geom_point(color = "pink", aes(text = name))
## Warning: Ignoring unknown aesthetics: text
ggplotly(p, tooltip = "text")