1
|
|
|
""" |
2
|
|
|
Template for HTML version of Data Summary |
3
|
|
|
""" |
4
|
|
|
|
5
|
|
|
kyd_htmltemplate = """ |
|
|
|
|
6
|
|
|
<style> |
7
|
|
|
|
8
|
|
|
.kydbox {{ |
9
|
|
|
border-style: solid; |
10
|
|
|
border-color: #CCCCCC; |
11
|
|
|
border-width: 2px; |
12
|
|
|
margin: 10px; |
13
|
|
|
padding: 5px; |
14
|
|
|
font-family: sans-serif; |
15
|
|
|
font-size: 10pt; |
16
|
|
|
}} |
17
|
|
|
|
18
|
|
|
.kydfloatboxleft {{ |
19
|
|
|
margin: 5px; |
20
|
|
|
padding-left: 10px; |
21
|
|
|
float: left; |
22
|
|
|
border-right-width: 2px; |
23
|
|
|
border-right-style: solid; |
24
|
|
|
border-right-color: #CCCCCC; |
25
|
|
|
padding-right: 15px; |
26
|
|
|
margin-right: 15px; |
27
|
|
|
}} |
28
|
|
|
|
29
|
|
|
.kydfloatboxright {{ |
30
|
|
|
margin: 5px; |
31
|
|
|
padding-right: 10px; |
32
|
|
|
float: right; |
33
|
|
|
}} |
34
|
|
|
|
35
|
|
|
.kydsubtitle {{ |
36
|
|
|
font-size: 10pt; |
37
|
|
|
font-weight: bold; |
38
|
|
|
margin-top: 5px; |
39
|
|
|
margin-bottom: 5px; |
40
|
|
|
}} |
41
|
|
|
|
42
|
|
|
.kydpropertylabel {{ |
43
|
|
|
font-weight: bold; |
44
|
|
|
}} |
45
|
|
|
|
46
|
|
|
td.kydpropertylabel {{ |
47
|
|
|
text-align: right; |
48
|
|
|
}} |
49
|
|
|
|
50
|
|
|
table.kydbasic_stats, |
51
|
|
|
table.kydarray_structure {{ |
52
|
|
|
padding-top: 0px; |
53
|
|
|
}} |
54
|
|
|
|
55
|
|
|
table.kydbasic_stats td, |
56
|
|
|
table.kydarray_structure td {{ |
57
|
|
|
padding: 3px 10px 3px 10px; |
58
|
|
|
}} |
59
|
|
|
|
60
|
|
|
.kydbottomborder {{ |
61
|
|
|
border-bottom-width:2px; |
62
|
|
|
border-bottom-style:solid; |
63
|
|
|
border-bottom-color:#CCCCCC; |
64
|
|
|
}} |
65
|
|
|
|
66
|
|
|
</style> |
67
|
|
|
|
68
|
|
|
<div class="kydbox" , style="float:left"> |
69
|
|
|
|
70
|
|
|
<div class="kydfloatboxleft"> |
71
|
|
|
<div class="kydsubtitle">Basic Statistics</div> |
72
|
|
|
|
73
|
|
|
<span class='kydpropertylabel'>Mean:</span> |
74
|
|
|
{kyd_class.mean:.{kyd_class.precision}} |
75
|
|
|
|
76
|
|
|
<span class='kydpropertylabel'>Std Dev:</span> |
77
|
|
|
{kyd_class.std:.{kyd_class.precision}} |
78
|
|
|
|
79
|
|
|
<table class="kydbasic_stats"> |
80
|
|
|
<tr> |
81
|
|
|
<td class='kydpropertylabel'>Min:</td> |
82
|
|
|
<td>{kyd_class.min:.{kyd_class.precision}}</td> |
83
|
|
|
<td class='kydpropertylabel'>-99% CI:</td> |
84
|
|
|
<td>{kyd_class.ci_99[0]:.{kyd_class.precision}}</td> |
85
|
|
|
</tr> |
86
|
|
|
<tr> |
87
|
|
|
<td class='kydpropertylabel'>1Q:</td> |
88
|
|
|
<td>{kyd_class.firstquartile:.{kyd_class.precision}}</td> |
89
|
|
|
<td class='kydpropertylabel'>-95% CI:</td> |
90
|
|
|
<td>{kyd_class.ci_95[0]:.{kyd_class.precision}}</td> |
91
|
|
|
</tr> |
92
|
|
|
<tr> |
93
|
|
|
<td class='kydpropertylabel'>Median:</td> |
94
|
|
|
<td>{kyd_class.median:.{kyd_class.precision}}</td> |
95
|
|
|
<td class='kydpropertylabel'>-68% CI:</td> |
96
|
|
|
<td>{kyd_class.ci_68[0]:.{kyd_class.precision}}</td> |
97
|
|
|
</tr> |
98
|
|
|
<tr> |
99
|
|
|
<td class='kydpropertylabel'>3Q:</td> |
100
|
|
|
<td>{kyd_class.thirdquartile:.{kyd_class.precision}}</td> |
101
|
|
|
<td class='kydpropertylabel'>+68% CI:</td> |
102
|
|
|
<td>{kyd_class.ci_68[1]:.{kyd_class.precision}}</td> |
103
|
|
|
</tr> |
104
|
|
|
<tr> |
105
|
|
|
<td class='kydpropertylabel'>Max:</td> |
106
|
|
|
<td>{kyd_class.max:.{kyd_class.precision}}</td> |
107
|
|
|
<td class='kydpropertylabel'>+95% CI:</td> |
108
|
|
|
<td>{kyd_class.ci_95[1]:.{kyd_class.precision}}</td> |
109
|
|
|
</tr> |
110
|
|
|
<tr> |
111
|
|
|
<td> </td> |
112
|
|
|
<td> </td> |
113
|
|
|
<td class='kydpropertylabel'>+99% CI:</td> |
114
|
|
|
<td>{kyd_class.ci_99[1]:.{kyd_class.precision}}</td> |
115
|
|
|
</tr> |
116
|
|
|
|
117
|
|
|
</table> |
118
|
|
|
</div> |
119
|
|
|
|
120
|
|
|
<div class="kydfloatboxright"> |
121
|
|
|
<div class="kydsubtitle">Array Structure</div> |
122
|
|
|
<table class="kydarray_structure"> |
123
|
|
|
<tr> |
124
|
|
|
<td class='kydpropertylabel'>Number of Dimensions:</td> |
125
|
|
|
<td>{kyd_class.ndim}</td> |
126
|
|
|
</tr> |
127
|
|
|
<tr> |
128
|
|
|
<td class='kydpropertylabel'>Shape of Dimensions:</td> |
129
|
|
|
<td>{kyd_class.shape}</td> |
130
|
|
|
</tr> |
131
|
|
|
<tr> |
132
|
|
|
<td class='kydpropertylabel'>Array Data Type:</td> |
133
|
|
|
<td>{kyd_class.dtype}</td> |
134
|
|
|
</tr> |
135
|
|
|
<tr> |
136
|
|
|
<td class='kydpropertylabel'>Memory Size:</td> |
137
|
|
|
<td>{kyd_class.human_memsize}</td> |
138
|
|
|
</tr> |
139
|
|
|
<tr> |
140
|
|
|
<td class='kydpropertylabel'>Number of NaN:</td> |
141
|
|
|
<td>{kyd_class.num_nan}</td> |
142
|
|
|
</tr> |
143
|
|
|
<tr> |
144
|
|
|
<td class='kydpropertylabel'>Number of Inf:</td> |
145
|
|
|
<td>{kyd_class.num_inf}</td> |
146
|
|
|
</tr> |
147
|
|
|
|
148
|
|
|
</table> |
149
|
|
|
</div> |
150
|
|
|
|
151
|
|
|
</div> |
152
|
|
|
""" |
153
|
|
|
|
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.