comparison web/comparison.php @ 0:9dab44dcb331

Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
author Daniel O'Connor <darius@dons.net.au>
date Tue, 09 Feb 2010 13:44:25 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9dab44dcb331
1 <!-- for Emacs, this is a -*- mode: html-fill; coding: utf-8 -*- document -->
2 <!-- $Id: comparison.php,v 1.8 2010/02/08 01:46:47 grog Exp $ -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6 <?php
7 /* title should start with a lower case character */
8 $title = "Comparative weather observations";
9 $subtitle = "Ballarat area";
10 include "header.php";
11 include "weathergraph.php";
12 include "current.php";
13 $id = '$Id: comparison.php,v 1.8 2010/02/08 01:46:47 grog Exp $';
14 if (array_key_exists ("date", $_GET))
15 $date = $_GET ["date"];
16 else
17 $date = date ("Y-m-d");
18
19 ?>
20
21 <html xmlns="http://www.w3.org/1999/xhtml">
22 <head>
23 <?php pagetitle0 ($title); ?>
24 <meta http-equiv="refresh" content="900" ;="">
25 </head>
26
27 <body>
28 <?php pageheader0 ($title); ?>
29
30 <div align="justify">
31 <p>
32 This page shows comparative readings from a number of weather stations. It's still
33 experimental. This compares data from the following weather stations in <?php href
34 ("http://www.wunderground.com/wundermap/?lat=-37.76312&lon=144.01566&zoom=10&type=map&units=metric&rad=1&rad.num=1&rad.spd=25&rad.opa=70&rad.stm=0&rad.type=N0R&rad.smo=1&rad.mrg=0&wxsn=1&wxsn.mode=tw&svr=0&cams=0&sat=0&riv=0&mm=0&hur=0&fire=0&tor=0&ndfd=0&pix=0",
35 "the area"); ?>, and also Melbourne airport, a little further away (<?php href
36 ("http://www.wunderground.com/history/station/94868/2009/12/22/DailyHistory.html",
37 "Melbourne city"); ?> doesn't report wind).
38 </p>
39
40 <ul>
41 <li>
42 <?php href
43 ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI102", "Bacchus
44 Marsh airport"); ?> (currently offline).
45 </li>
46 <li>
47 <?php href ("http://www.bom.gov.au/products/IDV60801/IDV60801.94852.shtml", "Ballarat");
48 ?> airport (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
49 </li>
50 <li>
51 <?php href
52 ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI115",
53 "Buninyong"); ?>
54 </li>
55 <li>
56 <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI94",
57 "Delacombe"); ?>
58 </li>
59 <li>
60 <?php href
61 ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI124",
62 "Dereel"); ?> (this station)
63 </li>
64
65 <li>
66 <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICREDA2",
67 "Redan"); ?>
68 </li>
69
70 <li>
71 <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI86",
72 "Teesdale"); ?>
73 </li>
74
75 <li>
76 <?php href ("http://www.bom.gov.au/products/IDV60901/IDV60901.94866.shtml", "Melbourne
77 Airport"); ?> (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
78 </li>
79
80 <li>
81 <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICMTHE3",
82 "Mount Helen"); ?>
83 </li>
84 <li>
85 <?php href ("http://www.bom.gov.au/products/IDV60901/IDV60901.94863.shtml", "Sheaoaks");
86 ?> (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
87 </li>
88 </ul>
89
90 <?php
91 if (array_key_exists ("raw", $_GET))
92 {
93 $raw = "-raw";
94 /* offer to smooth */
95 print <<< EOS
96 <form action="comparison.php" method="get">
97 <input type="submit" name="smoothed" value="Smooth" />
98 </form>
99
100 EOS;
101 }
102 else /* set edit */
103 {
104 $raw = "";
105 print <<< EOS
106 <form action="comparison.php" method="get">
107 <input type="submit" name="raw" value="Raw" />
108 </form>
109
110 EOS;
111 }
112 ?>
113 <br />
114
115 <div align="left">
116
117 <?php showgraphs (<<< EOS
118 comparative-temperature-$date Comparative temperature
119 comparative-dewpoint-$date Comparative dewpoint
120 comparative-humidity-$date Comparative humidity
121 comparative-pressure-$date Comparative pressure
122 comparative-wind-$date Comparative wind speed
123 comparative-gust-$date Comparative wind gust speed
124 comparative-rain-$date Comparative rainfall
125 EOS
126 );
127 ?>
128 </div>
129 </div>
130
131 <?php pagefooter ($id); ?>