riksdagsmonitor 0.8.60 → 0.8.65
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/README.md +366 -972
- package/SECURITY.md +57 -4
- package/dist/lib/cia/csv-utils.d.ts +75 -0
- package/dist/lib/cia/csv-utils.d.ts.map +1 -0
- package/dist/lib/cia/csv-utils.js +122 -0
- package/dist/lib/cia/csv-utils.js.map +1 -0
- package/dist/lib/cia/dashboard-init.d.ts +1 -1
- package/dist/lib/cia/dashboard-init.d.ts.map +1 -1
- package/dist/lib/cia/dashboard-init.js +7 -6
- package/dist/lib/cia/dashboard-init.js.map +1 -1
- package/dist/lib/cia/data-loader.d.ts +38 -348
- package/dist/lib/cia/data-loader.d.ts.map +1 -1
- package/dist/lib/cia/data-loader.js +54 -766
- package/dist/lib/cia/data-loader.js.map +1 -1
- package/dist/lib/cia/election-predictions.d.ts +1 -1
- package/dist/lib/cia/election-predictions.d.ts.map +1 -1
- package/dist/lib/cia/loaders/committees.d.ts +25 -0
- package/dist/lib/cia/loaders/committees.d.ts.map +1 -0
- package/dist/lib/cia/loaders/committees.js +110 -0
- package/dist/lib/cia/loaders/committees.js.map +1 -0
- package/dist/lib/cia/loaders/demographics.d.ts +22 -0
- package/dist/lib/cia/loaders/demographics.d.ts.map +1 -0
- package/dist/lib/cia/loaders/demographics.js +48 -0
- package/dist/lib/cia/loaders/demographics.js.map +1 -0
- package/dist/lib/cia/loaders/documents.d.ts +22 -0
- package/dist/lib/cia/loaders/documents.d.ts.map +1 -0
- package/dist/lib/cia/loaders/documents.js +51 -0
- package/dist/lib/cia/loaders/documents.js.map +1 -0
- package/dist/lib/cia/loaders/election.d.ts +24 -0
- package/dist/lib/cia/loaders/election.d.ts.map +1 -0
- package/dist/lib/cia/loaders/election.js +111 -0
- package/dist/lib/cia/loaders/election.js.map +1 -0
- package/dist/lib/cia/loaders/index.d.ts +26 -0
- package/dist/lib/cia/loaders/index.d.ts.map +1 -0
- package/dist/lib/cia/loaders/index.js +26 -0
- package/dist/lib/cia/loaders/index.js.map +1 -0
- package/dist/lib/cia/loaders/ministries.d.ts +22 -0
- package/dist/lib/cia/loaders/ministries.d.ts.map +1 -0
- package/dist/lib/cia/loaders/ministries.js +41 -0
- package/dist/lib/cia/loaders/ministries.js.map +1 -0
- package/dist/lib/cia/loaders/overview.d.ts +24 -0
- package/dist/lib/cia/loaders/overview.d.ts.map +1 -0
- package/dist/lib/cia/loaders/overview.js +96 -0
- package/dist/lib/cia/loaders/overview.js.map +1 -0
- package/dist/lib/cia/loaders/parties.d.ts +24 -0
- package/dist/lib/cia/loaders/parties.d.ts.map +1 -0
- package/dist/lib/cia/loaders/parties.js +92 -0
- package/dist/lib/cia/loaders/parties.js.map +1 -0
- package/dist/lib/cia/loaders/risk.d.ts +22 -0
- package/dist/lib/cia/loaders/risk.d.ts.map +1 -0
- package/dist/lib/cia/loaders/risk.js +38 -0
- package/dist/lib/cia/loaders/risk.js.map +1 -0
- package/dist/lib/cia/loaders/top10.d.ts +24 -0
- package/dist/lib/cia/loaders/top10.d.ts.map +1 -0
- package/dist/lib/cia/loaders/top10.js +68 -0
- package/dist/lib/cia/loaders/top10.js.map +1 -0
- package/dist/lib/cia/loaders/voting.d.ts +27 -0
- package/dist/lib/cia/loaders/voting.d.ts.map +1 -0
- package/dist/lib/cia/loaders/voting.js +108 -0
- package/dist/lib/cia/loaders/voting.js.map +1 -0
- package/dist/lib/cia/sources.d.ts +29 -0
- package/dist/lib/cia/sources.d.ts.map +1 -0
- package/dist/lib/cia/sources.js +162 -0
- package/dist/lib/cia/sources.js.map +1 -0
- package/dist/lib/cia/types.d.ts +324 -0
- package/dist/lib/cia/types.d.ts.map +1 -0
- package/dist/lib/cia/types.js +24 -0
- package/dist/lib/cia/types.js.map +1 -0
- package/dist/lib/cia/visualizations.d.ts +1 -1
- package/dist/lib/cia/visualizations.d.ts.map +1 -1
- package/dist/lib/shared/register-globals.d.ts +1 -1
- package/dist/lib/shared/register-globals.d.ts.map +1 -1
- package/dist/lib/shared/register-globals.js +6 -4
- package/dist/lib/shared/register-globals.js.map +1 -1
- package/package.json +7 -6
|
@@ -4,340 +4,54 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @description
|
|
6
6
|
* CIA Intelligence Data Loader & Pipeline Orchestrator.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* Thin orchestrator that wires together the per-domain loaders in `loaders/`
|
|
9
|
+
* with a single `LoadCSV` closure built from `csvBaseURL` + `fallbackURL`.
|
|
10
|
+
* Public API (constructor, static `CSV_SOURCES`, `parseCSV`, `loadCSV`,
|
|
11
|
+
* `load*()` methods, `loadAll`) is preserved for existing consumers
|
|
12
|
+
* (`dashboard-init.ts`, `election-predictions.ts`, `visualizations.ts`).
|
|
13
|
+
*
|
|
14
|
+
* Was originally a 1 300-line monolith; decomposed into focused modules:
|
|
15
|
+
* - `types.ts` — DTO interfaces
|
|
16
|
+
* - `sources.ts` — CSV source URL inventory + Riksdag constants
|
|
17
|
+
* - `csv-utils.ts` — `parseCSV` / `loadCSV` helpers
|
|
18
|
+
* - `loaders/*.ts` — one file per domain (10 loaders)
|
|
12
19
|
*
|
|
13
20
|
* @author Hack23 AB - Data Pipeline Engineering
|
|
14
21
|
* @license Apache-2.0
|
|
15
|
-
* @version
|
|
22
|
+
* @version 3.0.0
|
|
16
23
|
* @since 2024
|
|
17
|
-
|
|
18
24
|
*
|
|
19
25
|
* @intelligence CIA Platform Data Pipeline Orchestrator — core data acquisition module implementing multi-source intelligence data loading from 19+ CIA product categories. Manages CSV export ingestion and JSON fallback for electoral forecasts. Provides resilient pipeline with local-first strategy and remote fallback.
|
|
20
26
|
*
|
|
21
27
|
* @business Data infrastructure investment — the CIA data pipeline is the foundation for all analytical products. Pipeline reliability directly impacts user experience and platform credibility. Modular architecture enables future data source expansion (European Parliament, Nordic councils).
|
|
22
28
|
*
|
|
23
29
|
* @marketing Data transparency asset — transparent data sourcing (CIA Platform, open government data) builds trust with all audience segments. Data pipeline documentation demonstrates commitment to accuracy and verifiability, key messaging for press and academic audiences.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/** Map of all known CSV source categories. */
|
|
33
|
-
export interface CSVSourceMap {
|
|
34
|
-
personStatus: CSVSourceDefinition;
|
|
35
|
-
riskByParty: CSVSourceDefinition;
|
|
36
|
-
riskLevels: CSVSourceDefinition;
|
|
37
|
-
annualBallots: CSVSourceDefinition;
|
|
38
|
-
crisisResilience: CSVSourceDefinition;
|
|
39
|
-
partyPerformance: CSVSourceDefinition;
|
|
40
|
-
partyMetrics: CSVSourceDefinition;
|
|
41
|
-
partyMomentum: CSVSourceDefinition;
|
|
42
|
-
partyMembers: CSVSourceDefinition;
|
|
43
|
-
influenceMetrics: CSVSourceDefinition;
|
|
44
|
-
riskSummary: CSVSourceDefinition;
|
|
45
|
-
committeeProductivity: CSVSourceDefinition;
|
|
46
|
-
committeeActivity: CSVSourceDefinition;
|
|
47
|
-
partyEffectiveness: CSVSourceDefinition;
|
|
48
|
-
electionForecast: CSVSourceDefinition;
|
|
49
|
-
coalitionScenarios: CSVSourceDefinition;
|
|
50
|
-
coalitionAlignment: CSVSourceDefinition;
|
|
51
|
-
genderByParty: CSVSourceDefinition;
|
|
52
|
-
experienceByParty: CSVSourceDefinition;
|
|
53
|
-
ministryEffectiveness: CSVSourceDefinition;
|
|
54
|
-
annualDocTypes: CSVSourceDefinition;
|
|
55
|
-
decisionTrends: CSVSourceDefinition;
|
|
56
|
-
electionRegions: CSVSourceDefinition;
|
|
57
|
-
governmentRoles: CSVSourceDefinition;
|
|
58
|
-
riskEvolution: CSVSourceDefinition;
|
|
59
|
-
behavioralPatterns: CSVSourceDefinition;
|
|
60
|
-
}
|
|
61
|
-
/** A single parsed CSV row (header-keyed, auto-typed values). */
|
|
62
|
-
export interface CSVRow {
|
|
63
|
-
[key: string]: string | number;
|
|
64
|
-
}
|
|
65
|
-
export interface KeyMetrics {
|
|
66
|
-
totalMPs: number;
|
|
67
|
-
totalParties: number;
|
|
68
|
-
totalRiskRules: number;
|
|
69
|
-
governmentCoalition: string;
|
|
70
|
-
coalitionSeats: number;
|
|
71
|
-
oppositionSeats: number;
|
|
72
|
-
majorityMargin: number;
|
|
73
|
-
}
|
|
74
|
-
export interface RiskAlerts {
|
|
75
|
-
critical: number;
|
|
76
|
-
major: number;
|
|
77
|
-
minor: number;
|
|
78
|
-
last90Days: {
|
|
79
|
-
critical: number;
|
|
80
|
-
major: number;
|
|
81
|
-
minor: number;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export interface ParliamentActivity {
|
|
85
|
-
votesLastMonth: number;
|
|
86
|
-
documentsProcessed: number;
|
|
87
|
-
motionsSubmitted: number;
|
|
88
|
-
committeeMeetings: number;
|
|
89
|
-
}
|
|
90
|
-
export interface CoalitionStability {
|
|
91
|
-
stabilityScore: number;
|
|
92
|
-
riskLevel: string;
|
|
93
|
-
defectionProbability: number;
|
|
94
|
-
ideologicalTension: string;
|
|
95
|
-
}
|
|
96
|
-
export interface DataQuality {
|
|
97
|
-
completeness: number;
|
|
98
|
-
lastDataSync: string;
|
|
99
|
-
coverage: string;
|
|
100
|
-
}
|
|
101
|
-
export interface OverviewDashboard {
|
|
102
|
-
title: string;
|
|
103
|
-
description: string;
|
|
104
|
-
lastUpdated: string;
|
|
105
|
-
keyMetrics: KeyMetrics;
|
|
106
|
-
riskAlerts: RiskAlerts;
|
|
107
|
-
parliamentActivity: ParliamentActivity;
|
|
108
|
-
coalitionStability: CoalitionStability;
|
|
109
|
-
dataQuality: DataQuality;
|
|
110
|
-
_source: string;
|
|
111
|
-
}
|
|
112
|
-
export interface PartyMetricsData {
|
|
113
|
-
seats: number;
|
|
114
|
-
voteShare: number;
|
|
115
|
-
memberCount: number;
|
|
116
|
-
documentsAuthored: number;
|
|
117
|
-
motionsSubmitted: number;
|
|
118
|
-
successRate: number;
|
|
119
|
-
}
|
|
120
|
-
export interface PartyVoting {
|
|
121
|
-
totalVotes: number;
|
|
122
|
-
cohesionScore: number;
|
|
123
|
-
rebellionRate: number;
|
|
124
|
-
}
|
|
125
|
-
export interface PartyTrends {
|
|
126
|
-
supportTrend: string;
|
|
127
|
-
activityTrend: string;
|
|
128
|
-
performanceLevel: string;
|
|
129
|
-
}
|
|
130
|
-
export interface PartyEntry {
|
|
131
|
-
id: string;
|
|
132
|
-
partyName: string;
|
|
133
|
-
shortName: string;
|
|
134
|
-
metrics: PartyMetricsData;
|
|
135
|
-
voting: PartyVoting;
|
|
136
|
-
trends: PartyTrends;
|
|
137
|
-
_source: string;
|
|
138
|
-
}
|
|
139
|
-
export interface PartyPerformance {
|
|
140
|
-
title: string;
|
|
141
|
-
description: string;
|
|
142
|
-
lastUpdated: string;
|
|
143
|
-
parties: PartyEntry[];
|
|
144
|
-
_source: string;
|
|
145
|
-
}
|
|
146
|
-
export interface MPRanking {
|
|
147
|
-
rank: number;
|
|
148
|
-
id: string;
|
|
149
|
-
firstName: string;
|
|
150
|
-
lastName: string;
|
|
151
|
-
party: string;
|
|
152
|
-
role: string;
|
|
153
|
-
influenceScore: number;
|
|
154
|
-
networkConnections: number;
|
|
155
|
-
brokerClassification: string;
|
|
156
|
-
riskLevel: string;
|
|
157
|
-
riskScore: number;
|
|
158
|
-
_source: string;
|
|
159
|
-
}
|
|
160
|
-
export interface Top10Influential {
|
|
161
|
-
title: string;
|
|
162
|
-
description: string;
|
|
163
|
-
lastUpdated: string;
|
|
164
|
-
methodology: string;
|
|
165
|
-
rankings: MPRanking[];
|
|
166
|
-
_source: string;
|
|
167
|
-
}
|
|
168
|
-
export interface CommitteeEntry {
|
|
169
|
-
id: string;
|
|
170
|
-
name: string;
|
|
171
|
-
memberCount: number;
|
|
172
|
-
influenceScore: number;
|
|
173
|
-
documentsProcessed: number;
|
|
174
|
-
productivityLevel: string;
|
|
175
|
-
meetingsPerYear: number;
|
|
176
|
-
keyIssues: string[];
|
|
177
|
-
_source: string;
|
|
178
|
-
}
|
|
179
|
-
export interface NetworkNode {
|
|
180
|
-
id: string;
|
|
181
|
-
name: string;
|
|
182
|
-
size: number;
|
|
183
|
-
}
|
|
184
|
-
export interface NetworkEdge {
|
|
185
|
-
source: string;
|
|
186
|
-
target: string;
|
|
187
|
-
weight: number;
|
|
188
|
-
type: string;
|
|
189
|
-
}
|
|
190
|
-
export interface CommitteeNetwork {
|
|
191
|
-
title: string;
|
|
192
|
-
description: string;
|
|
193
|
-
lastUpdated: string;
|
|
194
|
-
committees: CommitteeEntry[];
|
|
195
|
-
networkGraph: {
|
|
196
|
-
nodes: NetworkNode[];
|
|
197
|
-
edges: NetworkEdge[];
|
|
198
|
-
};
|
|
199
|
-
crossCommitteeMPs: unknown[];
|
|
200
|
-
_source: string;
|
|
201
|
-
}
|
|
202
|
-
export interface VotingMatrix {
|
|
203
|
-
labels: string[];
|
|
204
|
-
partyNames: string[];
|
|
205
|
-
agreementMatrix: number[][];
|
|
206
|
-
}
|
|
207
|
-
export interface RebellionEntry {
|
|
208
|
-
party: string;
|
|
209
|
-
rebellionRate: number;
|
|
210
|
-
trend: string;
|
|
211
|
-
}
|
|
212
|
-
export interface VotingPatterns {
|
|
213
|
-
title: string;
|
|
214
|
-
description: string;
|
|
215
|
-
lastUpdated: string;
|
|
216
|
-
analysisPeriod: string;
|
|
217
|
-
votingMatrix: VotingMatrix;
|
|
218
|
-
keyIssues: unknown[];
|
|
219
|
-
rebellionTracking: RebellionEntry[];
|
|
220
|
-
_source: string;
|
|
221
|
-
}
|
|
222
|
-
export interface ElectionAnalysis {
|
|
223
|
-
forecast: {
|
|
224
|
-
parties: Array<{
|
|
225
|
-
name: string;
|
|
226
|
-
currentSeats: number;
|
|
227
|
-
predictedSeats: number;
|
|
228
|
-
change: number;
|
|
229
|
-
voteShare: number;
|
|
230
|
-
confidenceInterval?: {
|
|
231
|
-
min: number;
|
|
232
|
-
max: number;
|
|
233
|
-
};
|
|
234
|
-
}>;
|
|
235
|
-
};
|
|
236
|
-
coalitionScenarios: Array<{
|
|
237
|
-
name: string;
|
|
238
|
-
composition: string[];
|
|
239
|
-
totalSeats: number;
|
|
240
|
-
probability: number;
|
|
241
|
-
majority: boolean;
|
|
242
|
-
riskLevel: string;
|
|
243
|
-
}>;
|
|
244
|
-
keyFactors: string[];
|
|
245
|
-
electionDate?: string;
|
|
246
|
-
}
|
|
247
|
-
export interface MinistryEntry {
|
|
248
|
-
name: string;
|
|
249
|
-
effectiveness: string;
|
|
250
|
-
documentsProduced: number;
|
|
251
|
-
governmentBills: number;
|
|
252
|
-
year: number;
|
|
253
|
-
quarter: number;
|
|
254
|
-
}
|
|
255
|
-
export interface MinistryDashboard {
|
|
256
|
-
title: string;
|
|
257
|
-
description: string;
|
|
258
|
-
lastUpdated: string;
|
|
259
|
-
ministries: MinistryEntry[];
|
|
260
|
-
_source: string;
|
|
261
|
-
}
|
|
262
|
-
export interface GenderEntry {
|
|
263
|
-
party: string;
|
|
264
|
-
gender: string;
|
|
265
|
-
count: number;
|
|
266
|
-
}
|
|
267
|
-
export interface ExperienceEntry {
|
|
268
|
-
party: string;
|
|
269
|
-
experienceLevel: string;
|
|
270
|
-
politicianCount: number;
|
|
271
|
-
}
|
|
272
|
-
export interface DemographicsDashboard {
|
|
273
|
-
title: string;
|
|
274
|
-
description: string;
|
|
275
|
-
lastUpdated: string;
|
|
276
|
-
genderByParty: GenderEntry[];
|
|
277
|
-
experienceByParty: ExperienceEntry[];
|
|
278
|
-
_source: string;
|
|
279
|
-
}
|
|
280
|
-
export interface DocumentTypeEntry {
|
|
281
|
-
year: number;
|
|
282
|
-
documentType: string;
|
|
283
|
-
docCount: number;
|
|
284
|
-
}
|
|
285
|
-
export interface DecisionTrendEntry {
|
|
286
|
-
year: number;
|
|
287
|
-
month: number;
|
|
288
|
-
decisionCount: number;
|
|
289
|
-
approvedDecisions: number;
|
|
290
|
-
rejectedDecisions: number;
|
|
291
|
-
approvalRate: number;
|
|
292
|
-
}
|
|
293
|
-
export interface DocumentActivityDashboard {
|
|
294
|
-
title: string;
|
|
295
|
-
description: string;
|
|
296
|
-
lastUpdated: string;
|
|
297
|
-
documentTypes: DocumentTypeEntry[];
|
|
298
|
-
decisionTrends: DecisionTrendEntry[];
|
|
299
|
-
_source: string;
|
|
300
|
-
}
|
|
301
|
-
export interface RiskEvolutionEntry {
|
|
302
|
-
period: string;
|
|
303
|
-
severity: string;
|
|
304
|
-
politicianCount: number;
|
|
305
|
-
avgRiskScore: number;
|
|
306
|
-
}
|
|
307
|
-
export interface RiskEvolutionDashboard {
|
|
308
|
-
title: string;
|
|
309
|
-
description: string;
|
|
310
|
-
lastUpdated: string;
|
|
311
|
-
entries: RiskEvolutionEntry[];
|
|
312
|
-
_source: string;
|
|
313
|
-
}
|
|
314
|
-
export interface CIADataPayload {
|
|
315
|
-
overview: OverviewDashboard;
|
|
316
|
-
election: ElectionAnalysis;
|
|
317
|
-
partyPerf: PartyPerformance;
|
|
318
|
-
top10: Top10Influential;
|
|
319
|
-
committees: CommitteeNetwork;
|
|
320
|
-
votingPatterns: VotingPatterns;
|
|
321
|
-
ministry: MinistryDashboard;
|
|
322
|
-
demographics: DemographicsDashboard;
|
|
323
|
-
documentActivity: DocumentActivityDashboard;
|
|
324
|
-
riskEvolution: RiskEvolutionDashboard;
|
|
325
|
-
}
|
|
30
|
+
*/
|
|
31
|
+
import type { CIADataPayload, CSVRow, CSVSourceMap, CommitteeNetwork, DemographicsDashboard, DocumentActivityDashboard, ElectionAnalysis, MinistryDashboard, OverviewDashboard, PartyPerformance, RiskEvolutionDashboard, Top10Influential, VotingPatterns } from './types.js';
|
|
32
|
+
export type * from './types.js';
|
|
33
|
+
/**
|
|
34
|
+
* Aggregator that delegates per-domain loading to the dedicated modules in
|
|
35
|
+
* `loaders/`. Maintains the original public API so existing callers compile
|
|
36
|
+
* unchanged after the decomposition refactor.
|
|
37
|
+
*/
|
|
326
38
|
export declare class CIADataLoader {
|
|
327
39
|
readonly csvBaseURL: string;
|
|
328
40
|
readonly fallbackURL: string;
|
|
329
41
|
/** The 8 parties represented in the Swedish Riksdag. */
|
|
330
|
-
static readonly RIKSDAG_PARTIES: string[];
|
|
42
|
+
static readonly RIKSDAG_PARTIES: readonly string[];
|
|
331
43
|
/** Mapping of full Swedish committee names to their Riksdag org codes. */
|
|
332
|
-
static readonly COMMITTEE_ORG_CODES: Record<string, string
|
|
44
|
+
static readonly COMMITTEE_ORG_CODES: Readonly<Record<string, string>>;
|
|
333
45
|
/**
|
|
334
46
|
* Heuristic divisor to estimate meetings/year from committee document counts.
|
|
335
47
|
* Assumption: ~25 published documents per active committee meeting.
|
|
336
48
|
*/
|
|
337
49
|
static readonly COMMITTEE_DOCS_PER_MEETING_ESTIMATE = 25;
|
|
338
|
-
constructor();
|
|
339
50
|
/** CSV data source definitions – maps to real PostgreSQL view exports. */
|
|
340
|
-
static CSV_SOURCES: CSVSourceMap
|
|
51
|
+
static readonly CSV_SOURCES: Readonly<CSVSourceMap>;
|
|
52
|
+
/** Loader closure bound to this instance's URL configuration. */
|
|
53
|
+
private readonly loadCSVFn;
|
|
54
|
+
constructor();
|
|
341
55
|
/**
|
|
342
56
|
* Parse CSV text into array of objects using header row as keys.
|
|
343
57
|
* @param csvText - Raw CSV text
|
|
@@ -351,53 +65,29 @@ export declare class CIADataLoader {
|
|
|
351
65
|
* @returns Parsed CSV rows
|
|
352
66
|
*/
|
|
353
67
|
loadCSV(localPath: string, fallbackPath?: string): Promise<CSVRow[]>;
|
|
354
|
-
/**
|
|
355
|
-
* Build overview dashboard from CSV sources.
|
|
356
|
-
* Replaces overview-dashboard.json.
|
|
357
|
-
*/
|
|
68
|
+
/** Build overview dashboard from CSV sources. Replaces overview-dashboard.json. */
|
|
358
69
|
loadOverviewDashboard(): Promise<OverviewDashboard>;
|
|
359
|
-
/**
|
|
360
|
-
* Build election analysis from CSV sources.
|
|
361
|
-
* Replaces election-analysis.json.
|
|
362
|
-
*/
|
|
70
|
+
/** Build election analysis from CSV sources. Replaces election-analysis.json. */
|
|
363
71
|
loadElectionAnalysis(): Promise<ElectionAnalysis>;
|
|
364
|
-
/**
|
|
365
|
-
* Build party performance from CSV sources.
|
|
366
|
-
* Replaces party-performance.json.
|
|
367
|
-
*/
|
|
72
|
+
/** Build party performance from CSV sources. Replaces party-performance.json. */
|
|
368
73
|
loadPartyPerformance(): Promise<PartyPerformance>;
|
|
369
|
-
/**
|
|
370
|
-
* Build top 10 influential MPs from CSV sources.
|
|
371
|
-
* Replaces top10-influential-mps.json.
|
|
372
|
-
*/
|
|
74
|
+
/** Build top 10 influential MPs from CSV sources. Replaces top10-influential-mps.json. */
|
|
373
75
|
loadTop10Influential(): Promise<Top10Influential>;
|
|
374
|
-
/**
|
|
375
|
-
* Build committee network from CSV sources.
|
|
376
|
-
* Replaces committee-network.json.
|
|
377
|
-
* Filters out INACTIVE committees and deduplicates by name.
|
|
378
|
-
*/
|
|
76
|
+
/** Build committee network from CSV sources. Replaces committee-network.json. */
|
|
379
77
|
loadCommitteeNetwork(): Promise<CommitteeNetwork>;
|
|
380
78
|
/**
|
|
381
79
|
* Build voting patterns from CSV sources.
|
|
382
|
-
* Uses real coalition alignment data for the agreement matrix
|
|
383
|
-
*
|
|
80
|
+
* Uses real coalition alignment data for the agreement matrix when present;
|
|
81
|
+
* otherwise falls back to win-rate similarity.
|
|
384
82
|
*/
|
|
385
83
|
loadVotingPatterns(): Promise<VotingPatterns>;
|
|
386
|
-
/**
|
|
387
|
-
* Build ministry dashboard from CSV sources.
|
|
388
|
-
*/
|
|
84
|
+
/** Build ministry dashboard from CSV sources. */
|
|
389
85
|
loadMinistryDashboard(): Promise<MinistryDashboard>;
|
|
390
|
-
/**
|
|
391
|
-
* Build demographics dashboard from CSV sources.
|
|
392
|
-
*/
|
|
86
|
+
/** Build demographics dashboard from CSV sources. */
|
|
393
87
|
loadDemographics(): Promise<DemographicsDashboard>;
|
|
394
|
-
/**
|
|
395
|
-
* Build document activity dashboard from CSV sources.
|
|
396
|
-
*/
|
|
88
|
+
/** Build document activity dashboard from CSV sources. */
|
|
397
89
|
loadDocumentActivity(): Promise<DocumentActivityDashboard>;
|
|
398
|
-
/**
|
|
399
|
-
* Build risk evolution dashboard from CSV sources.
|
|
400
|
-
*/
|
|
90
|
+
/** Build risk evolution dashboard from CSV sources. */
|
|
401
91
|
loadRiskEvolution(): Promise<RiskEvolutionDashboard>;
|
|
402
92
|
/**
|
|
403
93
|
* Load all data in parallel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-loader.d.ts","sourceRoot":"","sources":["../../../src/browser/cia/data-loader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"data-loader.d.ts","sourceRoot":"","sources":["../../../src/browser/cia/data-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACf,MAAM,YAAY,CAAC;AAkCpB,mBAAmB,YAAY,CAAC;AAMhC;;;;GAIG;AACH,qBAAa,aAAa;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,wDAAwD;IACxD,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAmB;IAErE,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAuB;IAE5F;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,mCAAmC,MAAuC;IAE1F,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAe;IAElE,iEAAiE;IACjE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;;IAQpC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC;;;;;OAKG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI1E,mFAAmF;IAC7E,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIzD,iFAAiF;IAC3E,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIvD,iFAAiF;IAC3E,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIvD,0FAA0F;IACpF,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIvD,iFAAiF;IAC3E,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIvD;;;;OAIG;IACG,kBAAkB,IAAI,OAAO,CAAC,cAAc,CAAC;IAInD,iDAAiD;IAC3C,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIzD,qDAAqD;IAC/C,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAIxD,0DAA0D;IACpD,oBAAoB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAIhE,uDAAuD;IACjD,iBAAiB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAI1D;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC;CA4BzC"}
|