{% if visits_per_tile_cumsum_linechart %}
<div>
  <div class="tab-structure-info-button">
      <input type="checkbox" id="visitspertile">
      <label class="tab-label-structure-info-button" for="visitspertile"><h3>Visits per tile <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
          <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
          <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
        </svg></h3></label>
      <div class="tab-content">
        <p>The following map shows the divergence of the spatial distribution according to the provided tessellation between the two datasets. 
          The deviation of the relative visits per tile of the alternative from the base dataset is shown. 
          Additionally, the relative visits per tile of each dataset can be displayed. </p>
        <p>One can chose from these three visualizations in the layer control on the top right. The legends are below. </p>
        <p>The deviations range from -2 to 2. The deviations are computed as follows: (alternative - base) / ((|base| + |alternative|) / 2).</p>
        <p>The relative visits per tile for both the base and the alternative dataset range from 0 to the maximum value of both relative visits.</p>
        <p>The allocated privacy budgets for this map are shown below and noise is applied accordingly onto the relative counts. 
          The confidence interval is indicated below.</p>
        <p>All applicable similarity measures are displayed in the orange box below the map.</p>
      </div>
  </div>


    </h3>
    <table class="default">               
      <tr>
        <th style="width:30%">Base:</th>
        <td style="width:30%">privacy budget: {{visits_per_tile_eps[0]}}</td>
        <td style="width:30%">95% CI: +/- {{visits_per_tile_moe[0]}} % of visit(s)</td>
      </tr>
      <tr>
        <th style="width:30%">Alternative:</th>
        <td style="width:30%">privacy budget: {{visits_per_tile_eps[1]}}</td>
        <td style="width:30%">95% CI: +/- {{visits_per_tile_moe[1]}} % of visit(s)</td>
      </tr>
    </table>
    
    <iframe src="{{output_filename}}/maps/visits_per_tile_map.html" width="100%" height="600" style="border:1px solid black;">
    </iframe>
<!---    <div style="width: 800px; height: 600px;">
        {{counts_per_tile_map}}
    </div>
--->
<div class="container_legend">
    <div class="row">
      <div class="col-sm">
        <p style="text-align: center">Deviations from base:</p>
        {{visits_per_tile_legend[0]}}      </div>
      <div class="col-sm">
        <p style="text-align: center">Visits per tile base:</p>
        {{visits_per_tile_legend[1]}}      </div>
      <div class="col-sm">
        <p style="text-align: center">Visits per tile alternative:</p>
        {{visits_per_tile_legend[2]}}      </div>
    </div>
  </div>

    <p>Base: {{points_outside_tessellation_info_base}}</p>
    <p>Alternative: {{points_outside_tessellation_info_alternative}}</p>

    {{visits_per_tile_measure}}
</div>


<div>
  <div class="tab-structure-info-button">
    <input type="checkbox" id="fivenumber">
    <label class="tab-label-structure-info-button" for="fivenumber"><h4>Five-number summary: visits per tile <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
        <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
        <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
      </svg></h4></label>
    <div class="tab-content">
        <p>This table shows the mean number of visits per tile for each dataset as well as the five-number summary consisting of: the most extreme values in the dataset (the maximum and minimum values), the lower and upper quartiles, and the median.</p>
        <p>These values are computed from the counts visualized above. Thus, no extra privacy budget is used.</p>
        <p>The symmetric mean absolute percentage error consisting of all the above counts is displayed in the orange box below.</p>
    </div>
  </div>
    <div>
      {{visits_per_tile_summary_table}}
      {{visits_per_tile_summary_measure}}
    </div>
</div>
<div>
  <div class="tab-structure-info-button">
    <input type="checkbox" id="cumsumpertile">
    <label class="tab-label-structure-info-button" for="cumsumpertile"><h4>Cumulated sum of visits per tile <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
        <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
        <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
      </svg></h4></label>
    <div class="tab-content">
        <p>The following visualization shows the cumulated relative number of visits of both datasets. This means that the tiles are sorted according to the number of visits in descending order and the relative number of visits are added tile by tile. 
            Thus, you can use the graph to evaluate how many tiles are needed to cover a certain share of the visits.</p>
        <p>If all tiles are visited equally, the cumulated sum follows a straight diagonal line. The larger the share of single tiles in the total number of visits, the steeper the curve.</p>
        <p>These values are computed from the counts visualized above. Thus, no extra privacy budget is used.</p>
        <p>The legend indicates the color for the base dataset and the alternative dataset.</p>
    </div>
</div>    
    <div>
      {{visits_per_tile_cumsum_linechart}}
    </div>
</div>
<div>
  <div class="tab-structure-info-button">
    <input type="checkbox" id="rankingfreqtiles">
    <label class="tab-label-structure-info-button" for="rankingfreqtiles"><h4>Ranking of most frequently visited tiles <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
        <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
        <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
      </svg></h4></label>
    <div class="tab-content">
        <p>The following visualization shows the ranking of most frequently visited tiles for the base and the alternative dataset. </p>
        <p>The ranking includes the union of the top 10 most frequently visited tiles of both dataset and therefore a minimum 10 to a maximum 20 most frequently visited tiles.</p>
        <p>The y-axis shows the tile name (if provided) and tile ID in order of the ranking (starting with the top 10 base tiles). The x-axis shows the relative number of visits per tile. </p>
        <p>These values are computed from the counts visualized above. Thus, no extra privacy budget is used. The 95% confidence interval of the visits per tile indicated above also applied here and is visualized with error bars.</p>
        <p> The legend indicates the color for the base dataset and the alternative dataset.</p>
        <p>The Kendall rank correlation coefficient and the coverage of top n locations are displayed in the orange box below the map. Both measures are computed for the configured top n values (default: 10, 50, 100).</p>
      </div>
</div>   
    <div>
      {{most_freq_tiles_ranking}}
      {{visits_per_tile_ranking_measure}}
    </div>
</div>
{% endif %} 

{% if visits_per_tile_time_map %}
<div>
  <div class="tab-structure-info-button">
    <input type="checkbox" id="timetile">
    <label class="tab-label-structure-info-button" for="timetile"><h3>Visits per tile and time window <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
        <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
        <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
      </svg></h3></label>
    <div class="tab-content">
      <p>Each map shows the <strong>arrivals (destinations)</strong> for the respective time window for each tile, split by weekday and weekend, as the deviation from base.</p>  
        <p>The deviations range from -2 to 2. The deviations are computed as follows: (alternative - base) / ((|base| + |alternative|) / 2).</p>
        <p>The allocated privacy budgets for this map are shown below and noise is applied accordingly onto the relative counts, which are used to compute the deviation. 
          The confidence interval is indicated below.</p>
        <p>All applicable similarity measures are displayed in the orange box below the map.</p>
    </div>
  </div> 
    <table class="default">               
      <tr>
        <th style="width:30%">Base:</th>
        <td style="width:30%">privacy budget: {{visits_per_tile_timewindow_eps[0]}}</td>
        <td style="width:30%">95% CI: +/- {{visits_per_tile_timewindow_moe[0]}} visit(s)</td>
      </tr>
      <tr>
        <th style="width:30%">Alternative:</th>
        <td style="width:30%">privacy budget: {{visits_per_tile_timewindow_eps[1]}}</td>
        <td style="width:30%">95% CI: +/- {{visits_per_tile_timewindow_moe[1]}} visit(s)</td>
      </tr>
    </table>    
        <div class = "map_png">
        {{visits_per_tile_time_map}}
    </div>
    <p class="grey info">
      {{visits_per_tile_time_info}} </p>
    {{visits_per_time_tile_measure}}
</div>
{% endif %}