From 2abdf7dcb0b12f07ef480b599aaa7230431f3818 Mon Sep 17 00:00:00 2001 From: Graham Stark Date: Tue, 5 Sep 2023 21:59:14 +0100 Subject: [PATCH] Wealth closer to Wealth Tax Commission, exept fixed a HH level. --- src/STBOutput.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/STBOutput.jl b/src/STBOutput.jl index 8a71ecf0..7bf385f7 100644 --- a/src/STBOutput.jl +++ b/src/STBOutput.jl @@ -681,8 +681,9 @@ const EXTRA_INC_COLS = 18 end ns = Symbol.(colnames) select!( sort!(vhh, col), ns... ) - # next one not needed?? + # average change column - sum of weighted changes (since they're already divided by total popn) avch = combine( groupby( dhh, [col]),(:weighted_change=>sum)) + # ... put av changes in the right order sort!( avch, col ) vhh."Average Change(£s)" = avch[:,2] glf = coalesce.( vhh, 0.0)