@@ -0,0 +1,1853 @@
+#!/usr/bin/env python%0A%22%22%22Do a comparison with what's on SRH%22%22%22%0Afrom __future__ import print_function%0Aimport datetime%0Aimport sys%0A%0Aimport pandas as pd%0Afrom pandas.io.sql import read_sql%0Afrom pyiem.util import get_dbconn%0A%0ASRH = %22http://www.srh.noaa.gov/ridge2/shapefiles/psql_currenthazards.html%22%0A%0A%0Adef main():%0A    %22%22%22Go Main Go%22%22%22%0A    sys.stdout.write(%22Content-type: text/plain%5Cn%5Cn%22)%0A    sys.stdout.write(%22Report run at %25s%5Cn%22 %25 (datetime.datetime.utcnow(), ))%0A    srhdf = pd.read_html(SRH, header=0)%5B0%5D%0A    srhdf%5B'wfo'%5D = srhdf%5B'wfo'%5D.str.slice(1, 4)%0A    iemdf = read_sql(%22%22%22%0A    SELECT wfo, phenomena, significance, eventid, count(*) from warnings_2017%0A    where expire %3E now()%0A    GROUP by wfo, phenomena, significance, eventid%0A    %22%22%22, get_dbconn('postgis', user='nobody'), index_col=%5B'wfo', 'phenomena',%0A                                                          'significance',%0A                                                          'eventid'%5D)%0A    for idx, g_srhdf in srhdf.groupby(%5B'wfo', 'phenom', 'sig', 'event'%5D):%0A        if idx not in iemdf.index:%0A            sys.stdout.write(%22IEM Missing %25s%5Cn%22 %25 (repr(idx),))%0A            continue%0A        if len(g_srhdf.index) != iemdf.at%5Bidx, 'count'%5D:%0A            sys.stdout.write((%22%25s Count Mismatch IEM: %25s SRH: %25s%5Cn%22%0A                              ) %25 (repr(idx), iemdf.at%5Bidx, 'count'%5D,%0A                                   len(g_srhdf.index)))%0A    for idx, _row in iemdf.iterrows():%0A        (wfo, phenomena, significance, eventid) = idx%0A        df2 = srhdf%5B((srhdf%5B'phenom'%5D == phenomena) &%0A                     (srhdf%5B'sig'%5D == significance) &%0A                     (srhdf%5B'event'%5D == eventid) &%0A                     (srhdf%5B'wfo'%5D == wfo))%5D%0A        if df2.empty:%0A            sys.stdout.write(%22SRH MISSING %25s%5Cn%22 %25 (repr(idx), ))%0A    sys.stdout.write(%22DONE...%5Cn%22)%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add WWA diagnostic for some local testing