潤飾你的 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(
___,
___
)