Skip to content

Commit cfcb264

Browse files
committed
update CHANGELOG
1 parent b74e366 commit cfcb264

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ The *outputs* argument to the bin and group transforms is now optional; it defau
154154

155155
The bin and group transforms now support new *distinct*, *mode*, *min-index*, and *max-index* reducers. The *distinct* reducer counts the number of distinct values in each group, while the *mode* reducer returns the most frequent value in each group. The *min-index* and *max-index* reducers are similar to *min* and *max*, except they return the zero-based index of the minimum and maximum value, respectively; for example, this is useful to sort time series by the date of each series’ peak.
156156

157+
<img width="640" alt="a small-multiples area chart of Google search trends for the year 2020; trends are ordered chronologically by their peak, starting with Australian bushfires and ending with COVID-19 vaccine" src="https://user-images.githubusercontent.com/230541/130283717-71d42637-89e4-4794-82e6-9a8570bb527d.png">
158+
159+
```js
160+
Plot.plot({
161+
height: 900,
162+
label: null,
163+
x: {axis: "top"},
164+
y: {axis: null},
165+
facet: {
166+
data: trends,
167+
y: "search",
168+
marginLeft: 160
169+
},
170+
marks: [
171+
Plot.areaY(trends, {x: "week", y: "interest", sort: {fy: {value: "y", reduce: "max-index"}}})
172+
]
173+
})
174+
```
175+
157176
The default *thresholds* option for the bin transforms is now *auto* instead of *scott*. The *auto* option applies a maximum limit of 200 bins to Scott’s rule. This reduces the risk of producing vanishing rects when they are too numerous and thin to be visible. (Note, however, that it is still possible to produce invisible rects if the insets are larger than the width.)
158177

159178
The normalize, window, and stack transforms can now accept a transform *options* argument in addition to an *inputs* argument that specifies the input channels. This allows makes these transforms more consistent with the other transforms, reduces ambiguity, and allows for additional shorthand. For example, you can pass *k* as the first argument to the window transform, here for a 12-month moving average:

0 commit comments

Comments
 (0)