开始使用免费开始使用

润色您的 HPI 动画

在本练习中,您将对上一课中创建的住房价格指数与实际 GDP 的气泡图进行润色。

本练习是课程的一部分

R 中级交互式数据可视化(plotly)

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Polish the axis titles and log-transform the x-axis
us_economy %>%
  plot_ly(x = ~gdp, y = ~house_price) %>%
  add_markers(
    size = ~population, color = ~region, 
    frame = ~year, ids = ~state,
    marker = list(sizemode = "diameter")
  ) %>%
  layout(
    ___,
    ___
  )
编辑并运行代码