<commit_before>{% set active_page='timeline'%}{% extends "base.html" %}
{% block title %}Timeline {% endblock %}
{% block content %}

<style>
    .editor-type, .editor-group, .label-editor-type, .label-editor-group {
        display:none;
    }
</style>

    <!-- Recline CSS components -->
  <link rel="stylesheet" href="{{url_for('static', filename='css/flot.css')}}">
  <link rel="stylesheet" href="{{url_for('static', filename='css/multiview.css')}}">
  <!-- /Recline CSS components -->

  <!-- 3rd party JS libraries -->
  <script type="text/javascript" src="{{url_for('static', filename='vendor/underscore/1.4.2/underscore.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='vendor/backbone/0.9.2/backbone.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='vendor/mustache/0.5.0-dev/mustache.js')}}"></script>
  <!--[if lte IE 8]>
  <script language="javascript" type="text/javascript" src="{{url_for('static', filename='vendor/flot/excanvas.min.js')}}"></script>
  <![endif]-->
  <script type="text/javascript" src="{{url_for('static', filename='vendor/flot/jquery.flot.js')}}"></script>
  <!--[if lte IE 7]>
  <script language="javascript" type="text/javascript" src="{{url_for('static', filename='vendor/json/json2.js')}}"></script>
  <![endif]-->


  <!-- model and backends -->
  <script type="text/javascript" src="{{url_for('static', filename='src/ecma-fixes.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/model.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/backend.json.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/backend.memory.js')}}"></script>

  <!-- views -->
  <script type="text/javascript" src="{{url_for('static', filename='src/view.flot.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/view.graph.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.pager.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.queryeditor.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.filtereditor.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.fields.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/view.multiview.js')}}"></script>

<h1>Timeline</h1>
<p class="lead">Select fields on the right and see a graph of how many organisations will be publishing that IATI field over time.</p>

<div id="elementsgraph"></div>
<div style='clear: both;'></div>
<script type="text/javascript">


jQuery(function($) {

    var url = "{{url_for('element_dates_groups')}}";
  window.dataExplorer = null;
  window.explorerDiv = $('#elementsgraph');

  // This is some fancy stuff to allow configuring the multiview from
  // parameters in the query string
  //
  // For more on state see the view documentation.
    var state = {
    "view-graph": {
        graphType: "line", 
        group: "date",
        series: [{% for element in elements %}{% if loop.first %}'{{element.propertyid}}'{% else %}, '{{element.propertyid}}'{%endif%}{%endfor%}]
    },
    currentView: "graph"
    };
  var dataset = new recline.Model.Dataset({
      url:url,
      fields: [
          {id: 'date', type: 'date', label:"Date"}
          {% for element in elements %},
          {id: '{{element.propertyid}}', label: "{{element.level|capitalize}} - {{element.description}}{% if element.defining_attribute_value %} ({{element.defining_attribute_value}}){%endif%}", type: "string"}{%endfor%}
        ],
      backend:'json'
    });
  createExplorer(dataset, state);
});


// make Explorer creation / initialization in a function so we can call it
// again and again
var createExplorer = function(dataset, state) {
  // remove existing data explorer view
  var reload = false;
  if (window.dataExplorer) {
    window.dataExplorer.remove();
    reload = true;
  }
  window.dataExplorer = null;
  var $el = $('<div />');
  $el.appendTo(window.explorerDiv);

  var views = [
    {
      id: 'graph',
      label: 'Graph',
      view: new recline.View.Graph({
        model: dataset,
        state: {
            graphType: "lines",
            group: "date",
            series: ["5", "6"]
          }
      })
    }
  ];<commit_msg>Update timeline text, show activity documents instead<commit_after>{% set active_page='timeline'%}{% extends "base.html" %}
{% block title %}Timeline {% endblock %}
{% block content %}

<style>
    .editor-type, .editor-group, .label-editor-type, .label-editor-group {
        display:none;
    }
</style>

    <!-- Recline CSS components -->
  <link rel="stylesheet" href="{{url_for('static', filename='css/flot.css')}}">
  <link rel="stylesheet" href="{{url_for('static', filename='css/multiview.css')}}">
  <!-- /Recline CSS components -->

  <!-- 3rd party JS libraries -->
  <script type="text/javascript" src="{{url_for('static', filename='vendor/underscore/1.4.2/underscore.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='vendor/backbone/0.9.2/backbone.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='vendor/mustache/0.5.0-dev/mustache.js')}}"></script>
  <!--[if lte IE 8]>
  <script language="javascript" type="text/javascript" src="{{url_for('static', filename='vendor/flot/excanvas.min.js')}}"></script>
  <![endif]-->
  <script type="text/javascript" src="{{url_for('static', filename='vendor/flot/jquery.flot.js')}}"></script>
  <!--[if lte IE 7]>
  <script language="javascript" type="text/javascript" src="{{url_for('static', filename='vendor/json/json2.js')}}"></script>
  <![endif]-->


  <!-- model and backends -->
  <script type="text/javascript" src="{{url_for('static', filename='src/ecma-fixes.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/model.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/backend.json.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/backend.memory.js')}}"></script>

  <!-- views -->
  <script type="text/javascript" src="{{url_for('static', filename='src/view.flot.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/view.graph.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.pager.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.queryeditor.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.filtereditor.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/widget.fields.js')}}"></script>
  <script type="text/javascript" src="{{url_for('static', filename='src/view.multiview.js')}}"></script>

<h1>Timeline</h1>
<p class="lead">Select fields on the right and see how many organisations plan to publish that field.</p>

<div id="elementsgraph"></div>
<div style='clear: both;'></div>
<script type="text/javascript">


jQuery(function($) {

    var url = "{{url_for('element_dates_groups')}}";
  window.dataExplorer = null;
  window.explorerDiv = $('#elementsgraph');

  // This is some fancy stuff to allow configuring the multiview from
  // parameters in the query string
  //
  // For more on state see the view documentation.
    var state = {
    "view-graph": {
        graphType: "line", 
        group: "date",
        series: [{% for element in elements %}{% if loop.first %}'{{element.propertyid}}'{% else %}, '{{element.propertyid}}'{%endif%}{%endfor%}]
    },
    currentView: "graph"
    };
  var dataset = new recline.Model.Dataset({
      url:url,
      fields: [
          {id: 'date', type: 'date', label:"Date"}
          {% for element in elements %},
          {id: '{{element.propertyid}}', label: "{{element.level|capitalize}} - {{element.description}}{% if element.defining_attribute_value %} ({{element.defining_attribute_value}}){%endif%}", type: "string"}{%endfor%}
        ],
      backend:'json'
    });
  createExplorer(dataset, state);
});


// make Explorer creation / initialization in a function so we can call it
// again and again
var createExplorer = function(dataset, state) {
  // remove existing data explorer view
  var reload = false;
  if (window.dataExplorer) {
    window.dataExplorer.remove();
    reload = true;
  }
  window.dataExplorer = null;
  var $el = $('<div />');
  $el.appendTo(window.explorerDiv);

  var views = [
    {
      id: 'graph',
      label: 'Graph',
      view: new recline.View.Graph({
        model: dataset,
        state: {
            graphType: "lines",
            group: "date",
            series: ["5", "41"]
          }
      })
    }
  ];
{'fraction_non_alphanumeric': 0.2124693285746152, 'fraction_numerical': 0.0039036359580637966, 'mean_word_length': 4.156411730879816, 'pattern_counts': {'":': 2, '<': 117, '<?xml version=': 0, '>': 117, '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': '4806314', 'n_tokens_mistral': 2900, 'n_tokens_neox': 2803, 'n_words': 572}