使用 Trelliscope 按国家分面 gapminder
针对 gapminder 数据集的一个子集(大洋洲中的两个国家),以"预期寿命 与 年份"的示例为基础,按国家与洲进行分面,并创建一个 TrelliscopeJS 展示。
gapminder 数据集已在您的工作区中可用。
本练习是课程的一部分
使用 R 中的 Trelliscope 可视化大数据
交互式实操练习
通过完成这段示例代码来试试这个练习。
library(ggplot2)
library(trelliscopejs)
# Create the plot
ggplot(gapminder, ___) +
___ +
# Facet on country and continent
facet_trelliscope(~ ___ + ___)