@pgpm/measurements 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +1 -1
- package/package.json +4 -4
- package/sql/pgpm-measurements--0.15.5.sql +419 -0
package/Makefile
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/measurements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Measurement utilities for performance tracking and analytics",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/verify": "0.
|
|
24
|
+
"@pgpm/verify": "0.22.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"pgpm": "^4.2
|
|
27
|
+
"pgpm": "^4.23.2"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "96ae0195a8b3a3dd056808c344f0e3c31a199e5e"
|
|
38
38
|
}
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
\echo Use "CREATE EXTENSION pgpm-measurements" to load this file. \quit
|
|
2
|
+
CREATE SCHEMA measurements;
|
|
3
|
+
|
|
4
|
+
CREATE TABLE measurements.quantities (
|
|
5
|
+
id serial PRIMARY KEY,
|
|
6
|
+
name text,
|
|
7
|
+
label text,
|
|
8
|
+
unit text,
|
|
9
|
+
unit_desc text,
|
|
10
|
+
description text
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
COMMENT ON TABLE measurements.quantities IS 'Unit of measure definitions: maps quantity names to their display labels, units, and descriptions';
|
|
14
|
+
|
|
15
|
+
COMMENT ON COLUMN measurements.quantities.id IS 'Auto-incrementing identifier for this quantity';
|
|
16
|
+
|
|
17
|
+
COMMENT ON COLUMN measurements.quantities.name IS 'Machine-readable name for this quantity (e.g. length, mass, temperature)';
|
|
18
|
+
|
|
19
|
+
COMMENT ON COLUMN measurements.quantities.label IS 'Human-readable display label';
|
|
20
|
+
|
|
21
|
+
COMMENT ON COLUMN measurements.quantities.unit IS 'Unit symbol or abbreviation (e.g. m, kg, °C)';
|
|
22
|
+
|
|
23
|
+
COMMENT ON COLUMN measurements.quantities.unit_desc IS 'Full unit name (e.g. meters, kilograms, degrees Celsius)';
|
|
24
|
+
|
|
25
|
+
COMMENT ON COLUMN measurements.quantities.description IS 'Detailed description of what this quantity measures';
|
|
26
|
+
|
|
27
|
+
INSERT INTO measurements.quantities (
|
|
28
|
+
id,
|
|
29
|
+
name,
|
|
30
|
+
label,
|
|
31
|
+
unit,
|
|
32
|
+
unit_desc,
|
|
33
|
+
description
|
|
34
|
+
) VALUES
|
|
35
|
+
(
|
|
36
|
+
1,
|
|
37
|
+
'Acceleration',
|
|
38
|
+
'Acceleration',
|
|
39
|
+
'm/s²',
|
|
40
|
+
'meter per square second',
|
|
41
|
+
'the rate of change of velocity with respect to time'
|
|
42
|
+
),
|
|
43
|
+
(
|
|
44
|
+
2,
|
|
45
|
+
'AmountOfSubstance',
|
|
46
|
+
'Amount Of Substance',
|
|
47
|
+
'mol',
|
|
48
|
+
'molecules, for example of a substance. The system unit for this quantity is "mol" mole',
|
|
49
|
+
'the number of elementary entities (molecules, for example) of a substance'
|
|
50
|
+
),
|
|
51
|
+
(
|
|
52
|
+
3,
|
|
53
|
+
'Angle',
|
|
54
|
+
'Angle',
|
|
55
|
+
'rad',
|
|
56
|
+
'radian',
|
|
57
|
+
'the figure formed by two lines diverging from a common point'
|
|
58
|
+
),
|
|
59
|
+
(
|
|
60
|
+
4,
|
|
61
|
+
'AngularAcceleration',
|
|
62
|
+
'Angular Acceleration',
|
|
63
|
+
'rad/s²',
|
|
64
|
+
'radian per square second',
|
|
65
|
+
'the rate of change of angular velocity with respect to time'
|
|
66
|
+
),
|
|
67
|
+
(
|
|
68
|
+
5,
|
|
69
|
+
'AngularVelocity',
|
|
70
|
+
'Angular Velocity',
|
|
71
|
+
'rad/s',
|
|
72
|
+
'radian per second',
|
|
73
|
+
'the rate of change of angular displacement with respect to time'
|
|
74
|
+
),
|
|
75
|
+
(
|
|
76
|
+
6,
|
|
77
|
+
'Area',
|
|
78
|
+
'Area',
|
|
79
|
+
'm²',
|
|
80
|
+
'square meter',
|
|
81
|
+
'the extent of a planar region or of the surface of a solid measured in square units'
|
|
82
|
+
),
|
|
83
|
+
(
|
|
84
|
+
7,
|
|
85
|
+
'CatalyticActivity',
|
|
86
|
+
'Catalytic Activity',
|
|
87
|
+
'kat',
|
|
88
|
+
'katal',
|
|
89
|
+
'a catalytic activity'
|
|
90
|
+
),
|
|
91
|
+
(
|
|
92
|
+
8,
|
|
93
|
+
'DataAmount',
|
|
94
|
+
'Data Amount',
|
|
95
|
+
'bit',
|
|
96
|
+
NULL,
|
|
97
|
+
'a measure of data amount'
|
|
98
|
+
),
|
|
99
|
+
(
|
|
100
|
+
9,
|
|
101
|
+
'DataRate',
|
|
102
|
+
'Data Rate',
|
|
103
|
+
'bit/s',
|
|
104
|
+
'bit per second',
|
|
105
|
+
'the speed of data-transmission'
|
|
106
|
+
),
|
|
107
|
+
(
|
|
108
|
+
10,
|
|
109
|
+
'Dimensionless',
|
|
110
|
+
'Dimensionless',
|
|
111
|
+
NULL,
|
|
112
|
+
NULL,
|
|
113
|
+
'a dimensionless quantity'
|
|
114
|
+
),
|
|
115
|
+
(
|
|
116
|
+
11,
|
|
117
|
+
'Duration',
|
|
118
|
+
'Duration',
|
|
119
|
+
's',
|
|
120
|
+
'second',
|
|
121
|
+
'a period of existence or persistence'
|
|
122
|
+
),
|
|
123
|
+
(
|
|
124
|
+
12,
|
|
125
|
+
'DynamicViscosity',
|
|
126
|
+
'Dynamic Viscosity',
|
|
127
|
+
'Pa·s',
|
|
128
|
+
'Pascal-Second',
|
|
129
|
+
'the dynamic viscosity'
|
|
130
|
+
),
|
|
131
|
+
(
|
|
132
|
+
13,
|
|
133
|
+
'ElectricCapacitance',
|
|
134
|
+
'Electric Capacitance',
|
|
135
|
+
'F',
|
|
136
|
+
'Farad',
|
|
137
|
+
'an electric capacitance'
|
|
138
|
+
),
|
|
139
|
+
(
|
|
140
|
+
14,
|
|
141
|
+
'ElectricCharge',
|
|
142
|
+
'Electric Charge',
|
|
143
|
+
'C',
|
|
144
|
+
'Coulomb',
|
|
145
|
+
'an electric charge'
|
|
146
|
+
),
|
|
147
|
+
(
|
|
148
|
+
15,
|
|
149
|
+
'ElectricConductance',
|
|
150
|
+
'Electric Conductance',
|
|
151
|
+
'S',
|
|
152
|
+
'Siemens',
|
|
153
|
+
'an electric conductance'
|
|
154
|
+
),
|
|
155
|
+
(
|
|
156
|
+
16,
|
|
157
|
+
'ElectricCurrent',
|
|
158
|
+
'Electric Current',
|
|
159
|
+
'A',
|
|
160
|
+
'Ampere',
|
|
161
|
+
'the amount of electric charge flowing past a specified circuit point per unit time'
|
|
162
|
+
),
|
|
163
|
+
(
|
|
164
|
+
17,
|
|
165
|
+
'ElectricInductance',
|
|
166
|
+
'Electric Inductance',
|
|
167
|
+
'H',
|
|
168
|
+
'Henry',
|
|
169
|
+
'an electric inductance'
|
|
170
|
+
),
|
|
171
|
+
(
|
|
172
|
+
18,
|
|
173
|
+
'ElectricPotential',
|
|
174
|
+
'Electric Potential',
|
|
175
|
+
'V',
|
|
176
|
+
'Volt',
|
|
177
|
+
'an electric potential or electromotive force'
|
|
178
|
+
),
|
|
179
|
+
(
|
|
180
|
+
19,
|
|
181
|
+
'ElectricResistance',
|
|
182
|
+
'Electric Resistance',
|
|
183
|
+
'Ω',
|
|
184
|
+
'Ohm',
|
|
185
|
+
'an electric resistance'
|
|
186
|
+
),
|
|
187
|
+
(
|
|
188
|
+
20,
|
|
189
|
+
'Energy',
|
|
190
|
+
'Energy',
|
|
191
|
+
'J',
|
|
192
|
+
'Joule',
|
|
193
|
+
'the capacity of a physical system to do work'
|
|
194
|
+
),
|
|
195
|
+
(
|
|
196
|
+
21,
|
|
197
|
+
'Force',
|
|
198
|
+
'Force',
|
|
199
|
+
'N',
|
|
200
|
+
'Newton',
|
|
201
|
+
'a quantity that tends to produce an acceleration of a body in the direction of its application'
|
|
202
|
+
),
|
|
203
|
+
(
|
|
204
|
+
22,
|
|
205
|
+
'Frequency',
|
|
206
|
+
'Frequency',
|
|
207
|
+
'Hz',
|
|
208
|
+
'Hertz',
|
|
209
|
+
'the number of times a specified phenomenon occurs within a specified interval'
|
|
210
|
+
),
|
|
211
|
+
(
|
|
212
|
+
23,
|
|
213
|
+
'Illuminance',
|
|
214
|
+
'Illuminance',
|
|
215
|
+
'lx',
|
|
216
|
+
'lux',
|
|
217
|
+
'an illuminance'
|
|
218
|
+
),
|
|
219
|
+
(
|
|
220
|
+
24,
|
|
221
|
+
'KinematicViscosity',
|
|
222
|
+
'Kinematic Viscosity',
|
|
223
|
+
'm²/s',
|
|
224
|
+
NULL,
|
|
225
|
+
'the diffusion of momentum'
|
|
226
|
+
),
|
|
227
|
+
(
|
|
228
|
+
25,
|
|
229
|
+
'Length',
|
|
230
|
+
'Length',
|
|
231
|
+
'm',
|
|
232
|
+
'meter',
|
|
233
|
+
'the extent of something along its greatest dimension or the extent of space between two objects or places'
|
|
234
|
+
),
|
|
235
|
+
(
|
|
236
|
+
26,
|
|
237
|
+
'LuminousFlux',
|
|
238
|
+
'Luminous Flux',
|
|
239
|
+
'lm',
|
|
240
|
+
'lumen',
|
|
241
|
+
'a luminous flux'
|
|
242
|
+
),
|
|
243
|
+
(
|
|
244
|
+
27,
|
|
245
|
+
'LuminousIntensity',
|
|
246
|
+
'Luminous Intensity',
|
|
247
|
+
'cd',
|
|
248
|
+
'candela',
|
|
249
|
+
'the luminous flux density per solid angle as measured in a given direction relative to the emitting source'
|
|
250
|
+
),
|
|
251
|
+
(
|
|
252
|
+
28,
|
|
253
|
+
'MagneticFlux',
|
|
254
|
+
'Magnetic Flux',
|
|
255
|
+
'Wb',
|
|
256
|
+
'Weber',
|
|
257
|
+
'a magnetic flux'
|
|
258
|
+
),
|
|
259
|
+
(
|
|
260
|
+
29,
|
|
261
|
+
'MagneticFluxDensity',
|
|
262
|
+
'Magnetic Flux Density',
|
|
263
|
+
'T',
|
|
264
|
+
'Tesla',
|
|
265
|
+
'a magnetic flux density'
|
|
266
|
+
),
|
|
267
|
+
(
|
|
268
|
+
30,
|
|
269
|
+
'Mass',
|
|
270
|
+
'Mass',
|
|
271
|
+
'kg',
|
|
272
|
+
'kilogram',
|
|
273
|
+
'the measure of the quantity of matter that a body or an object contains'
|
|
274
|
+
),
|
|
275
|
+
(
|
|
276
|
+
31,
|
|
277
|
+
'MassFlowRate',
|
|
278
|
+
'Mass Flow Rate',
|
|
279
|
+
'kg/s',
|
|
280
|
+
'kilogram per second',
|
|
281
|
+
'the movement of mass per time'
|
|
282
|
+
),
|
|
283
|
+
(
|
|
284
|
+
32,
|
|
285
|
+
'Money',
|
|
286
|
+
'Money',
|
|
287
|
+
NULL,
|
|
288
|
+
NULL,
|
|
289
|
+
'something generally accepted as a medium of exchange, a measure of value, or a means of payment'
|
|
290
|
+
),
|
|
291
|
+
(
|
|
292
|
+
33,
|
|
293
|
+
'Power',
|
|
294
|
+
'Power',
|
|
295
|
+
'W',
|
|
296
|
+
'Watt',
|
|
297
|
+
'the rate at which work is done'
|
|
298
|
+
),
|
|
299
|
+
(
|
|
300
|
+
34,
|
|
301
|
+
'Pressure',
|
|
302
|
+
'Pressure',
|
|
303
|
+
'Pa',
|
|
304
|
+
'Pascal',
|
|
305
|
+
'a force applied uniformly over a surface'
|
|
306
|
+
),
|
|
307
|
+
(
|
|
308
|
+
35,
|
|
309
|
+
'RadiationDoseAbsorbed',
|
|
310
|
+
'Radiation Dose Absorbed',
|
|
311
|
+
'Gy',
|
|
312
|
+
'Gray',
|
|
313
|
+
'the amount of energy deposited per unit of mass'
|
|
314
|
+
),
|
|
315
|
+
(
|
|
316
|
+
36,
|
|
317
|
+
'RadiationDoseEffective',
|
|
318
|
+
'Radiation Dose Effective',
|
|
319
|
+
'equivalent) dose of radiation received by a human or some other living organism. The system unit for this quantity is Sv',
|
|
320
|
+
'or "equivalent" dose of radiation received by a human or some other living organism. The system unit for this quantity is "Sv" Sievert',
|
|
321
|
+
'the effective (or "equivalent") dose of radiation received by a human or some other living organism'
|
|
322
|
+
),
|
|
323
|
+
(
|
|
324
|
+
37,
|
|
325
|
+
'RadioactiveActivity',
|
|
326
|
+
'Radioactive Activity',
|
|
327
|
+
'Bq',
|
|
328
|
+
'Becquerel',
|
|
329
|
+
'a radioactive activity'
|
|
330
|
+
),
|
|
331
|
+
(
|
|
332
|
+
38,
|
|
333
|
+
'SolidAngle',
|
|
334
|
+
'Solid Angle',
|
|
335
|
+
'sr',
|
|
336
|
+
'steradian',
|
|
337
|
+
'the angle formed by three or more planes intersecting at a common point'
|
|
338
|
+
),
|
|
339
|
+
(
|
|
340
|
+
39,
|
|
341
|
+
'Temperature',
|
|
342
|
+
'Temperature',
|
|
343
|
+
'K',
|
|
344
|
+
'Kelvin',
|
|
345
|
+
'the degree of hotness or coldness of a body or an environment'
|
|
346
|
+
),
|
|
347
|
+
(
|
|
348
|
+
40,
|
|
349
|
+
'Torque',
|
|
350
|
+
'Torque',
|
|
351
|
+
'N·m',
|
|
352
|
+
'Newton-Meter',
|
|
353
|
+
'the moment of a force'
|
|
354
|
+
),
|
|
355
|
+
(
|
|
356
|
+
41,
|
|
357
|
+
'Velocity',
|
|
358
|
+
'Velocity',
|
|
359
|
+
'm/s',
|
|
360
|
+
'meter per second',
|
|
361
|
+
'a distance traveled divided by the time of travel'
|
|
362
|
+
),
|
|
363
|
+
(
|
|
364
|
+
42,
|
|
365
|
+
'Volume',
|
|
366
|
+
'Volume',
|
|
367
|
+
'm³',
|
|
368
|
+
'cubic meter',
|
|
369
|
+
'the amount of space occupied by a three-dimensional object or region of space, expressed in cubic units'
|
|
370
|
+
),
|
|
371
|
+
(
|
|
372
|
+
43,
|
|
373
|
+
'VolumetricDensity',
|
|
374
|
+
'Volumetric Density',
|
|
375
|
+
'kg/m³',
|
|
376
|
+
'kilogram per cubic meter',
|
|
377
|
+
'a mass per unit volume of a substance under specified conditions of pressure and temperature'
|
|
378
|
+
),
|
|
379
|
+
(
|
|
380
|
+
44,
|
|
381
|
+
'VolumetricFlowRate',
|
|
382
|
+
'Volumetric Flow Rate',
|
|
383
|
+
'm³/s',
|
|
384
|
+
'cubic meter per second',
|
|
385
|
+
'the volume of fluid passing a point in a system per unit of time'
|
|
386
|
+
);
|
|
387
|
+
|
|
388
|
+
INSERT INTO measurements.quantities (
|
|
389
|
+
id,
|
|
390
|
+
name,
|
|
391
|
+
label,
|
|
392
|
+
unit,
|
|
393
|
+
unit_desc,
|
|
394
|
+
description
|
|
395
|
+
) VALUES
|
|
396
|
+
(
|
|
397
|
+
45,
|
|
398
|
+
'Percent',
|
|
399
|
+
'Percent',
|
|
400
|
+
'%',
|
|
401
|
+
'percentage',
|
|
402
|
+
'a number or ratio expressed as a fraction of 100'
|
|
403
|
+
),
|
|
404
|
+
(
|
|
405
|
+
46,
|
|
406
|
+
'PartsPerMillion',
|
|
407
|
+
'Parts per Million',
|
|
408
|
+
'ppm',
|
|
409
|
+
'parts per million',
|
|
410
|
+
'pseudo-units to describe small values of miscellaneous dimensionless quantities that are pure numbers representing a quantity-per-quantity measure in parts per million'
|
|
411
|
+
),
|
|
412
|
+
(
|
|
413
|
+
47,
|
|
414
|
+
'PartsPerBillion',
|
|
415
|
+
'Parts per Billion',
|
|
416
|
+
'ppb',
|
|
417
|
+
'parts per billion',
|
|
418
|
+
'pseudo-units to describe small values of miscellaneous dimensionless quantities that are pure numbers representing a quantity-per-quantity measure in parts per billion'
|
|
419
|
+
);
|