Wanting to Aggregate Datetimes


I have a dataset of datetimes and I wanted to see them as a timeseries, counting up how many rows occur in different months/years, etc. When I try this using the rect mark, I end up with many individual marks rather than one big bar for each month. Is this because I have times as well? Do I have to define the year/month in order to aggregate by it?

  • If I have datetimes, how can I aggregate them to show arbitrary frequencies in Plot (like number in each month, for example)?

Try binX instead of groupX. The bin transform is for quantitative or temporal data, while the group transform is for categorical or ordinal data.

Cool. A comment worth framing. Thanks!