表格气泡图 (Github 打卡图)#

此示例显示了按星期几和每天的小时计算的GitHub贡献。

import altair as alt
from vega_datasets import data

source = data.github.url

alt.Chart(source).mark_circle().encode(
    x='hours(time):O',
    y='day(time):O',
    size='sum(count):Q'
)
import altair as alt
from vega_datasets import data

source = data.github.url

alt.Chart(source).mark_circle().encode(
    x='hours(time):O',
    y='day(time):O',
    size='sum(count):Q'
)
# No channel encoding options are specified in this chart
# so the code is the same as for the method-based syntax.