0
我对R上的地图进行可视化并不是很新,我试图改变运动中的传奇。
我的代码下在Highchart Choropleth中更改颜色轴
ds <- a21 %>%
group_by(fips) %>%
do(item = list(
fips = first(.$fips),
sequence = .$freq,
value = first(.$freq))) %>%
.$item
hc <- highchart(type = "map") %>%
hc_add_series(data = ds,
name = "complaints",
mapData = uscountygeojson,
joinBy = "fips",
borderWidth = 0.01) %>%
hc_colorAxis(stops = color_stops()) %>%
hc_title(text = "patient complaints") %>%
hc_legend(layout = "vertical", reversed = TRUE,
floating = TRUE, align = "right") %>%
hc_add_theme(hc_theme_smpl()) %>%
hc_motion(
enabled = TRUE,
axisLabel = "year",
labels = sort(unique(a21$year)),
series = 0,
updateIterval = 50,
magnet = list(
round = "floor",
step = 0.1
)
)
截图:
截至目前我看到[R自动创建频率colorbins
我想改变这我的数据框中的一组自定义值。
我的数据帧的一个片段是在
a21:
year fips freq q
1 2004 1001 3 1st Quantile
2 2005 1001 0 1st Quantile
3 2006 1001 4 1st Quantile
4 2007 1001 0 1st Quantile
5 2008 1001 0 1st Quantile
6 2009 1001 0 1st Quantile
我想q列的颜色轴标签