<commit_before>{% load lookup_filter %}

<html>
<head>
  <script src="http://d3js.org/d3.v3.min.js"></script>
  <script src="http://dimplejs.org/dist/dimple.v1.1.2.min.js"></script>
</head>
<body>
  {% for summary in summaries  %}
  {% with field_name=summary.field_name data_type=summary.data_type field_type=summary.field_type data=summary.data %}
  <div id="{{ field_name }}"></div>
  <script type="text/javascript">
    (function(elmSelector){
          var svg = dimple.newSvg(elmSelector, 800, 600);
          var data = [
            {% for item in data %}
              { "{{ field_name }}": "{{ item|lookup:field_name }}", "count": "{{ item.count }}" },
            {% endfor %}
          ];
          var chart = new dimple.chart(svg, data);
          var categoryAxisLocation = {% if data_type == "numeric" or data_type == 'time_based' %} "{{ "x" }}" {% else %} "{{ "y" }}" {% endif %};
          var countAxisLocation = {% if data_type == "numeric" or data_type == 'time_based' %} "{{ "y" }}" {% else %} "{{ "x" }}" {% endif %};
          var categoryAxis = chart.addAxis(categoryAxisLocation, "{{ field_name }}", null{% if data_type == 'time_based' %} , "{{ field_name }}" {% endif %});
          {% if data_type == 'time_based' %}
          categoryAxis.tickFormat = "%Y-%m-%d";
          categoryAxis.timePeriod = d3.time.hour;
          categoryAxis.timeInterval = 12;
          {% endif %}
          var countAxis = chart.addMeasureAxis(countAxisLocation, "count");
          chart.addSeries(null, dimple.plot.bar);
          chart.draw();
      })('#{{ field_name }}')
  </script>
  {% endwith %}
  {% endfor %}
</body>
</html><commit_msg>added base template<commit_after>{% extends 'base.html' %}
{% load lookup_filter %}

{% block content %}
        <div>
  {% for summary in summaries  %}
  {% with field_name=summary.field_name data_type=summary.data_type field_type=summary.field_type data=summary.data %}
  <div id="{{ field_name }}" style="width: 800px; height: 600px;"></div>
  <script type="text/javascript">
    (function(elmSelector){
          var svg = dimple.newSvg(elmSelector, 800, 600);
          var data = [
            {% for item in data %}
              { "{{ field_name }}": "{{ item|lookup:field_name }}", "count": "{{ item.count }}" },
            {% endfor %}
          ];
          var chart = new dimple.chart(svg, data);
          var categoryAxisLocation = {% if data_type == "numeric" or data_type == 'time_based' %} "{{ "x" }}" {% else %} "{{ "y" }}" {% endif %};
          var countAxisLocation = {% if data_type == "numeric" or data_type == 'time_based' %} "{{ "y" }}" {% else %} "{{ "x" }}" {% endif %};
          var categoryAxis = chart.addAxis(categoryAxisLocation, "{{ field_name }}", null{% if data_type == 'time_based' %} , "{{ field_name }}" {% endif %});
          {% if data_type == 'time_based' %}
          categoryAxis.tickFormat = "%Y-%m-%d";
          categoryAxis.timePeriod = d3.time.hour;
          categoryAxis.timeInterval = 12;
          {% endif %}
          var countAxis = chart.addMeasureAxis(countAxisLocation, "count");
          chart.addSeries(null, dimple.plot.bar);
          chart.draw();
      })('#{{ field_name }}')
  </script>
  {% endwith %}
  {% endfor %}
            </div>
{% endblock %}

{% block additional-headers %}
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v1.1.2.min.js"></script>
{% endblock %}
{'fraction_non_alphanumeric': 0.19628877935633518, 'fraction_numerical': 0.010437808060307335, 'mean_word_length': 2.758169934640523, 'pattern_counts': {'":': 4, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5619762', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1102, 'n_words': 218}