This page takes a while to load, but once it’s loaded, you can hover on a series to highlight all series for the given year. This is a useful technique for quickly comparing series for a given year across cities.
# devtools::install_github("ropensci/plotly#554")
library(plotly)
library(crosstalk)
sd <- SharedData$new(txhousing, ~year)
p <- ggplot(sd, aes(month, median)) +
geom_line(aes(group = year)) +
geom_smooth(data = txhousing, method = "gam") +
facet_wrap(~ city)
ggplotly(p) %>%
highlight(on = "plotly_hover", defaultValues = 2015, color = "red")
## Warning: Removed 616 rows containing non-finite values (stat_smooth).