|
22 | 22 | </ul> |
23 | 23 | {%- endif %} |
24 | 24 | {% endmacro %} |
25 | | -{% macro render_all_graphics(model_parameters, quantitative_analysis) %} |
26 | | - <h2>Graphics</h2> |
27 | | - {% for dataset in model_parameters.data %}{% if dataset.graphics and dataset.graphics.collection %} |
| 25 | +{% macro render_all_datasets(datasets) %} |
| 26 | + <div class="col card"> |
| 27 | + <h2>Datasets</h2> |
| 28 | + {% for dataset in datasets %} |
28 | 29 | <div class="row"> |
29 | 30 | <div class="col card"> |
30 | 31 | <h3>{{ dataset.name }}</h3> |
31 | | - {{ dataset.description }} |
32 | | - {{ render_graphics(dataset.graphics.collection) }} |
33 | | - </div> |
34 | | - </div>{% endif %} |
35 | | - {% endfor %} |
36 | | - {% if quantitative_analysis.graphics.collection %} |
37 | | - <div class="row"> |
38 | | - <div class="col card"> |
39 | | - <h3>Quantitative Analysis</h3> |
40 | | - {{ quantitative_analysis.graphics.description }} |
41 | | - {{ render_graphics(quantitative_analysis.graphics.collection) }} |
| 32 | + <p>{{ dataset.description }}</p> |
| 33 | + <a href="{{ dataset.link }}">{{ dataset.link }}</a> |
| 34 | + {% if dataset.graphics and dataset.graphics.collection %} |
| 35 | + {{ render_graphics(dataset.graphics.collection) }} |
| 36 | + {% endif %} |
42 | 37 | </div> |
43 | 38 | </div> |
44 | | - {% endif %} |
| 39 | + {% endfor %} |
| 40 | + </div> |
45 | 41 | {% endmacro %} |
46 | 42 | {% macro render_graphics(graphics) %} |
47 | 43 | <div class="img-container"> |
|
62 | 58 | {% macro metric_value(metric) %} |
63 | 59 | {{ metric.value }}{% if metric.confidence_interval %} ({{ metric.confidence_interval.lower_bound }}, {{ metric.confidence_interval.upper_bound }}){% endif %} |
64 | 60 | {% endmacro %} |
| 61 | +{% macro render_quantitative_analysis(quantitative_analysis) %} |
| 62 | +<div class="col card"> |
| 63 | + <h2>Quantitative Analysis</h2> |
| 64 | + {% if quantitative_analysis.performance_metrics %} |
| 65 | + {{ render_metrics_table(quantitative_analysis.performance_metrics )}} |
| 66 | + {% endif %} |
| 67 | + {% if quantitative_analysis.graphics.collection %} |
| 68 | + {{ render_metrics_graphics(quantitative_analysis.graphics) }} |
| 69 | + {% endif %} |
| 70 | +</div> |
| 71 | +{% endmacro %} |
65 | 72 | {% macro render_metrics_table(metrics) %} |
66 | | -<table> |
| 73 | +<table class="center"> |
67 | 74 | <caption>Performance Metrics</caption> |
68 | 75 | <tr><th>Name</th><th>Value</th></tr> |
69 | 76 | {% for metric in metrics %} |
70 | 77 | <tr><td>{{ metric_name(metric) }}</td><td>{{ metric_value(metric) }}</td></tr> |
71 | 78 | {% endfor %} |
72 | 79 | </table> |
73 | 80 | {% endmacro %} |
| 81 | +{% macro render_metrics_graphics(graphics) %} |
| 82 | + <div class="row"> |
| 83 | + <div class="col"> |
| 84 | + {{ graphics.description }} |
| 85 | + {{ render_graphics(graphics.collection) }} |
| 86 | + </div> |
| 87 | + </div> |
| 88 | +{% endmacro %} |
74 | 89 | <html lang="en"> |
75 | 90 | <head> |
76 | 91 | <style> |
|
95 | 110 | .img-item { |
96 | 111 | flex: 1; |
97 | 112 | } |
| 113 | + .center { |
| 114 | + margin-left: auto; |
| 115 | + margin-right: auto; |
| 116 | + } |
98 | 117 | table, th, td { border: 1px solid black; } |
99 | 118 | th, td { border: 1px solid #CCC; height: 30px; } |
100 | 119 | caption { font-weight: bold; } |
|
160 | 179 | <h3>Output Format</h3> |
161 | 180 | <div style="white-space:pre-wrap;">{{ model_parameters.output_format }}</div>{% endif %} |
162 | 181 | {% endif %} |
163 | | - </div> |
164 | 182 | {% if considerations and (considerations.users or considerations.use_cases or considerations.limitations or considerations.tradeoffs or considerations.ethical_considerations) %} |
165 | 183 | <div class="col card"> |
166 | 184 | <h2>Considerations</h2> |
|
190 | 208 | </div> |
191 | 209 | {% endif %} |
192 | 210 | </div> |
193 | | - {% if model_parameters.data or quantitative_analysis.graphics.collection %} |
194 | | - {{ render_all_graphics(model_parameters, quantitative_analysis) }} |
| 211 | + {% if model_parameters.data %} |
| 212 | + {{ render_all_datasets(model_parameters.data) }} |
195 | 213 | {% endif %} |
196 | | - {% if quantitative_analysis.performance_metrics %} |
197 | | - {{ render_metrics_table(quantitative_analysis.performance_metrics )}} |
| 214 | + {% if quantitative_analysis.performance_metrics or quantitative_analysis.graphics.collection %} |
| 215 | + {{ render_quantitative_analysis(quantitative_analysis) }} |
198 | 216 | {% endif %} |
199 | 217 | </body> |
200 | 218 | </html> |
0 commit comments