-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
19,672 additions
and
622 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// DATATABLE OF METRICS | ||
// | ||
|
||
var dictionary = { | ||
"Max" : ["Maximum Value", "The maximum value observed for the timeseries, at any time"], | ||
"Q75" : ["75% Percentile", "One in four observations is above this threshold"], | ||
"Median" : ["Median Value", "Half of the observations are above (below) this threshold"], | ||
"Q25" : ["25% Percentile", "One in four observations is below this threshold"], | ||
"Min" : ["Minimum Value", "The minimum value observed for the timeseries, at any time"], | ||
"Vol" : ["Volatility", "The standard deviation calculated using the entire timeseries"], | ||
"Mean" : ["Mean Value", "The average observation calculated using the entire timeseries"], | ||
"ObsCount" : ["No of Observations", "The total number of valid observations"], | ||
"FirstDate" : ["Earliest Measurement", "The first available observation"], | ||
"LastDate" : ["Latest Measurement", "The latest (most recent) available observation"], | ||
"Frequency" : ["Measurement Frequency", "The time interval between successive observations"], | ||
"Skew" : ["Skew", "The third moment of the distribution calculated using all observations"], | ||
"Kurtosis" : ["Kurtosis","The fourth moment of the distribution calculated using all observations"] | ||
} | ||
|
||
var metricSet = []; | ||
for (var key in dictionary) { | ||
var dataEntry = [dictionary[key][0], metrics[key], dictionary[key][1]]; | ||
metricSet.push(dataEntry); | ||
} | ||
metricSet.push(["Measurement Unit", units, "The unit of measurement (or percentage)"]); | ||
|
||
|
||
table2 = $('#metrics').DataTable( { | ||
data: metricSet, | ||
"bPaginate": false, | ||
"responsive": true, | ||
"bSort" : false, | ||
"ordering": false, | ||
"info": false, | ||
"searching": false, | ||
"pageLength": -1, | ||
columns: [ | ||
{ width: "25%", title: "Risk Metrics" }, | ||
{ width: "15%", title: "Values" }, | ||
{ width: "60%", title: "Description" }, | ||
] | ||
} ); | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{% extends "start/d3.html" %} | ||
{% load i18n static %} | ||
{% load custom_tags %} | ||
{% load humanize %} | ||
|
||
{% block extrastyle %} | ||
{{ block.super }} | ||
<link rel="stylesheet" type="text/css" href="{% static 'policy/css/policy.css' %}"/> | ||
{% endblock %} | ||
|
||
{% block extrahead %} | ||
{{ block.super }} | ||
<script type="text/javascript" charset="utf-8" | ||
src="{% static 'policy/js/timeseries_graph_numerical.js' %}"></script> | ||
<script type="text/javascript" charset="utf-8" | ||
src="{% static 'policy/js/timeseries_graph_ordinal.js' %}"></script> | ||
{% endblock %} | ||
|
||
{% block title %} | ||
{{ title }} Policy Data Plot for {{ object.title }} | ||
{% endblock %} | ||
|
||
{% block messages %} | ||
<div class="helpblock" id="page_content_front"> | ||
<h4><i class="fa fa-area-chart"></i> Policy Data: Timeseries Plot</h4> | ||
<p class="helpblocktext"><b>Dataseries: {{ object.title }}</b><br><i>Details: {{ object.title_long }}</i></p> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
{% include "policy/ds_breadcrumb.html" %} | ||
|
||
|
||
<div class="card card-primary card-outline"> | ||
<div class="card-body"> | ||
<div id="timeseries_graph" style="background-color: white"></div> | ||
</div> | ||
</div> | ||
<div class="card card-primary card-outline"> | ||
<div class="card-body"> | ||
{% if object.field_type == 'numerical' %} | ||
<h3>Summary Statistics:</h3> | ||
<table id="metrics" style="width:180px"> | ||
<tr class="even"> | ||
<td>Maximum Value</td> | ||
<td>{{ maxval }}</td> | ||
</tr> | ||
<tr class="odd"> | ||
<td>Minimum Value</td> | ||
<td>{{ minval }}</td> | ||
</tr> | ||
<tr class="even"> | ||
<td>Average Value</td> | ||
<td>{{ average }}</td> | ||
</tr> | ||
<tr class="odd"> | ||
<td>Latest Value</td> | ||
<td>{{ latest }}</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
<tr class="odd"> | ||
<td>Date</td> | ||
<td id="date_element">2020-01-05</td> | ||
</tr> | ||
<tr class="even"> | ||
<td>Value</td> | ||
<td id="value_element">0</td> | ||
</tr> | ||
</table> | ||
{% else %} | ||
<h3>Policy Value Dictionary:</h3> | ||
<table id="metrics"> | ||
{% for key, value in code_list.items %} | ||
<tr> | ||
<td>{{ key }}</td> | ||
<td>{{ value }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% endif %} | ||
</div> | ||
|
||
<script> | ||
let values = {{ object.values | safe }}; | ||
let units = "{{ object.unit }}"; | ||
let dates = {{ object.dates | safe }}; | ||
let metrics = {{ object.metrics | safe }}; | ||
let title = "{{ object.title_long }}"; | ||
console.log(title); | ||
let datatype = "{{ object.field_type }}"; | ||
console.log(datatype); | ||
</script> | ||
|
||
<script type="text/javascript" charset="utf-8" src="{% static 'policy/js/plot.js' %}"></script> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div> | ||
<table id="db_stats" class="display responsive"> | ||
<tbody> | ||
<tr> | ||
<td>Targeted Data Sets (Raw Sources)</td> | ||
<td><span id="total_datasets">100000</span></td> | ||
</tr> | ||
<tr> | ||
<td>Integrated Data Sets (After Data Cleaning)</td> | ||
<td><span id="tracked_datasets">100000</span></td> | ||
</tr> | ||
<tr> | ||
<td>Active Data Sets (Recently Changed)</td> | ||
<td><span id="live_datasets">100000</span></td> | ||
</tr> | ||
<tr> | ||
<td>Focus Metrics</td> | ||
<td>3</td> | ||
</tr> | ||
<tr> | ||
<td>Visualization Types</td> | ||
<td>3</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<script> | ||
$('#db_stats').DataTable(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.