diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-17T14·18+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-01-17T14·25+0000 |
commit | 3ecb412055532bfea0c7badaa137ddf75e563392 (patch) | |
tree | 4786d5f70d6e291db4c3d7b8c322b7978b0b4b6f /users/tazjin/covid | |
parent | 1c81ccb99634d107eb7f9b986bc4822c7a517d13 (diff) |
chore(tazjin/*): Remove some dead code r/3620
Change-Id: Ic938bc9ae446620f132d912e4787f4b42ffd9341 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4983 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/covid')
-rw-r--r-- | users/tazjin/covid/us_mortality.jq | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/users/tazjin/covid/us_mortality.jq b/users/tazjin/covid/us_mortality.jq deleted file mode 100644 index 584be3ef9afe..000000000000 --- a/users/tazjin/covid/us_mortality.jq +++ /dev/null @@ -1,36 +0,0 @@ -# This turns the CDC mortality data[0] into a format useful for my -# excess mortality spreadsheet. The US format is by far the worst one -# I have dealt with, as expected. -# -# This requires miller for transforming the CSV appropriately. -# -# Params: -# state: abbreviation of the state to extract ('US' for whole country) -# period: time period (either "2020" for current data, or anything else -# for historical averages) -# -# Call as: -# mlr --icsv --ojson cat weekly.csv | \ -# jq -rsf us_mortality.jq --arg state US --arg period 2020 -# -# [0]: https://www.cdc.gov/nchs/nvss/vsrr/covid19/excess_deaths.htm - -def filter_period(period): - if period == "2020" - then . | map(select(.["Time Period"] == 2020)) - else . | map(select(.["Time Period"] == "2015-2019")) - end; - -def collate_weeks(period): - (. | map(.["Number of Deaths"]) | add) as $count - | { - count: (if period == "2020" then $count else $count / 5 end), - week: .[0].Week, - }; - -. | map(select(.Type == "Predicted (weighted)")) - | map(select(.["State Abbreviation"] == $state)) - | filter_period($period) - | group_by(.Week) - | map(collate_weeks($period)) - | .[] | "week \(.week): \(.count)" |