summaryrefslogtreecommitdiff
path: root/client/chart/constants.js
blob: 0f23f06b1213bffa1021d4d6b07a2af08f9ff50f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* various nice HSL gradients */

export const rainbow = [
  '#9e0142',
  '#d53e4f',
  '#f46d43',
  '#fdae61',
  '#fee08b',
  '#ffffbf',
  '#e6f598',
  '#abdda4',
  '#66c2a5',
  '#3288bd',
  '#5e4fa2',
  // '#888888',
]

export const bigRainbow = [
  '#9e0142',
  '#d53e4f',
  '#f46d43',
  '#fdae61',
  '#fee08b',
  '#ffffbf',
  '#e6f598',
  '#abdda4',
  '#66c2a5',
  '#3288bd',
  '#5e4fa2',
  '#8744ae',
  '#a044ae',
  '#b342a4',
  '#b34287',
  // '#888888',
]
export const colorblindSafeRainbow = [
  '#a50026',
  '#d73027',
  '#f46d43',
  '#fdae61',
  '#fee090',
  '#ffffbf',
  '#e0f3f8',
  '#abd9e9',
  '#74add1',
  '#4575b4',
  '#313695',
  // '#888888',
]

export const categoryRainbow = [
  '#5e4fa2',
  '#66c2a5',
  '#d53e4f',
  '#f46d43',
  '#9e0142',
  '#3288bd',
  '#fee08b',
  '#abdda4',
  '#e6f598',
  '#fdae61',
  '#ffffbf',
  // '#888888',
]

export const institutionColors = [
  '#f2f293', // edu (yellow)
  '#3264f6', // company (blue)
  '#f30000', // gov/mil (red)
]

export const colorTable = {
  rainbow,
  bigRainbow,
  colorblindSafeRainbow,
  institutionColors,
  categoryRainbow,
}

/* stuff for a 'countries' legend */

export const topCountryCount = 10

export const otherCountriesLabel = 'Other Countries'

/* institution tuples, labels and templates */

export const initialInstitutionLookup = {
  edu: 0,
  company: 0,
  gov: 0,
}

export const institutionOrder = {
  edu: 0,
  company: 1,
  gov: 2,
}

export const institutionLabels = {
  edu: 'Academic',
  company: 'Commercial',
  gov: 'Military / Government',
  mil: 'Military / Government',
}