Values should be derived before summing

The `sum` function should be applied after the `derive`/`non_negative_derivate` functions, otherwise you end up with weird spikes like this:

![](http://i.imgur.com/OM7o9an.png)

The `keep_last_value` function can be used to alleviate this but in some situations seeing gaps in the graphs is useful/desired.