{% if flows_cumsum_linechart %}
<div>
    <div class="tab-structure-info-button">
        <input type="checkbox" id="odflows">
        <label class="tab-label-structure-info-button" for="odflows"><h3>OD flows between 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></h3></label>
        <div class="tab-content">
            <p>The following map shows the origin-destination (OD) flows between the tiles according to the provided tessellation, meaning the number of trips between respective start and end tiles.</p>
            <p>The origin of the OD flows is indicated by a small circle and by clicking on one OD connection, information on the origin and destination cell name as well as the count of for this OD connection will show up. </p>
            <p>The legend for the intra-tile flows is below. The intra-tile flow is defined as an OD connections that starts and ends in the same tile.</p>
            <p>The allocated privacy budget for this map is shown below and noise is applied accordingly onto the counts. The confidence interval is indicated below.</p>
            <p>Flows below a certain threshold are not displayed (grayed out for intra-tile flows):
                Due to the applied noise, flows with a low count are likely to contain a high percentage of noise. For usability reasons, such unrealistic values are not displayed/grayed out. 
                More specifically: 
                The threshold is set so that values for flows with a 5% chance (or higher) of deviating more than 20 percentage points from the estimated value are not shown.</p>
        </div>
    </div>
    <p>privacy budget: {{od_eps}}</p>
    <p>95% CI: +/-{{od_moe}} flow(s)</p>
    <div>
        <p class = "info">
          {{privacy_info}}
        </p>
        <iframe src="{{output_filename}}/maps/od_map.html" width="100%" height="600" style="border:1px solid black;">
        </iframe>
        <!-- <div style="width: 800px; height: 600px;">
            {{od_map}}
        </div> -->

        <p class="grey info"> {{user_config_info}} </p>

        <div>
            {{od_legend}}
        </div>


<!--    <p> {{intra_tile_flows_info}} </p>  
        <p class = "info">
            A large number of intra-cell flows either indicate many round-trips 
            (i.e., start and end location are the same) 
            or the start and end location lie within the same tile due to a coarse tessellation.
        </p>
    -->
    </div>

    <div>
        <div class="tab-structure-info-button">
            <input type="checkbox" id="fivenumberod">
            <label class="tab-label-structure-info-button" for="fivenumberod"><h4>Five-number summary: flows per OD pair <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 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>
            </div>
        </div>
        {{flows_summary_table}}
    </div>
    <div>
        <div class="tab-structure-info-button">
            <input type="checkbox" id="cumsumperod">
            <label class="tab-label-structure-info-button" for="cumsumperod"><h4>Cumuluated sum of flows per OD pair <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 flows per OD pair. This means that the OD pairs are sorted according to the number of flows in descending order and the relative number of flows are added OD pair by OD pair. 
                    Thus, you can use the graph to evaluate how many OD pairs are needed to cover a certain share of the flows.</p>
                <p>If all OD pairs are visited equally, the cumulated sum follows a straight diagonal line (gray line). The larger the share of a single OD pair in the total number of flows, the steeper the curve.</p>
                <p>These values are computed from the counts visualized above. Thus, no extra privacy budget is used.</p>
            </div>
        </div>
        {{flows_cumsum_linechart}}
    </div>  
    
    <div>
        <div class="tab-structure-info-button">
            <input type="checkbox" id="rankingfreqod">
            <label class="tab-label-structure-info-button" for="rankingfreqod"><h4>Ranking of most frequent OD connections <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 OD connections.</p>
                <p>The y-axis shows the tile name of origin and destination in order of the ranking. The x-axis shows the number of flows per OD pair.</p>
                <p>These values are computed from the counts visualized above. Thus, no extra privacy budget is used. 
                    The 95% confidence interval of the flows per OD pair indicated above also applies here and is visualized with error bars.</p>
            </div>
        </div> 
        {{most_freq_flows_ranking}}
    </div>
</div>
{% endif %}


{% if travel_time_hist or jump_length_hist %}
<div>    
    {% if travel_time_hist %}
    <div>
        <div class="tab-structure-info-button">
            <input type="checkbox" id="traveltime">
            <label class="tab-label-structure-info-button" for="traveltime"><h3>Travel time of trips (in minutes) <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 histogram shows the distribution of travel time. The travel time is computed as the time difference between start and end timestamp of a trip in minutes.</p>
                <p>The y-axis indicates the relative counts of trips while the x-axis shows the range of histogram bins in minutes according to the user configurated bin size and maximum value.</p>
                <p>The allocated privacy budget for this statistic is shown below and noise is applied accordingly to compute the estimate (bars) and the 95% confidence interval (error bar).</p>
            </div>
        </div>         
        <p>privacy budget: {{travel_time_eps}}</p>
        <p>95% CI: +/-: {{travel_time_moe}} %</p>
        <div>
            {{travel_time_hist}}
            <p class="grey info">
                {{travel_time_hist_info}}
            </p>
        </div>
        <div>
            <h4>Five number summary: travel time</h4>
            {{travel_time_summary_table}}
        </div>
    </div>
    {% endif %} 


    {% if jump_length_hist %}
    <div>
        <div class="tab-structure-info-button">
            <input type="checkbox" id="jumplength">
            <label class="tab-label-structure-info-button" for="jumplength"><h3>Jump length (in kilometers) <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 histogram shows the distribution of jump length. The jump length is the straight-line distance between the origin and destination.</p>
                <p>The y-axis indicates the relative counts of trips while the x-axis shows the range of histogram bins in kilometers according to the user configurated bin size and maximum value.</p>
                <p>The allocated privacy budget for this statistic is shown below and noise is applied accordingly to compute the estimate (bars) and the 95% confidence interval (error bar).</p>
            </div>
        </div>
        <p>privacy budget: {{travel_time_eps}}</p>
        <p>95% CI: +/- {{travel_time_moe}} %</p>
        <div>
            {{jump_length_hist}}
            <p class="grey info">
                {{jump_length_hist_info}}
            </p>
        </div>
        <div>
            <h4>Five number summary: jump length</h4>
            {{jump_length_summary_table}}
        </div>
    </div>
    {% endif %}
</div>
{% endif %}