aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metchart/modifier/diff.py6
-rw-r--r--pyproject.toml2
2 files changed, 7 insertions, 1 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
diff --git a/pyproject.toml b/pyproject.toml
index d5f2744..d5a60bd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "metchart"
-version = "0.0.1"
+version = "0.0.2"
dependencies = [
"metpy",
"xarray",