main.html 4.85 KB
Newer Older
Tiago Peixoto's avatar
Tiago Peixoto committed
1 2 3 4 5 6 7 8 9 10
{% extends "base.html" %}
{% from 'macros.html' import fmt_int, fmt_float %}

{% block net_active %}
active
{% endblock %}

{% block content %}

<div class="column-group">
Tiago Peixoto's avatar
Tiago Peixoto committed
11 12 13 14 15 16
  <div class="xlarge-100 large-100 small-100 bottom-space">
    <div class="search-header">
      <form class="ink-form push-right search-bar" action="/" method="get">
        <div class="control-group all-100" style="margin-bottom: 0">
          <div class="control append-button" role="search">
            <span>
17 18
              {% if search == "" %}
              <input type="text" name="search" id="search" placeholder="Multiple regexp terms separated by '&'">
Tiago Peixoto's avatar
Tiago Peixoto committed
19 20 21 22 23 24
              {% else %}
              <input type="text" name="search" id="search", value="{{search}}">
              {% endif %}
            </span>
            <button class="ink-button">Search</button>
          </div>
Tiago Peixoto's avatar
Tiago Peixoto committed
25
        </div>
Tiago Peixoto's avatar
Tiago Peixoto committed
26 27 28 29 30 31 32 33 34
      </form>
      <div class="legend">
        {% if tags is not none %}
            Showing only entries with tags:
        {% for tag in tags %}
            <span class="ink-label grey">{{ tag }}</span>
        {% endfor %}
        <br/>
        {% endif %}
35
        {% if search != "" %}
Tiago Peixoto's avatar
Tiago Peixoto committed
36 37 38
            Showing only entries that match regexp: {{search}}<br/>
        {% endif %}
        <span style="font-size:x-small">Tip: click on the table header to sort the list. Hover your mouse to obtain a legend.</span>
Tiago Peixoto's avatar
Tiago Peixoto committed
39
      </div>
Tiago Peixoto's avatar
Tiago Peixoto committed
40
    </div>
Tiago Peixoto's avatar
Tiago Peixoto committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
    <table class="ink-table hover sortable">
      <thead>
        <tr>
           <th class="align-left tight">Name</th>
           <th class="align-left">Title</th>
           <th class="align-right tight">Nodes</th>
           <th class="align-right tight">Edges</th>
           <th class="align-right tight" title="Mean degree">$\left&lt;k\right&gt;$</th>
           <th class="align-right tight" title="Standard deviation of the degrees">$\sigma_k$</th>
           <th class="align-right tight" title="Largest eigenvalue of Hashimoto (non-backtracking) matrix">$\lambda_h$</th>
           <th class="align-right tight" title="Random walk mixing time">$\tau$</th>
           <th class="align-right tight" title="Degree assortativity">$r$</th>
           <th class="align-right tight" title="Global clustering coefficient">$c$</th>
           <th class="align-right tight" title="(Pseudo-) diameter">$\oslash$</th>
           <th class="align-right tight" title="Relative size of the largest component">$S$</th>
           <th class="align-right tight">Kind</th>
           <th class="align-right tight">Mode</th>
           <th class="align-right tight" title="Number of networks">$n$</th>
           <th class="align-left">Tags</th>
        </tr>
      </thead>
      <tbody>
        
        {% for entry in entries %}
        <tr>
          <td class="mono"> <a href="/net/{{ entry.name }}">{{ entry.name }}</a> </td>
          <td> {{ entry.title }} </td>
          <td class="align-right">
            {{ fmt_int(entry._analyses["num_vertices"]) }}
          </td>
          <td class="align-right">
            {{ fmt_int(entry._analyses["num_edges"]) }}
          </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["average_degree"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["degree_std_dev"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["hashimoto_radius"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["mixing_time"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["degree_assortativity"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["global_clustering"]) }}
           </td>
          <td class="align-right">
            {{ fmt_int(entry._analyses["diameter"]) }}
           </td>
          <td class="align-right">
            {{ fmt_float(entry._analyses["largest_component_fraction"]) }}
           </td>
          <td class="align-right">
            {% if entry._analyses["is_directed"] is not none %}
            {% if entry._analyses["is_directed"] %}
            Directed
            {% else %}
            Undirected
            {% endif %}
            {% endif %}
           </td>
          <td class="align-right">
            {% if entry._analyses["is_bipartite"] is not none %}
            {% if entry._analyses["is_bipartite"] %}
            Bipartite
            {% else %}
            Unipartite
            {% endif %}
            {% endif %}
           </td>
          <td class="align-right">
            {{ entry.files | length }}
          </td>
          <td>
            {% for tag in entry.tags %}
            <a href="?tags={{ tag }}"><span class="ink-label grey">{{ tag }}</span></a>
            {% endfor %}
          </td>
        </tr>
        {% endfor %}
      </tbody>
    <table>
  </div>
</div>

{% endblock %}