rate
rate
#
Rate — how often events happened, per minute, stacked by group.
FLOOR = 0.001
module-attribute
#
The rate, per minute, below which a stretch of timeline counts as quiet and is not drawn.
STEP = timedelta(minutes=2)
module-attribute
#
The width of one bin of a timeline.
Rate
#
Bases: Component
Events per minute — each event spread as a Gaussian of sigma — stacked by group.
Across the whole span (fold=None) only the stretches where something
happened are drawn, each run from and back to zero, on a time axis read in
the reader's own zone. With fold="day" every day is laid over one: the
rate by local time of day. Either way the reader drags to pan and scrolls to
zoom along time.
instants = photos.exif().instant
cgui.Rate(instants, groups=participants, fold="day")
cgui.Rate(instants, groups=participants)
Source code in capturegraph-ui/capturegraph_ui/charts/rate.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
__post_init__()
#
Check the props, then that groups lines up with instants and holds instants.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in capturegraph-ui/capturegraph_ui/charts/rate.py
html(render)
#
The stacked rate as one Vega-Lite area chart, zoomable along time.