Trelliscope で gapminder を国別にファセット化する
gapminder データの一部(オセアニアの2か国のみ)を使って、国と大陸でファセット化した「平均寿命 vs. 年」のグラフを TrelliscopeJS ディスプレイとして作成しましょう。
gapminder データセットはワークスペースに用意されています。
この演習はコースの一部です
RのTrelliscopeでビッグデータを可視化する
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
library(ggplot2)
library(trelliscopejs)
# Create the plot
ggplot(gapminder, ___) +
___ +
# Facet on country and continent
facet_trelliscope(~ ___ + ___)