@dra2020/dra-types 1.8.84 → 1.8.85
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/LICENSE +433 -21
- package/dist/dra-types.js +2 -0
- package/dist/dra-types.js.map +1 -1
- package/lib/bucketmap.ts +2 -0
- package/package.json +1 -1
- package/lib/colordata.ts +0 -321
- package/lib/gencolor.ts +0 -26
package/lib/bucketmap.ts
CHANGED
|
@@ -7,6 +7,8 @@ export const BucketMap: any =
|
|
|
7
7
|
'state-dev': 'dev-dra-us-west-2-723398989493',
|
|
8
8
|
'logs': 'dra-uswest-logs',
|
|
9
9
|
'logs-dev': 'dra-uswest-logs',
|
|
10
|
+
'logs-archive': 'dra-uswest-logs-archive',
|
|
11
|
+
'logs-archive-dev': 'dra-uswest-logs-archive',
|
|
10
12
|
'memsqs': 'dra-uswest-memsqs',
|
|
11
13
|
'memsqs-dev': 'dra-uswest-memsqs',
|
|
12
14
|
'images': 'dra-uswest-images',
|
package/package.json
CHANGED
package/lib/colordata.ts
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
export const DefaultColorNames: string[] =
|
|
2
|
-
[
|
|
3
|
-
'GhostWhite',
|
|
4
|
-
'Blue',
|
|
5
|
-
'Green',
|
|
6
|
-
'DarkMagenta',
|
|
7
|
-
'Red',
|
|
8
|
-
'Gold',
|
|
9
|
-
'Teal',
|
|
10
|
-
'Chocolate', //'DarkGray', //
|
|
11
|
-
'SlateBlue',
|
|
12
|
-
'Cyan',
|
|
13
|
-
'DeepPink',
|
|
14
|
-
'Chartreuse',
|
|
15
|
-
'CornflowerBlue',
|
|
16
|
-
'DarkSalmon',
|
|
17
|
-
'Olive',
|
|
18
|
-
'DarkOrange',
|
|
19
|
-
'Lime',
|
|
20
|
-
'DarkSlateBlue',
|
|
21
|
-
'Yellow',
|
|
22
|
-
'YellowGreen',
|
|
23
|
-
'Pink',
|
|
24
|
-
'Maroon',
|
|
25
|
-
'Sienna',
|
|
26
|
-
'Aquamarine',
|
|
27
|
-
'Indigo',
|
|
28
|
-
'PaleVioletRed',
|
|
29
|
-
'Navy', // 'Gray', //
|
|
30
|
-
'SpringGreen',
|
|
31
|
-
'Plum',
|
|
32
|
-
'DarkSeaGreen',
|
|
33
|
-
'LightCoral',
|
|
34
|
-
'Khaki',
|
|
35
|
-
'OrangeRed',
|
|
36
|
-
'RoyalBlue',
|
|
37
|
-
'LimeGreen',
|
|
38
|
-
'DarkOrchid',
|
|
39
|
-
'Orange',
|
|
40
|
-
'DodgerBlue',
|
|
41
|
-
'MediumAquamarine',
|
|
42
|
-
'Moccasin',
|
|
43
|
-
'Firebrick',
|
|
44
|
-
'LightSteelBlue',
|
|
45
|
-
'LawnGreen',
|
|
46
|
-
'Magenta',
|
|
47
|
-
'MediumVioletRed',
|
|
48
|
-
'Turquoise',
|
|
49
|
-
'Tomato',
|
|
50
|
-
'Thistle',
|
|
51
|
-
'SandyBrown',
|
|
52
|
-
'IndianRed',
|
|
53
|
-
'PowderBlue',
|
|
54
|
-
'SaddleBrown',
|
|
55
|
-
'OliveDrab',
|
|
56
|
-
'Fuchsia', // 'Gainsboro', //
|
|
57
|
-
'PeachPuff',
|
|
58
|
-
'RosyBrown',
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
export interface ColorLookup
|
|
62
|
-
{
|
|
63
|
-
[key: string]: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const ColorValues: ColorLookup =
|
|
67
|
-
{
|
|
68
|
-
'AliceBlue': '#F0F8FF',
|
|
69
|
-
'AntiqueWhite': '#FAEBD7',
|
|
70
|
-
'Aqua': '#00FFFF',
|
|
71
|
-
'Aquamarine': '#7FFFD4',
|
|
72
|
-
'Azure': '#F0FFFF',
|
|
73
|
-
'Beige': '#F5F5DC',
|
|
74
|
-
'Bisque': '#FFE4C4',
|
|
75
|
-
'Black': '#000000',
|
|
76
|
-
'BlanchedAlmond': '#FFEBCD',
|
|
77
|
-
'Blue': '#0000FF',
|
|
78
|
-
'BlueViolet': '#8A2BE2',
|
|
79
|
-
'Brown': '#A52A2A',
|
|
80
|
-
'BurlyWood': '#DEB887',
|
|
81
|
-
'CadetBlue': '#5F9EA0',
|
|
82
|
-
'Chartreuse': '#7FFF00',
|
|
83
|
-
'Chocolate': '#D2691E',
|
|
84
|
-
'Coral': '#FF7F50',
|
|
85
|
-
'CornflowerBlue': '#6495ED',
|
|
86
|
-
'Cornsilk': '#FFF8DC',
|
|
87
|
-
'Crimson': '#DC143C',
|
|
88
|
-
'Cyan': '#00FFFF',
|
|
89
|
-
'DarkBlue': '#00008B',
|
|
90
|
-
'DarkCyan': '#008B8B',
|
|
91
|
-
'DarkGoldenrod': '#B8860B',
|
|
92
|
-
'DarkGray': '#A9A9A9',
|
|
93
|
-
'DarkGreen': '#006400',
|
|
94
|
-
'DarkKhaki': '#BDB76B',
|
|
95
|
-
'DarkMagenta': '#8B008B',
|
|
96
|
-
'DarkOliveGreen': '#556B2F',
|
|
97
|
-
'DarkOrange': '#FF8C00',
|
|
98
|
-
'DarkOrchid': '#9932CC',
|
|
99
|
-
'DarkRed': '#8B0000',
|
|
100
|
-
'DarkSalmon': '#E9967A',
|
|
101
|
-
'DarkSeaGreen': '#8FBC8F',
|
|
102
|
-
'DarkSlateBlue': '#483D8B',
|
|
103
|
-
'DarkSlateGray': '#2F4F4F',
|
|
104
|
-
'DarkTurquoise': '#00CED1',
|
|
105
|
-
'DarkViolet': '#9400D3',
|
|
106
|
-
'DeepPink': '#FF1493',
|
|
107
|
-
'DeepSkyBlue': '#00BFFF',
|
|
108
|
-
'DimGray': '#696969',
|
|
109
|
-
'DodgerBlue': '#1E90FF',
|
|
110
|
-
'Firebrick': '#B22222',
|
|
111
|
-
'FloralWhite': '#FFFAF0',
|
|
112
|
-
'ForestGreen': '#228B22',
|
|
113
|
-
'Fuchsia': '#FF00FF',
|
|
114
|
-
'Gainsboro': '#DCDCDC',
|
|
115
|
-
'GhostWhite': '#F8F8FF',
|
|
116
|
-
'Gold': '#FFD700',
|
|
117
|
-
'Goldenrod': '#DAA520',
|
|
118
|
-
'Gray': '#808080',
|
|
119
|
-
'Green': '#008000',
|
|
120
|
-
'GreenYellow': '#ADFF2F',
|
|
121
|
-
'Honeydew': '#F0FFF0',
|
|
122
|
-
'HotPink': '#FF69B4',
|
|
123
|
-
'IndianRed': '#CD5C5C',
|
|
124
|
-
'Indigo': '#4B0082',
|
|
125
|
-
'Ivory': '#FFFFF0',
|
|
126
|
-
'Khaki': '#F0E68C',
|
|
127
|
-
'Lavender': '#E6E6FA',
|
|
128
|
-
'LavenderBlush': '#FFF0F5',
|
|
129
|
-
'LawnGreen': '#7CFC00',
|
|
130
|
-
'LemonChiffon': '#FFFACD',
|
|
131
|
-
'LightBlue': '#ADD8E6',
|
|
132
|
-
'LightCoral': '#F08080',
|
|
133
|
-
'LightCyan': '#E0FFFF',
|
|
134
|
-
'LightGoldenrodYellow': '#FAFAD2',
|
|
135
|
-
'LightGray': '#D3D3D3',
|
|
136
|
-
'LightGreen': '#90EE90',
|
|
137
|
-
'LightPink': '#FFB6C1',
|
|
138
|
-
'LightSalmon': '#FFA07A',
|
|
139
|
-
'LightSeaGreen': '#20B2AA',
|
|
140
|
-
'LightSkyBlue': '#87CEFA',
|
|
141
|
-
'LightSlateGray': '#778899',
|
|
142
|
-
'LightSteelBlue': '#B0C4DE',
|
|
143
|
-
'LightYellow': '#FFFFE0',
|
|
144
|
-
'Lime': '#00FF00',
|
|
145
|
-
'LimeGreen': '#32CD32',
|
|
146
|
-
'Linen': '#FAF0E6',
|
|
147
|
-
'Magenta': '#FF00FF',
|
|
148
|
-
'Maroon': '#800000',
|
|
149
|
-
'MediumAquamarine': '#66CDAA',
|
|
150
|
-
'MediumBlue': '#0000CD',
|
|
151
|
-
'MediumOrchid': '#BA55D3',
|
|
152
|
-
'MediumPurple': '#9370DB',
|
|
153
|
-
'MediumSeaGreen': '#3CB371',
|
|
154
|
-
'MediumSlateBlue': '#7B68EE',
|
|
155
|
-
'MediumSpringGreen': '#00FA9A',
|
|
156
|
-
'MediumTurquoise': '#48D1CC',
|
|
157
|
-
'MediumVioletRed': '#C71585',
|
|
158
|
-
'MidnightBlue': '#191970',
|
|
159
|
-
'MintCream': '#F5FFFA',
|
|
160
|
-
'MistyRose': '#FFE4E1',
|
|
161
|
-
'Moccasin': '#FFE4B5',
|
|
162
|
-
'NavajoWhite': '#FFDEAD',
|
|
163
|
-
'Navy': '#000080',
|
|
164
|
-
'OldLace': '#FDF5E6',
|
|
165
|
-
'Olive': '#808000',
|
|
166
|
-
'OliveDrab': '#6B8E23',
|
|
167
|
-
'Orange': '#FFA500',
|
|
168
|
-
'OrangeRed': '#FF4500',
|
|
169
|
-
'Orchid': '#DA70D6',
|
|
170
|
-
'PaleGoldenrod': '#EEE8AA',
|
|
171
|
-
'PaleGreen': '#98FB98',
|
|
172
|
-
'PaleTurquoise': '#AFEEEE',
|
|
173
|
-
'PaleVioletRed': '#DB7093',
|
|
174
|
-
'PapayaWhip': '#FFEFD5',
|
|
175
|
-
'PeachPuff': '#FFDAB9',
|
|
176
|
-
'Peru': '#CD853F',
|
|
177
|
-
'Pink': '#FFC0CB',
|
|
178
|
-
'Plum': '#DDA0DD',
|
|
179
|
-
'PowderBlue': '#B0E0E6',
|
|
180
|
-
'Purple': '#800080',
|
|
181
|
-
'Red': '#FF0000',
|
|
182
|
-
'RosyBrown': '#BC8F8F',
|
|
183
|
-
'RoyalBlue': '#4169E1',
|
|
184
|
-
'SaddleBrown': '#8B4513',
|
|
185
|
-
'Salmon': '#FA8072',
|
|
186
|
-
'SandyBrown': '#F4A460',
|
|
187
|
-
'SeaGreen': '#2E8B57',
|
|
188
|
-
'SeaShell': '#FFF5EE',
|
|
189
|
-
'Sienna': '#A0522D',
|
|
190
|
-
'Silver': '#C0C0C0',
|
|
191
|
-
'SkyBlue': '#87CEEB',
|
|
192
|
-
'SlateBlue': '#6A5ACD',
|
|
193
|
-
'SlateGray': '#708090',
|
|
194
|
-
'Snow': '#FFFAFA',
|
|
195
|
-
'SpringGreen': '#00FF7F',
|
|
196
|
-
'SteelBlue': '#4682B4',
|
|
197
|
-
'Tan': '#D2B48C',
|
|
198
|
-
'Teal': '#008080',
|
|
199
|
-
'Thistle': '#D8BFD8',
|
|
200
|
-
'Tomato': '#FF6347',
|
|
201
|
-
'Turquoise': '#40E0D0',
|
|
202
|
-
'Violet': '#EE82EE',
|
|
203
|
-
'Wheat': '#F5DEB3',
|
|
204
|
-
'White': '#FFFFFF',
|
|
205
|
-
'WhiteSmoke': '#F5F5F5',
|
|
206
|
-
'Yellow': '#FFFF00',
|
|
207
|
-
'YellowGreen': '#9ACD32',
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
export const ColorBySolidWhite = 0;
|
|
211
|
-
export const ColorBySolidBlack = 1;
|
|
212
|
-
export const ColorBySolidHispanic = 2;
|
|
213
|
-
export const ColorBySolidAsian = 3;
|
|
214
|
-
export const ColorByMostlyWhite = 4;
|
|
215
|
-
export const ColorByMostlyBlack = 5;
|
|
216
|
-
export const ColorByMostlyHispanic = 6;
|
|
217
|
-
export const ColorByMostlyAsian = 7;
|
|
218
|
-
export const ColorByMostlyNative = 8;
|
|
219
|
-
export const ColorByMix = 9;
|
|
220
|
-
export const ColorByHispanicWhite = 10;
|
|
221
|
-
export const ColorByBlackWhite = 11;
|
|
222
|
-
export const ColorByHispanicBlack = 12;
|
|
223
|
-
export const ColorByAsianWhite = 13;
|
|
224
|
-
export const ColorByAsianHispanic = 14;
|
|
225
|
-
export const ColorByBlackAsian = 15;
|
|
226
|
-
|
|
227
|
-
export const EthnicBackgroundColor: string[] = [
|
|
228
|
-
'#c0392b', // solid white
|
|
229
|
-
'#3498db', // solid black
|
|
230
|
-
'#2ecc71', // solid hispanic
|
|
231
|
-
'#9b59b6', // solid asian
|
|
232
|
-
'#d98880', // mostly white
|
|
233
|
-
'#aed6f1', // mostly black
|
|
234
|
-
'#abebc6', // mostly hispanic
|
|
235
|
-
'#bb8fce', // mostly asian
|
|
236
|
-
'#f1c40f', // mostly native
|
|
237
|
-
'#aab7b8', // mix
|
|
238
|
-
'#d5f5e3', // hispanic / white
|
|
239
|
-
'#d6eaf8', // black / white
|
|
240
|
-
'#186a3b', // hispanic / black
|
|
241
|
-
'#e8daef', // asian / white
|
|
242
|
-
'#45b39d', // asian / hispanic
|
|
243
|
-
'#4a235a', // black / asian
|
|
244
|
-
];
|
|
245
|
-
export const EthnicTextColor: string[] = [
|
|
246
|
-
'#ffffff',
|
|
247
|
-
'#ffffff',
|
|
248
|
-
'#ffffff',
|
|
249
|
-
'#ffffff',
|
|
250
|
-
'#000000',
|
|
251
|
-
'#000000',
|
|
252
|
-
'#000000',
|
|
253
|
-
'#000000',
|
|
254
|
-
'#000000',
|
|
255
|
-
'#000000',
|
|
256
|
-
'#000000',
|
|
257
|
-
'#000000',
|
|
258
|
-
'#ffffff',
|
|
259
|
-
'#000000',
|
|
260
|
-
'#000000',
|
|
261
|
-
'#ffffff',
|
|
262
|
-
];
|
|
263
|
-
export const EthnicLabel: string[] = [
|
|
264
|
-
'Solid White',
|
|
265
|
-
'Solid Black',
|
|
266
|
-
'Solid Hispanic',
|
|
267
|
-
'Solid Asian',
|
|
268
|
-
'Mostly White',
|
|
269
|
-
'Mostly Black',
|
|
270
|
-
'Mostly Hispanic',
|
|
271
|
-
'Mostly Asian',
|
|
272
|
-
'Mostly Native',
|
|
273
|
-
'Mixed',
|
|
274
|
-
'Hispanic / White Mix',
|
|
275
|
-
'Black / White Mix',
|
|
276
|
-
'Hispanic / Black Mix',
|
|
277
|
-
'Asian / White Mix',
|
|
278
|
-
'Asian / Hispanic Mix',
|
|
279
|
-
'Black / Asian Mix'
|
|
280
|
-
];
|
|
281
|
-
|
|
282
|
-
export const ColorByGreatR = 0;
|
|
283
|
-
export const ColorByGoodR = 1;
|
|
284
|
-
export const ColorByFairR = 2;
|
|
285
|
-
export const ColorByEven = 3;
|
|
286
|
-
export const ColorByFairD = 4;
|
|
287
|
-
export const ColorByGoodD = 5;
|
|
288
|
-
export const ColorByGreatD = 6;
|
|
289
|
-
|
|
290
|
-
export const ElectionBackgroundColor: string[] = [
|
|
291
|
-
'#CF0000', // greatR
|
|
292
|
-
'#FF4555', // goodR
|
|
293
|
-
'#FFB0CB', // fairR
|
|
294
|
-
'#9932CC', // even
|
|
295
|
-
'#87CEEB', // fairD
|
|
296
|
-
'#1E90FF', // goodD
|
|
297
|
-
'#0000CF', // greatD
|
|
298
|
-
];
|
|
299
|
-
|
|
300
|
-
export const ElectionTextColor: string[] = [
|
|
301
|
-
'#ffffff',
|
|
302
|
-
'#000000',
|
|
303
|
-
'#000000',
|
|
304
|
-
'#ffffff',
|
|
305
|
-
'#000000',
|
|
306
|
-
'#000000',
|
|
307
|
-
'#ffffff',
|
|
308
|
-
];
|
|
309
|
-
export const ElectionLabel: string[] = [
|
|
310
|
-
'Great Republican',
|
|
311
|
-
'Good Republican',
|
|
312
|
-
'Fair Republican',
|
|
313
|
-
'Even',
|
|
314
|
-
'Fair Democrat',
|
|
315
|
-
'Good Democrat',
|
|
316
|
-
'Great Democrat'
|
|
317
|
-
];
|
|
318
|
-
|
|
319
|
-
const lum: number[] = [0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 255];
|
|
320
|
-
export let IntensityBackgroundColor: string[] = [];
|
|
321
|
-
lum.forEach((n: number) => { IntensityBackgroundColor.push(`rgba(${n}, ${n}, ${n}, 1.0)`) } );
|
package/lib/gencolor.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as ColorData from "./colordata";
|
|
2
|
-
|
|
3
|
-
let ColorTable: string[] = null;
|
|
4
|
-
const MaxColors: number = 100;
|
|
5
|
-
|
|
6
|
-
export function genColor(i: number, useFirstColor: boolean): string
|
|
7
|
-
{
|
|
8
|
-
// i is district number, 0 => District[0] (unassigned), so subtract 1 to access ColorTable
|
|
9
|
-
function gen_table(): void
|
|
10
|
-
{
|
|
11
|
-
ColorTable = [];
|
|
12
|
-
for (let i: number = 0; i < MaxColors; i++)
|
|
13
|
-
{
|
|
14
|
-
// A little funky math below to skip the first (white) color
|
|
15
|
-
let j = (i % (ColorData.DefaultColorNames.length - 1)) + 1;
|
|
16
|
-
ColorTable.push(ColorData.ColorValues[ColorData.DefaultColorNames[j]]);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (ColorTable == null)
|
|
21
|
-
gen_table();
|
|
22
|
-
|
|
23
|
-
if (i == 0)
|
|
24
|
-
return ColorData.ColorValues[ColorData.DefaultColorNames[0]];
|
|
25
|
-
return ColorTable[((i - 1) + (useFirstColor ? 0 : 1)) % MaxColors];
|
|
26
|
-
}
|