-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
711 lines (644 loc) · 16.9 KB
/
index.d.ts
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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
// This file is auto generated by the gqlToTs.ts module
// tslint:disable
// graphql typescript definitions
declare namespace DH {
interface IGraphQLResponseRoot {
data?: IQuery;
errors?: Array<IGraphQLResponseError>;
}
interface IGraphQLResponseError {
message: string; // Required for all errors
locations?: Array<IGraphQLResponseErrorLocation>;
[propName: string]: any; // 7.2.2 says 'GraphQL servers may provide additional entries to error'
}
interface IGraphQLResponseErrorLocation {
line: number;
column: number;
}
interface IQuery {
bubbleChartOda: Array<IBubbleChartOda> | null;
bubbleChartPoverty: Array<IBubbleChartPoverty> | null;
bubbleChartOptions: IBubbleChartOptions | null;
overviewTab: IOverviewTab | null;
povertyTab: IPovertyTab | null;
populationTab: IPopulationTab | null;
governmentFinance: IGovernmentFinance | null;
internationalResources: IInternationalResources | null;
/**
eg recipient or donor
*/
flows: IFlows | null;
/**
for area tree map chart dropdown selectoion
*/
singleResource: ISingleResourceData | null;
mapData: IMapData | null;
/**
id is district slug
*/
overviewTabRegional: IOverviewTabRegional | null;
povertyTabRegional: PovertyTabRegional | null;
populationTabRegional: PopulationTabRegional | null;
educationTabRegional: EducationTabRegional | null;
healthTabRegional: HealthTabRegional | null;
localGovernmentFinance: ILocalGovernmentFinance | null;
unbundlingAidDataTotal: IUnbundlingAidTotal | null;
unbundlingAidData: Array<IAidUnit> | null;
unbundlingSelectionData: IUnbundlingAidSelections | null;
methodology: Array<IMethodology> | null;
countries: Array<IEntity> | null;
districtPageData: Array<IPage> | null;
countryProfilePageData: Array<IPage> | null;
odaDonorBubbleChartPageData: Array<IPage> | null;
globalPicturePageData: Array<IPage> | null;
povertyBubbleChartPageData: Array<IPage> | null;
unbundlingOdaPageData: Array<IPage> | null;
unbundlingOOfPageData: Array<IPage> | null;
whereThePoorPageData: Array<IPage> | null;
districts: Array<IDistrict> | null;
globalPictureThemes: Array<ITheme> | null;
spotlightThemes: Array<ITheme> | null;
}
interface IBubbleChartOda {
year: number | null;
/**
country id
*/
id: string | null;
/**
country name
*/
name: string | null;
income_group: string | null;
region: string | null;
uid: string | null;
value: number | null;
revenuePerPerson: number | null;
numberInExtremePoverty: number | null;
}
interface IBubbleChartPoverty {
year: number | null;
value: number | null;
id: string | null;
name: string | null;
income_group: string | null;
region: string | null;
uid: string | null;
revenuePerPerson: number | null;
numberInExtremePoverty: number | null;
percentageInExtremePoverty: number | null;
}
interface IBubbleChartOptions {
/**
this list feeds off oda table from countries and global/concept file
IdNamePair is defined in unbundling aid types
*/
indicators: Array<IIdNamePair>;
incomeGroups: Array<IIdNamePair>;
regions: Array<IRegion>;
}
interface IIdNamePair {
id: string;
name: string;
}
interface IRegion {
name: string | null;
id: string | null;
color: string | null;
}
interface IOverviewTab {
/**
how many of the poorest people globally live in a country
*/
poorestPeople: IIndicatorValueWithToolTip | null;
/**
total population for a given country
*/
population: IIndicatorValueWithToolTip | null;
domesticResources: IIndicatorValueWithToolTip | null;
internationalResources: IIndicatorValueWithToolTip | null;
/**
recipient countries $PPP, both donor and recipient
*/
governmentSpendPerPerson: IIndicatorValueWithToolTip | null;
/**
donor: gross nation income per capit GNI
*/
averageIncomerPerPerson: IIndicatorDataWithToolTip | null;
/**
donor: Income share by quintile
*/
incomeDistTrend: IQuintileDataWithToolTip | null;
}
interface IIndicatorValueWithToolTip {
value: string | null;
toolTip: IToolTip;
}
interface IToolTip {
source: string;
heading: string;
}
interface IIndicatorDataWithToolTip {
data: Array<IIndicatorData>;
toolTip: IToolTip;
}
interface IIndicatorData {
year: number;
value: number | null;
id: string;
name: string;
color: string | null;
uid: string;
}
interface IQuintileDataWithToolTip {
data: Array<IQuintile>;
toolTip: IToolTip | null;
}
interface IQuintile {
value: number;
quintileName: string;
uid: string;
color: string;
}
interface IPovertyTab {
/**
Poverty reduction over time area chart trend
*/
poverty190Trend: IIndicatorDataWithToolTip | null;
/**
how deep is poverty %
*/
depthOfExtremePoverty: IIndicatorValueWithToolTip | null;
/**
Recipients: how income is distributed, % of income received by each quintil
*/
incomeDistTrend: IQuintileDataWithToolTip | null;
}
interface IPopulationTab {
/**
total population in a country
*/
population: IIndicatorValueWithToolTip | null;
/**
Urban vs Rural population level
*/
populationDistribution: IPopulationDistributionWithToolTip | null;
/**
Number of people in 3 age bands (65+, 15- 65, 0 - 14)
*/
populationPerAgeBand: IPopulationPerAgeBandWithToolTip | null;
}
interface IPopulationDistributionWithToolTip {
data: Array<IPopulationDistribution>;
toolTip: IToolTip;
}
interface IPopulationDistribution {
group: string;
value: number;
year: number;
}
interface IPopulationPerAgeBandWithToolTip {
data: Array<IPopulationPerAgeBand>;
toolTip: IToolTip;
}
interface IPopulationPerAgeBand {
band: string;
value: number;
year: number;
uid: string;
}
interface IGovernmentFinance {
startYear: number;
/**
Total revenue for a particular
*/
totalRevenue: IIndicatorValueWithToolTip | null;
grantsAsPcOfRevenue: IIndicatorValueWithToolTip | null;
/**
for donut chart
*/
spendingAllocation: ISpendingAllocationWithToolTip | null;
/**
for treemap
such as constant 2015 USD for tree map
*/
currencyCode: string | null;
currencyUSD: string | null;
supportLocalCurrencyOnly: boolean;
/**
use resourcesRecipient sql
*/
expenditure: Array<IDomestic> | null;
revenueAndGrants: Array<IDomestic> | null;
finance: Array<IDomestic> | null;
}
interface ISpendingAllocationWithToolTip {
data: Array<ISpendingAllocation> | null;
toolTip: IToolTip;
}
interface ISpendingAllocation {
value: number;
name: string;
color: string;
uid: string;
}
interface IDomestic {
/**
eg Actual or budget
*/
budget_type: string;
levels: Array<string>;
year: number;
value: number | null;
value_ncu: number | null;
uid: string;
color: string;
}
interface IInternationalResources {
startYear: number;
/**
Gross National Income
*/
GNI: IIndicatorValueWithToolTip | null;
/**
Net ODA received, % of GNI for recipient countries
*/
netODAOfGNIIn: IIndicatorValueWithToolTip | null;
/**
Net ODA out, % of GNI for recipient countries
*/
netODAOfGNIOut: IIndicatorValueWithToolTip | null;
/**
for line chart in the international resources tabs section,
IndicatorDataColoredWithToolTip is defined in spotlight types
*/
resourceflowsOverTime: IFlowsOverTimeWithToolTip;
/**
for sidebar chart in international resources section & area partition tree chart default data
*/
resourcesOverTime: IResourceDataWithToolTip;
/**
Whats the mix of resources can be for donors (out flows) or receipient (in flows)
this is for the donut chart
*/
mixOfResources: IResourceDataWithToolTip;
}
interface IFlowsOverTimeWithToolTip {
data: Array<IIndicatorData>;
toolTip: IToolTip;
}
interface IResourceDataWithToolTip {
data: Array<IResourceData>;
toolTip: IToolTip;
}
interface IResourceData {
year: number;
value: number;
flow_name: string;
flow_id: string;
/**
a position value for a flow generated from flow_type, flow_category and flow name order
*/
position: number;
short_name: string;
/**
Category i.e FDI, ODA
*/
flow_category: string;
/**
flow either inflow or outflow
*/
flow_type: string;
/**
i.e contains flow type as 1st level, flow category as second and flow name as 3rd
levels: [String]
in or out
*/
direction: string;
color: string;
uid: string;
}
interface IFlows {
/**
an array of inflows for a particular countryType for area & partition chart
*/
inflows: Array<IFlow>;
/**
an array of outflows for a particular countryType
*/
outflows: Array<IFlow>;
}
interface IFlow {
name: string;
id: string;
selections: Array<IFlowSelection>;
}
interface IFlowSelection {
name: string;
/**
this is the group ID
*/
id: string;
unbundle: boolean;
}
interface ISingleResourceData {
resources: Array<IIndicatorData>;
color: string;
}
interface IMapData {
map: Array<IMapUnit>;
/**
map indicator user friendly label / slug eg Poverty
*/
name: string;
/**
map value unit eg US $ or %
*/
uom_display: string;
uom: string;
map_style: string | null;
start_year: number;
end_year: number;
default_year: number;
description: string | null;
source: string;
theme: string;
heading: string;
country: string;
id: string;
legend: Array<ILegendField>;
}
interface IMapUnit {
/**
country code Id in DW this is di_id
*/
id: string;
/**
country slug
*/
slug: string;
/**
countryName derived from entity.csv
*/
name: string;
year: number;
color: string | null;
value: number | null;
detail: string | null;
uid: string;
}
interface ILegendField {
label: string;
color: string;
backgroundColor: string;
}
interface IOverviewTabRegional {
/**
WHAT PERCENTAGE OF PEOPLE IN WAKISO LIVE BELOW THE NATIONAL POVERTY LINE?
can be no data or '12%'
*/
poorestPeople: IIndicatorValueWithToolTip | null;
/**
WHAT RESOURCES ARE AVAILABLE TO LOCAL GOVERNMENTS IN WAKISO? eg 3.6m or 2.7bn
this is a total of local, donor and central government resources
*/
regionalResources: IIndicatorValueNCUWithToolTip | null;
/**
IndicatorDataColored is defined in country profile types
has local government, donor and central government
*/
regionalResourcesBreakdown: Array<IResourcesBreakDown> | null;
/**
HOW MUCH DOES THE LOCAL GOVERNMENT SPEND PER PERSON?
*/
localGovernmentSpendPerPerson: IIndicatorValueWithToolTip | null;
}
interface IIndicatorValueNCUWithToolTip {
value: string | null;
value_ncu: string | null;
toolTip: IToolTip;
}
interface IResourcesBreakDown {
data: IIndicatorData;
toolTip: IToolTip;
}
type PovertyTabRegional = IPovertyTabUg | IPovertyTabKe;
interface IPovertyTabUg {
poorestPeople: IIndicatorValueWithToolTip | null;
/**
WHAT IS THE AVERAGE LIFE EXPECTANCY?
*/
lifeExpectancy: IIndicatorValueWithToolTip | null;
/**
WHAT IS THE STANDARD OF LIVING SCORE?
*/
stdOfLiving: IIndicatorValueWithToolTip | null;
}
interface IPovertyTabKe {
poorestPeople: IIndicatorValueWithToolTip | null;
/**
WHAT IS THE AVERAGE LIFE EXPECTANCY?
*/
meanExpenditure: IIndicatorValueWithToolTip | null;
/**
WHAT IS THE STANDARD OF LIVING SCORE?
*/
povertyGap: IIndicatorValueWithToolTip | null;
}
type PopulationTabRegional =
| IPopulationTabRegionalUg
| IPopulationTabRegionalKe;
interface IPopulationTabRegionalUg {
/**
The total population of a given district and the population density in per sq km
*/
totalPopulation: IIndicatorValueWithToolTip | null;
populationDensity: IIndicatorValueWithToolTip | null;
/**
Urban vs Rural population level
*/
populationDistribution: IPopulationDistributionWithToolTip | null;
averageDependencyRatio: IIndicatorValueWithToolTip | null;
allAverageDependencyRatio: IIndicatorValueWithToolTip | null;
}
interface IPopulationTabRegionalKe {
/**
The total population of a given district and the population density in per sq km
*/
totalPopulation: IIndicatorValueWithToolTip | null;
populationDensity: IIndicatorValueWithToolTip | null;
populationBirthRate: IIndicatorValueWithToolTip | null;
}
type EducationTabRegional = IEducationTabRegionalUg | IEducationTabRegionalKe;
interface IEducationTabRegionalUg {
/**
WHAT IS THE PUPIL–TEACHER RATIO IN PRIMARY EDUCATION?...in government schools and...in all schools
*/
pupilTeacherRatioGovtSchl: IIndicatorValueWithToolTip | null;
pupilTeacherRatioOtherSchl: IIndicatorValueWithToolTip | null;
/**
WHAT PERCENTAGE OF STUDENTS PASS THE PRIMARY LEAVING EXAM?
*/
studentsPassRate: IIndicatorValueWithToolTip | null;
studentsPassDistrictRank: IIndicatorValueWithToolTip | null;
/**
HOW MUCH PRIMARY EDUCATION FUNDING IS THERE?
*/
primaryEducationfunding: IIndicatorValueNCUWithToolTip | null;
}
interface IEducationTabRegionalKe {
/**
WHAT IS THE PUPIL–TEACHER RATIO IN PRIMARY EDUCATION?...in government schools and...in all schools
*/
primaryPupilTeacherRatioAllSchl: IIndicatorValueWithToolTip | null;
primaryTeacherRatioPublicSchl: IIndicatorValueWithToolTip | null;
primaryTeacherRatioPrivateSchl: IIndicatorValueWithToolTip | null;
}
type HealthTabRegional = IHealthTabRegionalKe | IHealthTabRegionalUg;
interface IHealthTabRegionalKe {
birthAttendanceSkilled: IIndicatorValueWithToolTip | null;
contraceptiveUse: IIndicatorValueWithToolTip | null;
healthCareFunding: IIndicatorValueNCUWithToolTip | null;
}
interface IHealthTabRegionalUg {
/**
WHAT IS THE DISTRICT LEAGUE HEALTH PERFORMANCE SCORE?
*/
districtPerformance: IIndicatorValueWithToolTip | null;
/**
WHAT PERCENTAGE OF TUBERCULOSIS CASES HAVE BEEN SUCCESSFULLY TREATED?
*/
treatmeantOfTb: IIndicatorValueWithToolTip | null;
districtHealthRank: IIndicatorValueWithToolTip | null;
/**
HOW MUCH LOCAL GOVERNMENT HEALTHCARE FUNDING IS THERE?
*/
healthCareFunding: IIndicatorValueNCUWithToolTip | null;
}
interface ILocalGovernmentFinance {
startYear: number;
currencyUSD: string;
currencyCode: string;
supportLocalCurrencyOnly: boolean;
/**
come from finance file
*/
revenueAndGrants: Array<IDomestic>;
expenditure: Array<IDomestic>;
}
interface IUnbundlingAidToTalQuery {
/**
oda or oof
*/
aidType: string;
year?: number | null;
}
interface IUnbundlingAidTotal {
year: number;
total: string;
}
interface IUnbundlingAidQuery {
/**
oda or oof
*/
aidType: string;
year: number;
/**
eg channel, bundle
*/
groupBy: string;
to_di_id?: string | null;
from_di_id?: string | null;
/**
form is same as buddle
*/
bundle?: string | null;
sector?: string | null;
channel?: string | null;
}
interface IAidUnit {
/**
this will usually be a summed up aggregate value
*/
value: number;
/**
country or organisation or channel or bundle name
*/
name: string;
color: string;
id: string;
year: number;
uid: string;
}
interface IUnbundlingAidSelections {
/**
unbundling aid selection options
*/
to: Array<IIdNamePair>;
from: Array<IIdNamePair>;
channels: Array<IIdNamePair>;
sectors: Array<IIdNamePair>;
/**
same as form
*/
bundles: Array<IIdNamePair>;
years: Array<number>;
}
interface IMethodology {
name: string;
description: string;
methodology: string;
/**
think units
*/
uom: string | null;
source: ISource | null;
csv: string;
zip: string;
}
interface ISource {
name: string;
link: string | null;
}
interface IEntity {
id: string;
name: string;
slug: string;
has_domestic_data: string;
hasPDF: boolean;
countryType: string;
}
interface IPage {
id: string;
title: string;
narrative: string | null;
donor_title: string | null;
}
interface IDistrict {
id: string;
name: string;
}
interface ITheme {
id: string;
name: string;
default_indicator: string;
indicators: Array<IThemeIndicator>;
}
interface IThemeIndicator {
heading: string;
source: string;
tooltip: string;
id: string;
name: string;
}
interface IBubbleChartData {
year: number | null;
id: string | null;
name: string | null;
income_group: string | null;
region: string | null;
value: number | null;
uid: string | null;
}
}
// tslint:enable