-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema_test.xml
299 lines (247 loc) · 13.9 KB
/
schema_test.xml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<Schema name="Data_USA">
<SharedDimension name="State Election">
<Hierarchy name="State" primary_key="geoid">
<Table name="states_shapes2017"/>
<Level name="State" key_column="geoid" name_column="name" key_type="text">
<Annotation name="dim_type">GEOGRAPHY</Annotation>
</Level>
</Hierarchy>
</SharedDimension>
<Cube name="election_president">
<Annotation name="source_name">MIT Data Electionlab</Annotation>
<Annotation name="source_link">https://electionlab.mit.edu/data</Annotation>
<Annotation name="dataset_name">U.S President 1976-2020</Annotation>
<Annotation name="dataset_link">https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/42MVDX/MFU99O</Annotation>
<Annotation name="dataset_name">County Presidential Election Returns 2000-2020</Annotation>
<Annotation name="dataset_link">https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/VOQCHQ/FQ9NBF</Annotation>
<Annotation name="source_name">Federal Election Commision</Annotation>
<Annotation name="source_link">https://www.fec.gov/</Annotation>
<Annotation name="available_dimensions">Candidate, Geography, Party, Year</Annotation>
<Annotation name="hidden_dimensions">Version</Annotation>
<Table name="election_president" primary_key="candidate_id"/>
<Dimension type= "geo" name="Geography" foreign_key="geo_id" source="states_shapes2017" default_hierarchy="State">
<Hierarchy name="State" primary_key="geoid">
<Table name="states_shapes2017" />
<Level name="State" key_column="geoid" name_column="name" key_type="text"/>
</Hierarchy>
<Hierarchy name="County" primary_key="geoid">
<Table name="counties_shapes2017" />
<Level name="County" key_column="geoid" name_column="name" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">GEOGRAPHY</Annotation>
</Dimension>
<Dimension foreign_key="candidate_id" name="Candidate" source="election_president">
<Hierarchy name="Candidate" primary_key="candidate_id">
<Level name="Candidate" key_column="candidate_id" name_column="candidate" key_type="text">
<Property name="Office" column="office"/>
</Level>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE</Annotation>
</Dimension>
<Dimension foreign_key="party" name="Party" source="election_president">
<Hierarchy name="Party" primary_key="party">
<Level key_column="party" name="Party" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">PARTY</Annotation>
</Dimension>
<Dimension type="time" foreign_key="year" name="Year" source="election_president">
<Hierarchy name="Year" primary_key="year">
<Level key_column="year" name="Year">
<Annotation name="default_year">2020</Annotation>
</Level>
</Hierarchy>
<Annotation name="dim_type">YEAR</Annotation>
</Dimension>
<Measure name="Candidate Votes" column="candidatevotes" aggregator="sum" visible="true">
<Annotation name="units_of_measurement">VOTES</Annotation>
</Measure>
<Measure name="Total Votes" column="totalvotes" aggregator="max" visible="true">
<Annotation name="units_of_measurement">VOTES</Annotation>
</Measure>
</Cube>
<Cube name="election_senate">
<Annotation name="source_name">MIT Data Electionlab</Annotation>
<Annotation name="source_link">https://electionlab.mit.edu/data</Annotation>
<Annotation name="dataset_name">U.S Senate 1976-2020</Annotation>
<Annotation name="dataset_link">https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/PEJ5QU/XXQCIK</Annotation>
<Annotation name="source_name">Federal Election Commision</Annotation>
<Annotation name="source_link">https://www.fec.gov/</Annotation>
<Annotation name="available_dimensions">Candidate, Geography, Party, Year, Candidate Other, Special</Annotation>
<Annotation name="hidden_dimensions">Unofficial, Version</Annotation>
<Annotation name="hide_in_ui">Unofficial, Version</Annotation>
<Table name="election_senate" primary_key="candidate_id"/>
<DimensionUsage name="State" source="State Election" foreign_key="geo_id" type="geo" />
<Dimension foreign_key="candidate_id" name="Candidate" source="election_senate">
<Hierarchy name="Candidate" primary_key="candidate_id">
<Level name="Candidate" key_column="candidate_id" name_column="candidate" key_type="text">
<Property name="Office" column="office"/>
</Level>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE</Annotation>
</Dimension>
<Dimension foreign_key="candidate_other" name="Candidate Other" source="election_senate">
<Hierarchy name="Candidate Other" primary_key="candidate_other">
<Level key_column="candidate_other" name="Candidate Other" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE OTHER</Annotation>
</Dimension>
<Dimension foreign_key="party" name="Party" source="election_senate">
<Hierarchy name="Party" primary_key="party">
<Level key_column="party" name="Party" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">PARTY</Annotation>
</Dimension>
<Dimension foreign_key="special" name="Special" source="election_senate">
<Hierarchy name="Special" primary_key="special">
<Level key_column="special" name="Special"/>
</Hierarchy>
<Annotation name="dim_type">SPECIAL</Annotation>
</Dimension>
<Dimension foreign_key="unofficial" name="Unofficial" source="election_senate">
<Hierarchy name="Unofficial" primary_key="unofficial">
<Level key_column="unofficial" name="Unofficial"/>
</Hierarchy>
</Dimension>
<Dimension type="time" foreign_key="year" name="Year" source="election_senate">
<Hierarchy name="Year" primary_key="year">
<Level key_column="year" name="Year"/>
</Hierarchy>
<Annotation name="dim_type">YEAR</Annotation>
<Annotation name="default_year">2020</Annotation>
</Dimension>
<Measure name="Candidate Votes" column="candidatevotes" aggregator="sum" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
<Measure name="Total Votes" column="totalvotes" aggregator="max" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
</Cube>
<Cube name="election_house">
<Annotation name="source_name">MIT Data Electionlab</Annotation>
<Annotation name="source_link">https://electionlab.mit.edu/data</Annotation>
<Annotation name="dataset_name">U.S House 1976-2020</Annotation>
<Annotation name="dataset_link">https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/IG0UN2/8KAB8V</Annotation>
<Annotation name="source_name">Federal Election Commision</Annotation>
<Annotation name="source_link">https://www.fec.gov/</Annotation>
<Annotation name="available_dimensions">Candidate, Geography, Party, Year, Candidate Other, Special</Annotation>
<Annotation name="hidden_dimensions">Unofficial, Version</Annotation>
<Annotation name="hide_in_ui">Unofficial, Version</Annotation>
<Table name="election_house" primary_key="candidate_id"/>
<Dimension type="geo" foreign_key="geo_id" name="Geography" source="election_house">
<Hierarchy name="Congressional_District" primary_key="geo_id">
<Level name="Congressional_District" key_column="geo_id" name_column="geo_name" key_type="text">
<Property column="geo_id" name="FIPS"/>
<Property column="geo_name" name="State"/>
</Level>
</Hierarchy>
<Annotation name="dim_type">GEOGRAPHY</Annotation>
</Dimension>
<Dimension foreign_key="candidate_id" name="Candidate" source="election_house">
<Hierarchy name="Candidate" primary_key="candidate_id">
<Level name="Candidate" key_column="candidate_id" name_column="candidate" key_type="text">
<Property name="Office" column="office"/>
</Level>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE</Annotation>
</Dimension>
<Dimension foreign_key="candidate_other" name="Candidate Other" source="election_house">
<Hierarchy name="Candidate Other" primary_key="candidate_other">
<Level key_column="candidate_other" name="Candidate Other" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE OTHER</Annotation>
</Dimension>
<Dimension foreign_key="party" name="Party" source="election_house">
<Hierarchy name="Party" primary_key="party">
<Level key_column="party" name="Party" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">PARTY</Annotation>
</Dimension>
<Dimension foreign_key="special" name="Special" source="election_house">
<Hierarchy name="Special" primary_key="special">
<Level key_column="special" name="Special"/>
</Hierarchy>
<Annotation name="dim_type">SPECIAL</Annotation>
</Dimension>
<Dimension foreign_key="runoff" name="Runoff" source="election_house">
<Hierarchy name="Runoff" primary_key="runoff">
<Level key_column="runoff" name="Runoff"/>
</Hierarchy>
<Annotation name="dim_type">RUNOFF</Annotation>
</Dimension>
<Dimension foreign_key="unofficial" name="Unofficial" source="election_house">
<Hierarchy name="Unofficial" primary_key="unofficial">
<Level key_column="unofficial" name="Unofficial"/>
</Hierarchy>
</Dimension>
<Dimension type="time" foreign_key="year" name="Year" source="election_house">
<Hierarchy name="Year" primary_key="year">
<Level key_column="year" name="Year"/>
</Hierarchy>
<Annotation name="dim_type">YEAR</Annotation>
<Annotation name="default_year">2020</Annotation>
</Dimension>
<Measure name="Candidate Votes" column="candidatevotes" aggregator="sum" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
<Measure measure_type="units_ofmeasurement" name="Total Votes" column="totalvotes" aggregator="max" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
</Cube>
<Cube name="election_house_compact">
<Annotation name="source_name">MIT Data Electionlab</Annotation>
<Annotation name="source_link">https://electionlab.mit.edu/data</Annotation>
<Annotation name="dataset_name">U.S House 1976-2020</Annotation>
<Annotation name="dataset_link">https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/IG0UN2/8KAB8V</Annotation>
<Annotation name="source_name">Federal Election Commision</Annotation>
<Annotation name="source_link">https://www.fec.gov/</Annotation>
<Annotation name="hidden_dimensions">Version</Annotation>
<Annotation name="source_description">By applying scientific principles to how elections are studied and administered, the MIT Election Lab aims to improve the democratic experience for all U.S. voters. The lab supports advances in election science by collecting, analyzing, and sharing core data and findings. They also aim to build relationships with election officials and others to help apply new scientific research to the practice of democracy in the United States.</Annotation>
<Table name="election_house_compact" schema="election" primary_key="winning_candidate"/>
<Dimension type="geo" foreign_key="district" name="Geography" source="house_compact_election">
<Hierarchy name="Congressional_District" primary_key="district">
<Level name="Congressional_District" key_column="district" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">GEOGRAPHY</Annotation>
</Dimension>
<Dimension type="time" foreign_key="year" name="Year" source="election_house_compact">
<Hierarchy name="Year" primary_key="year">
<Level name="Year" key_column="year"/>
</Hierarchy>
<Annotation name="dim_type">YEAR</Annotation>
<Annotation name="default_year">2020</Annotation>
</Dimension>
<Dimension foreign_key="winning_candidate" name="Candidate" source="election_house_compact">
<Hierarchy name="Candidate" primary_key="winning_candidate">
<Level name="Candidate" key_column="winning_candidate" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">CANDIDATE</Annotation>
</Dimension>
<Dimension foreign_key="special" name="Special" source="election_house_compact">
<Hierarchy name="Special" primary_key="special">
<Level key_column="special" name="Special"/>
</Hierarchy>
<Annotation name="dim_type">SPECIAL</Annotation>
</Dimension>
<Dimension foreign_key="party" name="Party" source="election_house_compact">
<Hierarchy name="Party" primary_key="party">
<Level key_column="party" name="Party" key_type="text"/>
</Hierarchy>
<Annotation name="dim_type">PARTY</Annotation>
</Dimension>
<Dimension foreign_key="runoff" name="Runoff" source="election_house_compact">
<Hierarchy name="Runoff" primary_key="runoff">
<Level key_column="runoff" name="Runoff"/>
</Hierarchy>
<Annotation name="dim_type">RUNOFF</Annotation>
</Dimension>
<Measure name="Winner Votes" column="winner_votes" aggregator="sum" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
<Measure name="Other Votes" column="other_votes" aggregator="sum" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
<Measure name="Total Votes" column="total_votes" aggregator="max" visible="true">
<Annotation name="units_ofmeasurement">VOTES</Annotation>
</Measure>
</Cube>
</Schema>