aboutsummaryrefslogtreecommitdiff
path: root/metchart/modifier
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-31 19:09:15 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-31 19:09:15 +0100
commitcd69f3b04bd42005a181b5c7459de5ec7f2aa572 (patch)
tree03a95327967a8d201b68f5f256c54391734d674a /metchart/modifier
parente832421e29cf408ced155a250f7da2b113c708e2 (diff)
downloadmeteo_toolbox-cd69f3b04bd42005a181b5c7459de5ec7f2aa572.tar.gz
diff modifier
Diffstat (limited to 'metchart/modifier')
-rw-r--r--metchart/modifier/diff.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/metchart/modifier/diff.py b/metchart/modifier/diff.py
new file mode 100644
index 0000000..496acf7
--- /dev/null
+++ b/metchart/modifier/diff.py
@@ -0,0 +1,6 @@
+def run(data, vars):
+ ret = data[0]
+ for var in vars:
+ ret[var['name']] = ret[var['field']].diff(var['by'])
+
+ return ret