#!/bin/bash # problems-filed-graph # Plot graph of FixMyStreet problem report creation rate. # # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org. WWW: http://www.mysociety.org/ # # $Id: problems-filed-graph,v 1.2 2008-04-11 11:05:36 francis Exp $ GPLOT_OUTPUT="set terminal png font 'Vera.ttf' 9 size 1200,600" EXTENSION=".png" #GPLOT_OUTPUT="set terminal fig color big thickness 1" #EXTENSION=".fig" #GPLOT_OUTPUT="set terminal svg size 800 250" #EXTENSION=".svg" cd `dirname $0` cd ../../ source fixmystreet/commonlib/shlib/deployfns read_conf fixmystreet/conf/general.yml SOURCEO=/tmp/bci-report-rate-graph-data-nonwmc-$RANDOM$RANDOM GPSCRIPT=/tmp/bci-report-rate-graph-script-$RANDOM$RANDOM echo "select date(created), count(*) from problem where state not in ('unconfirmed', 'hidden') group by date(created) order by date(created) ;" | psql --host $OPTION_FMS_DB_HOST --port $OPTION_FMS_DB_PORT -A -F " " $OPTION_FMS_DB_NAME $OPTION_FMS_DB_USER | egrep -v "date|rows" >$SOURCEO #echo "source $SOURCEO" cat >$GPSCRIPT < fixmystreet/web/bci-live-line$EXTENSION 2>/dev/null