Source

brightway2-ui / bw2ui / web / templates / hinton.html

Full commit
{% extends "base.html" %}

{% block extrahead %}
<script src="{{ url_for('static', filename="js/hinton.js") }}"></script>
<script src="{{ url_for('static', filename="js/interp-histogram.js") }}"></script>
<style type="text/css">
svg { 
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 80px;
}
</style>
{% endblock %}


{% block body %}
<h1>Testing Hinton matrix</h1>
<div id="hinton"></div>
<hr>
<div id="interp"></div>
<script type="text/javascript">
var data = [[0, 0, 2.13e-01],
  [0, 4, 3.88e-04],
  [1, 4, 3.46e-02],
  [2, 2, 4.64e-02],
  [2, 3, 2.91e-2],
  [3, 1, 1.46e-1],
  [3, 2, 1.41e-4],
  [3, 4, 7.5e-4],
  [4, 3, 5e-3],
  [4, 4, 1.4e-4]],
  ylabels = ["wheat grains conventional, Castilla-y-Leon, at farm",
  "nitric acid, 50% in H2O, at plant",
  "ammonia, steam reforming, liquid, at plant",
  "natural gas, burned in cogen 1MWe lean burn",
  "combine harvesting"],
  w = 400,
  h = 400,
  padding = 10;

hinton_matrix(data, 0.773, ["foo", "foo", "foo", "foo", "foo"], ylabels, "#hinton", w, h, padding);
</script>
<script type="text/javascript">
var data = [[1, 0.60372056294234133], [0, 0.60948078161411423], [0, 0.61524100028588713], [2, 0.62100121895765992], [0, 0.62676143762943282], [0, 0.63252165630120571], [0, 0.63828187497297861], [1, 0.6440420936447514], [2, 0.6498023123165243], [9, 0.6555625309882972], [8, 0.6613227496600701], [11, 0.66708296833184288], [20, 0.67284318700361578], [17, 0.67860340567538868], [31, 0.68436362434716158], [36, 0.69012384301893448], [40, 0.69588406169070727], [53, 0.70164428036248017], [77, 0.70740449903425306], [100, 0.71316471770602596], [121, 0.71892493637779875], [147, 0.72468515504957165], [167, 0.73044537372134455], [182, 0.73620559239311745], [205, 0.74196581106489035], [188, 0.74772602973666313], [246, 0.75348624840843603], [266, 0.75924646708020893], [323, 0.76500668575198183], [305, 0.77076690442375462], [343, 0.77652712309552752], [333, 0.78228734176730041], [375, 0.78804756043907331], [355, 0.79380777911084621], [354, 0.799567997782619], [353, 0.8053282164543919], [348, 0.8110884351261648], [354, 0.81684865379793758], [337, 0.82260887246971048], [286, 0.82836909114148338], [317, 0.83412930981325628], [323, 0.83988952848502918], [270, 0.84564974715680208], [300, 0.85140996582857487], [301, 0.85717018450034776], [272, 0.86293040317212066], [229, 0.86869062184389345], [196, 0.87445084051566635], [175, 0.88021105918743925], [174, 0.88597127785921215], [166, 0.89173149653098505], [150, 0.89749171520275794], [132, 0.90325193387453073], [124, 0.90901215254630363], [114, 0.91477237121807653], [97, 0.92053258988984932], [101, 0.92629280856162222], [79, 0.93205302723339511], [55, 0.93781324590516801], [69, 0.94357346457694091], [45, 0.94933368324871381], [37, 0.9550939019204866], [37, 0.9608541205922595], [31, 0.96661433926403229], [29, 0.97237455793580518], [28, 0.97813477660757808], [22, 0.98389499527935098], [20, 0.98965521395112388], [11, 0.99541543262289678], [14, 1.0011756512946697], [10, 1.0069358699664424], [9, 1.0126960886382155], [16, 1.0184563073099882], [6, 1.0242165259817611], [5, 1.0299767446535339], [10, 1.0357369633253068], [3, 1.0414971819970797], [5, 1.0472574006688526], [2, 1.0530176193406255], [6, 1.0587778380123982], [5, 1.0645380566841713], [2, 1.070298275355944], [1, 1.0760584940277169], [1, 1.0818187126994898], [2, 1.0875789313712627], [0, 1.0933391500430356], [1, 1.0990993687148085], [0, 1.1048595873865814], [0, 1.1106198060583541], [0, 1.1163800247301272], [0, 1.1221402434018999], [0, 1.1279004620736728], [0, 1.1336606807454457], [0, 1.1394208994172186], [0, 1.1451811180889915], [0, 1.1509413367607642], [1, 1.1567015554325373], [0, 1.16246177410431], [0, 1.1682219927760831], [1, 1.1739822114478558]],
  id = "#interp",
  w = 500,
  h = 300,
  xlabel = "kg CO2-eq.",
  padding = 10;

interpolated_histogram(data, xlabel, 0.816, 0.677, 1.03, id, w, h, padding);
</script>
{% endblock %}