From 9a200b3bf6e7698d5cefcccb41da6ee527258d73 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Wed, 15 Feb 2017 20:33:24 +0000 Subject: [PATCH] this is what happens when you cut and this is what happens paste --- roles/web-data-analysis/files/condense-hotspot.sh | 4 ++-- roles/web-data-analysis/files/hotspot-moving_avg.py | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/roles/web-data-analysis/files/condense-hotspot.sh b/roles/web-data-analysis/files/condense-hotspot.sh index 17f3fcb2a7..95784984d9 100644 --- a/roles/web-data-analysis/files/condense-hotspot.sh +++ b/roles/web-data-analysis/files/condense-hotspot.sh @@ -74,10 +74,10 @@ fi # stuck and you end up with days or weeks of data in a single # file. Because the data is pretty small we can get away with adding up the data every day. -find ${WORKEDIR} -type f | grep raw- | xargs cat | sort -u | awk 'BEGIN{x=0; y=0}; {if (x != $1){ print x,y; x=$1; y=$2} else {y=y+$2}}' > ${WORKEDIR}/worked-all +find ${WORKDIR} -type f | grep raw- | xargs cat | sort -u | awk 'BEGIN{x=0; y=0}; {if (x != $1){ print x,y; x=$1; y=$2} else {y=y+$2}}' > ${WORKDIR}/worked-all -awk -f ${LSHARE}/${PROJECT}-data.awk ${WORKEDIR}/worked-all | sort -u > ${WEBDIR}/${PROJECT}data-all.csv +awk -f ${LSHARE}/${PROJECT}-data.awk ${WORKDIR}/worked-all | sort -u > ${WEBDIR}/${PROJECT}data-all.csv # Make the seven day moving average file /usr/local/bin/hotspot-moving_avg.py > ${WEBDIR}/${PROJECT}data-all-7day-ma.csv diff --git a/roles/web-data-analysis/files/hotspot-moving_avg.py b/roles/web-data-analysis/files/hotspot-moving_avg.py index 1489df62c9..35f1ce3da0 100644 --- a/roles/web-data-analysis/files/hotspot-moving_avg.py +++ b/roles/web-data-analysis/files/hotspot-moving_avg.py @@ -26,12 +26,6 @@ import pandas #import matplotlib.pyplot as plt import math -# Moving Average - -import pandas -import matplotlib.pyplot as plt -import math - rolling = 7 tree = {}