4.23 Interactive
- ggplot objects can be converted to plotly objects
- Work more or less well (see below)
- See Interactive data visualization: Plotly
# data_twitter_influence.csv
data <- read_csv(sprintf("https://docs.google.com/uc?id=%s&export=download",
"1dLSTUJ5KA-BmAdS-CHmmxzqDFm2xVfv6")) %>%
filter(n_retweets < mean(n_retweets), # Whathappenshere?
followers_count < mean(followers_count))
p1 <- ggplot(data,
aes(x = followers_count,
y = n_retweets,
colour = party)) +
geom_point()
ggplotly(p1)
Figure 4.11: Making ggplot interactive