
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs
/Jobs

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"




/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchangeselect
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: location of type string
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear,  l.name AS location FROM clearsky.mobilesqmreading r right outer join               clearsky.location l on r.location = l.lid
           ORDER BY 1, 2"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="dateselect" id="dateselect" onchange="this.form.submit()"> 
              {dates}
            </select>
          </form>"

 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"




/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"






/DataEntry



/Locations

/resource/SQM-DataGatheringSheet-02.pdf
/resource/SQM-Project-Instructions-02.pdf
/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/DataEntry

/Locations

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/Locations

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"







/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"




/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


Jun 19, 2025 12:50:30 PM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request



/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


Jun 19, 2025 1:33:19 PM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request

Jun 19, 2025 1:33:20 PM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request




/Locations





/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults
/SQMResults


/resource/SQM-DataGatheringSheet-02.pdf
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"



/DataEntry
/DataEntry
/DataEntry
/DataEntry
/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/DataEntry
/DataEntry
/DataEntry
/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/DataEntry
/DataEntry
/DataEntry

/DataEntry
/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/DataEntry
/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/DataEntry
/DataEntry
/DataEntry
/DataEntry

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/Locations

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"




/DataEntry


/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry
/DataEntry


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"



Jul 01, 2025 9:17:31 PM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request
)
Jul 02, 2025 8:44:46 AM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request


/Locations



/Locations
.

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

.

/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"





/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/Locations
/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"

/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"

/StaticTrend
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = statictrend
 Parse yaml token = decscription value = For each day max mpsas, max alt, avg phase
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mpsas of type float
out_parameter: alt of type float
out_parameter: phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, max(mpsas) as mpsas, max(lunar_alt_deg) as alt, avg(lunar_phase) as phase FROM clearsky.observatorysqmreading WHERE mdate BETWEEN ? AND ? 
GROUP BY mdate 
ORDER BY mdate ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/StaticResults
 Parse yaml token = name value = staticdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: dstart of type date
out_parameter: dend of type date
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "select min(mdate) dstart, max(mdate) dend from clearsky.observatorysqmreading "
 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = staticresults
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: day1 of type date
in_parameter: day2 of type date
 Parse yaml token = out_parameters value = 
out_parameter: mdate of type date
out_parameter: mtime of type time
out_parameter: mpsas of type float
out_parameter: lunar_alt_deg of type float
out_parameter: lunar_phase of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"


/SQMResults
 Parse yaml token = name value = sqmdatelist
 Parse yaml token = decscription value = Gets SQL Date Dimension
 Parse yaml token = out_parameters value = 
out_parameter: myear of type integer
out_parameter: mmonth of type integer
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT DISTINCT date_part('year', mdate) AS myear, date_part('month', mdate) mmonth FROM clearsky.mobilesqmreading           ORDER BY 1, 2 ASC"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<form action="#" method="POST">            <select name="yearselect" id="yearselect" onchange="this.form.submit()"> 
              {years}
            </select>
            <select name="monthselect" id="monthselect" onchange="this.form.submit()"> 
              {months}
            </select>
          </form>"

 Parse yaml token = name value = sqmresultsmonth
 Parse yaml token = decscription value = Shows values of MPSAS values for each location.
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mdate of type date
out_parameter: serial_no of type string
out_parameter: mpsas_1 of type float
out_parameter: mpsas_2 of type float
out_parameter: mpsas_3 of type float
out_parameter: mpsas_4 of type float
out_parameter: mpsas_5 of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, s.mdate, d.serial_no, s.mpsas_1, s.mpsas_2, s.mpsas_3, s.mpsas_4, s.mpsas_5 from clearsky.mobilesqmreading s right outer join 
 clearsky.location l on s.location = l.lid right outer join 
 clearsky.mobilesqm d on s.device = d.lid 
 where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
 order by l.lid"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="myChart" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    const ctx = document.getElementById('myChart');
    new Chart(ctx, {
      type: 'bubble',
      data: data,
      options: {
        scales : {
        x: {
            type: 'category',
            labels: labels
          }},
          plugins: {
            legend: {
                display: false
            },
        }
      }
    });
    
  </script>  
</div>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/SQMLocation
 Parse yaml token = name value = sqmlocation
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: month of type integer
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: lat of type string
out_parameter: long of type string
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, l.latitude as lat, l.longitude as long, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and date_part('month', s.mdate) = ?
group by l.name, l.latitude, l.longitude"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div id="map" style="width: 800px; height: 600px"></div>    <script>
      var map = L.map('map').setView([51.411, -1.69], 10);

      L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 19,
        attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
        }).addTo(map);

      {points}
    </script>"


/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/SQMChange
 Parse yaml token = name value = sqmchange
 Parse yaml token = decscription value = For each location min, mean, max for each date
 Parse yaml token = in_parameters value = 
in_parameter: year of type integer
in_parameter: region of type string
 Parse yaml token = out_parameters value = 
out_parameter: location of type string
out_parameter: mth of type integer
out_parameter: mmin of type float
out_parameter: mmean of type float
out_parameter: mmax of type float
 Parse yaml token = dataservice value = 
 dataservice param  = type value = service
 dataservice param  = name value = RunPostgresQuery
 dataservice param  = sql value =  "SELECT l.name as location, date_part('month', s.mdate) as mth, min(value) as mmin, avg(value) as mmean, max(value) as mmax from (SELECT location, mdate, mpsas_1 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_2 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_3 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_4 as value from clearsky.mobilesqmreading
union all
SELECT location, mdate, mpsas_5 as value from clearsky.mobilesqmreading) s right outer join
clearsky.location l on s.location = l.lid
where date_part('year', s.mdate) = ? and l.name like ?
group by l.lid, l.name, s.mdate 
order by l.lid, date_part('month', s.mdate)"

 Parse yaml token = renderservice value = 
 dataservice param  = type value = embedded
 renderservice param  = html value =  "<div class="container">
  <div>
    <canvas id="trend" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    function checkOnClick( i ) {
      var chart = Chart.getChart('trend');
      var check = document.getElementById('ds' + i );
      chart.setDatasetVisibility(i, check.checked);
      chart.update();
    }
    const ctx = document.getElementById('trend');
    new Chart(ctx, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          legend: {
            display: false
            }
        },
        title: {
          display: true,
          text: 'Mean MPSAS Change '
        } 
      }
  });
    
  </script>  
</div>"

/Locations
