<commit_before>
<?php 
  include("../../../../config/settings.inc.php");
  include("$rootpath/include/forms.php");
  $var = isset($_GET["var"]) ? $_GET["var"]: "";
  $year = isset($_GET["year"]) ? $_GET["year"]: date("Y", time() - 86400 - (7 * 3600) );
  $month = isset($_GET["month"]) ? $_GET["month"]: date("m", time() - 86400 - (7 * 3600) );
  $day = isset($_GET["day"]) ? $_GET["day"]: date("d", time() - 86400 - (7 * 3600) );
  $date = $year ."-". $month ."-". $day;
  $ts = mktime(0,0,0, $month, $day, $year);
  $uri = "dayplot.phtml?year=".$year."&month=".$month."&day=".$day."&";

  $page = "isuag";
  $TITLE = "IEM | ISUAG Daily Data Plots";
  include("$rootpath/include/header.php"); 
?>
<div class="text">
<table width="700">
<tr>
  <td colspan=2><h3 class="heading">ISU AgClimate Daily Data Plots</h3></td></tr>

<tr>
 <td rowspan=2 valign="TOP">
<table width="100%">
<tr>
  <td><h3 class="subtitle">Dynamic Historical Data:</h3></td></tr>
<tr>
  <td>
    <b>Daily Data Plots</b>
    <br><a href="gsplot.phtml">Growing Season Plots</a>
  </td></tr>
<tr>
  <td><h3 class="subtitle">Switch Parameter:</h3></td></tr>
<tr>
  <td><ul>
   <li><a href="<?php echo $uri; ?>var=c11&var2=c12">High & Low Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c30">Average Soil Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c300">High & Low Soil Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c70">Potential Evapotranspiration</a></li>
   <li><a href="<?php echo $uri; ?>var=c40">Average Wind Velocity</a></li>
   <li><a href="<?php echo $uri; ?>var=c529">Five Second Wind Gust</a></li>
   <li><a href="<?php echo $uri; ?>var=c90">Precipitation</a></li>
   <li><a href="<?php echo $uri; ?>var=c80">Total Solar Radiation</a></li>
   <li><a href="<?php echo $uri; ?>var=dwpf">Max/Min Dew Points</a></li></ul>
  </td></tr>
</table>
 </td>
 <td>
  <form method="GET" action="dayplot.phtml">
  <input type="hidden" name="var" value="<?php echo $var; ?>">
  <table>
    <tr><th>Year:</th><th>Month:</th><th>Day:</th><td></td></tr>
    <tr>
      <td><?php yearSelect(1998, $year); ?></td>
      <td><?php monthSelect($month); ?></td>
      <td><?php daySelect($day); ?></td>
      <td><input type="submit" value="Make Plot"></td>
    </tr>
  </table>
   </form>
 </td>
</tr>
<tr>
 <td>
   <?php include('plot.php'); ?>
 </td>
</tr>

<tr>
<td colspan=2>
<center><img src="/images/gisready.png"><h3 class="subtitle"> Data Listing</h3>
</center>

<pre>
<?php
 $ndate = strftime("%b %d, %Y", $ts);
 $tr = "# ".$ndate." ". $varDef[$var . $var2] ."\n";
 $tr .= "#-----------------------snip------------------\n";
 if (strlen($var2) > 0 || $var == 'dwpfh'){
   $tr .= sprintf("%20s,%10s,%10s,%10s,%10s\n", 'StationName', 'Latitude', 'Longitude', $var, $var2);
  } else {
   $tr .= sprintf("%20s,%10s,%10s,%10s\n", 'StationName', 'Latitude', 'Longitude', $var);
  }

 foreach($data as $key => $value){
   if ($key == "A133259" || $key == "A130219") continue;
   if (strlen($var2) > 0 || $var == 'dwpfh'){
     $tr .= sprintf("%20s,%10s,%10s,%10s,%10s\n", $ISUAGcities[$key]['city'],
  $ISUAGcities[$key]['lat'], $ISUAGcities[$key]['lon'], $data[$key]['var'],
  $data[$key]['var2'] );
   } else {
     $tr .= sprintf("%20s,%10s,%10s,%10s\n", $ISUAGcities[$key]['city'],
  $ISUAGcities[$key]['lat'], $ISUAGcities[$key]['lon'], $data[$key]['var'] );
   }

 }
 echo $tr;
?>
</pre>
</td></tr>
</table>
<p>You should be able to 'copy & paste' this raw data listing into a simple
text editor and save the data file on your machine.  Most GIS systems can 
then import this dataset as a layer.  You may have to omit the commented lines
(#) if your GIS has trouble importing the data.
</div>


<?php include("/mesonet/php/include/footer.php"); ?>
<commit_msg>Updates to make forms work...<commit_after>
<?php 
  include("../../../../config/settings.inc.php");
  include("$rootpath/include/forms.php");
  $var = isset($_GET["var"]) ? $_GET["var"]: "";
  $year = isset($_GET["year"]) ? $_GET["year"]: date("Y", time() - 86400 - (7 * 3600) );
  $month = isset($_GET["month"]) ? $_GET["month"]: date("m", time() - 86400 - (7 * 3600) );
  $day = isset($_GET["day"]) ? $_GET["day"]: date("d", time() - 86400 - (7 * 3600) );
  $date = $year ."-". $month ."-". $day;
  $ts = mktime(0,0,0, $month, $day, $year);
  $uri = "dayplot.phtml?year=".$year."&month=".$month."&day=".$day."&";

  $page = "isuag";
  $TITLE = "IEM | ISUAG Daily Data Plots";
  include("$rootpath/include/header.php"); 
?>
<div class="text">
<table width="700">
<tr>
  <td colspan=2><h3 class="heading">ISU AgClimate Daily Data Plots</h3></td></tr>

<tr>
 <td rowspan=2 valign="TOP">
<table width="100%">
<tr>
  <td><h3 class="subtitle">Dynamic Historical Data:</h3></td></tr>
<tr>
  <td>
    <b>Daily Data Plots</b>
    <br><a href="gsplot.phtml">Growing Season Plots</a>
  </td></tr>
<tr>
  <td><h3 class="subtitle">Switch Parameter:</h3></td></tr>
<tr>
  <td><ul>
   <li><a href="<?php echo $uri; ?>var=c11&var2=c12">High & Low Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c30">Average Soil Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c300">High & Low Soil Temperatures</a></li>
   <li><a href="<?php echo $uri; ?>var=c70">Potential Evapotranspiration</a></li>
   <li><a href="<?php echo $uri; ?>var=c40">Average Wind Velocity</a></li>
   <li><a href="<?php echo $uri; ?>var=c529">Five Second Wind Gust</a></li>
   <li><a href="<?php echo $uri; ?>var=c90">Precipitation</a></li>
   <li><a href="<?php echo $uri; ?>var=c80">Total Solar Radiation</a></li>
   <li><a href="<?php echo $uri; ?>var=dwpf">Max/Min Dew Points</a></li></ul>
  </td></tr>
</table>
 </td>
 <td>
  <form method="GET" action="dayplot.phtml">
  <input type="hidden" name="var" value="<?php echo $var; ?>">
  <table>
    <tr><th>Year:</th><th>Month:</th><th>Day:</th><td></td></tr>
    <tr>
      <td><?php echo yearSelect(1998, $year); ?></td>
      <td><?php echo monthSelect($month); ?></td>
      <td><?php echo daySelect($day); ?></td>
      <td><input type="submit" value="Make Plot"></td>
    </tr>
  </table>
   </form>
 </td>
</tr>
<tr>
 <td>
   <?php include('plot.php'); ?>
 </td>
</tr>

<tr>
<td colspan=2>
<center><img src="/images/gisready.png"><h3 class="subtitle"> Data Listing</h3>
</center>

<pre>
<?php
 $ndate = strftime("%b %d, %Y", $ts);
 $tr = "# ".$ndate." ". $varDef[$var . $var2] ."\n";
 $tr .= "#-----------------------snip------------------\n";
 if (strlen($var2) > 0 || $var == 'dwpfh'){
   $tr .= sprintf("%20s,%10s,%10s,%10s,%10s\n", 'StationName', 'Latitude', 'Longitude', $var, $var2);
  } else {
   $tr .= sprintf("%20s,%10s,%10s,%10s\n", 'StationName', 'Latitude', 'Longitude', $var);
  }

 foreach($data as $key => $value){
   if ($key == "A133259" || $key == "A130219") continue;
   if (strlen($var2) > 0 || $var == 'dwpfh'){
     $tr .= sprintf("%20s,%10s,%10s,%10s,%10s\n", $ISUAGcities[$key]['city'],
  $ISUAGcities[$key]['lat'], $ISUAGcities[$key]['lon'], $data[$key]['var'],
  $data[$key]['var2'] );
   } else {
     $tr .= sprintf("%20s,%10s,%10s,%10s\n", $ISUAGcities[$key]['city'],
  $ISUAGcities[$key]['lat'], $ISUAGcities[$key]['lon'], $data[$key]['var'] );
   }

 }
 echo $tr;
?>
</pre>
</td></tr>
</table>
<p>You should be able to 'copy & paste' this raw data listing into a simple
text editor and save the data file on your machine.  Most GIS systems can 
then import this dataset as a layer.  You may have to omit the commented lines
(#) if your GIS has trouble importing the data.
</div>


<?php include("/mesonet/php/include/footer.php"); ?>

{'fraction_non_alphanumeric': 0.2827149082265945, 'fraction_numerical': 0.034332497028918524, 'mean_word_length': 4.025879230258792, 'pattern_counts': {'":': 0, '<': 283, '<?xml version=': 0, '>': 289, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6256998', 'n_tokens_mistral': 3184, 'n_tokens_neox': 3025, 'n_words': 653}