<commit_before>{% extends "base.html" %}

{% block content %}
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
    However, it seems JavaScript is either disabled or not supported by your browser.
    To view Google Maps, KX cloud and other enable JavaScript by changing your browser
    options, and then try again.
</noscript>
<table><tr><td bgcolor=#dddddd nowrap><font size=+1>Top 10</font>&nbsp;&nbsp;</td>
<td nowrap>&nbsp;&nbsp;<font size=+1><a href="{% url metashare.views.frontpage %}stats/usage/">Usage statistics</a></font>&nbsp;&nbsp; </td>
{% if user.username and myres %}
<td nowrap>&nbsp;&nbsp;<font size=+1><a href="{% url metashare.views.frontpage %}stats/mystats/">My resources</a></font>&nbsp;&nbsp; </td>
{% endif %}
<td></td></tr>
<tr><td bgcolor=#dddddd colspan=4>

<div class="content_box">

<form class="form_helper" name="topform" id="topform" action="{% url metashare.views.frontpage %}stats/top/" method="get">
<table>
<tr><td>
<select name='view' onchange="topform.submit();">

<option value='topviewed' style="background-image: url({{ MEDIA_URL }}stats/img/view_icon.gif); background-repeat: no-repeat;"
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Most Viewed Resources

<option value='topdownloaded' style="background-image: url({{ MEDIA_URL }}stats/img/download_icon.gif); background-repeat: no-repeat;"
{% ifequal view "topdownloaded" %}
        selected
{% endifequal %}
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Top Downloaded Resources

<option value='topqueries' style="background-image: url({{ MEDIA_URL }}stats/img/retrieve_icon.gif); background-repeat: no-repeat;"
{% ifequal view "topqueries" %}
        selected
{% endifequal %}

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Top Queries

<option value='latestupdated' style="background-image: url({{ MEDIA_URL }}stats/img/update_icon.gif); background-repeat: no-repeat;"
{% ifequal view "latestupdated" %}
        selected
{% endifequal %}

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latest Updated Resources

<option value='latestqueries' style="background-image: url({{ MEDIA_URL }}stats/img/retrieve_icon.gif); background-repeat: no-repeat;"
{% ifequal view "latestqueries" %} 
	selected
{% endifequal %}
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latest Queries
</select>
</td></tr></table>
</form>

{% if topdata|length <= 0 %}
    <center><strong>No data found</strong></center>
{% else %}
<div id="results">
<table class="result_table">
<tr class="result_table_head">
{% ifequal view "latestqueries" %}
  <td width="60%" nowrap>Query, Filters</td>
  <td width="15%" nowrap>Found results</td>
  <td width="25%">Time</td>
{% else %}
    {% ifequal view "topqueries" %}
        <td width="60%" nowrap>Query, Filters</td>
        <td width="15%" nowrap>Count</td>
        <td width="25%">Time</td> 
    {% else %}
      <td width="5%">Id</td>
      <td width="70%">Title</td>
      {% ifequal view "latestupdated" %}
        <td width="25%">Date</td>
      {% else %}
        <td width="25%">Count</td>
      {% endifequal %}
    {% endifequal %}
{% endifequal %}
</tr>

{% for stat in topdata %}
    <tr class="{% cycle odd,even %}">
    {% if "quer" in view %}  
       <td nowrap><a href="{% url metashare.views.frontpage %}repository/search/?{{ stat.4 }}"><img src="{{ MEDIA_URL }}css/sexybuttons/images/icons/silk/zoom.png"> <font color=black>{{ stat.0 }}</font></a>
       {% ifnotequal stat.1 "" %}  
       {{ stat.1 }}
       {% endifnotequal %}
       </td>
       <td width=100%><i><font color=black>{{ stat.3 }}</font></i></td>
       <td nowrap>{{ stat.2 }}</td>
    {% else %} 
       <th style="text-align:right;" nowrap>{{ stat.0 }}</th>
       <td width=100%><a href="{{ stat.1 }}">{{ stat.3 }}</a></td>
       <td nowrap>
       {% ifequal view "latestupdated" %}   
            {{ stat.2 }}
       {% else %}
            <b><font color=black>{{ stat.2 }}</font></b>
       {% endifequal %}
       </td>
    {% endif %}
    </tr>
{% endfor %}
</table>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize(){
    var myLatlng=new google.maps.LatLng(23.885838,-2.109375);
    var myOptions={zoom:1,center:myLatlng,mapTypeId:google.maps.MapTypeId.ROADMAP}
    var map=new google.maps.Map(document.getElementById("googlemap"),myOptions);

    {% for geoinfo in geovisits %}
        {% if geoinfo.2|length > 0 %}
            var myLatLng=new google.maps.LatLng({{ geoinfo.2 }});var numberMarker1=new google.maps.Marker({position:myLatLng,map:map,icon:'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.5|0|ed1818|12|_|{{ geoinfo.1 }}'});
        {% endif %}
    {% endfor %}
}
</script>


<body onload="initialize()" onunload="GUnload()"> 
     
  </body> 
  
  
  {% if geovisits|length > 0 %}
    <div id="visits" style="background: #E6E6FA; border: 1px solid #000;">   
     <table width=50%><td width=40%><table>
        <tr class="result_table_head">{{ visitstitle }}</td><tr>
     
     {% for geoinfo in geovisits %}
            <tr>
            <td nowrap><font color=black>{{ geoinfo.0 }}</font></td>
            <td><font color=black>{{ geoinfo.1 }}</font></td>
            </tr><commit_msg>Change the visualization of the map: now it is political<commit_after>{% extends "base.html" %}

{% block content %}
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
    However, it seems JavaScript is either disabled or not supported by your browser.
    To view Google Maps enable JavaScript by changing your browser options, and then try again.
</noscript>
<table><tr><td bgcolor=#dddddd nowrap><font size=+1>Top 10</font>&nbsp;&nbsp;</td>
<td nowrap>&nbsp;&nbsp;<font size=+1><a href="{% url metashare.views.frontpage %}stats/usage/">Usage statistics</a></font>&nbsp;&nbsp; </td>
{% if user.username and myres %}
<td nowrap>&nbsp;&nbsp;<font size=+1><a href="{% url metashare.views.frontpage %}stats/mystats/">My resources</a></font>&nbsp;&nbsp; </td>
{% endif %}
<td></td></tr>
<tr><td bgcolor=#dddddd colspan=4>

<div class="content_box">

<form class="form_helper" name="topform" id="topform" action="{% url metashare.views.frontpage %}stats/top/" method="get">
<table>
<tr><td>
<select name='view' onchange="topform.submit();">

<option value='topviewed' style="background-image: url({{ MEDIA_URL }}stats/img/view_icon.gif); background-repeat: no-repeat;"
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Most Viewed Resources

<option value='topdownloaded' style="background-image: url({{ MEDIA_URL }}stats/img/download_icon.gif); background-repeat: no-repeat;"
{% ifequal view "topdownloaded" %}
        selected
{% endifequal %}
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Top Downloaded Resources

<option value='topqueries' style="background-image: url({{ MEDIA_URL }}stats/img/retrieve_icon.gif); background-repeat: no-repeat;"
{% ifequal view "topqueries" %}
        selected
{% endifequal %}

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Top Queries

<option value='latestupdated' style="background-image: url({{ MEDIA_URL }}stats/img/update_icon.gif); background-repeat: no-repeat;"
{% ifequal view "latestupdated" %}
        selected
{% endifequal %}

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latest Updated Resources

<option value='latestqueries' style="background-image: url({{ MEDIA_URL }}stats/img/retrieve_icon.gif); background-repeat: no-repeat;"
{% ifequal view "latestqueries" %} 
	selected
{% endifequal %}
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latest Queries
</select>
</td></tr></table>
</form>

{% if topdata|length <= 0 %}
    <center><strong>No data found</strong></center>
{% else %}
<div id="results">
<table class="result_table">
<tr class="result_table_head">
{% ifequal view "latestqueries" %}
  <td width="60%" nowrap>Query, Filters</td>
  <td width="15%" nowrap>Found results</td>
  <td width="25%">Time</td>
{% else %}
    {% ifequal view "topqueries" %}
        <td width="60%" nowrap>Query, Filters</td>
        <td width="15%" nowrap>Count</td>
        <td width="25%">Time</td> 
    {% else %}
      <td width="5%">Id</td>
      <td width="70%">Title</td>
      {% ifequal view "latestupdated" %}
        <td width="25%">Date</td>
      {% else %}
        <td width="25%">Count</td>
      {% endifequal %}
    {% endifequal %}
{% endifequal %}
</tr>

{% for stat in topdata %}
    <tr class="{% cycle odd,even %}">
    {% if "quer" in view %}  
       <td nowrap><a href="{% url metashare.views.frontpage %}repository/search/?{{ stat.4 }}"><img src="{{ MEDIA_URL }}css/sexybuttons/images/icons/silk/zoom.png"> <font color=black>{{ stat.0 }}</font></a>
       {% ifnotequal stat.1 "" %}  
       {{ stat.1 }}
       {% endifnotequal %}
       </td>
       <td width=100%><i><font color=black>{{ stat.3 }}</font></i></td>
       <td nowrap>{{ stat.2 }}</td>
    {% else %} 
       <th style="text-align:right;" nowrap>{{ stat.0 }}</th>
       <td width=100%><a href="{{ stat.1 }}">{{ stat.3 }}</a></td>
       <td nowrap>
       {% ifequal view "latestupdated" %}   
            {{ stat.2 }}
       {% else %}
            <b><font color=black>{{ stat.2 }}</font></b>
       {% endifequal %}
       </td>
    {% endif %}
    </tr>
{% endfor %}
</table>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
  <script type="text/javascript">
    google.load('visualization', '1', {packages: ['geochart']});

    function drawVisualization() {
      var data = google.visualization.arrayToDataTable([
      ['Country', 'Count'],
        {% for geoinfo in geovisits %}
        {% if geoinfo.2|length > 0 %}
        ['{{ geoinfo.0 }}', {{ geoinfo.1 }}],
        {% endif %}
        {% endfor %}
        
      ]);
    
      var geochart = new google.visualization.GeoChart(
          document.getElementById('googlemap'));
      geochart.draw(data, {width: 530, height: 300});
    }
    

    google.setOnLoadCallback(drawVisualization);
  </script>


<body onload="initialize()" onunload="GUnload()"> 
     
  </body> 
  
  
  {% if geovisits|length > 0 %}
    <div id="visits" style="background: #E6E6FA; border: 1px solid #000;">   
     <table width=50%><td width=40%><table>
        <tr class="result_table_head">{{ visitstitle }}</td><tr>
     
     {% for geoinfo in geovisits %}
            <tr>
            <td nowrap><font color=black>{{ geoinfo.0 }}</font></td>
            <td><font color=black>{{ geoinfo.1 }}</font></td>
            </tr>
{'fraction_non_alphanumeric': 0.20140763594292327, 'fraction_numerical': 0.014751253374469727, 'mean_word_length': 3.717144156434743, 'pattern_counts': {'":': 0, '<': 253, '<?xml version=': 0, '>': 255, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '961851', 'n_tokens_mistral': 3800, 'n_tokens_neox': 3451, 'n_words': 750}