Visualizing Big Data with Trelliscope in R
Ryan Hafen
Author, TrelliscopeJS
Simply add as_plotly = TRUE
to facet_trelliscope()
.
For example:
gap_life <- select(gapminder, year, lifeExp, country, continent)
ggplot(gap_life, aes(year, lifeExp)) +
geom_point() +
facet_trelliscope(~ country + continent,
name = "lifeExp_by_country",
desc = "Life expectancy vs. year for 142 countries.",
nrow = 2, ncol = 3,
as_plotly = TRUE)
Simply add auto_cog = TRUE
to facet_trelliscope()
.
For example:
ggplot(gap_life, aes(year, lifeExp)) +
geom_point() +
facet_trelliscope(~ country + continent,
name = "lifeExp_by_country",
desc = "Life expectancy vs. year for 142 countries.",
nrow = 2, ncol = 3,
auto_cog = TRUE)
See the help for autocogs::autocog
for more information about available automatic cognostics.
Axis limit ranges can be controlled with the scales
argument.
Three options:
"same"
(default)"sliced"
"free"
Each panel's limits are the same.
Enables "apples to apples" comparisons across panels.
Each panel's limits span the same range but don't necessarily start in the same place.
Useful for making comparisons of differences of scale.
Each panel's limits are based on the bounds of its own data.
Visualizing Big Data with Trelliscope in R