Research Labs

2026-09-17 20:36 UTCopen field data · live

pages/control.php

Snapshot 2026.09.17-a2894de (current) · 21 lines · 2,687 bytes · tree · plain text

SHA-256 ae867741b2799b0f4cf89edb94a7c3b5238406bd77af1edc97b99759023c6248
1<?php
2require_once __DIR__.'/../inc/streampage.php';
3page_header('Control site (reference shore)','control');
4echo '<h1>Control site (reference shore)</h1><p class="lede">A matched stretch of the same shoreline at least two kilometres from the construction envelope, counted rather than instrumented: the same shore-bird counts as on the parcel, on the same days, by the regional nature research centre. Its role is to share weather, season and regional trends so that change happening everywhere can be told apart from change caused here.</p>';
5/* Primary stream: the paired human counts. Rendered from the streams table once a stream exists for them; a static placeholder card until then. */
6$c=stream_by_code('ct_shore_counts');
7if($c && visible($c)){
8 $rows=series($c, date('Y-m-d H:i:s',strtotime('-365 days')), date('Y-m-d H:i:s'));
9 echo '<div class="card"><h3>'.h($c['label']).' '.mode_badge($c).'</h3><div class="kv">Paired human counts, same day as the parcel counts, periodically through the year. The primary comparison for the wildlife paper.</div><div class="chart" data-chart=\''.h(json_encode(['unit'=>$c['unit'],'series'=>[['label'=>$c['label'],'slot'=>(int)$c['series_slot'],'data'=>array_map(fn($r)=>[substr($r['ts'],0,16),(float)$r['value']],$rows)]]])).'\'></div>'.instrument_card($c).'</div>';
10}else{
11 echo '<div class="card"><h3>Reference shore counts (Náttúrustofa Vesturlands) <span class="badge badge-ph">PLACEHOLDER DATA</span></h3><div class="kv">Paired human counts, same day as the parcel counts, periodically through the year. The primary comparison for the wildlife paper.</div><div class="kv">First record: none yet. The tag turns green when the first count lands.</div></div>';
12}
13/* Below it, the recorder: at most one, and only if it can be placed and serviced. */
14$s=stream_by_code('ac_control_activity');
15if($s){
16 $rows=series($s, date('Y-m-d H:i:s',strtotime('-30 days')), date('Y-m-d H:i:s'));
17 echo '<div class="card"><h3>'.h($s['label']).' <span class="kv">if placed</span> '.mode_badge($s).'</h3><div class="kv">At most one recorder is placed at the reference shore, and only if the landowner agrees and the Centre\'s visits can service it; the comparison rests on the counts.</div><div class="chart" data-chart=\''.h(json_encode(['unit'=>$s['unit'],'series'=>[['label'=>$s['label'],'slot'=>2,'data'=>array_map(fn($r)=>[substr($r['ts'],0,16),(float)$r['value']],$rows)]]])).'\'></div>'.instrument_card($s).'</div>';
18}
19echo '<p class="note">Siting follows published disturbance distances for the shore species of this coast; the exact location is generalised on public pages by agreement with the regional ecologists.</p>';
20page_footer();
21

Lines can be cited as pages/control.php L120-L140, platform code 2026.09.17-a2894de; add #L120-L140 to this page's address to highlight them. Source shown for scrutiny of the research platform. All rights reserved. Not offered as installable software.