ba0af5bff4ba — Joe Ulfers 5 years ago
Add results page
6 files changed, 59 insertions(+), 6 deletions(-)

M _static/js/doors.js
M _templates/layout.html
M conf.py
M index.rst
M research/index.rst
A => results.rst
M _static/js/doors.js +2 -0
@@ 53,6 53,8 @@ window.doors = (function () {
     }
 
     var jsModule = {}
+    // Loading doors.py fails from the results page, but it doesn't matter, that page doesn't need
+    // any of the Python functionality
     $.ajax('doors.py', {dataType: 'text', async: false})
     .done(function (source) {
         var pyModule = Sk.importMainWithBody('doors', false, source)

          
M _templates/layout.html +6 -4
@@ 1,6 1,7 @@ 
 {% extends "basic/layout.html" %}
 
-{% set script_files = script_files + [
+{% set script_files = [
+    '/_static/js/lib/jquery-1.11.0.js',
     '/_static/js/classify.js',
     '/_static/js/lib/ASCIIMathML.js' ] %}
 

          
@@ 13,9 14,10 @@ 
 {% block header %}
 <header {% if pagename == "index" %}class="home"{% endif %}>
     <div><!-- for styling -->
-        <a href="index.html">The revolving door hoax</a>
-        <a href="experiment.html">The experiment</a>
-        <a href="research/index.html">The research</a>
+        <a href="{{ pathto(master_doc) }}">The revolving door hoax</a>
+        <a href="/experiment.html">The experiment</a>
+        <a href="/research/index.html">The research</a>
+        <a href="/results.html">The results</a>
     </div>
 </header>
 {% endblock %}

          
M conf.py +1 -1
@@ 95,7 95,7 @@ html_theme_path = ['.']
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static', 'model.html', 'chart.html', 'doors.py']
+html_static_path = ['_static', 'model.html', 'chart.html', 'doors.py', 'results']
 
 # -- Options for HTMLHelp output ------------------------------------------
 

          
M index.rst +1 -0
@@ 7,6 7,7 @@ The great revolving door hoax
 
     experiment
     research/index
+    results
 
 Imagine, before you, two doors lie in wait, anticipating your choice. One, simple and familiar,
 but adorned by an admonishment to use the other. Imagine you do not know how your choice may affect

          
M research/index.rst +1 -1
@@ 139,7 139,7 @@ Most of the studies lie safely behind ac
 
 -   `Zmeureanu et al. test revolving door seal leakage`_ to see whether stationary doors measured up
     to standards. They did not.
--   `Allgayer and Hunt studied water flow around revolving doors`_. If you're keen to spend $100,
+-   `Allgayer and Hunt studied water flow around revolving doors`_. If you're keen to spend money,
     you can get `Allgayer's book from Amazon`_.
 -   Zmeureanu published what looks from the abstract like `a trimmed copy of Lin Du's study`_.
 -   `Karlsson finally compared different door types (PDF)`_, but only in computer simulation.

          
A => results.rst +48 -0
@@ 0,0 1,48 @@ 
+###########
+The results
+###########
+
+This chart plots the recorded temperature inside the model and outside, for given volumes of traffic. In the scenarios shown, it shows that for an average of 19 people per minute, the revolving door outperformed the swinging door.
+
+That is, while simulated people used the swinging door, the difference between outdoor and indoor temperature was lower than when they used the revolving door. This indicates the building was better insulated than the revolving door.
+
+Similar results held for other traffic volumes.
+
+How to read this chart
+======================
+
+- Time is on the x axis
+- Temperature is on the y axis
+- Blue represents outside sensors
+- Maroon represents inside sensors
+- The vertical height of each line is one degree celcius
+- Gray bars represent people moving through doors
+
+Pick different time frames to examine by clicking the chart or choosing from the selected ranges:
+
+.. raw:: html
+
+    <script src="_static/js/lib/jquery-1.11.0.js"></script>
+    <script src="_static/js/lib/skulpt.min.js"></script>
+    <script src="_static/js/lib/skulpt-stdlib.js"></script>
+    <script src="_static/js/doors.js"></script>
+
+    <div class="chart">
+        <!-- filled with content from chart.html -->
+    </div>
+    <script>
+    ;(function () {
+        'use strict'
+        $('.chart').load('_static/chart.html', function () {
+            var chart = doors.chart($('.chart'))
+            doors.results('_static/051100-0855.30.csv', '_static/051100-0855-scenarios.csv')
+            .onupdate(function (results, scenarios) {
+                chart.update(results, scenarios)
+            })
+        })
+    })()
+    </script>
+
+----
+
+Still hate revolving doors? Don't despair. Remember Galileo, did he recant? This is just a small-scale experiment. Perhaps the results don't scale to full-size doors or buildings...
  No newline at end of file