-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemographics.json
115 lines (112 loc) · 4.2 KB
/
demographics.json
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
106
107
108
109
110
111
112
113
114
115
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"config": {"view": {"stroke": "-"}},
"title": {
"text": "Lifetime Likelihood of Imprisonment",
"anchor": "middle",
"fontSize": 20
},
"data": {
"values": [
{"id": 1},
{"id": 2},
{"id": 3},
{"id": 4},
{"id": 5},
{"id": 6},
{"id": 7},
{"id": 8},
{"id": 9},
{"id": 10},
{"id": 11},
{"id": 12},
{"id": 13},
{"id": 14},
{"id": 15},
{"id": 16},
{"id": 17},
{"id": 18},
{"id": 19},
{"id": 20}
]
},
"transform": [
{"calculate": "ceil (datum.id/5)", "as": "row"},
{"calculate": "datum.id - datum.row*5", "as": "col"}
],
"concat": [
{
"title": "All Males",
"width": 300,
"height": 170,
"mark": {"type": "point", "filled": true},
"encoding": {
"x": {"field": "col", "type": "ordinal", "axis": null},
"y": {"field": "row", "type": "ordinal", "axis": null},
"shape": {
"value": "M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z"
},
"color": {
"condition": {"test": "datum.id <= 2", "value": "black"},
"value": "rgb(167,165,156)"
},
"size": {"value": 100}
}
},
{
"title": "White Males",
"width": 300,
"height": 170,
"mark": {"type": "point", "filled": true},
"encoding": {
"x": {"field": "col", "type": "ordinal", "axis": null},
"y": {"field": "row", "type": "ordinal", "axis": null},
"shape": {
"value": "M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z"
},
"color": {
"condition": {"test": "datum.id <= 1", "value": "black"},
"value": "rgb(167,165,156)"
},
"size": {"value": 100}
}
},
{
"title": "Black Males",
"width": 300,
"height": 170,
"mark": {"type": "point", "filled": true},
"encoding": {
"x": {"field": "col", "type": "ordinal", "axis": null},
"y": {"field": "row", "type": "ordinal", "axis": null},
"shape": {
"value": "M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z"
},
"color": {
"condition": {"test": "datum.id <= 6", "value": "black"},
"value": "rgb(167,165,156)"
},
"size": {"value": 100}
}
},
{
"title": "Hispanic Males",
"width": 300,
"height": 170,
"mark": {"type": "point", "filled": true},
"encoding": {
"x": {"field": "col", "type": "ordinal", "axis": null},
"y": {"field": "row", "type": "ordinal", "axis": null},
"shape": {
"value": "M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z"
},
"color": {
"condition": {"test": "datum.id <= 3", "value": "black"},
"value": "rgb(167,165,156)"
},
"size": {"value": 100}
}
}
],
"columns": 2
}