china-nbs 0.3.0 → 0.4.0
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/CHANGELOG.md +11 -0
- package/README.md +51 -2
- package/dist/cli.cjs +2825 -2545
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2825 -2545
- package/dist/cli.js.map +1 -1
- package/dist/index.d.cts +4 -195
- package/dist/index.d.ts +4 -195
- package/dist/mcp.cjs +4229 -0
- package/dist/mcp.cjs.map +1 -0
- package/dist/mcp.d.cts +10 -0
- package/dist/mcp.d.ts +10 -0
- package/dist/mcp.js +4225 -0
- package/dist/mcp.js.map +1 -0
- package/dist/types-Kg3OAnEy.d.cts +195 -0
- package/dist/types-Kg3OAnEy.d.ts +195 -0
- package/docs/evaluation.md +1 -1
- package/docs/mcp.md +115 -0
- package/package.json +18 -5
package/dist/mcp.cjs
ADDED
|
@@ -0,0 +1,4229 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var url = require('url');
|
|
5
|
+
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
6
|
+
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
7
|
+
var zod = require('zod');
|
|
8
|
+
|
|
9
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
10
|
+
// src/cache.ts
|
|
11
|
+
var TtlCache = class {
|
|
12
|
+
entries = /* @__PURE__ */ new Map();
|
|
13
|
+
inFlight = /* @__PURE__ */ new Map();
|
|
14
|
+
maxEntries;
|
|
15
|
+
now;
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
this.maxEntries = Math.max(1, options.maxEntries ?? 200);
|
|
18
|
+
this.now = options.now ?? Date.now;
|
|
19
|
+
}
|
|
20
|
+
get size() {
|
|
21
|
+
return this.entries.size;
|
|
22
|
+
}
|
|
23
|
+
get(key) {
|
|
24
|
+
const entry = this.entries.get(key);
|
|
25
|
+
if (!entry) return void 0;
|
|
26
|
+
if (entry.expiresAt <= this.now()) {
|
|
27
|
+
this.entries.delete(key);
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
this.entries.delete(key);
|
|
31
|
+
this.entries.set(key, entry);
|
|
32
|
+
return entry.value;
|
|
33
|
+
}
|
|
34
|
+
set(key, value, ttlMs) {
|
|
35
|
+
if (ttlMs <= 0) return;
|
|
36
|
+
this.entries.delete(key);
|
|
37
|
+
this.entries.set(key, { value, expiresAt: this.now() + ttlMs });
|
|
38
|
+
while (this.entries.size > this.maxEntries) {
|
|
39
|
+
const oldest = this.entries.keys().next().value;
|
|
40
|
+
if (oldest === void 0) break;
|
|
41
|
+
this.entries.delete(oldest);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
delete(key) {
|
|
45
|
+
this.entries.delete(key);
|
|
46
|
+
}
|
|
47
|
+
clear() {
|
|
48
|
+
this.entries.clear();
|
|
49
|
+
this.inFlight.clear();
|
|
50
|
+
}
|
|
51
|
+
async getOrLoad(key, ttlMs, loader, options = {}) {
|
|
52
|
+
if (!options.noCache) {
|
|
53
|
+
const cached = this.get(key);
|
|
54
|
+
if (cached !== void 0) return cached;
|
|
55
|
+
}
|
|
56
|
+
const existing = this.inFlight.get(key);
|
|
57
|
+
if (existing) return existing;
|
|
58
|
+
const promise = loader().then((value) => {
|
|
59
|
+
if (!options.noCache) this.set(key, value, ttlMs);
|
|
60
|
+
return value;
|
|
61
|
+
}).finally(() => {
|
|
62
|
+
this.inFlight.delete(key);
|
|
63
|
+
});
|
|
64
|
+
this.inFlight.set(key, promise);
|
|
65
|
+
return promise;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// src/catalog-codes.ts
|
|
70
|
+
var CATALOG_CODES = {
|
|
71
|
+
national: { month: "1", quarter: "2", year: "3" },
|
|
72
|
+
province: { month: "4", quarter: "5", year: "6" },
|
|
73
|
+
city: { year: "8" }
|
|
74
|
+
};
|
|
75
|
+
function catalogCode(scope, period2) {
|
|
76
|
+
return CATALOG_CODES[scope][period2];
|
|
77
|
+
}
|
|
78
|
+
var CATALOG_CODE_LABELS = {
|
|
79
|
+
"1": "\u5168\u56FD\u6708\u5EA6",
|
|
80
|
+
"2": "\u5168\u56FD\u5B63\u5EA6",
|
|
81
|
+
"3": "\u5168\u56FD\u5E74\u5EA6",
|
|
82
|
+
"4": "\u5206\u7701\u6708\u5EA6",
|
|
83
|
+
"5": "\u5206\u7701\u5B63\u5EA6",
|
|
84
|
+
"6": "\u5206\u7701\u5E74\u5EA6",
|
|
85
|
+
"7": "\u4E3B\u8981\u57CE\u5E02\u6708\u5EA6\u4EF7\u683C",
|
|
86
|
+
"8": "\u4E3B\u8981\u57CE\u5E02\u5E74\u5EA6",
|
|
87
|
+
"9": "\u6E2F\u6FB3\u53F0\u6708\u5EA6"
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// src/errors.ts
|
|
91
|
+
var NbsError = class extends Error {
|
|
92
|
+
code;
|
|
93
|
+
retryable;
|
|
94
|
+
hint;
|
|
95
|
+
details;
|
|
96
|
+
constructor(code, message, options = {}) {
|
|
97
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
98
|
+
this.name = "NbsError";
|
|
99
|
+
this.code = code;
|
|
100
|
+
this.retryable = options.retryable ?? false;
|
|
101
|
+
this.hint = options.hint;
|
|
102
|
+
this.details = options.details;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
function isNbsError(error) {
|
|
106
|
+
return error instanceof NbsError;
|
|
107
|
+
}
|
|
108
|
+
function toQueryError(error) {
|
|
109
|
+
if (isNbsError(error)) {
|
|
110
|
+
return {
|
|
111
|
+
code: error.code,
|
|
112
|
+
message: error.message,
|
|
113
|
+
retryable: error.retryable,
|
|
114
|
+
...error.hint === void 0 ? {} : { hint: error.hint },
|
|
115
|
+
...error.details === void 0 ? {} : { details: error.details }
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
119
|
+
return {
|
|
120
|
+
code: "ABORTED",
|
|
121
|
+
message: "\u67E5\u8BE2\u5DF2\u53D6\u6D88",
|
|
122
|
+
retryable: false,
|
|
123
|
+
hint: "\u5982\u679C\u8FD9\u662F\u8D85\u65F6\u5BFC\u81F4\u7684\uFF0C\u8BF7\u589E\u5927 totalTimeoutMs \u6216\u7A0D\u540E\u91CD\u8BD5\u3002"
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
code: "UPSTREAM_ERROR",
|
|
128
|
+
message: error instanceof Error ? error.message : String(error),
|
|
129
|
+
retryable: true,
|
|
130
|
+
hint: "\u8FD9\u662F\u672A\u9884\u671F\u7684\u9519\u8BEF\uFF1B\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF0C\u6216\u8FD0\u884C CLI \u65F6\u52A0 --debug \u67E5\u770B\u8BE6\u60C5\u3002"
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function invalidArgument(message, hint) {
|
|
134
|
+
return new NbsError("INVALID_ARGUMENT", message, { hint });
|
|
135
|
+
}
|
|
136
|
+
function notFound(message, hint, details) {
|
|
137
|
+
return new NbsError("NOT_FOUND", message, { hint, details });
|
|
138
|
+
}
|
|
139
|
+
function invalidRange(message, hint) {
|
|
140
|
+
return new NbsError("INVALID_RANGE", message, { hint });
|
|
141
|
+
}
|
|
142
|
+
function upstreamBlocked(status, bodySnippet) {
|
|
143
|
+
return new NbsError("UPSTREAM_BLOCKED", `\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE ${status}\uFF0C\u53EF\u80FD\u88AB WAF \u62E6\u622A`, {
|
|
144
|
+
retryable: false,
|
|
145
|
+
hint: "\u4E0D\u8981\u5FAA\u73AF\u91CD\u8BD5\u3002\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u6539\u7528 web \u641C\u7D22\u65B0\u95FB/\u89E3\u8BFB\uFF1B\u4E0D\u8981\u628A\u65E7 EasyQuery \u5F53\u4F5C fallback\u3002",
|
|
146
|
+
details: bodySnippet ? { bodySnippet } : void 0
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function upstreamError(status, message, details) {
|
|
150
|
+
return new NbsError("UPSTREAM_ERROR", message || `\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE ${status}`, {
|
|
151
|
+
retryable: status >= 500 || status === 429,
|
|
152
|
+
hint: "\u63A5\u53E3\u53EF\u80FD\u5904\u4E8E\u8BD5\u8FD0\u884C\u671F\u6216\u4E0D\u7A33\u5B9A\uFF1B\u5DF2\u81EA\u52A8\u91CD\u8BD5\u4E00\u6B21\uFF0C\u4ECD\u5931\u8D25\u53EF\u7A0D\u540E\u518D\u8BD5\u3002",
|
|
153
|
+
details
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function parseError(message, details) {
|
|
157
|
+
return new NbsError("PARSE_ERROR", message, {
|
|
158
|
+
retryable: false,
|
|
159
|
+
hint: "\u63A5\u53E3\u7ED3\u6784\u53EF\u80FD\u5DF2\u6539\u7248\uFF1B\u8BF7\u67E5\u770B docs/contracts.md \u5E76\u7528\u6700\u65B0\u54CD\u5E94\u66F4\u65B0\u89E3\u6790\u5668\u3002",
|
|
160
|
+
details
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function timeoutError(timeoutMs) {
|
|
164
|
+
return new NbsError("TIMEOUT", `\u8BF7\u6C42\u8D85\u65F6\uFF08${timeoutMs}ms\uFF09`, {
|
|
165
|
+
retryable: true,
|
|
166
|
+
hint: "\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u5728\u8BD5\u8FD0\u884C\u671F\u53EF\u80FD\u8F83\u6162\uFF1B\u53EF\u589E\u5927 timeoutMs \u6216\u7A0D\u540E\u91CD\u8BD5\u3002"
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function circuitOpenError(retryAfterMs, failures, path) {
|
|
170
|
+
return new NbsError("CIRCUIT_OPEN", "\u4E0A\u6E38\u8FDE\u7EED\u5931\u8D25\uFF0C\u7194\u65AD\u5668\u5DF2\u6253\u5F00", {
|
|
171
|
+
retryable: true,
|
|
172
|
+
hint: `\u8BF7\u7B49\u5F85\u7EA6 ${Math.ceil(retryAfterMs / 1e3)} \u79D2\u540E\u518D\u8BD5\uFF0C\u6216\u68C0\u67E5\u7F51\u7EDC/\u4EE3\u7406\u914D\u7F6E\u3002`,
|
|
173
|
+
details: {
|
|
174
|
+
path,
|
|
175
|
+
failures,
|
|
176
|
+
retryAfterMs: Math.max(0, Math.ceil(retryAfterMs))
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// src/catalog.ts
|
|
182
|
+
var VALID_CODES = new Set(Object.keys(CATALOG_CODE_LABELS));
|
|
183
|
+
var MAX_NODES = 500;
|
|
184
|
+
function toNode(record) {
|
|
185
|
+
return {
|
|
186
|
+
id: record.id,
|
|
187
|
+
name: record.name,
|
|
188
|
+
level: record.level,
|
|
189
|
+
isLeaf: record.isLeaf,
|
|
190
|
+
parentId: record.parentId,
|
|
191
|
+
startYear: record.startYear,
|
|
192
|
+
endYear: record.endYear
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
async function fetchCatalog(provider, options, code = "3", pid = "", depth = 1) {
|
|
196
|
+
if (!VALID_CODES.has(code)) {
|
|
197
|
+
const available = Object.entries(CATALOG_CODE_LABELS).map(([value, label]) => `${value} ${label}`).join("\u3001");
|
|
198
|
+
throw invalidArgument(`\u4E0D\u652F\u6301\u7684\u5206\u7C7B code\uFF1A${code}`, `\u53EF\u7528\u503C\uFF1A${available}\u3002`);
|
|
199
|
+
}
|
|
200
|
+
const safeDepth = Math.max(1, Math.min(3, Math.floor(depth)));
|
|
201
|
+
const nodes = [];
|
|
202
|
+
const notes = [];
|
|
203
|
+
const queue = [{ pid, level: 1 }];
|
|
204
|
+
while (queue.length > 0 && nodes.length < MAX_NODES) {
|
|
205
|
+
const current = queue.shift();
|
|
206
|
+
if (!current) break;
|
|
207
|
+
const children = await provider.getTree({
|
|
208
|
+
pid: current.pid,
|
|
209
|
+
code,
|
|
210
|
+
signal: options.signal,
|
|
211
|
+
noCache: options.noCache
|
|
212
|
+
});
|
|
213
|
+
for (const child of children) {
|
|
214
|
+
nodes.push(toNode(child));
|
|
215
|
+
if (!child.isLeaf && current.level < safeDepth) {
|
|
216
|
+
queue.push({ pid: child.id, level: current.level + 1 });
|
|
217
|
+
}
|
|
218
|
+
if (nodes.length >= MAX_NODES) break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (nodes.length >= MAX_NODES) {
|
|
222
|
+
notes.push(`\u5206\u7C7B\u6811\u8282\u70B9\u8F83\u591A\uFF0C\u4EC5\u8FD4\u56DE\u524D ${MAX_NODES} \u4E2A\uFF1B\u8BF7\u7528 pid \u7EE7\u7EED\u5C55\u5F00\u3002`);
|
|
223
|
+
}
|
|
224
|
+
return { nodes, notes };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// src/rate-limiter.ts
|
|
228
|
+
function abortError() {
|
|
229
|
+
return new DOMException("The operation was aborted.", "AbortError");
|
|
230
|
+
}
|
|
231
|
+
function sleep(ms, signal) {
|
|
232
|
+
if (ms <= 0) return Promise.resolve();
|
|
233
|
+
return new Promise((resolve, reject) => {
|
|
234
|
+
if (signal?.aborted) {
|
|
235
|
+
reject(abortError());
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const onAbort = () => {
|
|
239
|
+
clearTimeout(timer);
|
|
240
|
+
cleanup();
|
|
241
|
+
reject(abortError());
|
|
242
|
+
};
|
|
243
|
+
const cleanup = () => signal?.removeEventListener("abort", onAbort);
|
|
244
|
+
const timer = setTimeout(() => {
|
|
245
|
+
cleanup();
|
|
246
|
+
resolve();
|
|
247
|
+
}, ms);
|
|
248
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
var RateLimiter = class {
|
|
252
|
+
minIntervalMs;
|
|
253
|
+
jitterMs;
|
|
254
|
+
sleepImpl;
|
|
255
|
+
queueTail = Promise.resolve();
|
|
256
|
+
lastRequestAt = 0;
|
|
257
|
+
constructor(options = {}) {
|
|
258
|
+
this.minIntervalMs = options.minIntervalMs ?? 2e3;
|
|
259
|
+
this.jitterMs = options.jitterMs ?? 250;
|
|
260
|
+
this.sleepImpl = options.sleep ?? sleep;
|
|
261
|
+
}
|
|
262
|
+
async run(fn, signal) {
|
|
263
|
+
const previous = this.queueTail;
|
|
264
|
+
let release;
|
|
265
|
+
this.queueTail = new Promise((resolve) => {
|
|
266
|
+
release = resolve;
|
|
267
|
+
});
|
|
268
|
+
await previous;
|
|
269
|
+
try {
|
|
270
|
+
const elapsed = Date.now() - this.lastRequestAt;
|
|
271
|
+
const wait = this.minIntervalMs + Math.floor(Math.random() * this.jitterMs) - elapsed;
|
|
272
|
+
if (wait > 0) await this.sleepImpl(wait, signal);
|
|
273
|
+
this.lastRequestAt = Date.now();
|
|
274
|
+
return await fn();
|
|
275
|
+
} finally {
|
|
276
|
+
release();
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// src/client.ts
|
|
282
|
+
var DEFAULT_BASE_URL = "https://data.stats.gov.cn/dg/website/publicrelease/web/external";
|
|
283
|
+
var DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Safari/537.36";
|
|
284
|
+
var DEFAULT_TIMEOUT_MS = 2e4;
|
|
285
|
+
var DEFAULT_MAX_RETRIES = 1;
|
|
286
|
+
var DEFAULT_RETRY_DELAY_MS = 5e3;
|
|
287
|
+
function abortError2() {
|
|
288
|
+
return new DOMException("The operation was aborted.", "AbortError");
|
|
289
|
+
}
|
|
290
|
+
function createAbortBundle(parent, timeoutMs) {
|
|
291
|
+
const controller = new AbortController();
|
|
292
|
+
let timedOut = false;
|
|
293
|
+
const onParentAbort = () => controller.abort(abortError2());
|
|
294
|
+
if (parent) {
|
|
295
|
+
if (parent.aborted) controller.abort(abortError2());
|
|
296
|
+
else parent.addEventListener("abort", onParentAbort, { once: true });
|
|
297
|
+
}
|
|
298
|
+
const timer = setTimeout(() => {
|
|
299
|
+
timedOut = true;
|
|
300
|
+
controller.abort(new DOMException("Request timed out.", "TimeoutError"));
|
|
301
|
+
}, timeoutMs);
|
|
302
|
+
return {
|
|
303
|
+
signal: controller.signal,
|
|
304
|
+
timedOut: () => timedOut,
|
|
305
|
+
cleanup: () => {
|
|
306
|
+
clearTimeout(timer);
|
|
307
|
+
parent?.removeEventListener("abort", onParentAbort);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function joinUrl(baseUrl, path) {
|
|
312
|
+
return `${baseUrl.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
313
|
+
}
|
|
314
|
+
function buildUrl(baseUrl, path, query2) {
|
|
315
|
+
const url = new URL(joinUrl(baseUrl, path));
|
|
316
|
+
if (query2) {
|
|
317
|
+
for (const [key, value] of Object.entries(query2)) {
|
|
318
|
+
if (value === void 0 || value === "") continue;
|
|
319
|
+
url.searchParams.set(key, String(value));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return url.toString();
|
|
323
|
+
}
|
|
324
|
+
var NbsClient = class {
|
|
325
|
+
baseUrl;
|
|
326
|
+
cache;
|
|
327
|
+
userAgent;
|
|
328
|
+
timeoutMs;
|
|
329
|
+
jitterMs;
|
|
330
|
+
maxRetries;
|
|
331
|
+
retryDelayMs;
|
|
332
|
+
fetchImpl;
|
|
333
|
+
dispatcher;
|
|
334
|
+
logger;
|
|
335
|
+
sleepImpl;
|
|
336
|
+
limiter;
|
|
337
|
+
circuitEnabled;
|
|
338
|
+
circuitFailureThreshold;
|
|
339
|
+
circuitCooldownMs;
|
|
340
|
+
now;
|
|
341
|
+
consecutiveFailures = 0;
|
|
342
|
+
circuitOpenedAt = null;
|
|
343
|
+
constructor(options = {}) {
|
|
344
|
+
this.baseUrl = options.baseUrl ?? DEFAULT_BASE_URL;
|
|
345
|
+
this.userAgent = options.userAgent ?? DEFAULT_USER_AGENT;
|
|
346
|
+
this.timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
347
|
+
this.jitterMs = options.jitterMs ?? 250;
|
|
348
|
+
this.maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
349
|
+
this.retryDelayMs = options.retryDelayMs ?? DEFAULT_RETRY_DELAY_MS;
|
|
350
|
+
this.cache = options.cache ?? new TtlCache();
|
|
351
|
+
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
352
|
+
this.dispatcher = options.dispatcher;
|
|
353
|
+
this.logger = options.logger;
|
|
354
|
+
this.sleepImpl = options.sleep ?? sleep;
|
|
355
|
+
const circuit = options.circuitBreaker === false ? void 0 : options.circuitBreaker ?? {};
|
|
356
|
+
this.circuitEnabled = circuit !== void 0;
|
|
357
|
+
this.circuitFailureThreshold = Math.max(1, circuit?.failureThreshold ?? 5);
|
|
358
|
+
this.circuitCooldownMs = Math.max(0, circuit?.cooldownMs ?? 3e4);
|
|
359
|
+
this.now = options.now ?? Date.now;
|
|
360
|
+
this.limiter = options.limiter ?? new RateLimiter({
|
|
361
|
+
minIntervalMs: options.minIntervalMs,
|
|
362
|
+
jitterMs: options.jitterMs,
|
|
363
|
+
sleep: options.sleep
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
async request(path, options = {}) {
|
|
367
|
+
const cacheKey = options.cacheKey;
|
|
368
|
+
const ttl = options.cacheTtlMs ?? 0;
|
|
369
|
+
if (cacheKey && ttl > 0) {
|
|
370
|
+
return this.cache.getOrLoad(cacheKey, ttl, () => this.requestWithRetry(path, options), {
|
|
371
|
+
noCache: options.noCache
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
return this.requestWithRetry(path, options);
|
|
375
|
+
}
|
|
376
|
+
async requestWithRetry(path, options) {
|
|
377
|
+
this.assertCircuitClosed(path);
|
|
378
|
+
let lastError;
|
|
379
|
+
for (let attempt = 0; attempt <= this.maxRetries; attempt += 1) {
|
|
380
|
+
try {
|
|
381
|
+
const result = await this.limiter.run(
|
|
382
|
+
() => this.requestOnce(path, options),
|
|
383
|
+
options.signal
|
|
384
|
+
);
|
|
385
|
+
this.consecutiveFailures = 0;
|
|
386
|
+
return result;
|
|
387
|
+
} catch (error) {
|
|
388
|
+
lastError = error;
|
|
389
|
+
const retryable = error instanceof NbsError && error.retryable;
|
|
390
|
+
if (!retryable || attempt >= this.maxRetries || options.signal?.aborted) {
|
|
391
|
+
this.recordFailure(error);
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
const wait = this.retryDelayMs + Math.floor(Math.random() * this.jitterMs);
|
|
395
|
+
this.logger?.("retrying request", { path, attempt: attempt + 1, wait });
|
|
396
|
+
await this.sleepImpl(wait, options.signal);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
throw lastError;
|
|
400
|
+
}
|
|
401
|
+
assertCircuitClosed(path) {
|
|
402
|
+
if (!this.circuitEnabled || this.circuitOpenedAt === null) return;
|
|
403
|
+
const elapsed = this.now() - this.circuitOpenedAt;
|
|
404
|
+
if (elapsed >= this.circuitCooldownMs) {
|
|
405
|
+
this.circuitOpenedAt = null;
|
|
406
|
+
this.consecutiveFailures = Math.max(0, this.circuitFailureThreshold - 1);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
throw circuitOpenError(this.circuitCooldownMs - elapsed, this.consecutiveFailures, path);
|
|
410
|
+
}
|
|
411
|
+
recordFailure(error) {
|
|
412
|
+
if (!this.circuitEnabled) return;
|
|
413
|
+
if (!(error instanceof NbsError) || !error.retryable) return;
|
|
414
|
+
this.consecutiveFailures += 1;
|
|
415
|
+
if (this.consecutiveFailures >= this.circuitFailureThreshold && this.circuitOpenedAt === null) {
|
|
416
|
+
this.circuitOpenedAt = this.now();
|
|
417
|
+
this.logger?.("circuit opened", { failures: this.consecutiveFailures });
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
async requestOnce(path, options) {
|
|
421
|
+
const url = buildUrl(this.baseUrl, path, options.query);
|
|
422
|
+
const method = options.method ?? "GET";
|
|
423
|
+
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
424
|
+
const bundle = createAbortBundle(options.signal, timeoutMs);
|
|
425
|
+
const headers = {
|
|
426
|
+
Accept: "application/json, text/plain, */*",
|
|
427
|
+
Referer: "https://data.stats.gov.cn/",
|
|
428
|
+
"User-Agent": this.userAgent,
|
|
429
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
430
|
+
"X-Client-Name": "china-nbs",
|
|
431
|
+
...options.headers
|
|
432
|
+
};
|
|
433
|
+
let body;
|
|
434
|
+
if (options.body !== void 0) {
|
|
435
|
+
body = JSON.stringify(options.body);
|
|
436
|
+
headers["Content-Type"] = "application/json;charset=UTF-8";
|
|
437
|
+
}
|
|
438
|
+
this.logger?.("request", { method, url, body });
|
|
439
|
+
try {
|
|
440
|
+
let response;
|
|
441
|
+
try {
|
|
442
|
+
const init = {
|
|
443
|
+
method,
|
|
444
|
+
headers,
|
|
445
|
+
body,
|
|
446
|
+
signal: bundle.signal
|
|
447
|
+
};
|
|
448
|
+
if (this.dispatcher !== void 0) {
|
|
449
|
+
init.dispatcher = this.dispatcher;
|
|
450
|
+
}
|
|
451
|
+
response = await this.fetchImpl(url, init);
|
|
452
|
+
} catch (error) {
|
|
453
|
+
if (bundle.timedOut()) throw timeoutError(timeoutMs);
|
|
454
|
+
if (options.signal?.aborted) {
|
|
455
|
+
throw new NbsError("ABORTED", "\u67E5\u8BE2\u5DF2\u53D6\u6D88", { retryable: false });
|
|
456
|
+
}
|
|
457
|
+
throw error;
|
|
458
|
+
}
|
|
459
|
+
const text = await response.text();
|
|
460
|
+
if (response.status === 403) throw upstreamBlocked(response.status, text.slice(0, 300));
|
|
461
|
+
if (response.status === 429) {
|
|
462
|
+
throw new NbsError("UPSTREAM_RATE_LIMITED", "\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE 429", {
|
|
463
|
+
retryable: true,
|
|
464
|
+
hint: "\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\uFF1B\u8BF7\u7B49\u5F85\u540E\u91CD\u8BD5\u3002",
|
|
465
|
+
details: { status: response.status }
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
if (response.status >= 500) {
|
|
469
|
+
throw upstreamError(response.status, `\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE ${response.status}`, {
|
|
470
|
+
bodySnippet: text.slice(0, 300)
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
if (!response.ok) {
|
|
474
|
+
throw new NbsError("UPSTREAM_ERROR", `\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE ${response.status}`, {
|
|
475
|
+
retryable: false,
|
|
476
|
+
hint: "\u63A5\u53E3\u8DEF\u5F84\u53EF\u80FD\u5DF2\u53D8\u5316\uFF1B\u8BF7\u67E5\u770B docs/contracts.md\u3002",
|
|
477
|
+
details: { status: response.status, bodySnippet: text.slice(0, 300) }
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
let parsed;
|
|
481
|
+
try {
|
|
482
|
+
parsed = JSON.parse(text);
|
|
483
|
+
} catch {
|
|
484
|
+
throw parseError("\u63A5\u53E3\u8FD4\u56DE\u7684\u4E0D\u662F JSON", {
|
|
485
|
+
status: response.status,
|
|
486
|
+
contentType: response.headers.get("content-type"),
|
|
487
|
+
bodySnippet: text.slice(0, 300)
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
if (!parsed || typeof parsed !== "object") {
|
|
491
|
+
throw parseError("\u63A5\u53E3\u8FD4\u56DE\u7ED3\u6784\u4E0D\u662F\u5BF9\u8C61", { bodySnippet: text.slice(0, 300) });
|
|
492
|
+
}
|
|
493
|
+
const envelope = parsed;
|
|
494
|
+
if (envelope.success === false) {
|
|
495
|
+
throw upstreamError(response.status, envelope.message || "\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25", {
|
|
496
|
+
state: envelope.state
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
if (envelope.state !== void 0 && envelope.state !== 2e4) {
|
|
500
|
+
throw upstreamError(response.status, envelope.message || `\u63A5\u53E3\u72B6\u6001\u7801 ${envelope.state}`, {
|
|
501
|
+
state: envelope.state
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
if (!("data" in envelope)) {
|
|
505
|
+
throw parseError("\u63A5\u53E3\u8FD4\u56DE\u7F3A\u5C11 data \u5B57\u6BB5", { bodySnippet: text.slice(0, 300) });
|
|
506
|
+
}
|
|
507
|
+
return envelope.data;
|
|
508
|
+
} catch (error) {
|
|
509
|
+
if (bundle.timedOut()) throw timeoutError(timeoutMs);
|
|
510
|
+
throw error;
|
|
511
|
+
} finally {
|
|
512
|
+
bundle.cleanup();
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
// src/aliases.ts
|
|
518
|
+
var ALIASES = {
|
|
519
|
+
gdp: ["\u56FD\u5185\u751F\u4EA7\u603B\u503C", "\u5730\u533A\u751F\u4EA7\u603B\u503C", "\u7ECF\u6D4E\u603B\u91CF"],
|
|
520
|
+
cpi: ["\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570", "\u6D88\u8D39\u4EF7\u683C\u6307\u6570"],
|
|
521
|
+
ppi: ["\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u751F\u4EA7\u8005\u4EF7\u683C\u6307\u6570"],
|
|
522
|
+
\u793E\u96F6: ["\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D", "\u96F6\u552E\u603B\u989D"],
|
|
523
|
+
\u56FA\u6295: ["\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44", "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u989D"],
|
|
524
|
+
\u4EBA\u53E3: ["\u5E38\u4F4F\u4EBA\u53E3", "\u5E74\u672B\u603B\u4EBA\u53E3", "\u603B\u4EBA\u53E3"],
|
|
525
|
+
\u5931\u4E1A\u7387: ["\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387", "\u8C03\u67E5\u5931\u4E1A\u7387"],
|
|
526
|
+
\u6536\u5165: ["\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u53EF\u652F\u914D\u6536\u5165"],
|
|
527
|
+
\u5C45\u6C11\u6536\u5165: ["\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"],
|
|
528
|
+
\u5DE5\u4E1A\u589E\u52A0\u503C: ["\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C", "\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C"],
|
|
529
|
+
\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C: ["\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C", "\u5DE5\u4E1A\u589E\u52A0\u503C"],
|
|
530
|
+
\u8D22\u653F\u6536\u5165: ["\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165", "\u5730\u65B9\u8D22\u653F\u6536\u5165"],
|
|
531
|
+
\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165: ["\u5730\u65B9\u8D22\u653F\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165", "\u8D22\u653F\u6536\u5165"],
|
|
532
|
+
\u7CAE\u98DF: ["\u7CAE\u98DF\u4EA7\u91CF", "\u7CAE\u98DF\u603B\u4EA7\u91CF"],
|
|
533
|
+
\u7CAE\u98DF\u4EA7\u91CF: ["\u7CAE\u98DF\u603B\u4EA7\u91CF"],
|
|
534
|
+
\u8FDB\u51FA\u53E3: ["\u8D27\u7269\u8FDB\u51FA\u53E3\u603B\u989D", "\u8FDB\u51FA\u53E3\u603B\u989D", "\u5916\u8D38\u603B\u989D"],
|
|
535
|
+
\u623F\u5730\u4EA7: ["\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44", "\u623F\u5730\u4EA7\u6295\u8D44"],
|
|
536
|
+
\u5EFA\u7B51\u4E1A: ["\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u4EA7\u503C"],
|
|
537
|
+
\u519C\u4E1A: ["\u519C\u6797\u7267\u6E14\u4E1A\u603B\u4EA7\u503C", "\u519C\u4E1A\u603B\u4EA7\u503C"],
|
|
538
|
+
\u80FD\u6E90: ["\u80FD\u6E90\u751F\u4EA7\u603B\u91CF"]
|
|
539
|
+
};
|
|
540
|
+
var STOP_WORDS = /* @__PURE__ */ new Set([
|
|
541
|
+
"\u4E2D\u56FD",
|
|
542
|
+
"\u5168\u56FD",
|
|
543
|
+
"\u56FD\u5BB6",
|
|
544
|
+
"\u7EDF\u8BA1",
|
|
545
|
+
"\u7EDF\u8BA1\u5C40",
|
|
546
|
+
"\u6570\u636E",
|
|
547
|
+
"\u6700\u65B0",
|
|
548
|
+
"\u4ECA\u5E74",
|
|
549
|
+
"\u53BB\u5E74",
|
|
550
|
+
"\u5168\u5E74",
|
|
551
|
+
"\u5E74\u5EA6",
|
|
552
|
+
"\u5B63\u5EA6",
|
|
553
|
+
"\u6708\u5EA6",
|
|
554
|
+
"\u6708\u4EFD",
|
|
555
|
+
"\u591A\u5C11",
|
|
556
|
+
"\u662F\u591A\u5C11",
|
|
557
|
+
"\u67E5\u8BE2",
|
|
558
|
+
"\u67E5",
|
|
559
|
+
"\u4E00\u4E0B",
|
|
560
|
+
"\u7684",
|
|
561
|
+
"\u4E86",
|
|
562
|
+
"\u5417",
|
|
563
|
+
"\u5462",
|
|
564
|
+
"\u548C",
|
|
565
|
+
"\u4E0E",
|
|
566
|
+
"\u53CA",
|
|
567
|
+
"\u8BF7",
|
|
568
|
+
"\u5E2E\u6211",
|
|
569
|
+
"\u770B\u770B"
|
|
570
|
+
]);
|
|
571
|
+
function normalize(text) {
|
|
572
|
+
return text.toLowerCase().replace(/[((][^))]*[))]/g, "").replace(/[\s,,.。;;::、!?!?"'“”‘’\-_/\\|]/g, "").replace(/[年月日]/g, "").trim();
|
|
573
|
+
}
|
|
574
|
+
function expandAliases(query2) {
|
|
575
|
+
const normalized = normalize(query2);
|
|
576
|
+
const result = /* @__PURE__ */ new Set();
|
|
577
|
+
if (normalized) result.add(normalized);
|
|
578
|
+
for (const [key, values] of Object.entries(ALIASES)) {
|
|
579
|
+
const normalizedKey = normalize(key);
|
|
580
|
+
if (normalized === normalizedKey || normalized.includes(normalizedKey) || normalizedKey.includes(normalized)) {
|
|
581
|
+
for (const value of values) result.add(normalize(value));
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return [...result].filter(Boolean);
|
|
585
|
+
}
|
|
586
|
+
function queryTokens(query2) {
|
|
587
|
+
const tokens = /* @__PURE__ */ new Set();
|
|
588
|
+
for (const part of query2.split(/[\s,,.。;;::、!?!?"'“”‘’\-_/\\|]+/)) {
|
|
589
|
+
const normalized = normalize(part);
|
|
590
|
+
if (normalized.length >= 2 && !STOP_WORDS.has(normalized)) tokens.add(normalized);
|
|
591
|
+
}
|
|
592
|
+
const whole = normalize(query2);
|
|
593
|
+
if (whole.length >= 2 && !STOP_WORDS.has(whole)) tokens.add(whole);
|
|
594
|
+
return [...tokens];
|
|
595
|
+
}
|
|
596
|
+
function stripRegion(query2, regionNames2) {
|
|
597
|
+
let result = query2;
|
|
598
|
+
for (const name of regionNames2) {
|
|
599
|
+
const short = name.replace(/(省|市|自治区|特别行政区|壮族|回族|维吾尔|藏族|蒙古)/g, "");
|
|
600
|
+
for (const candidate of [name, short]) {
|
|
601
|
+
if (candidate.length >= 2) {
|
|
602
|
+
result = result.replace(new RegExp(candidate, "g"), " ");
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return result.replace(/\s+/g, " ").trim();
|
|
607
|
+
}
|
|
608
|
+
var MEASURE_TERMS = {
|
|
609
|
+
growth: ["\u589E\u901F", "\u589E\u957F", "\u540C\u6BD4", "\u73AF\u6BD4", "\u6DA8\u5E45", "\u4E0B\u8DCC", "\u4E0B\u964D"],
|
|
610
|
+
index: ["\u6307\u6570", "\u4E0A\u5E74=100", "\u4E0A\u5E74\u540C\u6708=100", "\u4E0A\u5E74\u540C\u671F=100", "\u5B9A\u57FA"],
|
|
611
|
+
perCapita: ["\u4EBA\u5747", "\u6BCF\u4EBA"],
|
|
612
|
+
contribution: ["\u8D21\u732E\u7387", "\u62C9\u52A8", "\u6784\u6210", "\u5360\u6BD4"],
|
|
613
|
+
cumulative: ["\u7D2F\u8BA1", "\u5E74\u521D\u81F3\u4ECA"],
|
|
614
|
+
current: ["\u5F53\u5B63", "\u5F53\u6708", "\u5355\u5B63"],
|
|
615
|
+
constantPrice: ["\u4E0D\u53D8\u4EF7", "\u53EF\u6BD4\u4EF7"]};
|
|
616
|
+
function hasAny(text, terms) {
|
|
617
|
+
const normalized = normalize(text);
|
|
618
|
+
return terms.some((term) => normalized.includes(normalize(term)));
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// src/cities.ts
|
|
622
|
+
var CITIES = [
|
|
623
|
+
{ text: "\u77F3\u5BB6\u5E84\u5E02", value: "130100000000", aliases: ["\u77F3\u5BB6\u5E84"], scope: "city" },
|
|
624
|
+
{ text: "\u592A\u539F\u5E02", value: "140100000000", aliases: ["\u592A\u539F"], scope: "city" },
|
|
625
|
+
{ text: "\u547C\u548C\u6D69\u7279\u5E02", value: "150100000000", aliases: ["\u547C\u548C\u6D69\u7279"], scope: "city" },
|
|
626
|
+
{ text: "\u6C88\u9633\u5E02", value: "210100000000", aliases: ["\u6C88\u9633"], scope: "city" },
|
|
627
|
+
{ text: "\u5927\u8FDE\u5E02", value: "210200000000", aliases: ["\u5927\u8FDE"], scope: "city" },
|
|
628
|
+
{ text: "\u957F\u6625\u5E02", value: "220100000000", aliases: ["\u957F\u6625"], scope: "city" },
|
|
629
|
+
{ text: "\u54C8\u5C14\u6EE8\u5E02", value: "230100000000", aliases: ["\u54C8\u5C14\u6EE8"], scope: "city" },
|
|
630
|
+
{ text: "\u5357\u4EAC\u5E02", value: "320100000000", aliases: ["\u5357\u4EAC"], scope: "city" },
|
|
631
|
+
{ text: "\u676D\u5DDE\u5E02", value: "330100000000", aliases: ["\u676D\u5DDE"], scope: "city" },
|
|
632
|
+
{ text: "\u5B81\u6CE2\u5E02", value: "330200000000", aliases: ["\u5B81\u6CE2"], scope: "city" },
|
|
633
|
+
{ text: "\u5408\u80A5\u5E02", value: "340100000000", aliases: ["\u5408\u80A5"], scope: "city" },
|
|
634
|
+
{ text: "\u798F\u5DDE\u5E02", value: "350100000000", aliases: ["\u798F\u5DDE"], scope: "city" },
|
|
635
|
+
{ text: "\u53A6\u95E8\u5E02", value: "350200000000", aliases: ["\u53A6\u95E8"], scope: "city" },
|
|
636
|
+
{ text: "\u5357\u660C\u5E02", value: "360100000000", aliases: ["\u5357\u660C"], scope: "city" },
|
|
637
|
+
{ text: "\u6D4E\u5357\u5E02", value: "370100000000", aliases: ["\u6D4E\u5357"], scope: "city" },
|
|
638
|
+
{ text: "\u9752\u5C9B\u5E02", value: "370200000000", aliases: ["\u9752\u5C9B"], scope: "city" },
|
|
639
|
+
{ text: "\u90D1\u5DDE\u5E02", value: "410100000000", aliases: ["\u90D1\u5DDE"], scope: "city" },
|
|
640
|
+
{ text: "\u6B66\u6C49\u5E02", value: "420100000000", aliases: ["\u6B66\u6C49"], scope: "city" },
|
|
641
|
+
{ text: "\u957F\u6C99\u5E02", value: "430100000000", aliases: ["\u957F\u6C99"], scope: "city" },
|
|
642
|
+
{ text: "\u5E7F\u5DDE\u5E02", value: "440100000000", aliases: ["\u5E7F\u5DDE"], scope: "city" },
|
|
643
|
+
{ text: "\u6DF1\u5733\u5E02", value: "440300000000", aliases: ["\u6DF1\u5733"], scope: "city" },
|
|
644
|
+
{ text: "\u5357\u5B81\u5E02", value: "450100000000", aliases: ["\u5357\u5B81"], scope: "city" },
|
|
645
|
+
{ text: "\u6D77\u53E3\u5E02", value: "460100000000", aliases: ["\u6D77\u53E3"], scope: "city" },
|
|
646
|
+
{ text: "\u6210\u90FD\u5E02", value: "510100000000", aliases: ["\u6210\u90FD"], scope: "city" },
|
|
647
|
+
{ text: "\u8D35\u9633\u5E02", value: "520100000000", aliases: ["\u8D35\u9633"], scope: "city" },
|
|
648
|
+
{ text: "\u6606\u660E\u5E02", value: "530100000000", aliases: ["\u6606\u660E"], scope: "city" },
|
|
649
|
+
{ text: "\u62C9\u8428\u5E02", value: "540100000000", aliases: ["\u62C9\u8428"], scope: "city" },
|
|
650
|
+
{ text: "\u897F\u5B89\u5E02", value: "610100000000", aliases: ["\u897F\u5B89"], scope: "city" },
|
|
651
|
+
{ text: "\u5170\u5DDE\u5E02", value: "620100000000", aliases: ["\u5170\u5DDE"], scope: "city" },
|
|
652
|
+
{ text: "\u897F\u5B81\u5E02", value: "630100000000", aliases: ["\u897F\u5B81"], scope: "city" },
|
|
653
|
+
{ text: "\u94F6\u5DDD\u5E02", value: "640100000000", aliases: ["\u94F6\u5DDD"], scope: "city" },
|
|
654
|
+
{ text: "\u4E4C\u9C81\u6728\u9F50\u5E02", value: "650100000000", aliases: ["\u4E4C\u9C81\u6728\u9F50"], scope: "city" }
|
|
655
|
+
];
|
|
656
|
+
|
|
657
|
+
// src/regions.ts
|
|
658
|
+
var NATIONAL_REGION = {
|
|
659
|
+
text: "\u5168\u56FD",
|
|
660
|
+
value: "000000000000",
|
|
661
|
+
aliases: ["\u5168\u56FD", "\u4E2D\u56FD", "\u56FD\u5BB6", "\u5168\u56FD\u5408\u8BA1"],
|
|
662
|
+
national: true,
|
|
663
|
+
scope: "national"
|
|
664
|
+
};
|
|
665
|
+
var PROVINCES = [
|
|
666
|
+
{ text: "\u5317\u4EAC\u5E02", value: "110000000000", aliases: ["\u5317\u4EAC"] },
|
|
667
|
+
{ text: "\u5929\u6D25\u5E02", value: "120000000000", aliases: ["\u5929\u6D25"] },
|
|
668
|
+
{ text: "\u6CB3\u5317\u7701", value: "130000000000", aliases: ["\u6CB3\u5317"] },
|
|
669
|
+
{ text: "\u5C71\u897F\u7701", value: "140000000000", aliases: ["\u5C71\u897F"] },
|
|
670
|
+
{ text: "\u5185\u8499\u53E4\u81EA\u6CBB\u533A", value: "150000000000", aliases: ["\u5185\u8499\u53E4", "\u5185\u8499"] },
|
|
671
|
+
{ text: "\u8FBD\u5B81\u7701", value: "210000000000", aliases: ["\u8FBD\u5B81"] },
|
|
672
|
+
{ text: "\u5409\u6797\u7701", value: "220000000000", aliases: ["\u5409\u6797"] },
|
|
673
|
+
{ text: "\u9ED1\u9F99\u6C5F\u7701", value: "230000000000", aliases: ["\u9ED1\u9F99\u6C5F"] },
|
|
674
|
+
{ text: "\u4E0A\u6D77\u5E02", value: "310000000000", aliases: ["\u4E0A\u6D77"] },
|
|
675
|
+
{ text: "\u6C5F\u82CF\u7701", value: "320000000000", aliases: ["\u6C5F\u82CF"] },
|
|
676
|
+
{ text: "\u6D59\u6C5F\u7701", value: "330000000000", aliases: ["\u6D59\u6C5F"] },
|
|
677
|
+
{ text: "\u5B89\u5FBD\u7701", value: "340000000000", aliases: ["\u5B89\u5FBD"] },
|
|
678
|
+
{ text: "\u798F\u5EFA\u7701", value: "350000000000", aliases: ["\u798F\u5EFA"] },
|
|
679
|
+
{ text: "\u6C5F\u897F\u7701", value: "360000000000", aliases: ["\u6C5F\u897F"] },
|
|
680
|
+
{ text: "\u5C71\u4E1C\u7701", value: "370000000000", aliases: ["\u5C71\u4E1C"] },
|
|
681
|
+
{ text: "\u6CB3\u5357\u7701", value: "410000000000", aliases: ["\u6CB3\u5357"] },
|
|
682
|
+
{ text: "\u6E56\u5317\u7701", value: "420000000000", aliases: ["\u6E56\u5317"] },
|
|
683
|
+
{ text: "\u6E56\u5357\u7701", value: "430000000000", aliases: ["\u6E56\u5357"] },
|
|
684
|
+
{ text: "\u5E7F\u4E1C\u7701", value: "440000000000", aliases: ["\u5E7F\u4E1C"] },
|
|
685
|
+
{ text: "\u5E7F\u897F\u58EE\u65CF\u81EA\u6CBB\u533A", value: "450000000000", aliases: ["\u5E7F\u897F"] },
|
|
686
|
+
{ text: "\u6D77\u5357\u7701", value: "460000000000", aliases: ["\u6D77\u5357"] },
|
|
687
|
+
{ text: "\u91CD\u5E86\u5E02", value: "500000000000", aliases: ["\u91CD\u5E86"] },
|
|
688
|
+
{ text: "\u56DB\u5DDD\u7701", value: "510000000000", aliases: ["\u56DB\u5DDD"] },
|
|
689
|
+
{ text: "\u8D35\u5DDE\u7701", value: "520000000000", aliases: ["\u8D35\u5DDE"] },
|
|
690
|
+
{ text: "\u4E91\u5357\u7701", value: "530000000000", aliases: ["\u4E91\u5357"] },
|
|
691
|
+
{ text: "\u897F\u85CF\u81EA\u6CBB\u533A", value: "540000000000", aliases: ["\u897F\u85CF"] },
|
|
692
|
+
{ text: "\u9655\u897F\u7701", value: "610000000000", aliases: ["\u9655\u897F"] },
|
|
693
|
+
{ text: "\u7518\u8083\u7701", value: "620000000000", aliases: ["\u7518\u8083"] },
|
|
694
|
+
{ text: "\u9752\u6D77\u7701", value: "630000000000", aliases: ["\u9752\u6D77"] },
|
|
695
|
+
{ text: "\u5B81\u590F\u56DE\u65CF\u81EA\u6CBB\u533A", value: "640000000000", aliases: ["\u5B81\u590F"] },
|
|
696
|
+
{ text: "\u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A", value: "650000000000", aliases: ["\u65B0\u7586"] },
|
|
697
|
+
{ text: "\u53F0\u6E7E\u7701", value: "710000000000", aliases: ["\u53F0\u6E7E"] },
|
|
698
|
+
{ text: "\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A", value: "810000000000", aliases: ["\u9999\u6E2F"] },
|
|
699
|
+
{ text: "\u6FB3\u95E8\u7279\u522B\u884C\u653F\u533A", value: "820000000000", aliases: ["\u6FB3\u95E8"] }
|
|
700
|
+
];
|
|
701
|
+
var CITIES2 = CITIES.map((city) => ({
|
|
702
|
+
text: city.text,
|
|
703
|
+
value: city.value,
|
|
704
|
+
aliases: [...city.aliases],
|
|
705
|
+
scope: "city"
|
|
706
|
+
}));
|
|
707
|
+
var ALL_REGIONS = [NATIONAL_REGION, ...PROVINCES, ...CITIES2];
|
|
708
|
+
function scopeOf(region2) {
|
|
709
|
+
return region2.scope ?? (region2.national ? "national" : "province");
|
|
710
|
+
}
|
|
711
|
+
function regionNames() {
|
|
712
|
+
return ALL_REGIONS.flatMap((region2) => [region2.text, ...region2.aliases]);
|
|
713
|
+
}
|
|
714
|
+
function resolveRegion(input) {
|
|
715
|
+
if (!input?.trim()) return NATIONAL_REGION;
|
|
716
|
+
const normalized = normalize(input);
|
|
717
|
+
for (const region2 of ALL_REGIONS) {
|
|
718
|
+
if (normalize(region2.text) === normalized) return region2;
|
|
719
|
+
if (region2.aliases.some((alias) => normalize(alias) === normalized)) return region2;
|
|
720
|
+
}
|
|
721
|
+
const candidates = ALL_REGIONS.filter((region2) => {
|
|
722
|
+
const names = [region2.text, ...region2.aliases].map(normalize);
|
|
723
|
+
return names.some((name) => normalized.includes(name) || name.includes(normalized));
|
|
724
|
+
});
|
|
725
|
+
if (candidates.length === 1) return candidates[0];
|
|
726
|
+
return void 0;
|
|
727
|
+
}
|
|
728
|
+
function inferRegionFromText(text) {
|
|
729
|
+
if (!text?.trim()) return void 0;
|
|
730
|
+
const normalized = normalize(text);
|
|
731
|
+
const matches = ALL_REGIONS.filter(
|
|
732
|
+
(region2) => !region2.national && [region2.text, ...region2.aliases].some((name) => normalized.includes(normalize(name)))
|
|
733
|
+
);
|
|
734
|
+
const city = matches.find((region2) => region2.scope === "city");
|
|
735
|
+
if (city) return city;
|
|
736
|
+
return matches.length === 1 ? matches[0] : void 0;
|
|
737
|
+
}
|
|
738
|
+
function regionSuggestions(input) {
|
|
739
|
+
const normalized = normalize(input);
|
|
740
|
+
return ALL_REGIONS.filter(
|
|
741
|
+
(region2) => [region2.text, ...region2.aliases].some((name) => {
|
|
742
|
+
const candidate = normalize(name);
|
|
743
|
+
return candidate.includes(normalized) || normalized.includes(candidate);
|
|
744
|
+
})
|
|
745
|
+
).slice(0, 6).map((region2) => region2.text);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/curated.ts
|
|
749
|
+
var CURATED = [
|
|
750
|
+
{
|
|
751
|
+
key: "gdp-year-national",
|
|
752
|
+
aliases: [
|
|
753
|
+
"GDP",
|
|
754
|
+
"GDP\u603B\u91CF",
|
|
755
|
+
"GDP\u73B0\u4EF7",
|
|
756
|
+
"\u4E2D\u56FDGDP",
|
|
757
|
+
"\u56FD\u5185\u751F\u4EA7\u603B\u503C",
|
|
758
|
+
"\u4E2D\u56FD\u7ECF\u6D4E",
|
|
759
|
+
"\u7ECF\u6D4E\u603B\u91CF",
|
|
760
|
+
"\u751F\u4EA7\u603B\u503C"
|
|
761
|
+
],
|
|
762
|
+
name: "\u56FD\u5185\u751F\u4EA7\u603B\u503C",
|
|
763
|
+
displayName: "\u56FD\u5185\u751F\u4EA7\u603B\u503C (\u4EBF\u5143)",
|
|
764
|
+
unit: "\u4EBF\u5143",
|
|
765
|
+
frequency: "year",
|
|
766
|
+
regionScope: "national",
|
|
767
|
+
measure: "\u73B0\u4EF7\u603B\u91CF",
|
|
768
|
+
cid: "f7fd25aaad184414875632cf2327da60",
|
|
769
|
+
indicId: "7dc6a2ee6c614960b7059991e0cc4d96"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
key: "gdp-quarter-cumulative",
|
|
773
|
+
aliases: [
|
|
774
|
+
"GDP\u7D2F\u8BA1",
|
|
775
|
+
"GDP\u7D2F\u8BA1\u503C",
|
|
776
|
+
"\u56FD\u5185\u751F\u4EA7\u603B\u503C",
|
|
777
|
+
"\u56FD\u5185\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1",
|
|
778
|
+
"\u56FD\u5185\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C",
|
|
779
|
+
"\u751F\u4EA7\u603B\u503C",
|
|
780
|
+
"GDP"
|
|
781
|
+
],
|
|
782
|
+
name: "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C",
|
|
783
|
+
displayName: "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
784
|
+
unit: "\u4EBF\u5143",
|
|
785
|
+
frequency: "quarter",
|
|
786
|
+
regionScope: "national",
|
|
787
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
788
|
+
cid: "28d936104e304aa191e338eb82b6dc09",
|
|
789
|
+
indicId: "8c5fab362d124fa7b91af833b3bd7397"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
key: "gdp-quarter-province",
|
|
793
|
+
aliases: [
|
|
794
|
+
"GDP",
|
|
795
|
+
"GDP\u7D2F\u8BA1",
|
|
796
|
+
"GDP\u7D2F\u8BA1\u503C",
|
|
797
|
+
"\u56FD\u5185\u751F\u4EA7\u603B\u503C",
|
|
798
|
+
"\u5730\u533A\u751F\u4EA7\u603B\u503C",
|
|
799
|
+
"\u5730\u533A\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1",
|
|
800
|
+
"\u5730\u533A\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C",
|
|
801
|
+
"\u751F\u4EA7\u603B\u503C",
|
|
802
|
+
"\u7ECF\u6D4E\u603B\u91CF"
|
|
803
|
+
],
|
|
804
|
+
name: "\u5730\u533A\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C",
|
|
805
|
+
displayName: "\u5730\u533A\u751F\u4EA7\u603B\u503C\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
806
|
+
unit: "\u4EBF\u5143",
|
|
807
|
+
frequency: "quarter",
|
|
808
|
+
regionScope: "province",
|
|
809
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
810
|
+
cid: "44ecf9ea21884caea5451c35e9c08fff",
|
|
811
|
+
indicId: "dc168397231c49f391ee9e11966de389"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
key: "gdp-quarter-current",
|
|
815
|
+
aliases: ["GDP\u5F53\u5B63", "GDP\u5F53\u5B63\u503C", "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u5F53\u5B63", "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u5F53\u5B63\u503C"],
|
|
816
|
+
name: "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u5F53\u5B63\u503C",
|
|
817
|
+
displayName: "\u56FD\u5185\u751F\u4EA7\u603B\u503C\u5F53\u5B63\u503C (\u4EBF\u5143)",
|
|
818
|
+
unit: "\u4EBF\u5143",
|
|
819
|
+
frequency: "quarter",
|
|
820
|
+
regionScope: "national",
|
|
821
|
+
measure: "\u5F53\u5B63\u503C",
|
|
822
|
+
cid: "28d936104e304aa191e338eb82b6dc09",
|
|
823
|
+
indicId: "d22612f09aeb4241bc557ef0ac61b3ba"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
key: "cpi-month-national",
|
|
827
|
+
aliases: [
|
|
828
|
+
"CPI",
|
|
829
|
+
"CPI\u540C\u6BD4",
|
|
830
|
+
"CPI\u5F53\u6708",
|
|
831
|
+
"CPI\u6708\u5EA6",
|
|
832
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
833
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570\u540C\u6BD4",
|
|
834
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570\u5F53\u6708",
|
|
835
|
+
"\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
836
|
+
"\u7269\u4EF7"
|
|
837
|
+
],
|
|
838
|
+
name: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
839
|
+
displayName: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74\u540C\u6708=100)",
|
|
840
|
+
unit: "%",
|
|
841
|
+
frequency: "month",
|
|
842
|
+
regionScope: "national",
|
|
843
|
+
measure: "\u4E0A\u5E74\u540C\u6708=100",
|
|
844
|
+
// The default shard is 2021-2025; shards cover the full monthly history.
|
|
845
|
+
cid: "809d2522b0fe4be89142650341b19083",
|
|
846
|
+
indicId: "4ae9047687934a6390984c21d6ddab96",
|
|
847
|
+
shards: [
|
|
848
|
+
{
|
|
849
|
+
cid: "5c7452825c7c4dcba391db5ca7f335c5",
|
|
850
|
+
indicId: "53180dfb9c14411ba4b762307c85920c",
|
|
851
|
+
startYear: 2026
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
cid: "809d2522b0fe4be89142650341b19083",
|
|
855
|
+
indicId: "4ae9047687934a6390984c21d6ddab96",
|
|
856
|
+
startYear: 2021,
|
|
857
|
+
endYear: 2025
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
cid: "9d4eec43537742a7ab5d63db97fa2f51",
|
|
861
|
+
indicId: "e5c318ffdbbc4d38898e52b52267eb25",
|
|
862
|
+
startYear: 2016,
|
|
863
|
+
endYear: 2020
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
cid: "954cfd7597e34b919ec71caf6aeead51",
|
|
867
|
+
indicId: "4c1065dd4e984b25a21190c843551697",
|
|
868
|
+
endYear: 2015
|
|
869
|
+
}
|
|
870
|
+
]
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
key: "cpi-month-province",
|
|
874
|
+
aliases: [
|
|
875
|
+
"CPI",
|
|
876
|
+
"CPI\u540C\u6BD4",
|
|
877
|
+
"CPI\u5F53\u6708",
|
|
878
|
+
"CPI\u6708\u5EA6",
|
|
879
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
880
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570\u540C\u6BD4",
|
|
881
|
+
"\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570\u5F53\u6708",
|
|
882
|
+
"\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
883
|
+
"\u7269\u4EF7"
|
|
884
|
+
],
|
|
885
|
+
name: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
886
|
+
displayName: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74\u540C\u6708=100)",
|
|
887
|
+
unit: "%",
|
|
888
|
+
frequency: "month",
|
|
889
|
+
regionScope: "province",
|
|
890
|
+
measure: "\u4E0A\u5E74\u540C\u6708=100",
|
|
891
|
+
// Province shards use different cids and indicator ids from the national
|
|
892
|
+
// series. Verified against Guangdong on 2026-11-03.
|
|
893
|
+
cid: "c7b31f465b2b4a40b9999090b03b5a37",
|
|
894
|
+
indicId: "a2713908ee9a4a86a6e1bf90a6c1df68",
|
|
895
|
+
shards: [
|
|
896
|
+
{
|
|
897
|
+
cid: "b5e122302ad745358ba7415bd4a22c2f",
|
|
898
|
+
indicId: "02d75ee002764e2ea53f263e52109e8f",
|
|
899
|
+
startYear: 2026
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
cid: "c7b31f465b2b4a40b9999090b03b5a37",
|
|
903
|
+
indicId: "a2713908ee9a4a86a6e1bf90a6c1df68",
|
|
904
|
+
startYear: 2021,
|
|
905
|
+
endYear: 2025
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
cid: "f6b9c87376ad4b24b170766f419dc076",
|
|
909
|
+
indicId: "072104df94b749dc8d0aa744718ba09b",
|
|
910
|
+
startYear: 2016,
|
|
911
|
+
endYear: 2020
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
cid: "d699037b6a894b9ea15d662b5422ce16",
|
|
915
|
+
indicId: "1f9acbec2553450fb5b1804b583833c6",
|
|
916
|
+
endYear: 2015
|
|
917
|
+
}
|
|
918
|
+
]
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
key: "cpi-year-national",
|
|
922
|
+
aliases: ["CPI\u5E74\u5EA6", "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570\u5E74\u5EA6", "CPI", "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570", "\u6D88\u8D39\u4EF7\u683C\u6307\u6570", "\u7269\u4EF7"],
|
|
923
|
+
name: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570",
|
|
924
|
+
displayName: "\u5C45\u6C11\u6D88\u8D39\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
925
|
+
unit: "\u4E0A\u5E74=100",
|
|
926
|
+
frequency: "year",
|
|
927
|
+
regionScope: "national",
|
|
928
|
+
measure: "\u4E0A\u5E74=100",
|
|
929
|
+
cid: "e5f37eced5de4d4c815f7ac5f59fc6c2",
|
|
930
|
+
indicId: "5e3053f110074dcdbcfa3c8428dd1367"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
key: "ppi-year-national",
|
|
934
|
+
aliases: ["PPI", "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u751F\u4EA7\u8005\u4EF7\u683C\u6307\u6570"],
|
|
935
|
+
name: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
936
|
+
displayName: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
937
|
+
unit: "\u4E0A\u5E74=100",
|
|
938
|
+
frequency: "year",
|
|
939
|
+
regionScope: "national",
|
|
940
|
+
measure: "\u4E0A\u5E74=100",
|
|
941
|
+
cid: "e5f37eced5de4d4c815f7ac5f59fc6c2",
|
|
942
|
+
indicId: "a867836c8fdc4e2dbf06be1dc87fafc6"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
key: "population-year-national",
|
|
946
|
+
aliases: ["\u4EBA\u53E3", "\u603B\u4EBA\u53E3", "\u5E74\u672B\u603B\u4EBA\u53E3", "\u4E2D\u56FD\u4EBA\u53E3"],
|
|
947
|
+
name: "\u5E74\u672B\u603B\u4EBA\u53E3",
|
|
948
|
+
displayName: "\u5E74\u672B\u603B\u4EBA\u53E3 (\u4E07\u4EBA)",
|
|
949
|
+
unit: "\u4E07\u4EBA",
|
|
950
|
+
frequency: "year",
|
|
951
|
+
regionScope: "national",
|
|
952
|
+
measure: "\u5E74\u672B",
|
|
953
|
+
cid: "6331ad868e8b4f55b8e9b6e765609ce1",
|
|
954
|
+
indicId: "806083491dbe46a08995783945a30b9d"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
key: "gdp-year-province",
|
|
958
|
+
aliases: ["GDP", "\u56FD\u5185\u751F\u4EA7\u603B\u503C", "\u5730\u533A\u751F\u4EA7\u603B\u503C", "\u751F\u4EA7\u603B\u503C", "\u7ECF\u6D4E\u603B\u91CF"],
|
|
959
|
+
name: "\u5730\u533A\u751F\u4EA7\u603B\u503C",
|
|
960
|
+
displayName: "\u5730\u533A\u751F\u4EA7\u603B\u503C (\u4EBF\u5143)",
|
|
961
|
+
unit: "\u4EBF\u5143",
|
|
962
|
+
frequency: "year",
|
|
963
|
+
regionScope: "province",
|
|
964
|
+
measure: "\u73B0\u4EF7\u603B\u91CF",
|
|
965
|
+
cid: "6f8fbd415cbc40ffa7ecb7fd917f2598",
|
|
966
|
+
indicId: "aff57de5ee994283974705914fbed246"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
key: "gdp-year-city",
|
|
970
|
+
aliases: ["GDP", "\u56FD\u5185\u751F\u4EA7\u603B\u503C", "\u5730\u533A\u751F\u4EA7\u603B\u503C", "\u751F\u4EA7\u603B\u503C", "\u7ECF\u6D4E\u603B\u91CF"],
|
|
971
|
+
name: "\u5730\u533A\u751F\u4EA7\u603B\u503C",
|
|
972
|
+
displayName: "\u5730\u533A\u751F\u4EA7\u603B\u503C (\u5F53\u5E74\u4EF7\u683C) (\u4EBF\u5143)",
|
|
973
|
+
unit: "\u4EBF\u5143",
|
|
974
|
+
frequency: "year",
|
|
975
|
+
regionScope: "city",
|
|
976
|
+
measure: "\u5F53\u5E74\u4EF7\u683C",
|
|
977
|
+
cid: "75a85abe58c749e0ad1d85be343e9056",
|
|
978
|
+
indicId: "35613910b9ad47e19cf79ae041ccb7ed"
|
|
979
|
+
},
|
|
980
|
+
// --- National annual: common macro indicators ---
|
|
981
|
+
{
|
|
982
|
+
key: "retail-year-national",
|
|
983
|
+
aliases: ["\u793E\u96F6", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D", "\u96F6\u552E\u603B\u989D", "\u6D88\u8D39\u96F6\u552E\u603B\u989D"],
|
|
984
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
985
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D (\u4EBF\u5143)",
|
|
986
|
+
unit: "\u4EBF\u5143",
|
|
987
|
+
frequency: "year",
|
|
988
|
+
regionScope: "national",
|
|
989
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
990
|
+
cid: "d5b51c4a56d646b3b3f00f2c9e31a217",
|
|
991
|
+
indicId: "008350880eb14928acc53fe20b295415"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
key: "fai-year-national",
|
|
995
|
+
aliases: [
|
|
996
|
+
"\u56FA\u6295",
|
|
997
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
998
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u989D",
|
|
999
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u603B\u989D",
|
|
1000
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44 (\u4E0D\u542B\u519C\u6237)"
|
|
1001
|
+
],
|
|
1002
|
+
name: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
1003
|
+
displayName: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44 (\u4E0D\u542B\u519C\u6237) (\u4EBF\u5143)",
|
|
1004
|
+
unit: "\u4EBF\u5143",
|
|
1005
|
+
frequency: "year",
|
|
1006
|
+
regionScope: "national",
|
|
1007
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1008
|
+
cid: "607a7cd4b50e4553894472475d1f4273",
|
|
1009
|
+
indicId: "c9bd95b9046e4278a73dfe09aedc4ca3"
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
key: "income-year-national",
|
|
1013
|
+
aliases: [
|
|
1014
|
+
"\u5C45\u6C11\u6536\u5165",
|
|
1015
|
+
"\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1016
|
+
"\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1017
|
+
"\u5168\u56FD\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1018
|
+
"\u53EF\u652F\u914D\u6536\u5165"
|
|
1019
|
+
],
|
|
1020
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1021
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165 (\u5143)",
|
|
1022
|
+
unit: "\u5143",
|
|
1023
|
+
frequency: "year",
|
|
1024
|
+
regionScope: "national",
|
|
1025
|
+
measure: "\u5168\u5E74",
|
|
1026
|
+
cid: "d153132154a549a78363017ef74ca784",
|
|
1027
|
+
indicId: "305bba1e881e413b91f32a06a4be65fd"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
key: "fiscal-revenue-year-national",
|
|
1031
|
+
aliases: ["\u8D22\u653F\u6536\u5165", "\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165", "\u56FD\u5BB6\u8D22\u653F\u6536\u5165", "\u516C\u5171\u9884\u7B97\u6536\u5165", "\u8D22\u653F\u9884\u7B97\u6536\u5165"],
|
|
1032
|
+
name: "\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165",
|
|
1033
|
+
displayName: "\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165 (\u4EBF\u5143)",
|
|
1034
|
+
unit: "\u4EBF\u5143",
|
|
1035
|
+
frequency: "year",
|
|
1036
|
+
regionScope: "national",
|
|
1037
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1038
|
+
cid: "9ab4eeaba2264792b296b6658b6472dc",
|
|
1039
|
+
indicId: "47768ef2d84343468356fcaf26fef62f"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
key: "grain-year-national",
|
|
1043
|
+
aliases: ["\u7CAE\u98DF\u4EA7\u91CF", "\u7CAE\u98DF\u603B\u4EA7\u91CF", "\u7CAE\u98DF"],
|
|
1044
|
+
name: "\u7CAE\u98DF\u4EA7\u91CF",
|
|
1045
|
+
displayName: "\u7CAE\u98DF\u4EA7\u91CF (\u4E07\u5428)",
|
|
1046
|
+
unit: "\u4E07\u5428",
|
|
1047
|
+
frequency: "year",
|
|
1048
|
+
regionScope: "national",
|
|
1049
|
+
measure: "\u5168\u5E74\u4EA7\u91CF",
|
|
1050
|
+
cid: "70551119a5104e13a5a2bbb3f36410f9",
|
|
1051
|
+
indicId: "cea4d9e54f72420883463207c5e7f564"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
key: "trade-year-national",
|
|
1055
|
+
aliases: ["\u8FDB\u51FA\u53E3", "\u8FDB\u51FA\u53E3\u603B\u989D", "\u8D27\u7269\u8FDB\u51FA\u53E3\u603B\u989D", "\u5916\u8D38\u603B\u989D", "\u5916\u8D38\u8FDB\u51FA\u53E3"],
|
|
1056
|
+
name: "\u8FDB\u51FA\u53E3\u603B\u989D",
|
|
1057
|
+
displayName: "\u8FDB\u51FA\u53E3\u603B\u989D (\u4EBA\u6C11\u5E01) (\u4EBF\u5143)",
|
|
1058
|
+
unit: "\u4EBF\u5143",
|
|
1059
|
+
frequency: "year",
|
|
1060
|
+
regionScope: "national",
|
|
1061
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1062
|
+
cid: "333332810f574043bc40553902c2f385",
|
|
1063
|
+
indicId: "e9f9299386b34a9f91ef13aa9aebd2be"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
key: "registered-unemployment-year-national",
|
|
1067
|
+
aliases: ["\u57CE\u9547\u767B\u8BB0\u5931\u4E1A\u7387", "\u767B\u8BB0\u5931\u4E1A\u7387"],
|
|
1068
|
+
name: "\u57CE\u9547\u767B\u8BB0\u5931\u4E1A\u7387",
|
|
1069
|
+
displayName: "\u57CE\u9547\u767B\u8BB0\u5931\u4E1A\u7387 (%)",
|
|
1070
|
+
unit: "%",
|
|
1071
|
+
frequency: "year",
|
|
1072
|
+
regionScope: "national",
|
|
1073
|
+
measure: "\u5E74\u672B",
|
|
1074
|
+
note: "\u5E74\u5EA6\u57CE\u9547\u767B\u8BB0\u5931\u4E1A\u7387\u6570\u636E\u622A\u81F3 2021\uFF1B\u6708\u5EA6\u5931\u4E1A\u7387\u8BF7\u67E5\u201C\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387\u201D\u3002",
|
|
1075
|
+
cid: "19839dbd8e82481b9524f031c6d816c5",
|
|
1076
|
+
indicId: "456ef2f3d75f472b930384237bc6100f"
|
|
1077
|
+
},
|
|
1078
|
+
// --- National quarterly ---
|
|
1079
|
+
{
|
|
1080
|
+
key: "income-quarter-national",
|
|
1081
|
+
aliases: [
|
|
1082
|
+
"\u5C45\u6C11\u6536\u5165",
|
|
1083
|
+
"\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1084
|
+
"\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1085
|
+
"\u5168\u56FD\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1086
|
+
"\u53EF\u652F\u914D\u6536\u5165"
|
|
1087
|
+
],
|
|
1088
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1089
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165\u7D2F\u8BA1\u503C (\u5143)",
|
|
1090
|
+
unit: "\u5143",
|
|
1091
|
+
frequency: "quarter",
|
|
1092
|
+
regionScope: "national",
|
|
1093
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1094
|
+
cid: "ec2d57ed282f456e8d025aff035b4fad",
|
|
1095
|
+
indicId: "bb5699c5ad534b568cca7c946227225a"
|
|
1096
|
+
},
|
|
1097
|
+
// --- National monthly ---
|
|
1098
|
+
{
|
|
1099
|
+
key: "ppi-month-national",
|
|
1100
|
+
aliases: ["PPI", "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u751F\u4EA7\u8005\u4EF7\u683C\u6307\u6570"],
|
|
1101
|
+
name: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
1102
|
+
displayName: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74\u540C\u6708=100)",
|
|
1103
|
+
unit: "\u4E0A\u5E74\u540C\u6708=100",
|
|
1104
|
+
frequency: "month",
|
|
1105
|
+
regionScope: "national",
|
|
1106
|
+
measure: "\u4E0A\u5E74\u540C\u6708=100",
|
|
1107
|
+
cid: "60e8b361f11c4a878c652a6487a25561",
|
|
1108
|
+
indicId: "150633e52b9a470a9a9fd1b296dd6c5b"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
key: "retail-month-national",
|
|
1112
|
+
aliases: ["\u793E\u96F6", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D", "\u96F6\u552E\u603B\u989D", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u5F53\u671F\u503C"],
|
|
1113
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1114
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u5F53\u671F\u503C (\u4EBF\u5143)",
|
|
1115
|
+
unit: "\u4EBF\u5143",
|
|
1116
|
+
frequency: "month",
|
|
1117
|
+
regionScope: "national",
|
|
1118
|
+
measure: "\u5F53\u671F\u503C",
|
|
1119
|
+
cid: "d0cb882c7f27443ab6b3ef9421901961",
|
|
1120
|
+
indicId: "1142a3a03e9045959e606a21822641ac"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
key: "retail-cumulative-month-national",
|
|
1124
|
+
aliases: ["\u793E\u96F6\u7D2F\u8BA1", "\u793E\u96F6\u7D2F\u8BA1\u503C", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u7D2F\u8BA1", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u7D2F\u8BA1\u503C"],
|
|
1125
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1126
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1127
|
+
unit: "\u4EBF\u5143",
|
|
1128
|
+
frequency: "month",
|
|
1129
|
+
regionScope: "national",
|
|
1130
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1131
|
+
cid: "d0cb882c7f27443ab6b3ef9421901961",
|
|
1132
|
+
indicId: "260a1794443b43dd93a59928b12f38af"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
key: "retail-growth-month-national",
|
|
1136
|
+
aliases: [
|
|
1137
|
+
"\u793E\u96F6\u540C\u6BD4",
|
|
1138
|
+
"\u793E\u96F6\u589E\u901F",
|
|
1139
|
+
"\u793E\u96F6\u589E\u957F",
|
|
1140
|
+
"\u793E\u96F6\u540C\u6BD4\u589E\u957F",
|
|
1141
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u540C\u6BD4",
|
|
1142
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u589E\u901F",
|
|
1143
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u589E\u957F",
|
|
1144
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u540C\u6BD4\u589E\u957F"
|
|
1145
|
+
],
|
|
1146
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1147
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u540C\u6BD4\u589E\u957F (%)",
|
|
1148
|
+
unit: "%",
|
|
1149
|
+
frequency: "month",
|
|
1150
|
+
regionScope: "national",
|
|
1151
|
+
measure: "\u540C\u6BD4",
|
|
1152
|
+
cid: "d0cb882c7f27443ab6b3ef9421901961",
|
|
1153
|
+
indicId: "aaac57d54d2e465d91bc9f3ea1a8618e"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
key: "fai-growth-month-national",
|
|
1157
|
+
aliases: [
|
|
1158
|
+
"\u56FA\u6295",
|
|
1159
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
1160
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u901F",
|
|
1161
|
+
"\u56FA\u6295\u589E\u901F",
|
|
1162
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u957F",
|
|
1163
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u989D\u7D2F\u8BA1\u589E\u957F"
|
|
1164
|
+
],
|
|
1165
|
+
name: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u989D",
|
|
1166
|
+
displayName: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u989D\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1167
|
+
unit: "%",
|
|
1168
|
+
frequency: "month",
|
|
1169
|
+
regionScope: "national",
|
|
1170
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1171
|
+
cid: "5129067b149d4ddfbec1ffc478d35bfb",
|
|
1172
|
+
indicId: "7e570cf8071c4734a7d78d9f0a70fbe1"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
key: "industrial-growth-month-national",
|
|
1176
|
+
aliases: [
|
|
1177
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1178
|
+
"\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1179
|
+
"\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1180
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u589E\u901F",
|
|
1181
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u540C\u6BD4",
|
|
1182
|
+
"\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u540C\u6BD4\u589E\u957F",
|
|
1183
|
+
"\u5DE5\u4E1A\u589E\u957F"
|
|
1184
|
+
],
|
|
1185
|
+
name: "\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1186
|
+
displayName: "\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u540C\u6BD4\u589E\u957F (%)",
|
|
1187
|
+
unit: "%",
|
|
1188
|
+
frequency: "month",
|
|
1189
|
+
regionScope: "national",
|
|
1190
|
+
measure: "\u540C\u6BD4\u589E\u957F",
|
|
1191
|
+
cid: "3f2e14f0542348ed9fe02476eca3450b",
|
|
1192
|
+
indicId: "ef1b1765960d45a29b4d7c4ca91be916"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
key: "industrial-cumulative-month-national",
|
|
1196
|
+
aliases: [
|
|
1197
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1198
|
+
"\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1199
|
+
"\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1200
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1\u589E\u901F"
|
|
1201
|
+
],
|
|
1202
|
+
name: "\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1203
|
+
displayName: "\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1204
|
+
unit: "%",
|
|
1205
|
+
frequency: "month",
|
|
1206
|
+
regionScope: "national",
|
|
1207
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1208
|
+
cid: "3f2e14f0542348ed9fe02476eca3450b",
|
|
1209
|
+
indicId: "21e7072e9f384209aedb56e69a18216e"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
key: "survey-unemployment-month-national",
|
|
1213
|
+
aliases: ["\u5931\u4E1A\u7387", "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387", "\u8C03\u67E5\u5931\u4E1A\u7387", "\u5168\u56FD\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387"],
|
|
1214
|
+
name: "\u5168\u56FD\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
1215
|
+
displayName: "\u5168\u56FD\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387 (%)",
|
|
1216
|
+
unit: "%",
|
|
1217
|
+
frequency: "month",
|
|
1218
|
+
regionScope: "national",
|
|
1219
|
+
measure: "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
1220
|
+
cid: "ee3b7046b390415b9b7745e3d16f6052",
|
|
1221
|
+
indicId: "3888eac6062945a79c8a27e5f13d4953"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
key: "fiscal-revenue-month-national",
|
|
1225
|
+
aliases: ["\u8D22\u653F\u6536\u5165", "\u56FD\u5BB6\u8D22\u653F\u6536\u5165", "\u8D22\u653F\u9884\u7B97\u6536\u5165", "\u56FD\u5BB6\u8D22\u653F\u9884\u7B97\u6536\u5165", "\u56FD\u5BB6\u8D22\u653F\u6536\u5165\u7D2F\u8BA1\u503C"],
|
|
1226
|
+
name: "\u56FD\u5BB6\u8D22\u653F\u6536\u5165",
|
|
1227
|
+
displayName: "\u56FD\u5BB6\u8D22\u653F\u6536\u5165\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1228
|
+
unit: "\u4EBF\u5143",
|
|
1229
|
+
frequency: "month",
|
|
1230
|
+
regionScope: "national",
|
|
1231
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1232
|
+
cid: "0083b57bb6b44d4d964b87a89192344e",
|
|
1233
|
+
indicId: "d615e8de42114feb9169f027e6c2dcc6"
|
|
1234
|
+
},
|
|
1235
|
+
// --- Province annual ---
|
|
1236
|
+
{
|
|
1237
|
+
key: "retail-year-province",
|
|
1238
|
+
aliases: ["\u793E\u96F6", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D", "\u96F6\u552E\u603B\u989D", "\u6D88\u8D39\u96F6\u552E\u603B\u989D"],
|
|
1239
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1240
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D (\u4EBF\u5143)",
|
|
1241
|
+
unit: "\u4EBF\u5143",
|
|
1242
|
+
frequency: "year",
|
|
1243
|
+
regionScope: "province",
|
|
1244
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1245
|
+
cid: "77cb81a53dd9438ab00f6b4f27196ad9",
|
|
1246
|
+
indicId: "3512aeee72d74be7b4008817a4dd2d03"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
key: "fai-year-province",
|
|
1250
|
+
aliases: ["\u56FA\u6295", "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44", "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u901F", "\u56FA\u6295\u589E\u901F", "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u957F"],
|
|
1251
|
+
name: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44 (\u4E0D\u542B\u519C\u6237)",
|
|
1252
|
+
displayName: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44 (\u4E0D\u542B\u519C\u6237) \u6BD4\u4E0A\u5E74\u589E\u957F (%)",
|
|
1253
|
+
unit: "%",
|
|
1254
|
+
frequency: "year",
|
|
1255
|
+
regionScope: "province",
|
|
1256
|
+
measure: "\u6BD4\u4E0A\u5E74\u589E\u957F",
|
|
1257
|
+
note: "\u5206\u7701\u5E74\u5EA6\u4EC5\u53D1\u5E03\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u901F\uFF0C\u6CA1\u6709\u4EBF\u5143\u603B\u91CF\u3002",
|
|
1258
|
+
cid: "fa42ee3b82724a1c972490d7b628811e",
|
|
1259
|
+
indicId: "a8b24c8058d14e069b7ef22600d7a9b5"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
key: "income-year-province",
|
|
1263
|
+
aliases: [
|
|
1264
|
+
"\u5C45\u6C11\u6536\u5165",
|
|
1265
|
+
"\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1266
|
+
"\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1267
|
+
"\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1268
|
+
"\u53EF\u652F\u914D\u6536\u5165"
|
|
1269
|
+
],
|
|
1270
|
+
name: "\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1271
|
+
displayName: "\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165 (\u5143)",
|
|
1272
|
+
unit: "\u5143",
|
|
1273
|
+
frequency: "year",
|
|
1274
|
+
regionScope: "province",
|
|
1275
|
+
measure: "\u5168\u5E74",
|
|
1276
|
+
cid: "5c072e1073514e448de4132760308fcf",
|
|
1277
|
+
indicId: "bda568266e4c445b867d25626e1f6b8a"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
key: "fiscal-revenue-year-province",
|
|
1281
|
+
aliases: ["\u8D22\u653F\u6536\u5165", "\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165", "\u5730\u65B9\u8D22\u653F\u6536\u5165", "\u5730\u65B9\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165"],
|
|
1282
|
+
name: "\u5730\u65B9\u8D22\u653F\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165",
|
|
1283
|
+
displayName: "\u5730\u65B9\u8D22\u653F\u4E00\u822C\u516C\u5171\u9884\u7B97\u6536\u5165 (\u4EBF\u5143)",
|
|
1284
|
+
unit: "\u4EBF\u5143",
|
|
1285
|
+
frequency: "year",
|
|
1286
|
+
regionScope: "province",
|
|
1287
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1288
|
+
cid: "bcd3d7159957431b8f3f5b7d10bdeceb",
|
|
1289
|
+
indicId: "c8dafa31105e4b93850f3820cdd4eae8"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
key: "grain-year-province",
|
|
1293
|
+
aliases: ["\u7CAE\u98DF\u4EA7\u91CF", "\u7CAE\u98DF\u603B\u4EA7\u91CF", "\u7CAE\u98DF"],
|
|
1294
|
+
name: "\u7CAE\u98DF\u4EA7\u91CF",
|
|
1295
|
+
displayName: "\u7CAE\u98DF\u4EA7\u91CF (\u4E07\u5428)",
|
|
1296
|
+
unit: "\u4E07\u5428",
|
|
1297
|
+
frequency: "year",
|
|
1298
|
+
regionScope: "province",
|
|
1299
|
+
measure: "\u5168\u5E74\u4EA7\u91CF",
|
|
1300
|
+
cid: "2ecdbcf038f349f1bd6840e731efbfa2",
|
|
1301
|
+
indicId: "d7d8730d61ff44998281d585e79b94af"
|
|
1302
|
+
},
|
|
1303
|
+
// --- Province quarterly ---
|
|
1304
|
+
{
|
|
1305
|
+
key: "income-quarter-province",
|
|
1306
|
+
aliases: [
|
|
1307
|
+
"\u5C45\u6C11\u6536\u5165",
|
|
1308
|
+
"\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1309
|
+
"\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1310
|
+
"\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1311
|
+
"\u53EF\u652F\u914D\u6536\u5165"
|
|
1312
|
+
],
|
|
1313
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1314
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165\u7D2F\u8BA1\u503C (\u5143)",
|
|
1315
|
+
unit: "\u5143",
|
|
1316
|
+
frequency: "quarter",
|
|
1317
|
+
regionScope: "province",
|
|
1318
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1319
|
+
cid: "1065e991d0c84623bf0e0d012f36c0e3",
|
|
1320
|
+
indicId: "0f6eafa0055f46bfbe61c3e2eafeb218"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
key: "retail-growth-quarter-province",
|
|
1324
|
+
aliases: [
|
|
1325
|
+
"\u793E\u96F6",
|
|
1326
|
+
"\u793E\u96F6\u589E\u901F",
|
|
1327
|
+
"\u793E\u96F6\u589E\u957F",
|
|
1328
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1329
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u589E\u901F",
|
|
1330
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u589E\u957F"
|
|
1331
|
+
],
|
|
1332
|
+
name: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
1333
|
+
displayName: "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1334
|
+
unit: "%",
|
|
1335
|
+
frequency: "quarter",
|
|
1336
|
+
regionScope: "province",
|
|
1337
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1338
|
+
note: "\u5206\u7701\u5B63\u5EA6\u4EC5\u53D1\u5E03\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D\u7D2F\u8BA1\u589E\u901F\u3002",
|
|
1339
|
+
cid: "b61c26f8f1134aaebc82c31ff5323266",
|
|
1340
|
+
indicId: "790a424df4cd4c97beeb8f720e45ff71"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
key: "construction-output-quarter-province",
|
|
1344
|
+
aliases: ["\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C\u7D2F\u8BA1\u503C"],
|
|
1345
|
+
name: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C",
|
|
1346
|
+
displayName: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1347
|
+
unit: "\u4EBF\u5143",
|
|
1348
|
+
frequency: "quarter",
|
|
1349
|
+
regionScope: "province",
|
|
1350
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1351
|
+
cid: "f20917614b8948e2a558096dbea27614",
|
|
1352
|
+
indicId: "ca4c8c8209604f06932744dbe47657a4"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
key: "agriculture-output-quarter-province",
|
|
1356
|
+
aliases: ["\u519C\u6797\u7267\u6E14\u4E1A\u603B\u4EA7\u503C", "\u519C\u6797\u7267\u6E14\u603B\u4EA7\u503C", "\u519C\u4E1A\u603B\u4EA7\u503C"],
|
|
1357
|
+
name: "\u519C\u6797\u7267\u6E14\u4E1A\u603B\u4EA7\u503C",
|
|
1358
|
+
displayName: "\u519C\u6797\u7267\u6E14\u4E1A\u603B\u4EA7\u503C\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1359
|
+
unit: "\u4EBF\u5143",
|
|
1360
|
+
frequency: "quarter",
|
|
1361
|
+
regionScope: "province",
|
|
1362
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1363
|
+
cid: "0e74a6ba50ed4af5afb83cd1b8335577",
|
|
1364
|
+
indicId: "0f03dead8f3d40c2a6978edacdddd8e7"
|
|
1365
|
+
},
|
|
1366
|
+
// --- Province monthly ---
|
|
1367
|
+
{
|
|
1368
|
+
key: "ppi-month-province",
|
|
1369
|
+
aliases: ["PPI", "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u751F\u4EA7\u8005\u4EF7\u683C\u6307\u6570"],
|
|
1370
|
+
name: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
1371
|
+
displayName: "\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74\u540C\u6708=100)",
|
|
1372
|
+
unit: "\u4E0A\u5E74\u540C\u6708=100",
|
|
1373
|
+
frequency: "month",
|
|
1374
|
+
regionScope: "province",
|
|
1375
|
+
measure: "\u4E0A\u5E74\u540C\u6708=100",
|
|
1376
|
+
cid: "f4978fd800d945989894083a156d94ed",
|
|
1377
|
+
indicId: "d91f353ef582487e916dee235383cf4f"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
key: "industrial-growth-month-province",
|
|
1381
|
+
aliases: [
|
|
1382
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1383
|
+
"\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1384
|
+
"\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1385
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u589E\u901F",
|
|
1386
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u540C\u6BD4",
|
|
1387
|
+
"\u5DE5\u4E1A\u589E\u957F"
|
|
1388
|
+
],
|
|
1389
|
+
name: "\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1390
|
+
displayName: "\u5DE5\u4E1A\u589E\u52A0\u503C\u540C\u6BD4\u589E\u957F (%)",
|
|
1391
|
+
unit: "%",
|
|
1392
|
+
frequency: "month",
|
|
1393
|
+
regionScope: "province",
|
|
1394
|
+
measure: "\u540C\u6BD4\u589E\u957F",
|
|
1395
|
+
cid: "9593fb551802499683f758e0f6f45bc7",
|
|
1396
|
+
indicId: "6e073cf3b36644e6bee881d312c95681"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
key: "industrial-cumulative-month-province",
|
|
1400
|
+
aliases: [
|
|
1401
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1402
|
+
"\u89C4\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1403
|
+
"\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1",
|
|
1404
|
+
"\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1\u589E\u901F"
|
|
1405
|
+
],
|
|
1406
|
+
name: "\u5DE5\u4E1A\u589E\u52A0\u503C",
|
|
1407
|
+
displayName: "\u5DE5\u4E1A\u589E\u52A0\u503C\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1408
|
+
unit: "%",
|
|
1409
|
+
frequency: "month",
|
|
1410
|
+
regionScope: "province",
|
|
1411
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1412
|
+
cid: "9593fb551802499683f758e0f6f45bc7",
|
|
1413
|
+
indicId: "e2da5a05def84138b9d33828951adc59"
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
key: "fai-growth-month-province",
|
|
1417
|
+
aliases: [
|
|
1418
|
+
"\u56FA\u6295",
|
|
1419
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
1420
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u901F",
|
|
1421
|
+
"\u56FA\u6295\u589E\u901F",
|
|
1422
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u589E\u957F",
|
|
1423
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u5B8C\u6210\u989D\u7D2F\u8BA1\u589E\u957F"
|
|
1424
|
+
],
|
|
1425
|
+
name: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u5B8C\u6210\u989D",
|
|
1426
|
+
displayName: "\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u5B8C\u6210\u989D\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1427
|
+
unit: "%",
|
|
1428
|
+
frequency: "month",
|
|
1429
|
+
regionScope: "province",
|
|
1430
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1431
|
+
cid: "e43af1a71b2d4a768569866795ed66e2",
|
|
1432
|
+
indicId: "31c20d4e16564c39a3e4d2cc0d2d83bb"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
key: "real-estate-investment-month-province",
|
|
1436
|
+
aliases: [
|
|
1437
|
+
"\u623F\u5730\u4EA7\u6295\u8D44",
|
|
1438
|
+
"\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44",
|
|
1439
|
+
"\u623F\u5730\u4EA7\u6295\u8D44\u989D",
|
|
1440
|
+
"\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44\u989D",
|
|
1441
|
+
"\u623F\u5730\u4EA7\u6295\u8D44\u7D2F\u8BA1\u503C"
|
|
1442
|
+
],
|
|
1443
|
+
name: "\u623F\u5730\u4EA7\u6295\u8D44",
|
|
1444
|
+
displayName: "\u623F\u5730\u4EA7\u6295\u8D44\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1445
|
+
unit: "\u4EBF\u5143",
|
|
1446
|
+
frequency: "month",
|
|
1447
|
+
regionScope: "province",
|
|
1448
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1449
|
+
cid: "b2cdd4aabffc4508b6199209127a6fd8",
|
|
1450
|
+
indicId: "6aa7aaa742b7475b8e93af99e8bc528e"
|
|
1451
|
+
},
|
|
1452
|
+
// --- Additional national/province long-tail entries ---
|
|
1453
|
+
{
|
|
1454
|
+
key: "fiscal-expenditure-year-national",
|
|
1455
|
+
aliases: ["\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA", "\u516C\u5171\u9884\u7B97\u652F\u51FA", "\u8D22\u653F\u652F\u51FA", "\u56FD\u5BB6\u8D22\u653F\u652F\u51FA"],
|
|
1456
|
+
name: "\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA",
|
|
1457
|
+
displayName: "\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA (\u4EBF\u5143)",
|
|
1458
|
+
unit: "\u4EBF\u5143",
|
|
1459
|
+
frequency: "year",
|
|
1460
|
+
regionScope: "national",
|
|
1461
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1462
|
+
cid: "9ab4eeaba2264792b296b6658b6472dc",
|
|
1463
|
+
indicId: "bd7a970226ff40a8b030c6b9a912560b"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
key: "summer-grain-year-national",
|
|
1467
|
+
aliases: ["\u590F\u6536\u7CAE\u98DF\u4EA7\u91CF", "\u590F\u7CAE\u4EA7\u91CF", "\u590F\u7CAE"],
|
|
1468
|
+
name: "\u590F\u6536\u7CAE\u98DF\u4EA7\u91CF",
|
|
1469
|
+
displayName: "\u590F\u6536\u7CAE\u98DF\u4EA7\u91CF (\u4E07\u5428)",
|
|
1470
|
+
unit: "\u4E07\u5428",
|
|
1471
|
+
frequency: "year",
|
|
1472
|
+
regionScope: "national",
|
|
1473
|
+
measure: "\u590F\u6536\u4EA7\u91CF",
|
|
1474
|
+
cid: "70551119a5104e13a5a2bbb3f36410f9",
|
|
1475
|
+
indicId: "a63f12c294e54faa825848afe31b55c9"
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
key: "urban-income-year-national",
|
|
1479
|
+
aliases: ["\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u57CE\u9547\u5C45\u6C11\u6536\u5165", "\u57CE\u9547\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"],
|
|
1480
|
+
name: "\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1481
|
+
displayName: "\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165 (\u5143)",
|
|
1482
|
+
unit: "\u5143",
|
|
1483
|
+
frequency: "year",
|
|
1484
|
+
regionScope: "national",
|
|
1485
|
+
measure: "\u5168\u5E74",
|
|
1486
|
+
cid: "d310e3ead14b403d9d10d29391713783",
|
|
1487
|
+
indicId: "c0908d6012a840dca82d2b362f7e2d69"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
key: "industrial-profit-year-province",
|
|
1491
|
+
aliases: ["\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u5229\u6DA6\u603B\u989D", "\u5DE5\u4E1A\u4F01\u4E1A\u5229\u6DA6\u603B\u989D", "\u5DE5\u4E1A\u5229\u6DA6\u603B\u989D"],
|
|
1492
|
+
name: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u5229\u6DA6\u603B\u989D",
|
|
1493
|
+
displayName: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u5229\u6DA6\u603B\u989D (\u4EBF\u5143)",
|
|
1494
|
+
unit: "\u4EBF\u5143",
|
|
1495
|
+
frequency: "year",
|
|
1496
|
+
regionScope: "province",
|
|
1497
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1498
|
+
cid: "e5f47e5583a54e4b88993bd7f3fb453b",
|
|
1499
|
+
indicId: "61c228f6ebfe444fa662eea06d7187c5"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
key: "tax-revenue-year-province",
|
|
1503
|
+
aliases: ["\u5730\u65B9\u8D22\u653F\u7A0E\u6536\u6536\u5165", "\u8D22\u653F\u7A0E\u6536\u6536\u5165", "\u7A0E\u6536\u6536\u5165"],
|
|
1504
|
+
name: "\u5730\u65B9\u8D22\u653F\u7A0E\u6536\u6536\u5165",
|
|
1505
|
+
displayName: "\u5730\u65B9\u8D22\u653F\u7A0E\u6536\u6536\u5165 (\u4EBF\u5143)",
|
|
1506
|
+
unit: "\u4EBF\u5143",
|
|
1507
|
+
frequency: "year",
|
|
1508
|
+
regionScope: "province",
|
|
1509
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1510
|
+
cid: "bcd3d7159957431b8f3f5b7d10bdeceb",
|
|
1511
|
+
indicId: "35afc4290fbe4bb8b37afa91c927edc3"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
key: "urban-income-year-province",
|
|
1515
|
+
aliases: ["\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u57CE\u9547\u5C45\u6C11\u6536\u5165", "\u57CE\u9547\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"],
|
|
1516
|
+
name: "\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1517
|
+
displayName: "\u57CE\u9547\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165 (\u5143)",
|
|
1518
|
+
unit: "\u5143",
|
|
1519
|
+
frequency: "year",
|
|
1520
|
+
regionScope: "province",
|
|
1521
|
+
measure: "\u5168\u5E74",
|
|
1522
|
+
cid: "5c072e1073514e448de4132760308fcf",
|
|
1523
|
+
indicId: "dd28563a8af84935bc8a010abf8b772c"
|
|
1524
|
+
},
|
|
1525
|
+
// --- Consumption, wages, energy, trade, real estate, employment ---
|
|
1526
|
+
{
|
|
1527
|
+
key: "consumption-year-national",
|
|
1528
|
+
aliases: ["\u5C45\u6C11\u6D88\u8D39\u652F\u51FA", "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA", "\u6D88\u8D39\u652F\u51FA", "\u4EBA\u5747\u6D88\u8D39\u652F\u51FA"],
|
|
1529
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA",
|
|
1530
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA (\u5143)",
|
|
1531
|
+
unit: "\u5143",
|
|
1532
|
+
frequency: "year",
|
|
1533
|
+
regionScope: "national",
|
|
1534
|
+
measure: "\u5168\u5E74",
|
|
1535
|
+
cid: "47e188eb48a840e4b7ee00c1d30a4792",
|
|
1536
|
+
indicId: "aae3499756ee4863a472d1bbf191b471"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
key: "engel-year-national",
|
|
1540
|
+
aliases: ["\u6069\u683C\u5C14\u7CFB\u6570", "\u5C45\u6C11\u6069\u683C\u5C14\u7CFB\u6570"],
|
|
1541
|
+
name: "\u5C45\u6C11\u6069\u683C\u5C14\u7CFB\u6570",
|
|
1542
|
+
displayName: "\u5C45\u6C11\u6069\u683C\u5C14\u7CFB\u6570 (%)",
|
|
1543
|
+
unit: "%",
|
|
1544
|
+
frequency: "year",
|
|
1545
|
+
regionScope: "national",
|
|
1546
|
+
measure: "\u5168\u5E74",
|
|
1547
|
+
cid: "7cdf71e826d64ff6a64b053009a5bccd",
|
|
1548
|
+
indicId: "24659814dbe04a3f84f54e8dae75adba"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
key: "wage-year-national",
|
|
1552
|
+
aliases: ["\u5E73\u5747\u5DE5\u8D44", "\u57CE\u9547\u975E\u79C1\u8425\u5355\u4F4D\u5E73\u5747\u5DE5\u8D44", "\u57CE\u9547\u975E\u79C1\u8425\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44"],
|
|
1553
|
+
name: "\u57CE\u9547\u975E\u79C1\u8425\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44",
|
|
1554
|
+
displayName: "\u57CE\u9547\u975E\u79C1\u8425\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44 (\u5143)",
|
|
1555
|
+
unit: "\u5143",
|
|
1556
|
+
frequency: "year",
|
|
1557
|
+
regionScope: "national",
|
|
1558
|
+
measure: "\u5168\u5E74",
|
|
1559
|
+
cid: "0aed53df47b14e7393a98718a320e238",
|
|
1560
|
+
indicId: "759f53b2b5204c3d9dce7683db504576"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
key: "energy-production-year-national",
|
|
1564
|
+
aliases: ["\u80FD\u6E90\u751F\u4EA7\u603B\u91CF", "\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF"],
|
|
1565
|
+
name: "\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF",
|
|
1566
|
+
displayName: "\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF (\u4E07\u5428\u6807\u51C6\u7164)",
|
|
1567
|
+
unit: "\u4E07\u5428\u6807\u51C6\u7164",
|
|
1568
|
+
frequency: "year",
|
|
1569
|
+
regionScope: "national",
|
|
1570
|
+
measure: "\u5168\u5E74",
|
|
1571
|
+
cid: "48615069f0334639963a48dfbbfc594e",
|
|
1572
|
+
indicId: "bd422ac661504ff2a88b64d02b547d27"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
key: "export-year-national",
|
|
1576
|
+
aliases: ["\u51FA\u53E3", "\u51FA\u53E3\u603B\u989D", "\u51FA\u53E3\u989D"],
|
|
1577
|
+
name: "\u51FA\u53E3\u603B\u989D",
|
|
1578
|
+
displayName: "\u51FA\u53E3\u603B\u989D (\u4EBA\u6C11\u5E01) (\u4EBF\u5143)",
|
|
1579
|
+
unit: "\u4EBF\u5143",
|
|
1580
|
+
frequency: "year",
|
|
1581
|
+
regionScope: "national",
|
|
1582
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1583
|
+
cid: "333332810f574043bc40553902c2f385",
|
|
1584
|
+
indicId: "3529a0abf1324839942a3ec3a7059bcc"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
key: "import-year-national",
|
|
1588
|
+
aliases: ["\u8FDB\u53E3", "\u8FDB\u53E3\u603B\u989D", "\u8FDB\u53E3\u989D"],
|
|
1589
|
+
name: "\u8FDB\u53E3\u603B\u989D",
|
|
1590
|
+
displayName: "\u8FDB\u53E3\u603B\u989D (\u4EBA\u6C11\u5E01) (\u4EBF\u5143)",
|
|
1591
|
+
unit: "\u4EBF\u5143",
|
|
1592
|
+
frequency: "year",
|
|
1593
|
+
regionScope: "national",
|
|
1594
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1595
|
+
cid: "333332810f574043bc40553902c2f385",
|
|
1596
|
+
indicId: "752ae251a0494227b593779a098417c7"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
key: "real-estate-investment-year-national",
|
|
1600
|
+
aliases: ["\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44", "\u623F\u5730\u4EA7\u6295\u8D44", "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44\u989D"],
|
|
1601
|
+
name: "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44",
|
|
1602
|
+
displayName: "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44 (\u4EBF\u5143)",
|
|
1603
|
+
unit: "\u4EBF\u5143",
|
|
1604
|
+
frequency: "year",
|
|
1605
|
+
regionScope: "national",
|
|
1606
|
+
measure: "\u672C\u5E74\u5B8C\u6210\u6295\u8D44",
|
|
1607
|
+
cid: "84fe2e0ffd2f4e99b13ceae5c065e2ac",
|
|
1608
|
+
indicId: "49523a91c3234c4bbaaaf6b2be40340d"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
key: "construction-output-year-national",
|
|
1612
|
+
aliases: ["\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u4EA7\u503C"],
|
|
1613
|
+
name: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C",
|
|
1614
|
+
displayName: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C (\u4EBF\u5143)",
|
|
1615
|
+
unit: "\u4EBF\u5143",
|
|
1616
|
+
frequency: "year",
|
|
1617
|
+
regionScope: "national",
|
|
1618
|
+
measure: "\u5168\u5E74",
|
|
1619
|
+
cid: "59c698b87ea7473d951de635f20e2078",
|
|
1620
|
+
indicId: "2f7d2b5a033048e6bc8712bcc119e126"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
key: "consumption-quarter-national",
|
|
1624
|
+
aliases: ["\u5C45\u6C11\u6D88\u8D39\u652F\u51FA", "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA", "\u6D88\u8D39\u652F\u51FA", "\u4EBA\u5747\u6D88\u8D39\u652F\u51FA"],
|
|
1625
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA",
|
|
1626
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA\u7D2F\u8BA1\u503C (\u5143)",
|
|
1627
|
+
unit: "\u5143/\u4EBA",
|
|
1628
|
+
frequency: "quarter",
|
|
1629
|
+
regionScope: "national",
|
|
1630
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1631
|
+
cid: "71e8c15775d242b8b212edb4cab6e808",
|
|
1632
|
+
indicId: "8e8fb36d72e544658caebd7419900d2a"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
key: "capacity-utilization-quarter-national",
|
|
1636
|
+
aliases: ["\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387", "\u4EA7\u80FD\u5229\u7528\u7387"],
|
|
1637
|
+
name: "\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387",
|
|
1638
|
+
displayName: "\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5F53\u5B63\u503C (%)",
|
|
1639
|
+
unit: "%",
|
|
1640
|
+
frequency: "quarter",
|
|
1641
|
+
regionScope: "national",
|
|
1642
|
+
measure: "\u5F53\u5B63\u503C",
|
|
1643
|
+
cid: "56a7def4ab0749d8800eab2415f90b54",
|
|
1644
|
+
indicId: "57ae79552303418087eee8f4f35b4368"
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
key: "construction-output-quarter-national",
|
|
1648
|
+
aliases: ["\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u4EA7\u503C"],
|
|
1649
|
+
name: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C",
|
|
1650
|
+
displayName: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1651
|
+
unit: "\u4EBF\u5143",
|
|
1652
|
+
frequency: "quarter",
|
|
1653
|
+
regionScope: "national",
|
|
1654
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1655
|
+
cid: "2bd9f3b20250419e9c2247948c77386e",
|
|
1656
|
+
indicId: "5991f9ec8ebf47d8ac1098efab14e946"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
key: "online-retail-month-national",
|
|
1660
|
+
aliases: ["\u7F51\u4E0A\u96F6\u552E\u989D", "\u7F51\u4E0A\u96F6\u552E"],
|
|
1661
|
+
name: "\u7F51\u4E0A\u96F6\u552E\u989D",
|
|
1662
|
+
displayName: "\u7F51\u4E0A\u96F6\u552E\u989D\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1663
|
+
unit: "\u4EBF\u5143",
|
|
1664
|
+
frequency: "month",
|
|
1665
|
+
regionScope: "national",
|
|
1666
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1667
|
+
cid: "fb09cbc680fe4d348c9d05f535ebf77c",
|
|
1668
|
+
indicId: "069baced432b4e1787ad1da50c11e9fc"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
key: "service-retail-month-national",
|
|
1672
|
+
aliases: ["\u670D\u52A1\u96F6\u552E\u989D", "\u670D\u52A1\u96F6\u552E"],
|
|
1673
|
+
name: "\u670D\u52A1\u96F6\u552E\u989D",
|
|
1674
|
+
displayName: "\u670D\u52A1\u96F6\u552E\u989D\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1675
|
+
unit: "%",
|
|
1676
|
+
frequency: "month",
|
|
1677
|
+
regionScope: "national",
|
|
1678
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1679
|
+
cid: "28fc474f03e746008ff9fbc2bbb4bf3b",
|
|
1680
|
+
indicId: "b4689b643a27430b9673a192210138d0"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
key: "big-city-unemployment-month-national",
|
|
1684
|
+
aliases: ["31\u4E2A\u5927\u57CE\u5E02\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387", "\u5927\u57CE\u5E02\u5931\u4E1A\u7387", "31\u57CE\u5931\u4E1A\u7387"],
|
|
1685
|
+
name: "31\u4E2A\u5927\u57CE\u5E02\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
1686
|
+
displayName: "31\u4E2A\u5927\u57CE\u5E02\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387 (%)",
|
|
1687
|
+
unit: "%",
|
|
1688
|
+
frequency: "month",
|
|
1689
|
+
regionScope: "national",
|
|
1690
|
+
measure: "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
1691
|
+
cid: "ee3b7046b390415b9b7745e3d16f6052",
|
|
1692
|
+
indicId: "1d550f3ec77a463bb607d4a3427e1465"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
key: "youth-unemployment-month-national",
|
|
1696
|
+
aliases: ["16-24\u5C81\u5931\u4E1A\u7387", "16\u201424\u5C81\u5931\u4E1A\u7387", "\u9752\u5E74\u5931\u4E1A\u7387", "16-24\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387"],
|
|
1697
|
+
name: "\u5168\u56FD\u57CE\u954716\u201424\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387",
|
|
1698
|
+
displayName: "\u5168\u56FD\u57CE\u954716\u201424\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387 (%)",
|
|
1699
|
+
unit: "%",
|
|
1700
|
+
frequency: "month",
|
|
1701
|
+
regionScope: "national",
|
|
1702
|
+
measure: "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
1703
|
+
cid: "ee3b7046b390415b9b7745e3d16f6052",
|
|
1704
|
+
indicId: "bd6da1abb26046c2acb38aa701d90e86"
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
key: "private-fai-growth-month-national",
|
|
1708
|
+
aliases: ["\u6C11\u95F4\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44", "\u6C11\u95F4\u6295\u8D44\u589E\u901F", "\u6C11\u95F4\u56FA\u6295", "\u6C11\u95F4\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u7D2F\u8BA1\u589E\u957F"],
|
|
1709
|
+
name: "\u6C11\u95F4\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
1710
|
+
displayName: "\u6C11\u95F4\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1711
|
+
unit: "%",
|
|
1712
|
+
frequency: "month",
|
|
1713
|
+
regionScope: "national",
|
|
1714
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1715
|
+
cid: "5129067b149d4ddfbec1ffc478d35bfb",
|
|
1716
|
+
indicId: "287f55a9520d43a9b3e045860a49fedd"
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
key: "consumption-year-province",
|
|
1720
|
+
aliases: ["\u5C45\u6C11\u6D88\u8D39\u652F\u51FA", "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA", "\u6D88\u8D39\u652F\u51FA", "\u4EBA\u5747\u6D88\u8D39\u652F\u51FA"],
|
|
1721
|
+
name: "\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA",
|
|
1722
|
+
displayName: "\u5168\u4F53\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA (\u5143)",
|
|
1723
|
+
unit: "\u5143",
|
|
1724
|
+
frequency: "year",
|
|
1725
|
+
regionScope: "province",
|
|
1726
|
+
measure: "\u5168\u5E74",
|
|
1727
|
+
cid: "7dbebcca62794c4da2b9ef9813d14564",
|
|
1728
|
+
indicId: "462f6c41041b4721b78e50397b358af8"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
key: "fiscal-expenditure-year-province",
|
|
1732
|
+
aliases: ["\u8D22\u653F\u652F\u51FA", "\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA", "\u5730\u65B9\u8D22\u653F\u652F\u51FA", "\u5730\u65B9\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA"],
|
|
1733
|
+
name: "\u5730\u65B9\u8D22\u653F\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA",
|
|
1734
|
+
displayName: "\u5730\u65B9\u8D22\u653F\u4E00\u822C\u516C\u5171\u9884\u7B97\u652F\u51FA (\u4EBF\u5143)",
|
|
1735
|
+
unit: "\u4EBF\u5143",
|
|
1736
|
+
frequency: "year",
|
|
1737
|
+
regionScope: "province",
|
|
1738
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1739
|
+
cid: "f38245648b504602b851e27257f09d9b",
|
|
1740
|
+
indicId: "1bc776bc77b44671a8f332fa80587fe2"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
key: "industrial-revenue-year-province",
|
|
1744
|
+
aliases: ["\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u6536\u5165", "\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u6536\u5165", "\u5DE5\u4E1A\u8425\u4E1A\u6536\u5165", "\u5DE5\u4E1A\u8425\u6536"],
|
|
1745
|
+
name: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u6536\u5165",
|
|
1746
|
+
displayName: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u6536\u5165 (\u4EBF\u5143)",
|
|
1747
|
+
unit: "\u4EBF\u5143",
|
|
1748
|
+
frequency: "year",
|
|
1749
|
+
regionScope: "province",
|
|
1750
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1751
|
+
cid: "e5f47e5583a54e4b88993bd7f3fb453b",
|
|
1752
|
+
indicId: "bc4fd1bdaca2457e8c22a370cbfef233"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
key: "real-estate-investment-year-province",
|
|
1756
|
+
aliases: ["\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44", "\u623F\u5730\u4EA7\u6295\u8D44", "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44\u989D"],
|
|
1757
|
+
name: "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44",
|
|
1758
|
+
displayName: "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44 (\u4EBF\u5143)",
|
|
1759
|
+
unit: "\u4EBF\u5143",
|
|
1760
|
+
frequency: "year",
|
|
1761
|
+
regionScope: "province",
|
|
1762
|
+
measure: "\u672C\u5E74\u5B8C\u6210\u6295\u8D44",
|
|
1763
|
+
cid: "d58795588d10411b883fa09af92f3cad",
|
|
1764
|
+
indicId: "6b3195bc0a94444f98418d320ee284e3"
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
key: "trade-year-province",
|
|
1768
|
+
aliases: ["\u8FDB\u51FA\u53E3", "\u8FDB\u51FA\u53E3\u603B\u989D", "\u8D27\u7269\u8FDB\u51FA\u53E3\u603B\u989D", "\u5916\u8D38\u603B\u989D"],
|
|
1769
|
+
name: "\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u8FDB\u51FA\u53E3\u603B\u989D",
|
|
1770
|
+
displayName: "\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u8FDB\u51FA\u53E3\u603B\u989D (\u5343\u7F8E\u5143)",
|
|
1771
|
+
unit: "\u5343\u7F8E\u5143",
|
|
1772
|
+
frequency: "year",
|
|
1773
|
+
regionScope: "province",
|
|
1774
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1775
|
+
note: "\u5206\u7701\u5E74\u5EA6\u6309\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u7EDF\u8BA1\uFF0C\u5355\u4F4D\u4E3A\u5343\u7F8E\u5143\u3002",
|
|
1776
|
+
cid: "9c61eb74ddd346d88749f9881837dbc7",
|
|
1777
|
+
indicId: "6219327f109140a691f71ea9d58c4ae5"
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
key: "consumption-quarter-province",
|
|
1781
|
+
aliases: ["\u5C45\u6C11\u6D88\u8D39\u652F\u51FA", "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA", "\u6D88\u8D39\u652F\u51FA", "\u4EBA\u5747\u6D88\u8D39\u652F\u51FA"],
|
|
1782
|
+
name: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA",
|
|
1783
|
+
displayName: "\u5C45\u6C11\u4EBA\u5747\u6D88\u8D39\u652F\u51FA\u7D2F\u8BA1\u503C (\u5143)",
|
|
1784
|
+
unit: "\u5143/\u4EBA",
|
|
1785
|
+
frequency: "quarter",
|
|
1786
|
+
regionScope: "province",
|
|
1787
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1788
|
+
cid: "cd66144ad151453f932783281aed87a7",
|
|
1789
|
+
indicId: "00836f986d1749f5893e40ba8d52618e"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
key: "home-sales-area-month-province",
|
|
1793
|
+
aliases: ["\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF", "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF", "\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u7D2F\u8BA1\u503C"],
|
|
1794
|
+
name: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF",
|
|
1795
|
+
displayName: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u7D2F\u8BA1\u503C (\u4E07\u5E73\u65B9\u7C73)",
|
|
1796
|
+
unit: "\u4E07\u5E73\u65B9\u7C73",
|
|
1797
|
+
frequency: "month",
|
|
1798
|
+
regionScope: "province",
|
|
1799
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1800
|
+
cid: "91e95a0d0f8244c9a83578cf9862888e",
|
|
1801
|
+
indicId: "b2a4e83212f8401f841df8e4257fe281"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
key: "home-sales-amount-month-province",
|
|
1805
|
+
aliases: ["\u5546\u54C1\u623F\u9500\u552E\u989D", "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D", "\u5546\u54C1\u623F\u9500\u552E\u989D\u7D2F\u8BA1\u503C"],
|
|
1806
|
+
name: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D",
|
|
1807
|
+
displayName: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1808
|
+
unit: "\u4EBF\u5143",
|
|
1809
|
+
frequency: "month",
|
|
1810
|
+
regionScope: "province",
|
|
1811
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1812
|
+
cid: "c4731a05f2114131a24a4969f1410bea",
|
|
1813
|
+
indicId: "155aab193c2e4836853f197e3a4f8ed4"
|
|
1814
|
+
},
|
|
1815
|
+
// --- Energy, housing sales, construction, rural income ---
|
|
1816
|
+
{
|
|
1817
|
+
key: "energy-consumption-year-national",
|
|
1818
|
+
aliases: ["\u80FD\u6E90\u6D88\u8D39\u603B\u91CF", "\u80FD\u6E90\u6D88\u8D39"],
|
|
1819
|
+
name: "\u80FD\u6E90\u6D88\u8D39\u603B\u91CF",
|
|
1820
|
+
displayName: "\u80FD\u6E90\u6D88\u8D39\u603B\u91CF (\u4E07\u5428\u6807\u51C6\u7164)",
|
|
1821
|
+
unit: "\u4E07\u5428\u6807\u51C6\u7164",
|
|
1822
|
+
frequency: "year",
|
|
1823
|
+
regionScope: "national",
|
|
1824
|
+
measure: "\u5168\u5E74",
|
|
1825
|
+
cid: "ea81a442991544f984906c2c264d13ca",
|
|
1826
|
+
indicId: "b7efa87515d54d2fa20f9349fbdf9b26"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
key: "electricity-year-national",
|
|
1830
|
+
aliases: ["\u53D1\u7535\u91CF", "\u7535\u529B\u4EA7\u91CF"],
|
|
1831
|
+
name: "\u53D1\u7535\u91CF",
|
|
1832
|
+
displayName: "\u53D1\u7535\u91CF (\u4EBF\u5343\u74E6\u65F6)",
|
|
1833
|
+
unit: "\u4EBF\u5343\u74E6\u65F6",
|
|
1834
|
+
frequency: "year",
|
|
1835
|
+
regionScope: "national",
|
|
1836
|
+
measure: "\u5168\u5E74",
|
|
1837
|
+
cid: "b3e5b73b887a46a0a13caf5ee238a194",
|
|
1838
|
+
indicId: "6e325390b4784350b753d695c48717a3"
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
key: "coal-output-year-national",
|
|
1842
|
+
aliases: ["\u539F\u7164\u4EA7\u91CF", "\u7164\u70AD\u4EA7\u91CF"],
|
|
1843
|
+
name: "\u539F\u7164\u4EA7\u91CF",
|
|
1844
|
+
displayName: "\u539F\u7164\u4EA7\u91CF (\u4E07\u5428)",
|
|
1845
|
+
unit: "\u4E07\u5428",
|
|
1846
|
+
frequency: "year",
|
|
1847
|
+
regionScope: "national",
|
|
1848
|
+
measure: "\u5168\u5E74",
|
|
1849
|
+
cid: "b3e5b73b887a46a0a13caf5ee238a194",
|
|
1850
|
+
indicId: "b6ba346ee94f401eb1e9bf4e4de979ed"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
key: "oil-output-year-national",
|
|
1854
|
+
aliases: ["\u539F\u6CB9\u4EA7\u91CF", "\u77F3\u6CB9\u4EA7\u91CF"],
|
|
1855
|
+
name: "\u539F\u6CB9\u4EA7\u91CF",
|
|
1856
|
+
displayName: "\u539F\u6CB9\u4EA7\u91CF (\u4E07\u5428)",
|
|
1857
|
+
unit: "\u4E07\u5428",
|
|
1858
|
+
frequency: "year",
|
|
1859
|
+
regionScope: "national",
|
|
1860
|
+
measure: "\u5168\u5E74",
|
|
1861
|
+
cid: "b3e5b73b887a46a0a13caf5ee238a194",
|
|
1862
|
+
indicId: "5051592ecc8f447daf063f00d582ac41"
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
key: "home-sales-area-year-national",
|
|
1866
|
+
aliases: ["\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF", "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF"],
|
|
1867
|
+
name: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF",
|
|
1868
|
+
displayName: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF (\u4E07\u5E73\u65B9\u7C73)",
|
|
1869
|
+
unit: "\u4E07\u5E73\u65B9\u7C73",
|
|
1870
|
+
frequency: "year",
|
|
1871
|
+
regionScope: "national",
|
|
1872
|
+
measure: "\u5168\u5E74",
|
|
1873
|
+
cid: "5e8a1ec6366a4fb4a3a1614aac306c0a",
|
|
1874
|
+
indicId: "6bb57c9d2b564dc2ac0313e2aaf7cd0c"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
key: "home-sales-amount-year-national",
|
|
1878
|
+
aliases: ["\u5546\u54C1\u623F\u9500\u552E\u989D", "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D"],
|
|
1879
|
+
name: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D",
|
|
1880
|
+
displayName: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u989D (\u4EBF\u5143)",
|
|
1881
|
+
unit: "\u4EBF\u5143",
|
|
1882
|
+
frequency: "year",
|
|
1883
|
+
regionScope: "national",
|
|
1884
|
+
measure: "\u5168\u5E74",
|
|
1885
|
+
cid: "807d81347d634d2b94cbf6a094eac3ff",
|
|
1886
|
+
indicId: "460123eb70df4b0eaaca2fd4c10117fd"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
key: "construction-output-year-province",
|
|
1890
|
+
aliases: ["\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C", "\u5EFA\u7B51\u4E1A\u4EA7\u503C"],
|
|
1891
|
+
name: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C",
|
|
1892
|
+
displayName: "\u5EFA\u7B51\u4E1A\u603B\u4EA7\u503C (\u4EBF\u5143)",
|
|
1893
|
+
unit: "\u4EBF\u5143",
|
|
1894
|
+
frequency: "year",
|
|
1895
|
+
regionScope: "province",
|
|
1896
|
+
measure: "\u5168\u5E74",
|
|
1897
|
+
cid: "fcdaadb9e74848329e0372a2414d29c2",
|
|
1898
|
+
indicId: "f233c23a85d442aa99e189f66601e873"
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
key: "rural-income-year-province",
|
|
1902
|
+
aliases: ["\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u519C\u6751\u5C45\u6C11\u6536\u5165", "\u519C\u6751\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"],
|
|
1903
|
+
name: "\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1904
|
+
displayName: "\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165 (\u5143)",
|
|
1905
|
+
unit: "\u5143",
|
|
1906
|
+
frequency: "year",
|
|
1907
|
+
regionScope: "province",
|
|
1908
|
+
measure: "\u5168\u5E74",
|
|
1909
|
+
cid: "5c072e1073514e448de4132760308fcf",
|
|
1910
|
+
indicId: "5b21e9a08bf74a5c8ba184eb9e9cc195"
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
key: "rural-income-quarter-province",
|
|
1914
|
+
aliases: ["\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165", "\u519C\u6751\u5C45\u6C11\u6536\u5165", "\u519C\u6751\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"],
|
|
1915
|
+
name: "\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165",
|
|
1916
|
+
displayName: "\u519C\u6751\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165\u7D2F\u8BA1\u503C (\u5143)",
|
|
1917
|
+
unit: "\u5143",
|
|
1918
|
+
frequency: "quarter",
|
|
1919
|
+
regionScope: "province",
|
|
1920
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1921
|
+
cid: "1065e991d0c84623bf0e0d012f36c0e3",
|
|
1922
|
+
indicId: "c6a1a68990ea4d6dafad3dbcf530d5cb"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
key: "real-estate-investment-month-national",
|
|
1926
|
+
aliases: ["\u623F\u5730\u4EA7\u6295\u8D44", "\u623F\u5730\u4EA7\u5F00\u53D1\u6295\u8D44", "\u623F\u5730\u4EA7\u6295\u8D44\u7D2F\u8BA1\u503C"],
|
|
1927
|
+
name: "\u623F\u5730\u4EA7\u6295\u8D44",
|
|
1928
|
+
displayName: "\u623F\u5730\u4EA7\u6295\u8D44\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1929
|
+
unit: "\u4EBF\u5143",
|
|
1930
|
+
frequency: "month",
|
|
1931
|
+
regionScope: "national",
|
|
1932
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1933
|
+
cid: "9206137ccf03460daa74b7799e0f3c31",
|
|
1934
|
+
indicId: "bfb626c0dfa04afab67937c452ca9f50"
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
key: "online-goods-retail-month-national",
|
|
1938
|
+
aliases: ["\u5B9E\u7269\u5546\u54C1\u7F51\u4E0A\u96F6\u552E\u989D", "\u5B9E\u7269\u7F51\u4E0A\u96F6\u552E\u989D", "\u5B9E\u7269\u5546\u54C1\u7F51\u4E0A\u96F6\u552E"],
|
|
1939
|
+
name: "\u5B9E\u7269\u5546\u54C1\u7F51\u4E0A\u96F6\u552E\u989D",
|
|
1940
|
+
displayName: "\u5B9E\u7269\u5546\u54C1\u7F51\u4E0A\u96F6\u552E\u989D\u7D2F\u8BA1\u503C (\u4EBF\u5143)",
|
|
1941
|
+
unit: "\u4EBF\u5143",
|
|
1942
|
+
frequency: "month",
|
|
1943
|
+
regionScope: "national",
|
|
1944
|
+
measure: "\u7D2F\u8BA1\u503C",
|
|
1945
|
+
cid: "fb09cbc680fe4d348c9d05f535ebf77c",
|
|
1946
|
+
indicId: "05fbe85e09c842098509c6b29481ab0c"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
key: "industrial-operating-profit-year-province",
|
|
1950
|
+
aliases: ["\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u5229\u6DA6", "\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u5229\u6DA6", "\u5DE5\u4E1A\u8425\u4E1A\u5229\u6DA6"],
|
|
1951
|
+
name: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u5229\u6DA6",
|
|
1952
|
+
displayName: "\u89C4\u6A21\u4EE5\u4E0A\u5DE5\u4E1A\u4F01\u4E1A\u8425\u4E1A\u5229\u6DA6 (\u4EBF\u5143)",
|
|
1953
|
+
unit: "\u4EBF\u5143",
|
|
1954
|
+
frequency: "year",
|
|
1955
|
+
regionScope: "province",
|
|
1956
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1957
|
+
cid: "e5f47e5583a54e4b88993bd7f3fb453b",
|
|
1958
|
+
indicId: "e18ca78062dd4f7a8dc7ab174d6ffdc0"
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
key: "export-year-province",
|
|
1962
|
+
aliases: ["\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u51FA\u53E3\u603B\u989D", "\u51FA\u53E3\u603B\u989D", "\u51FA\u53E3\u989D", "\u51FA\u53E3"],
|
|
1963
|
+
name: "\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u51FA\u53E3\u603B\u989D",
|
|
1964
|
+
displayName: "\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u51FA\u53E3\u603B\u989D (\u5343\u7F8E\u5143)",
|
|
1965
|
+
unit: "\u5343\u7F8E\u5143",
|
|
1966
|
+
frequency: "year",
|
|
1967
|
+
regionScope: "province",
|
|
1968
|
+
measure: "\u5168\u5E74\u603B\u989D",
|
|
1969
|
+
note: "\u5206\u7701\u5E74\u5EA6\u6309\u7ECF\u8425\u5355\u4F4D\u6240\u5728\u5730\u7EDF\u8BA1\uFF0C\u5355\u4F4D\u4E3A\u5343\u7F8E\u5143\u3002",
|
|
1970
|
+
cid: "9c61eb74ddd346d88749f9881837dbc7",
|
|
1971
|
+
indicId: "6a455b4128994239ab90e5cac2e7aa25"
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
key: "home-sales-area-growth-month-province",
|
|
1975
|
+
aliases: [
|
|
1976
|
+
"\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u589E\u901F",
|
|
1977
|
+
"\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u589E\u957F",
|
|
1978
|
+
"\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u7D2F\u8BA1\u589E\u957F",
|
|
1979
|
+
"\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u7D2F\u8BA1\u589E\u957F"
|
|
1980
|
+
],
|
|
1981
|
+
name: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF",
|
|
1982
|
+
displayName: "\u65B0\u5EFA\u5546\u54C1\u623F\u9500\u552E\u9762\u79EF\u7D2F\u8BA1\u589E\u957F (%)",
|
|
1983
|
+
unit: "%",
|
|
1984
|
+
frequency: "month",
|
|
1985
|
+
regionScope: "province",
|
|
1986
|
+
measure: "\u7D2F\u8BA1\u589E\u957F",
|
|
1987
|
+
cid: "91e95a0d0f8244c9a83578cf9862888e",
|
|
1988
|
+
indicId: "f5e66c49668a4536b3f2680c9cef19a4"
|
|
1989
|
+
},
|
|
1990
|
+
// --- Population structure ---
|
|
1991
|
+
{
|
|
1992
|
+
key: "birth-rate-year-national",
|
|
1993
|
+
aliases: ["\u4EBA\u53E3\u51FA\u751F\u7387", "\u51FA\u751F\u7387"],
|
|
1994
|
+
name: "\u4EBA\u53E3\u51FA\u751F\u7387",
|
|
1995
|
+
displayName: "\u4EBA\u53E3\u51FA\u751F\u7387 (\u2030)",
|
|
1996
|
+
unit: "\u2030",
|
|
1997
|
+
frequency: "year",
|
|
1998
|
+
regionScope: "national",
|
|
1999
|
+
measure: "\u5168\u5E74",
|
|
2000
|
+
cid: "ffed4267bba24830beea5991d4c9bcfc",
|
|
2001
|
+
indicId: "3d4006d356d94bdd9d75700b9788e230"
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
key: "death-rate-year-national",
|
|
2005
|
+
aliases: ["\u4EBA\u53E3\u6B7B\u4EA1\u7387", "\u6B7B\u4EA1\u7387"],
|
|
2006
|
+
name: "\u4EBA\u53E3\u6B7B\u4EA1\u7387",
|
|
2007
|
+
displayName: "\u4EBA\u53E3\u6B7B\u4EA1\u7387 (\u2030)",
|
|
2008
|
+
unit: "\u2030",
|
|
2009
|
+
frequency: "year",
|
|
2010
|
+
regionScope: "national",
|
|
2011
|
+
measure: "\u5168\u5E74",
|
|
2012
|
+
cid: "ffed4267bba24830beea5991d4c9bcfc",
|
|
2013
|
+
indicId: "ee4b8be1ad68498e81d9ecddf4d4f2de"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
key: "natural-growth-rate-year-national",
|
|
2017
|
+
aliases: ["\u4EBA\u53E3\u81EA\u7136\u589E\u957F\u7387", "\u81EA\u7136\u589E\u957F\u7387"],
|
|
2018
|
+
name: "\u4EBA\u53E3\u81EA\u7136\u589E\u957F\u7387",
|
|
2019
|
+
displayName: "\u4EBA\u53E3\u81EA\u7136\u589E\u957F\u7387 (\u2030)",
|
|
2020
|
+
unit: "\u2030",
|
|
2021
|
+
frequency: "year",
|
|
2022
|
+
regionScope: "national",
|
|
2023
|
+
measure: "\u5168\u5E74",
|
|
2024
|
+
cid: "ffed4267bba24830beea5991d4c9bcfc",
|
|
2025
|
+
indicId: "3969129b26a846968a7dddff5f326f55"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
key: "dependency-ratio-year-national",
|
|
2029
|
+
aliases: ["\u603B\u629A\u517B\u6BD4", "\u629A\u517B\u6BD4"],
|
|
2030
|
+
name: "\u603B\u629A\u517B\u6BD4",
|
|
2031
|
+
displayName: "\u603B\u629A\u517B\u6BD4 (%)",
|
|
2032
|
+
unit: "%",
|
|
2033
|
+
frequency: "year",
|
|
2034
|
+
regionScope: "national",
|
|
2035
|
+
measure: "\u5E74\u672B",
|
|
2036
|
+
cid: "c7743eefda9d44b5ad2ab0b4f29ba969",
|
|
2037
|
+
indicId: "0d2db39cd5424f5fbca859052413f4ad"
|
|
2038
|
+
},
|
|
2039
|
+
// --- Industrial product output ---
|
|
2040
|
+
{
|
|
2041
|
+
key: "cement-output-year-national",
|
|
2042
|
+
aliases: ["\u6C34\u6CE5\u4EA7\u91CF", "\u6C34\u6CE5"],
|
|
2043
|
+
name: "\u6C34\u6CE5\u4EA7\u91CF",
|
|
2044
|
+
displayName: "\u6C34\u6CE5\u4EA7\u91CF (\u4E07\u5428)",
|
|
2045
|
+
unit: "\u4E07\u5428",
|
|
2046
|
+
frequency: "year",
|
|
2047
|
+
regionScope: "national",
|
|
2048
|
+
measure: "\u5168\u5E74",
|
|
2049
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2050
|
+
indicId: "2cf2aee9e7b34db6ac1afaac0e940104"
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
key: "crude-steel-output-year-national",
|
|
2054
|
+
aliases: ["\u7C97\u94A2\u4EA7\u91CF", "\u7C97\u94A2"],
|
|
2055
|
+
name: "\u7C97\u94A2\u4EA7\u91CF",
|
|
2056
|
+
displayName: "\u7C97\u94A2\u4EA7\u91CF (\u4E07\u5428)",
|
|
2057
|
+
unit: "\u4E07\u5428",
|
|
2058
|
+
frequency: "year",
|
|
2059
|
+
regionScope: "national",
|
|
2060
|
+
measure: "\u5168\u5E74",
|
|
2061
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2062
|
+
indicId: "9a8ee14c26664afa83a25fe39ddcd1c7"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
key: "steel-output-year-national",
|
|
2066
|
+
aliases: ["\u94A2\u6750\u4EA7\u91CF", "\u94A2\u6750"],
|
|
2067
|
+
name: "\u94A2\u6750\u4EA7\u91CF",
|
|
2068
|
+
displayName: "\u94A2\u6750\u4EA7\u91CF (\u4E07\u5428)",
|
|
2069
|
+
unit: "\u4E07\u5428",
|
|
2070
|
+
frequency: "year",
|
|
2071
|
+
regionScope: "national",
|
|
2072
|
+
measure: "\u5168\u5E74",
|
|
2073
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2074
|
+
indicId: "f9276eef033145e0851f878fef58149f"
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
key: "auto-output-year-national",
|
|
2078
|
+
aliases: ["\u6C7D\u8F66\u4EA7\u91CF", "\u6C7D\u8F66"],
|
|
2079
|
+
name: "\u6C7D\u8F66\u4EA7\u91CF",
|
|
2080
|
+
displayName: "\u6C7D\u8F66\u4EA7\u91CF (\u4E07\u8F86)",
|
|
2081
|
+
unit: "\u4E07\u8F86",
|
|
2082
|
+
frequency: "year",
|
|
2083
|
+
regionScope: "national",
|
|
2084
|
+
measure: "\u5168\u5E74",
|
|
2085
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2086
|
+
indicId: "6afdb451350c464686b9a778ee0beab5"
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
key: "mobile-phone-output-year-national",
|
|
2090
|
+
aliases: ["\u79FB\u52A8\u901A\u4FE1\u624B\u6301\u673A\u4EA7\u91CF", "\u624B\u673A\u4EA7\u91CF", "\u624B\u673A"],
|
|
2091
|
+
name: "\u79FB\u52A8\u901A\u4FE1\u624B\u6301\u673A\u4EA7\u91CF",
|
|
2092
|
+
displayName: "\u79FB\u52A8\u901A\u4FE1\u624B\u6301\u673A\u4EA7\u91CF (\u4E07\u53F0)",
|
|
2093
|
+
unit: "\u4E07\u53F0",
|
|
2094
|
+
frequency: "year",
|
|
2095
|
+
regionScope: "national",
|
|
2096
|
+
measure: "\u5168\u5E74",
|
|
2097
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2098
|
+
indicId: "9733ca87a449439cad4006cb9a92190a"
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
key: "integrated-circuit-output-year-national",
|
|
2102
|
+
aliases: ["\u96C6\u6210\u7535\u8DEF\u4EA7\u91CF", "\u96C6\u6210\u7535\u8DEF", "\u82AF\u7247\u4EA7\u91CF"],
|
|
2103
|
+
name: "\u96C6\u6210\u7535\u8DEF\u4EA7\u91CF",
|
|
2104
|
+
displayName: "\u96C6\u6210\u7535\u8DEF\u4EA7\u91CF (\u4E07\u5757)",
|
|
2105
|
+
unit: "\u4E07\u5757",
|
|
2106
|
+
frequency: "year",
|
|
2107
|
+
regionScope: "national",
|
|
2108
|
+
measure: "\u5168\u5E74",
|
|
2109
|
+
cid: "3da0cb2e9c1a4097a8af9fd825093aee",
|
|
2110
|
+
indicId: "1aa41510bc174472a6b375abb71f6a4b"
|
|
2111
|
+
},
|
|
2112
|
+
// --- Fallback fixes ---
|
|
2113
|
+
{
|
|
2114
|
+
key: "state-wage-year-national",
|
|
2115
|
+
aliases: ["\u56FD\u6709\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44", "\u56FD\u6709\u5355\u4F4D\u5E73\u5747\u5DE5\u8D44", "\u56FD\u6709\u5355\u4F4D\u5DE5\u8D44"],
|
|
2116
|
+
name: "\u56FD\u6709\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44",
|
|
2117
|
+
displayName: "\u56FD\u6709\u5355\u4F4D\u5C31\u4E1A\u4EBA\u5458\u5E73\u5747\u5DE5\u8D44 (\u5143)",
|
|
2118
|
+
unit: "\u5143",
|
|
2119
|
+
frequency: "year",
|
|
2120
|
+
regionScope: "national",
|
|
2121
|
+
measure: "\u5168\u5E74",
|
|
2122
|
+
note: "\u56FD\u6709\u5355\u4F4D\u5E73\u5747\u5DE5\u8D44\u6570\u636E\u622A\u81F3 2023\u3002",
|
|
2123
|
+
cid: "0aed53df47b14e7393a98718a320e238",
|
|
2124
|
+
indicId: "5b4528184c1a44738f7c91811a0ac692"
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
key: "coal-share-energy-year-national",
|
|
2128
|
+
aliases: ["\u539F\u7164\u5360\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF\u6BD4\u91CD", "\u539F\u7164\u5360\u80FD\u6E90\u751F\u4EA7\u603B\u91CF\u6BD4\u91CD", "\u7164\u70AD\u5360\u80FD\u6E90\u751F\u4EA7\u603B\u91CF\u6BD4\u91CD"],
|
|
2129
|
+
name: "\u539F\u7164\u5360\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF\u7684\u6BD4\u91CD",
|
|
2130
|
+
displayName: "\u539F\u7164\u5360\u4E00\u6B21\u80FD\u6E90\u751F\u4EA7\u603B\u91CF\u7684\u6BD4\u91CD (%)",
|
|
2131
|
+
unit: "%",
|
|
2132
|
+
frequency: "year",
|
|
2133
|
+
regionScope: "national",
|
|
2134
|
+
measure: "\u5168\u5E74",
|
|
2135
|
+
cid: "48615069f0334639963a48dfbbfc594e",
|
|
2136
|
+
indicId: "4f3e534970aa479dac6651945ed4ba78"
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
key: "age-25-29-unemployment-month-national",
|
|
2140
|
+
aliases: [
|
|
2141
|
+
"25-29\u5C81\u5931\u4E1A\u7387",
|
|
2142
|
+
"25\u201429\u5C81\u5931\u4E1A\u7387",
|
|
2143
|
+
"25-29\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387",
|
|
2144
|
+
"25\u201429\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387",
|
|
2145
|
+
"\u57CE\u954725-29\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387",
|
|
2146
|
+
"\u5168\u56FD\u57CE\u954725-29\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387"
|
|
2147
|
+
],
|
|
2148
|
+
name: "\u5168\u56FD\u57CE\u954725\u201429\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387",
|
|
2149
|
+
displayName: "\u5168\u56FD\u57CE\u954725\u201429\u5C81\u52B3\u52A8\u529B\u5931\u4E1A\u7387 (%)",
|
|
2150
|
+
unit: "%",
|
|
2151
|
+
frequency: "month",
|
|
2152
|
+
regionScope: "national",
|
|
2153
|
+
measure: "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
2154
|
+
cid: "ee3b7046b390415b9b7745e3d16f6052",
|
|
2155
|
+
indicId: "7bc1bd5daeac48ae8bb413c34ece1d08"
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
key: "manufacturing-capacity-quarter-national",
|
|
2159
|
+
aliases: [
|
|
2160
|
+
"\u5236\u9020\u4E1A\u4EA7\u80FD\u5229\u7528\u7387",
|
|
2161
|
+
"\u5236\u9020\u4E1A\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387",
|
|
2162
|
+
"\u5236\u9020\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5F53\u5B63\u503C",
|
|
2163
|
+
"\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5236\u9020\u4E1A\u5F53\u5B63\u503C",
|
|
2164
|
+
"\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5236\u9020\u4E1A"
|
|
2165
|
+
],
|
|
2166
|
+
name: "\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5236\u9020\u4E1A\u5F53\u5B63\u503C",
|
|
2167
|
+
displayName: "\u5DE5\u4E1A\u4EA7\u80FD\u5229\u7528\u7387\u5236\u9020\u4E1A\u5F53\u5B63\u503C (%)",
|
|
2168
|
+
unit: "%",
|
|
2169
|
+
frequency: "quarter",
|
|
2170
|
+
regionScope: "national",
|
|
2171
|
+
measure: "\u5F53\u5B63\u503C",
|
|
2172
|
+
cid: "56a7def4ab0749d8800eab2415f90b54",
|
|
2173
|
+
indicId: "b26d4afe7263486a8573e2d4f55b2f65"
|
|
2174
|
+
},
|
|
2175
|
+
// --- Transport and postal ---
|
|
2176
|
+
{
|
|
2177
|
+
key: "passenger-transport-year-national",
|
|
2178
|
+
aliases: ["\u65C5\u5BA2\u8FD0\u8F93\u91CF", "\u5BA2\u8FD0\u91CF"],
|
|
2179
|
+
name: "\u65C5\u5BA2\u8FD0\u8F93\u91CF",
|
|
2180
|
+
displayName: "\u65C5\u5BA2\u8FD0\u8F93\u91CF (\u4E07\u4EBA)",
|
|
2181
|
+
unit: "\u4E07\u4EBA",
|
|
2182
|
+
frequency: "year",
|
|
2183
|
+
regionScope: "national",
|
|
2184
|
+
measure: "\u5168\u5E74",
|
|
2185
|
+
cid: "283f7c7b317340fe8e5443da77d3dd29",
|
|
2186
|
+
indicId: "cd96dcaddd0c42148276ba61f40651d9"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
key: "passenger-turnover-year-national",
|
|
2190
|
+
aliases: ["\u65C5\u5BA2\u5468\u8F6C\u91CF"],
|
|
2191
|
+
name: "\u65C5\u5BA2\u5468\u8F6C\u91CF",
|
|
2192
|
+
displayName: "\u65C5\u5BA2\u5468\u8F6C\u91CF (\u4EBF\u4EBA\u516C\u91CC)",
|
|
2193
|
+
unit: "\u4EBF\u4EBA\u516C\u91CC",
|
|
2194
|
+
frequency: "year",
|
|
2195
|
+
regionScope: "national",
|
|
2196
|
+
measure: "\u5168\u5E74",
|
|
2197
|
+
cid: "d0b6af034d1c4426be78de4912212744",
|
|
2198
|
+
indicId: "866f18ee57404cf6a5521bc9040e5dfc"
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
key: "freight-transport-year-national",
|
|
2202
|
+
aliases: ["\u8D27\u7269\u8FD0\u8F93\u91CF", "\u8D27\u8FD0\u91CF"],
|
|
2203
|
+
name: "\u8D27\u7269\u8FD0\u8F93\u91CF",
|
|
2204
|
+
displayName: "\u8D27\u7269\u8FD0\u8F93\u91CF (\u4E07\u5428)",
|
|
2205
|
+
unit: "\u4E07\u5428",
|
|
2206
|
+
frequency: "year",
|
|
2207
|
+
regionScope: "national",
|
|
2208
|
+
measure: "\u5168\u5E74",
|
|
2209
|
+
cid: "1afa59232de34e008c2a6e769cd253ed",
|
|
2210
|
+
indicId: "a4c3461ed6094d91819b35a297f60405"
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
key: "freight-turnover-year-national",
|
|
2214
|
+
aliases: ["\u8D27\u7269\u5468\u8F6C\u91CF"],
|
|
2215
|
+
name: "\u8D27\u7269\u5468\u8F6C\u91CF",
|
|
2216
|
+
displayName: "\u8D27\u7269\u5468\u8F6C\u91CF (\u4EBF\u5428\u516C\u91CC)",
|
|
2217
|
+
unit: "\u4EBF\u5428\u516C\u91CC",
|
|
2218
|
+
frequency: "year",
|
|
2219
|
+
regionScope: "national",
|
|
2220
|
+
measure: "\u5168\u5E74",
|
|
2221
|
+
cid: "9de6c6d7119647a9b591b4e464b95157",
|
|
2222
|
+
indicId: "cf1dd80a560546b9b8938a37caee5eab"
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
key: "express-volume-year-national",
|
|
2226
|
+
aliases: ["\u5FEB\u9012\u91CF", "\u5FEB\u9012\u4E1A\u52A1\u91CF"],
|
|
2227
|
+
name: "\u5FEB\u9012\u91CF",
|
|
2228
|
+
displayName: "\u5FEB\u9012\u91CF (\u4E07\u4EF6)",
|
|
2229
|
+
unit: "\u4E07\u4EF6",
|
|
2230
|
+
frequency: "year",
|
|
2231
|
+
regionScope: "national",
|
|
2232
|
+
measure: "\u5168\u5E74",
|
|
2233
|
+
cid: "a98d2811e2a94e388119c772d19980c8",
|
|
2234
|
+
indicId: "614c9517ff954e909beeaff7fb324dbd"
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
key: "express-revenue-year-national",
|
|
2238
|
+
aliases: ["\u5FEB\u9012\u4E1A\u52A1\u6536\u5165", "\u5FEB\u9012\u6536\u5165"],
|
|
2239
|
+
name: "\u5FEB\u9012\u4E1A\u52A1\u6536\u5165",
|
|
2240
|
+
displayName: "\u5FEB\u9012\u4E1A\u52A1\u6536\u5165 (\u4E07\u5143)",
|
|
2241
|
+
unit: "\u4E07\u5143",
|
|
2242
|
+
frequency: "year",
|
|
2243
|
+
regionScope: "national",
|
|
2244
|
+
measure: "\u5168\u5E74",
|
|
2245
|
+
cid: "a98d2811e2a94e388119c772d19980c8",
|
|
2246
|
+
indicId: "7209f8787c974235bf23a09f786447e5"
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
key: "mobile-phone-users-year-national",
|
|
2250
|
+
aliases: ["\u79FB\u52A8\u7535\u8BDD\u7528\u6237", "\u79FB\u52A8\u7535\u8BDD\u5E74\u672B\u7528\u6237", "\u624B\u673A\u7528\u6237"],
|
|
2251
|
+
name: "\u79FB\u52A8\u7535\u8BDD\u5E74\u672B\u7528\u6237",
|
|
2252
|
+
displayName: "\u79FB\u52A8\u7535\u8BDD\u5E74\u672B\u7528\u6237 (\u4E07\u6237)",
|
|
2253
|
+
unit: "\u4E07\u6237",
|
|
2254
|
+
frequency: "year",
|
|
2255
|
+
regionScope: "national",
|
|
2256
|
+
measure: "\u5E74\u672B",
|
|
2257
|
+
cid: "aeb6a15df8174f8eaf8ed66fdda629e9",
|
|
2258
|
+
indicId: "6a6b090595d048f09f34abb984182214"
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
key: "broadband-users-year-national",
|
|
2262
|
+
aliases: ["\u4E92\u8054\u7F51\u5BBD\u5E26\u63A5\u5165\u7528\u6237", "\u5BBD\u5E26\u63A5\u5165\u7528\u6237", "\u5BBD\u5E26\u7528\u6237"],
|
|
2263
|
+
name: "\u4E92\u8054\u7F51\u5BBD\u5E26\u63A5\u5165\u7528\u6237",
|
|
2264
|
+
displayName: "\u4E92\u8054\u7F51\u5BBD\u5E26\u63A5\u5165\u7528\u6237 (\u4E07\u6237)",
|
|
2265
|
+
unit: "\u4E07\u6237",
|
|
2266
|
+
frequency: "year",
|
|
2267
|
+
regionScope: "national",
|
|
2268
|
+
measure: "\u5E74\u672B",
|
|
2269
|
+
cid: "52b81ec946b74166bfb09b2a70105f78",
|
|
2270
|
+
indicId: "4635f9f75639448190338f83e2663371"
|
|
2271
|
+
},
|
|
2272
|
+
// --- Finance ---
|
|
2273
|
+
{
|
|
2274
|
+
key: "m2-year-national",
|
|
2275
|
+
aliases: ["M2", "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01M2\u4F9B\u5E94\u91CF", "\u8D27\u5E01\u4F9B\u5E94\u91CFM2", "\u5E7F\u4E49\u8D27\u5E01\u4F9B\u5E94\u91CF"],
|
|
2276
|
+
name: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01(M2)\u4F9B\u5E94\u91CF",
|
|
2277
|
+
displayName: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01 (M2) \u4F9B\u5E94\u91CF (\u4EBF\u5143)",
|
|
2278
|
+
unit: "\u4EBF\u5143",
|
|
2279
|
+
frequency: "year",
|
|
2280
|
+
regionScope: "national",
|
|
2281
|
+
measure: "\u5E74\u5E95\u4F59\u989D",
|
|
2282
|
+
cid: "b4654f05bda2472a9acf7488086971c3",
|
|
2283
|
+
indicId: "f7fe1af1ef3c4046a62fefd5f0c2be6b"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
key: "deposits-year-national",
|
|
2287
|
+
aliases: [
|
|
2288
|
+
"\u5404\u9879\u5B58\u6B3E",
|
|
2289
|
+
"\u5404\u9879\u5B58\u6B3E\u4F59\u989D",
|
|
2290
|
+
"\u91D1\u878D\u673A\u6784\u5404\u9879\u5B58\u6B3E",
|
|
2291
|
+
"\u91D1\u878D\u673A\u6784\u5404\u9879\u5B58\u6B3E\u4F59\u989D",
|
|
2292
|
+
"\u91D1\u878D\u673A\u6784\u8D44\u91D1\u6765\u6E90\u5404\u9879\u5B58\u6B3E",
|
|
2293
|
+
"\u5B58\u6B3E\u4F59\u989D"
|
|
2294
|
+
],
|
|
2295
|
+
name: "\u91D1\u878D\u673A\u6784\u8D44\u91D1\u6765\u6E90\u5404\u9879\u5B58\u6B3E",
|
|
2296
|
+
displayName: "\u91D1\u878D\u673A\u6784\u8D44\u91D1\u6765\u6E90\u5404\u9879\u5B58\u6B3E (\u4EBF\u5143)",
|
|
2297
|
+
unit: "\u4EBF\u5143",
|
|
2298
|
+
frequency: "year",
|
|
2299
|
+
regionScope: "national",
|
|
2300
|
+
measure: "\u5E74\u5E95\u4F59\u989D",
|
|
2301
|
+
cid: "72d27fd93b834ff28813907c8a80a04b",
|
|
2302
|
+
indicId: "ad0217dc4666437d9148e632c88cbdcd"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
key: "loans-year-national",
|
|
2306
|
+
aliases: [
|
|
2307
|
+
"\u5404\u9879\u8D37\u6B3E",
|
|
2308
|
+
"\u5404\u9879\u8D37\u6B3E\u4F59\u989D",
|
|
2309
|
+
"\u91D1\u878D\u673A\u6784\u5404\u9879\u8D37\u6B3E",
|
|
2310
|
+
"\u91D1\u878D\u673A\u6784\u5404\u9879\u8D37\u6B3E\u4F59\u989D",
|
|
2311
|
+
"\u91D1\u878D\u673A\u6784\u8D44\u91D1\u8FD0\u7528\u5404\u9879\u8D37\u6B3E",
|
|
2312
|
+
"\u8D37\u6B3E\u4F59\u989D"
|
|
2313
|
+
],
|
|
2314
|
+
name: "\u91D1\u878D\u673A\u6784\u8D44\u91D1\u8FD0\u7528\u5404\u9879\u8D37\u6B3E",
|
|
2315
|
+
displayName: "\u91D1\u878D\u673A\u6784\u8D44\u91D1\u8FD0\u7528\u5404\u9879\u8D37\u6B3E (\u4EBF\u5143)",
|
|
2316
|
+
unit: "\u4EBF\u5143",
|
|
2317
|
+
frequency: "year",
|
|
2318
|
+
regionScope: "national",
|
|
2319
|
+
measure: "\u5E74\u5E95\u4F59\u989D",
|
|
2320
|
+
cid: "da757ba930de4ad78b096c0fe497ba76",
|
|
2321
|
+
indicId: "1c1c3a67f80e41cd9ee66ca7e738d735"
|
|
2322
|
+
},
|
|
2323
|
+
// --- Education ---
|
|
2324
|
+
{
|
|
2325
|
+
key: "higher-ed-institutions-year-national",
|
|
2326
|
+
aliases: ["\u666E\u901A\u9AD8\u7B49\u5B66\u6821\u6570", "\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u6570", "\u9AD8\u7B49\u5B66\u6821\u6570", "\u9AD8\u6821\u6570"],
|
|
2327
|
+
name: "\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u6570",
|
|
2328
|
+
displayName: "\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u6570 (\u6240)",
|
|
2329
|
+
unit: "\u6240",
|
|
2330
|
+
frequency: "year",
|
|
2331
|
+
regionScope: "national",
|
|
2332
|
+
measure: "\u5168\u5E74",
|
|
2333
|
+
cid: "091cdd1e6a0648be89e944a61a6aea9d",
|
|
2334
|
+
indicId: "ef144502d27a4b7e8bb55c776ca02f50"
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
key: "higher-ed-students-year-national",
|
|
2338
|
+
aliases: ["\u666E\u901A\u672C\u4E13\u79D1\u5728\u6821\u5B66\u751F\u6570", "\u666E\u901A\u3001\u804C\u4E1A\u672C\u4E13\u79D1\u5728\u6821\u5B66\u751F\u6570", "\u672C\u4E13\u79D1\u5728\u6821\u751F", "\u5728\u6821\u5927\u5B66\u751F"],
|
|
2339
|
+
name: "\u666E\u901A\u3001\u804C\u4E1A\u672C\u4E13\u79D1\u5728\u6821\u5B66\u751F\u6570",
|
|
2340
|
+
displayName: "\u666E\u901A\u3001\u804C\u4E1A\u672C\u4E13\u79D1\u5728\u6821\u5B66\u751F\u6570 (\u4E07\u4EBA)",
|
|
2341
|
+
unit: "\u4E07\u4EBA",
|
|
2342
|
+
frequency: "year",
|
|
2343
|
+
regionScope: "national",
|
|
2344
|
+
measure: "\u5168\u5E74",
|
|
2345
|
+
cid: "66fa7dc25039460d94af99d177bbc512",
|
|
2346
|
+
indicId: "4dc890c99a2b4e0f849dd73733295901"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
key: "higher-ed-teachers-year-national",
|
|
2350
|
+
aliases: [
|
|
2351
|
+
"\u666E\u901A\u9AD8\u7B49\u5B66\u6821\u4E13\u4EFB\u6559\u5E08\u6570",
|
|
2352
|
+
"\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u4E13\u4EFB\u6559\u5E08\u6570",
|
|
2353
|
+
"\u9AD8\u6821\u4E13\u4EFB\u6559\u5E08\u6570",
|
|
2354
|
+
"\u9AD8\u6821\u6559\u5E08\u6570"
|
|
2355
|
+
],
|
|
2356
|
+
name: "\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u4E13\u4EFB\u6559\u5E08\u6570",
|
|
2357
|
+
displayName: "\u666E\u901A\u3001\u804C\u4E1A\u9AD8\u7B49\u5B66\u6821\u4E13\u4EFB\u6559\u5E08\u6570 (\u4E07\u4EBA)",
|
|
2358
|
+
unit: "\u4E07\u4EBA",
|
|
2359
|
+
frequency: "year",
|
|
2360
|
+
regionScope: "national",
|
|
2361
|
+
measure: "\u5168\u5E74",
|
|
2362
|
+
cid: "89988f8a4da848f98e7b402e1e781211",
|
|
2363
|
+
indicId: "948d9aeef0df4b598732dde268d173fc"
|
|
2364
|
+
},
|
|
2365
|
+
// --- Health ---
|
|
2366
|
+
{
|
|
2367
|
+
key: "health-institutions-year-national",
|
|
2368
|
+
aliases: ["\u533B\u7597\u536B\u751F\u673A\u6784\u6570", "\u533B\u7597\u673A\u6784\u6570"],
|
|
2369
|
+
name: "\u533B\u7597\u536B\u751F\u673A\u6784\u6570",
|
|
2370
|
+
displayName: "\u533B\u7597\u536B\u751F\u673A\u6784\u6570 (\u4E2A)",
|
|
2371
|
+
unit: "\u4E2A",
|
|
2372
|
+
frequency: "year",
|
|
2373
|
+
regionScope: "national",
|
|
2374
|
+
measure: "\u5E74\u672B",
|
|
2375
|
+
cid: "e4a03f31f25c4d20823b6c2aec862df2",
|
|
2376
|
+
indicId: "ecc1c2212e8a4beaa36f503cd602ceea"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
key: "health-technicians-year-national",
|
|
2380
|
+
aliases: ["\u536B\u751F\u6280\u672F\u4EBA\u5458\u6570", "\u536B\u751F\u6280\u672F\u4EBA\u5458"],
|
|
2381
|
+
name: "\u536B\u751F\u6280\u672F\u4EBA\u5458\u6570",
|
|
2382
|
+
displayName: "\u536B\u751F\u6280\u672F\u4EBA\u5458\u6570 (\u4E07\u4EBA)",
|
|
2383
|
+
unit: "\u4E07\u4EBA",
|
|
2384
|
+
frequency: "year",
|
|
2385
|
+
regionScope: "national",
|
|
2386
|
+
measure: "\u5E74\u672B",
|
|
2387
|
+
cid: "27fd1733fe6f4503aae77fb53d42b871",
|
|
2388
|
+
indicId: "dd2bc0e2596748acb777d625ef38928d"
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
key: "health-beds-year-national",
|
|
2392
|
+
aliases: ["\u533B\u7597\u536B\u751F\u673A\u6784\u5E8A\u4F4D\u6570", "\u533B\u7597\u536B\u751F\u5E8A\u4F4D\u6570", "\u533B\u9662\u5E8A\u4F4D\u6570"],
|
|
2393
|
+
name: "\u533B\u7597\u536B\u751F\u673A\u6784\u5E8A\u4F4D\u6570",
|
|
2394
|
+
displayName: "\u533B\u7597\u536B\u751F\u673A\u6784\u5E8A\u4F4D\u6570 (\u4E07\u5F20)",
|
|
2395
|
+
unit: "\u4E07\u5F20",
|
|
2396
|
+
frequency: "year",
|
|
2397
|
+
regionScope: "national",
|
|
2398
|
+
measure: "\u5E74\u672B",
|
|
2399
|
+
cid: "5eeed2da1ee748a1a035d3a6608ece67",
|
|
2400
|
+
indicId: "bb0d2ff0b33441bbbf023b15803db641"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
key: "health-expenditure-year-national",
|
|
2404
|
+
aliases: ["\u536B\u751F\u603B\u8D39\u7528", "\u536B\u751F\u603B\u8D39\u7528\u4EBF\u5143"],
|
|
2405
|
+
name: "\u536B\u751F\u603B\u8D39\u7528",
|
|
2406
|
+
displayName: "\u536B\u751F\u603B\u8D39\u7528 (\u4EBF\u5143)",
|
|
2407
|
+
unit: "\u4EBF\u5143",
|
|
2408
|
+
frequency: "year",
|
|
2409
|
+
regionScope: "national",
|
|
2410
|
+
measure: "\u5168\u5E74",
|
|
2411
|
+
cid: "fc2cd81f56644364a359c716b9599748",
|
|
2412
|
+
indicId: "1c60e1bb5c834beabf87a595c56b64f5"
|
|
2413
|
+
},
|
|
2414
|
+
// --- Environment ---
|
|
2415
|
+
{
|
|
2416
|
+
key: "water-supply-year-national",
|
|
2417
|
+
aliases: ["\u4F9B\u6C34\u603B\u91CF", "\u4F9B\u6C34\u603B\u91CF\u4EBF\u7ACB\u65B9\u7C73"],
|
|
2418
|
+
name: "\u4F9B\u6C34\u603B\u91CF",
|
|
2419
|
+
displayName: "\u4F9B\u6C34\u603B\u91CF (\u4EBF\u7ACB\u65B9\u7C73)",
|
|
2420
|
+
unit: "\u4EBF\u7ACB\u65B9\u7C73",
|
|
2421
|
+
frequency: "year",
|
|
2422
|
+
regionScope: "national",
|
|
2423
|
+
measure: "\u5168\u5E74",
|
|
2424
|
+
cid: "a425cb901c8d4979b87cabbd8a71af48",
|
|
2425
|
+
indicId: "002a6e2e7e6345a3be6e4bea79f7ed90"
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
key: "garbage-collected-year-national",
|
|
2429
|
+
aliases: ["\u751F\u6D3B\u5783\u573E\u6E05\u8FD0\u91CF", "\u5783\u573E\u6E05\u8FD0\u91CF"],
|
|
2430
|
+
name: "\u751F\u6D3B\u5783\u573E\u6E05\u8FD0\u91CF",
|
|
2431
|
+
displayName: "\u751F\u6D3B\u5783\u573E\u6E05\u8FD0\u91CF (\u4E07\u5428)",
|
|
2432
|
+
unit: "\u4E07\u5428",
|
|
2433
|
+
frequency: "year",
|
|
2434
|
+
regionScope: "national",
|
|
2435
|
+
measure: "\u5168\u5E74",
|
|
2436
|
+
cid: "ed0b58d0d91f48e388f71550773e746d",
|
|
2437
|
+
indicId: "36f00374b7074c32b63e04f1e8922401"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
key: "garbage-treatment-rate-year-national",
|
|
2441
|
+
aliases: ["\u751F\u6D3B\u5783\u573E\u65E0\u5BB3\u5316\u5904\u7406\u7387", "\u5783\u573E\u65E0\u5BB3\u5316\u5904\u7406\u7387"],
|
|
2442
|
+
name: "\u751F\u6D3B\u5783\u573E\u65E0\u5BB3\u5316\u5904\u7406\u7387",
|
|
2443
|
+
displayName: "\u751F\u6D3B\u5783\u573E\u65E0\u5BB3\u5316\u5904\u7406\u7387 (%)",
|
|
2444
|
+
unit: "%",
|
|
2445
|
+
frequency: "year",
|
|
2446
|
+
regionScope: "national",
|
|
2447
|
+
measure: "\u5168\u5E74",
|
|
2448
|
+
cid: "ed0b58d0d91f48e388f71550773e746d",
|
|
2449
|
+
indicId: "708b2b06668348baae3aed637e2f2747"
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
key: "afforestation-year-national",
|
|
2453
|
+
aliases: ["\u9020\u6797\u603B\u9762\u79EF", "\u9020\u6797\u9762\u79EF"],
|
|
2454
|
+
name: "\u9020\u6797\u603B\u9762\u79EF",
|
|
2455
|
+
displayName: "\u9020\u6797\u603B\u9762\u79EF (\u5343\u516C\u9877)",
|
|
2456
|
+
unit: "\u5343\u516C\u9877",
|
|
2457
|
+
frequency: "year",
|
|
2458
|
+
regionScope: "national",
|
|
2459
|
+
measure: "\u5168\u5E74",
|
|
2460
|
+
cid: "779819b5052d410ca8ed01ff2a8da775",
|
|
2461
|
+
indicId: "dd698d430b56494093e8317c05cb9076"
|
|
2462
|
+
},
|
|
2463
|
+
// --- Industry PPI ---
|
|
2464
|
+
{
|
|
2465
|
+
key: "ppi-coal-year-national",
|
|
2466
|
+
aliases: ["\u7164\u70AD\u5F00\u91C7\u548C\u6D17\u9009\u4E1APPI", "\u7164\u70AD\u5F00\u91C7\u548C\u6D17\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u7164\u70ADPPI"],
|
|
2467
|
+
name: "\u7164\u70AD\u5F00\u91C7\u548C\u6D17\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2468
|
+
displayName: "\u7164\u70AD\u5F00\u91C7\u548C\u6D17\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
2469
|
+
unit: "%",
|
|
2470
|
+
frequency: "year",
|
|
2471
|
+
regionScope: "national",
|
|
2472
|
+
measure: "\u4E0A\u5E74=100",
|
|
2473
|
+
cid: "cf69eaa876494700a818339a13ef207b",
|
|
2474
|
+
indicId: "345d4dcbd90f4dc4b345c7ce22ba88b1"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
key: "ppi-oil-gas-year-national",
|
|
2478
|
+
aliases: ["\u77F3\u6CB9\u548C\u5929\u7136\u6C14\u5F00\u91C7\u4E1APPI", "\u77F3\u6CB9\u548C\u5929\u7136\u6C14\u5F00\u91C7\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u6CB9\u6C14\u5F00\u91C7PPI"],
|
|
2479
|
+
name: "\u77F3\u6CB9\u548C\u5929\u7136\u6C14\u5F00\u91C7\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2480
|
+
displayName: "\u77F3\u6CB9\u548C\u5929\u7136\u6C14\u5F00\u91C7\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
2481
|
+
unit: "%",
|
|
2482
|
+
frequency: "year",
|
|
2483
|
+
regionScope: "national",
|
|
2484
|
+
measure: "\u4E0A\u5E74=100",
|
|
2485
|
+
cid: "cf69eaa876494700a818339a13ef207b",
|
|
2486
|
+
indicId: "e65c3e9357e248ffbc6abfb2623cff54"
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
key: "ppi-ferrous-mining-year-national",
|
|
2490
|
+
aliases: ["\u9ED1\u8272\u91D1\u5C5E\u77FF\u91C7\u9009\u4E1APPI", "\u9ED1\u8272\u91D1\u5C5E\u77FF\u91C7\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u94C1\u77FF\u77F3PPI"],
|
|
2491
|
+
name: "\u9ED1\u8272\u91D1\u5C5E\u77FF\u91C7\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2492
|
+
displayName: "\u9ED1\u8272\u91D1\u5C5E\u77FF\u91C7\u9009\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
2493
|
+
unit: "%",
|
|
2494
|
+
frequency: "year",
|
|
2495
|
+
regionScope: "national",
|
|
2496
|
+
measure: "\u4E0A\u5E74=100",
|
|
2497
|
+
cid: "cf69eaa876494700a818339a13ef207b",
|
|
2498
|
+
indicId: "5fe9e5a93d944b178dc73fe5e0a305e2"
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
key: "ppi-auto-year-national",
|
|
2502
|
+
aliases: ["\u6C7D\u8F66\u5236\u9020\u4E1APPI", "\u6C7D\u8F66\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570", "\u6C7D\u8F66PPI"],
|
|
2503
|
+
name: "\u6C7D\u8F66\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2504
|
+
displayName: "\u6C7D\u8F66\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
2505
|
+
unit: "%",
|
|
2506
|
+
frequency: "year",
|
|
2507
|
+
regionScope: "national",
|
|
2508
|
+
measure: "\u4E0A\u5E74=100",
|
|
2509
|
+
cid: "cf69eaa876494700a818339a13ef207b",
|
|
2510
|
+
indicId: "ef4e87fb412d4bcda71916f67b49e9b4"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
key: "ppi-computer-electronics-year-national",
|
|
2514
|
+
aliases: [
|
|
2515
|
+
"\u8BA1\u7B97\u673A\u901A\u4FE1\u548C\u5176\u4ED6\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1APPI",
|
|
2516
|
+
"\u8BA1\u7B97\u673A\u3001\u901A\u4FE1\u548C\u5176\u4ED6\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1APPI",
|
|
2517
|
+
"\u8BA1\u7B97\u673A\u901A\u4FE1\u548C\u5176\u4ED6\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2518
|
+
"\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1APPI"
|
|
2519
|
+
],
|
|
2520
|
+
name: "\u8BA1\u7B97\u673A\u3001\u901A\u4FE1\u548C\u5176\u4ED6\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570",
|
|
2521
|
+
displayName: "\u8BA1\u7B97\u673A\u3001\u901A\u4FE1\u548C\u5176\u4ED6\u7535\u5B50\u8BBE\u5907\u5236\u9020\u4E1A\u5DE5\u4E1A\u751F\u4EA7\u8005\u51FA\u5382\u4EF7\u683C\u6307\u6570 (\u4E0A\u5E74=100)",
|
|
2522
|
+
unit: "%",
|
|
2523
|
+
frequency: "year",
|
|
2524
|
+
regionScope: "national",
|
|
2525
|
+
measure: "\u4E0A\u5E74=100",
|
|
2526
|
+
cid: "cf69eaa876494700a818339a13ef207b",
|
|
2527
|
+
indicId: "5100ad712cd84b48ab1500d18e83fc73"
|
|
2528
|
+
},
|
|
2529
|
+
// --- Monthly money supply ---
|
|
2530
|
+
{
|
|
2531
|
+
key: "m2-month-national",
|
|
2532
|
+
aliases: ["M2", "M2\u4F59\u989D", "M2\u671F\u672B\u503C", "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01M2\u4F9B\u5E94\u91CF\u671F\u672B\u503C"],
|
|
2533
|
+
name: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01(M2)\u4F9B\u5E94\u91CF\u671F\u672B\u503C",
|
|
2534
|
+
displayName: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01 (M2) \u4F9B\u5E94\u91CF\u671F\u672B\u503C (\u4EBF\u5143)",
|
|
2535
|
+
unit: "\u4EBF\u5143",
|
|
2536
|
+
frequency: "month",
|
|
2537
|
+
regionScope: "national",
|
|
2538
|
+
measure: "\u671F\u672B\u503C",
|
|
2539
|
+
cid: "82130c6621a745cda3d64b090e733383",
|
|
2540
|
+
indicId: "f3c0ae453a54424489af41de315ec592"
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
key: "m2-growth-month-national",
|
|
2544
|
+
aliases: ["M2\u540C\u6BD4", "M2\u589E\u901F", "M2\u540C\u6BD4\u589E\u957F", "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01M2\u4F9B\u5E94\u91CF\u540C\u6BD4\u589E\u957F"],
|
|
2545
|
+
name: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01(M2)\u4F9B\u5E94\u91CF\u540C\u6BD4\u589E\u957F",
|
|
2546
|
+
displayName: "\u8D27\u5E01\u548C\u51C6\u8D27\u5E01 (M2) \u4F9B\u5E94\u91CF\u540C\u6BD4\u589E\u957F (%)",
|
|
2547
|
+
unit: "%",
|
|
2548
|
+
frequency: "month",
|
|
2549
|
+
regionScope: "national",
|
|
2550
|
+
measure: "\u540C\u6BD4\u589E\u957F",
|
|
2551
|
+
cid: "82130c6621a745cda3d64b090e733383",
|
|
2552
|
+
indicId: "e03f2232631f41cd9d754a7d7feb4a81"
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
key: "m1-month-national",
|
|
2556
|
+
aliases: ["M1", "M1\u4F59\u989D", "M1\u671F\u672B\u503C", "\u8D27\u5E01M1\u4F9B\u5E94\u91CF\u671F\u672B\u503C"],
|
|
2557
|
+
name: "\u8D27\u5E01(M1)\u4F9B\u5E94\u91CF\u671F\u672B\u503C",
|
|
2558
|
+
displayName: "\u8D27\u5E01 (M1) \u4F9B\u5E94\u91CF\u671F\u672B\u503C (\u4EBF\u5143)",
|
|
2559
|
+
unit: "\u4EBF\u5143",
|
|
2560
|
+
frequency: "month",
|
|
2561
|
+
regionScope: "national",
|
|
2562
|
+
measure: "\u671F\u672B\u503C",
|
|
2563
|
+
cid: "82130c6621a745cda3d64b090e733383",
|
|
2564
|
+
indicId: "add08d4a1ca049158166f126e169edde"
|
|
2565
|
+
}
|
|
2566
|
+
];
|
|
2567
|
+
function cleanQuery(query2) {
|
|
2568
|
+
let cleaned = stripRegion(query2, regionNames());
|
|
2569
|
+
cleaned = cleaned.replace(/\d{4}\s*Q[1-4]/gi, " ").replace(/\d{4}\s*[-/]\s*\d{1,2}/g, " ").replace(/\d{1,2}\s*[-–—至]\s*\d{1,2}\s*月/g, " ").replace(/\d{4}\s*年?/g, " ").replace(/\d{1,2}\s*月/g, " ").replace(/\d{1,2}\s*日/g, " ").replace(/第?[一二三四1234]\s*季度/g, " ").replace(/(上半年|下半年|全年|年度)/g, " ").replace(/(中国|全国|最新|今年|去年|数据|统计|是多少|多少|查询|一下)/g, " ").replace(/\s+/g, " ").trim();
|
|
2570
|
+
return normalize(cleaned);
|
|
2571
|
+
}
|
|
2572
|
+
function findCurated(query2, period2, regionScope) {
|
|
2573
|
+
const normalized = cleanQuery(query2);
|
|
2574
|
+
if (!normalized) return void 0;
|
|
2575
|
+
let best;
|
|
2576
|
+
for (const entry of CURATED) {
|
|
2577
|
+
if (entry.frequency !== period2) continue;
|
|
2578
|
+
if (entry.regionScope !== "any" && entry.regionScope !== regionScope) continue;
|
|
2579
|
+
for (const alias of entry.aliases) {
|
|
2580
|
+
const candidate = normalize(alias);
|
|
2581
|
+
if (!candidate || normalized !== candidate) continue;
|
|
2582
|
+
const score = 100 + candidate.length;
|
|
2583
|
+
if (!best || score > best.score) best = { entry, score };
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
return best?.entry;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
// src/resolver.ts
|
|
2590
|
+
var PERIOD_CODE = {
|
|
2591
|
+
year: "3",
|
|
2592
|
+
quarter: "2",
|
|
2593
|
+
month: "1"
|
|
2594
|
+
};
|
|
2595
|
+
var SUGGESTIONS = [
|
|
2596
|
+
"GDP",
|
|
2597
|
+
"CPI",
|
|
2598
|
+
"PPI",
|
|
2599
|
+
"\u4EBA\u53E3",
|
|
2600
|
+
"\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D",
|
|
2601
|
+
"\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44",
|
|
2602
|
+
"\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387",
|
|
2603
|
+
"\u5C45\u6C11\u4EBA\u5747\u53EF\u652F\u914D\u6536\u5165"
|
|
2604
|
+
];
|
|
2605
|
+
var QUALIFIER_TERMS = [
|
|
2606
|
+
"\u57CE\u9547",
|
|
2607
|
+
"\u519C\u6751",
|
|
2608
|
+
"\u590F\u6536",
|
|
2609
|
+
"\u79CB\u6536",
|
|
2610
|
+
"\u7A0E\u6536",
|
|
2611
|
+
"\u652F\u51FA",
|
|
2612
|
+
"\u6536\u5165",
|
|
2613
|
+
"\u5229\u6DA6",
|
|
2614
|
+
"\u8425\u4E1A\u6536\u5165",
|
|
2615
|
+
"\u603B\u4EA7\u91CF",
|
|
2616
|
+
"\u9500\u552E\u989D",
|
|
2617
|
+
"\u9500\u552E\u9762\u79EF",
|
|
2618
|
+
"\u623F\u5730\u4EA7",
|
|
2619
|
+
"\u8FDB\u53E3",
|
|
2620
|
+
"\u51FA\u53E3",
|
|
2621
|
+
"\u56FD\u6709",
|
|
2622
|
+
"\u6C11\u95F4",
|
|
2623
|
+
"\u65B0\u5EFA",
|
|
2624
|
+
"\u6269\u5EFA",
|
|
2625
|
+
"\u6539\u5EFA",
|
|
2626
|
+
"\u4F4F\u5B85"
|
|
2627
|
+
];
|
|
2628
|
+
function rawNormalize(text) {
|
|
2629
|
+
return text.toLowerCase().replace(/[\s,,.。;;::、!?!?"'“”‘’\-_/\\|]/g, "").trim();
|
|
2630
|
+
}
|
|
2631
|
+
function containsTerm(text, term) {
|
|
2632
|
+
return rawNormalize(text).includes(rawNormalize(term));
|
|
2633
|
+
}
|
|
2634
|
+
function containsAny(text, terms) {
|
|
2635
|
+
return terms.some((term) => containsTerm(text, term));
|
|
2636
|
+
}
|
|
2637
|
+
function periodCode(period2) {
|
|
2638
|
+
return PERIOD_CODE[period2];
|
|
2639
|
+
}
|
|
2640
|
+
function displayNameFor(record) {
|
|
2641
|
+
return record.showName.trim() || record.name || "";
|
|
2642
|
+
}
|
|
2643
|
+
function measureFor(record) {
|
|
2644
|
+
const text = record.showName;
|
|
2645
|
+
const measures = [
|
|
2646
|
+
"\u7D2F\u8BA1\u503C",
|
|
2647
|
+
"\u5F53\u5B63\u503C",
|
|
2648
|
+
"\u5F53\u6708\u503C",
|
|
2649
|
+
"\u4E0A\u5E74\u540C\u6708=100",
|
|
2650
|
+
"\u4E0A\u5E74\u540C\u671F=100",
|
|
2651
|
+
"\u4E0A\u5E74=100",
|
|
2652
|
+
"\u4E0D\u53D8\u4EF7",
|
|
2653
|
+
"\u73B0\u4EF7",
|
|
2654
|
+
"\u8D21\u732E\u7387",
|
|
2655
|
+
"\u62C9\u52A8",
|
|
2656
|
+
"\u4EBA\u5747",
|
|
2657
|
+
"\u73AF\u6BD4",
|
|
2658
|
+
"\u540C\u6BD4",
|
|
2659
|
+
"\u6307\u6570",
|
|
2660
|
+
"\u6784\u6210"
|
|
2661
|
+
];
|
|
2662
|
+
const found = measures.filter((measure) => text.includes(measure));
|
|
2663
|
+
return found.length > 0 ? found.join(" / ") : void 0;
|
|
2664
|
+
}
|
|
2665
|
+
function toCandidate(record, score, reasons) {
|
|
2666
|
+
return {
|
|
2667
|
+
id: `${record.cid}:${record.indicId}`,
|
|
2668
|
+
name: record.name ?? record.showName,
|
|
2669
|
+
displayName: displayNameFor(record),
|
|
2670
|
+
unit: record.unit,
|
|
2671
|
+
frequency: record.frequency,
|
|
2672
|
+
region: record.region,
|
|
2673
|
+
measure: measureFor(record),
|
|
2674
|
+
score,
|
|
2675
|
+
reasons
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
function toResolved(record, source) {
|
|
2679
|
+
return {
|
|
2680
|
+
cid: record.cid,
|
|
2681
|
+
indicId: record.indicId,
|
|
2682
|
+
name: record.name ?? record.showName,
|
|
2683
|
+
displayName: displayNameFor(record),
|
|
2684
|
+
unit: record.unit,
|
|
2685
|
+
frequency: record.frequency ?? "year",
|
|
2686
|
+
region: record.region,
|
|
2687
|
+
regionCode: record.regionCode,
|
|
2688
|
+
measure: measureFor(record),
|
|
2689
|
+
source
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
function fromCurated(entry, region2) {
|
|
2693
|
+
return {
|
|
2694
|
+
cid: entry.cid,
|
|
2695
|
+
indicId: entry.indicId,
|
|
2696
|
+
name: entry.name,
|
|
2697
|
+
displayName: entry.displayName,
|
|
2698
|
+
unit: entry.unit,
|
|
2699
|
+
frequency: entry.frequency,
|
|
2700
|
+
region: region2.text,
|
|
2701
|
+
regionCode: region2.value,
|
|
2702
|
+
measure: entry.measure,
|
|
2703
|
+
note: entry.note,
|
|
2704
|
+
shards: entry.shards,
|
|
2705
|
+
source: "curated"
|
|
2706
|
+
};
|
|
2707
|
+
}
|
|
2708
|
+
function latestFirst(a, b) {
|
|
2709
|
+
if (a.dt !== b.dt) return a.dt > b.dt ? a : b;
|
|
2710
|
+
if (a.name && !b.name) return a;
|
|
2711
|
+
if (b.name && !a.name) return b;
|
|
2712
|
+
return a;
|
|
2713
|
+
}
|
|
2714
|
+
function dedupeRecords(records) {
|
|
2715
|
+
const map = /* @__PURE__ */ new Map();
|
|
2716
|
+
for (const record of records) {
|
|
2717
|
+
const key = `${record.cid}:${record.indicId}`;
|
|
2718
|
+
const existing = map.get(key);
|
|
2719
|
+
if (!existing) {
|
|
2720
|
+
map.set(key, { ...record });
|
|
2721
|
+
continue;
|
|
2722
|
+
}
|
|
2723
|
+
const latest = latestFirst(existing, record);
|
|
2724
|
+
map.set(key, {
|
|
2725
|
+
...latest,
|
|
2726
|
+
name: latest.name ?? existing.name ?? record.name,
|
|
2727
|
+
unit: latest.unit ?? existing.unit ?? record.unit,
|
|
2728
|
+
frequency: latest.frequency ?? existing.frequency ?? record.frequency
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
return [...map.values()];
|
|
2732
|
+
}
|
|
2733
|
+
function scoreRecord(record, query2, period2, region2) {
|
|
2734
|
+
const reasons = [];
|
|
2735
|
+
let score = 0;
|
|
2736
|
+
const text = `${record.name ?? ""} ${record.showName}`;
|
|
2737
|
+
const normalizedName = normalize(record.name ?? "");
|
|
2738
|
+
const normalizedShow = normalize(record.showName);
|
|
2739
|
+
const cleaned = cleanQuery(query2);
|
|
2740
|
+
const fullQuery = canonicalName(cleaned);
|
|
2741
|
+
const aliases = expandAliases(cleaned).map(canonicalName).filter(Boolean);
|
|
2742
|
+
const tokens = queryTokens(cleaned);
|
|
2743
|
+
let exact = false;
|
|
2744
|
+
let contains = false;
|
|
2745
|
+
if (fullQuery) {
|
|
2746
|
+
if (normalizedName === fullQuery || normalizedShow === fullQuery) exact = true;
|
|
2747
|
+
else if (normalizedName.includes(fullQuery) || normalizedShow.includes(fullQuery))
|
|
2748
|
+
contains = true;
|
|
2749
|
+
else if (fullQuery.includes(normalizedName) && normalizedName.length >= 2) contains = true;
|
|
2750
|
+
}
|
|
2751
|
+
for (const alias of aliases) {
|
|
2752
|
+
if (!alias || alias === fullQuery) continue;
|
|
2753
|
+
if (fullQuery.includes(alias)) continue;
|
|
2754
|
+
if (normalizedName === alias || normalizedShow === alias) exact = true;
|
|
2755
|
+
else if (normalizedName.includes(alias) || normalizedShow.includes(alias)) contains = true;
|
|
2756
|
+
}
|
|
2757
|
+
if (exact) {
|
|
2758
|
+
score += 50;
|
|
2759
|
+
reasons.push("\u540D\u79F0\u5B8C\u5168\u5339\u914D +50");
|
|
2760
|
+
if (normalizedShow === fullQuery) {
|
|
2761
|
+
score += 10;
|
|
2762
|
+
reasons.push("\u5C55\u793A\u540D\u5B8C\u5168\u5339\u914D +10");
|
|
2763
|
+
}
|
|
2764
|
+
} else if (contains) {
|
|
2765
|
+
score += 25;
|
|
2766
|
+
reasons.push("\u540D\u79F0\u5305\u542B\u5173\u952E\u8BCD +25");
|
|
2767
|
+
} else if (normalizedName && fullQuery.includes(normalizedName)) {
|
|
2768
|
+
score += 15;
|
|
2769
|
+
reasons.push("\u540D\u79F0\u88AB\u67E5\u8BE2\u5305\u542B +15");
|
|
2770
|
+
}
|
|
2771
|
+
const tokenHits = tokens.filter(
|
|
2772
|
+
(token) => normalizedName.includes(token) || normalizedShow.includes(token)
|
|
2773
|
+
);
|
|
2774
|
+
if (tokenHits.length > 0) {
|
|
2775
|
+
score += tokenHits.length * 6;
|
|
2776
|
+
reasons.push(`\u5173\u952E\u8BCD\u547D\u4E2D ${tokenHits.length} \u4E2A +${tokenHits.length * 6}`);
|
|
2777
|
+
}
|
|
2778
|
+
if (tokens.length > 0 && tokenHits.length === tokens.length) {
|
|
2779
|
+
score += 12;
|
|
2780
|
+
reasons.push("\u5168\u90E8\u5173\u952E\u8BCD\u547D\u4E2D +12");
|
|
2781
|
+
}
|
|
2782
|
+
if (!record.name) {
|
|
2783
|
+
score -= 5;
|
|
2784
|
+
reasons.push("\u7F3A\u5C11\u6307\u6807\u540D -5");
|
|
2785
|
+
}
|
|
2786
|
+
if (record.frequency === period2) {
|
|
2787
|
+
score += 30;
|
|
2788
|
+
reasons.push("\u9891\u7387\u5339\u914D +30");
|
|
2789
|
+
} else {
|
|
2790
|
+
score -= 40;
|
|
2791
|
+
reasons.push("\u9891\u7387\u4E0D\u5339\u914D -40");
|
|
2792
|
+
}
|
|
2793
|
+
if (record.typeValue === periodCode(period2)) {
|
|
2794
|
+
score += 10;
|
|
2795
|
+
reasons.push("\u6570\u636E\u7C7B\u578B\u5339\u914D +10");
|
|
2796
|
+
}
|
|
2797
|
+
if (region2.national) {
|
|
2798
|
+
if (record.region.includes("\u5168\u56FD")) {
|
|
2799
|
+
score += 30;
|
|
2800
|
+
reasons.push("\u5730\u533A\u5339\u914D +30");
|
|
2801
|
+
} else {
|
|
2802
|
+
score -= 25;
|
|
2803
|
+
reasons.push("\u5730\u533A\u4E0D\u5339\u914D -25");
|
|
2804
|
+
}
|
|
2805
|
+
} else {
|
|
2806
|
+
const short = region2.text.replace(/(省|市|自治区|特别行政区|壮族|回族|维吾尔|藏族|蒙古)/g, "");
|
|
2807
|
+
if (record.region.includes(region2.text) || record.region.includes(short)) {
|
|
2808
|
+
score += 30;
|
|
2809
|
+
reasons.push("\u5730\u533A\u5339\u914D +30");
|
|
2810
|
+
} else if (record.region.includes("\u5168\u56FD")) {
|
|
2811
|
+
score -= 20;
|
|
2812
|
+
reasons.push("\u5168\u56FD\u6570\u636E\u4E0E\u5206\u7701\u67E5\u8BE2\u4E0D\u5339\u914D -20");
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
const unit = record.unit ?? "";
|
|
2816
|
+
const qGrowth = hasAny(query2, MEASURE_TERMS.growth);
|
|
2817
|
+
const qIndex = hasAny(query2, MEASURE_TERMS.index);
|
|
2818
|
+
const qPerCapita = hasAny(query2, MEASURE_TERMS.perCapita);
|
|
2819
|
+
const qContribution = hasAny(query2, MEASURE_TERMS.contribution);
|
|
2820
|
+
const qCumulative = hasAny(query2, MEASURE_TERMS.cumulative);
|
|
2821
|
+
const qCurrent = hasAny(query2, MEASURE_TERMS.current);
|
|
2822
|
+
const qConstant = hasAny(query2, MEASURE_TERMS.constantPrice);
|
|
2823
|
+
const isPriceIndex = /价格|CPI|物价|指数/i.test(query2) || /价格/.test(text);
|
|
2824
|
+
if (qGrowth) {
|
|
2825
|
+
if (/%|=100/.test(`${unit} ${text}`) || containsAny(text, ["\u589E\u957F", "\u589E\u901F"])) {
|
|
2826
|
+
score += 20;
|
|
2827
|
+
reasons.push("\u589E\u901F\u53E3\u5F84 +20");
|
|
2828
|
+
}
|
|
2829
|
+
if (/亿元|万元/.test(unit)) {
|
|
2830
|
+
score -= 15;
|
|
2831
|
+
reasons.push("\u603B\u91CF\u5355\u4F4D\u4E0E\u589E\u901F\u4E0D\u7B26 -15");
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
if (qIndex) {
|
|
2835
|
+
if (/=100/.test(`${unit} ${text}`) || containsTerm(text, "\u6307\u6570")) {
|
|
2836
|
+
score += 20;
|
|
2837
|
+
reasons.push("\u6307\u6570\u53E3\u5F84 +20");
|
|
2838
|
+
}
|
|
2839
|
+
if (/亿元|万元/.test(unit)) {
|
|
2840
|
+
score -= 10;
|
|
2841
|
+
reasons.push("\u603B\u91CF\u5355\u4F4D\u4E0E\u6307\u6570\u4E0D\u7B26 -10");
|
|
2842
|
+
}
|
|
2843
|
+
if (!containsTerm(text, "\u6307\u6570") && !/=100/.test(`${unit} ${text}`)) {
|
|
2844
|
+
score -= 25;
|
|
2845
|
+
reasons.push("\u540D\u79F0\u4E0D\u542B\u6307\u6570 -25");
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
if (qPerCapita) {
|
|
2849
|
+
if (containsTerm(text, "\u4EBA\u5747")) {
|
|
2850
|
+
score += 30;
|
|
2851
|
+
reasons.push("\u4EBA\u5747\u53E3\u5F84 +30");
|
|
2852
|
+
} else {
|
|
2853
|
+
score -= 15;
|
|
2854
|
+
reasons.push("\u975E\u4EBA\u5747\u53E3\u5F84 -15");
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
if (qContribution) {
|
|
2858
|
+
if (containsAny(text, MEASURE_TERMS.contribution)) {
|
|
2859
|
+
score += 25;
|
|
2860
|
+
reasons.push("\u8D21\u732E\u7387\u53E3\u5F84 +25");
|
|
2861
|
+
} else {
|
|
2862
|
+
score -= 15;
|
|
2863
|
+
reasons.push("\u975E\u8D21\u732E\u7387\u53E3\u5F84 -15");
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
if (qCumulative) {
|
|
2867
|
+
if (containsTerm(text, "\u7D2F\u8BA1")) {
|
|
2868
|
+
score += 20;
|
|
2869
|
+
reasons.push("\u7D2F\u8BA1\u53E3\u5F84 +20");
|
|
2870
|
+
}
|
|
2871
|
+
if (containsTerm(text, "\u5F53\u5B63") || containsTerm(text, "\u5F53\u6708")) {
|
|
2872
|
+
score -= 10;
|
|
2873
|
+
reasons.push("\u5F53\u5B63\u53E3\u5F84\u4E0E\u7D2F\u8BA1\u4E0D\u7B26 -10");
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
if (qCurrent) {
|
|
2877
|
+
if (containsAny(text, ["\u5F53\u5B63", "\u5F53\u6708"])) {
|
|
2878
|
+
score += 20;
|
|
2879
|
+
reasons.push("\u5F53\u5B63/\u5F53\u6708\u53E3\u5F84 +20");
|
|
2880
|
+
}
|
|
2881
|
+
if (containsTerm(text, "\u7D2F\u8BA1")) {
|
|
2882
|
+
score -= 10;
|
|
2883
|
+
reasons.push("\u7D2F\u8BA1\u53E3\u5F84\u4E0E\u5F53\u5B63\u4E0D\u7B26 -10");
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
if (qConstant) {
|
|
2887
|
+
if (containsTerm(text, "\u4E0D\u53D8\u4EF7")) {
|
|
2888
|
+
score += 25;
|
|
2889
|
+
reasons.push("\u4E0D\u53D8\u4EF7\u53E3\u5F84 +25");
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
const noMeasure = !qGrowth && !qIndex && !qPerCapita && !qContribution && !qCumulative && !qCurrent && !qConstant;
|
|
2893
|
+
if (noMeasure) {
|
|
2894
|
+
if (isPriceIndex) {
|
|
2895
|
+
if (/=100/.test(`${unit} ${text}`)) {
|
|
2896
|
+
score += 15;
|
|
2897
|
+
reasons.push("\u4EF7\u683C\u6307\u6570\u9ED8\u8BA4\u540C\u6BD4\u53E3\u5F84 +15");
|
|
2898
|
+
}
|
|
2899
|
+
if (unit === "%") {
|
|
2900
|
+
score -= 5;
|
|
2901
|
+
reasons.push("\u4EF7\u683C\u6307\u6570\u9ED8\u8BA4\u4E0D\u9009\u767E\u5206\u6BD4 -5");
|
|
2902
|
+
}
|
|
2903
|
+
} else {
|
|
2904
|
+
if (/亿元|万元|元|万吨|万人|亿人/.test(unit)) {
|
|
2905
|
+
score += 15;
|
|
2906
|
+
reasons.push("\u9ED8\u8BA4\u603B\u91CF\u5355\u4F4D +15");
|
|
2907
|
+
}
|
|
2908
|
+
if (unit === "%") {
|
|
2909
|
+
score -= 10;
|
|
2910
|
+
reasons.push("\u9ED8\u8BA4\u4E0D\u9009\u767E\u5206\u6BD4 -10");
|
|
2911
|
+
}
|
|
2912
|
+
if (unit.includes("=100")) {
|
|
2913
|
+
score -= 5;
|
|
2914
|
+
reasons.push("\u9ED8\u8BA4\u4E0D\u9009\u5B9A\u57FA\u6307\u6570 -5");
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
if (!qContribution && containsAny(text, MEASURE_TERMS.contribution)) {
|
|
2919
|
+
score -= 25;
|
|
2920
|
+
reasons.push("\u672A\u8BE2\u95EE\u8D21\u732E\u7387/\u62C9\u52A8/\u6784\u6210 -25");
|
|
2921
|
+
}
|
|
2922
|
+
if (!qIndex && containsTerm(text, "\u6307\u6570")) {
|
|
2923
|
+
score -= 15;
|
|
2924
|
+
reasons.push("\u672A\u8BE2\u95EE\u6307\u6570 -15");
|
|
2925
|
+
}
|
|
2926
|
+
if (!qPerCapita && containsTerm(text, "\u4EBA\u5747")) {
|
|
2927
|
+
score -= 25;
|
|
2928
|
+
reasons.push("\u672A\u8BE2\u95EE\u4EBA\u5747 -25");
|
|
2929
|
+
}
|
|
2930
|
+
if (!qConstant && containsTerm(text, "\u4E0D\u53D8\u4EF7")) {
|
|
2931
|
+
score -= 20;
|
|
2932
|
+
reasons.push("\u672A\u8BE2\u95EE\u4E0D\u53D8\u4EF7 -20");
|
|
2933
|
+
}
|
|
2934
|
+
if (!qGrowth && containsAny(text, ["\u589E\u957F\u7387", "\u589E\u957F\u901F\u5EA6"])) {
|
|
2935
|
+
score -= 10;
|
|
2936
|
+
reasons.push("\u672A\u8BE2\u95EE\u589E\u901F -10");
|
|
2937
|
+
}
|
|
2938
|
+
const asksGrowth = qGrowth || /增长|增速|同比|环比/.test(cleaned);
|
|
2939
|
+
if (!asksGrowth && containsTerm(text, "\u589E\u957F")) {
|
|
2940
|
+
score -= 15;
|
|
2941
|
+
reasons.push("\u672A\u8BE2\u95EE\u589E\u957F -15");
|
|
2942
|
+
}
|
|
2943
|
+
if (!cleaned.includes("\u5355\u4F4D\u9762\u79EF") && containsTerm(text, "\u5355\u4F4D\u9762\u79EF")) {
|
|
2944
|
+
score -= 20;
|
|
2945
|
+
reasons.push("\u672A\u8BE2\u95EE\u5355\u4F4D\u9762\u79EF -20");
|
|
2946
|
+
}
|
|
2947
|
+
for (const component of ["\u5DE5\u8D44\u6027", "\u7ECF\u8425\u51C0", "\u8D22\u4EA7\u51C0", "\u8F6C\u79FB\u51C0", "\u4E2D\u4F4D\u6570"]) {
|
|
2948
|
+
if (!cleaned.includes(component) && containsTerm(text, component)) {
|
|
2949
|
+
score -= 15;
|
|
2950
|
+
reasons.push(`\u672A\u8BE2\u95EE${component}\u6536\u5165 -15`);
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
if (!qCumulative && containsTerm(text, "\u7D2F\u8BA1")) {
|
|
2954
|
+
score -= 5;
|
|
2955
|
+
reasons.push("\u672A\u8BE2\u95EE\u7D2F\u8BA1 -5");
|
|
2956
|
+
}
|
|
2957
|
+
if (!qCurrent && containsAny(text, ["\u5F53\u5B63", "\u5F53\u6708"])) {
|
|
2958
|
+
score -= 5;
|
|
2959
|
+
reasons.push("\u672A\u8BE2\u95EE\u5F53\u5B63/\u5F53\u6708 -5");
|
|
2960
|
+
}
|
|
2961
|
+
if (containsTerm(text, "\u73AF\u6BD4")) {
|
|
2962
|
+
score -= 10;
|
|
2963
|
+
reasons.push("\u73AF\u6BD4\u53E3\u5F84\u964D\u6743 -10");
|
|
2964
|
+
}
|
|
2965
|
+
if (!query2.includes("\u652F\u51FA\u6CD5") && containsTerm(text, "\u652F\u51FA\u6CD5")) {
|
|
2966
|
+
score -= 15;
|
|
2967
|
+
reasons.push("\u672A\u8BE2\u95EE\u652F\u51FA\u6CD5 -15");
|
|
2968
|
+
}
|
|
2969
|
+
if (!query2.includes("\u6C11\u65CF\u81EA\u6CBB") && containsTerm(text, "\u6C11\u65CF\u81EA\u6CBB")) {
|
|
2970
|
+
score -= 20;
|
|
2971
|
+
reasons.push("\u672A\u8BE2\u95EE\u6C11\u65CF\u81EA\u6CBB\u5730\u65B9 -20");
|
|
2972
|
+
}
|
|
2973
|
+
if (!query2.includes("\u5B9A\u57FA") && /1978年?=100|1985年?=100/.test(`${unit} ${text}`)) {
|
|
2974
|
+
score -= 20;
|
|
2975
|
+
reasons.push("\u975E\u5B9A\u57FA\u67E5\u8BE2\u964D\u6743 -20");
|
|
2976
|
+
}
|
|
2977
|
+
if (!query2.includes("\u62BD\u6837") && containsTerm(text, "\u62BD\u6837\u8C03\u67E5")) {
|
|
2978
|
+
score -= 15;
|
|
2979
|
+
reasons.push("\u672A\u8BE2\u95EE\u62BD\u6837\u8C03\u67E5 -15");
|
|
2980
|
+
}
|
|
2981
|
+
if (!query2.includes("\u7537") && containsTerm(text, "\u7537\u6027")) {
|
|
2982
|
+
score -= 10;
|
|
2983
|
+
reasons.push("\u672A\u8BE2\u95EE\u7537\u6027\u4EBA\u53E3 -10");
|
|
2984
|
+
}
|
|
2985
|
+
if (!query2.includes("\u5973") && containsTerm(text, "\u5973\u6027")) {
|
|
2986
|
+
score -= 10;
|
|
2987
|
+
reasons.push("\u672A\u8BE2\u95EE\u5973\u6027\u4EBA\u53E3 -10");
|
|
2988
|
+
}
|
|
2989
|
+
if (!query2.includes("\u57CE\u9547") && containsTerm(text, "\u57CE\u9547\u4EBA\u53E3")) {
|
|
2990
|
+
score -= 10;
|
|
2991
|
+
reasons.push("\u672A\u8BE2\u95EE\u57CE\u9547\u4EBA\u53E3 -10");
|
|
2992
|
+
}
|
|
2993
|
+
if (!query2.includes("\u4E61\u6751") && containsTerm(text, "\u4E61\u6751\u4EBA\u53E3")) {
|
|
2994
|
+
score -= 10;
|
|
2995
|
+
reasons.push("\u672A\u8BE2\u95EE\u4E61\u6751\u4EBA\u53E3 -10");
|
|
2996
|
+
}
|
|
2997
|
+
for (const term of QUALIFIER_TERMS) {
|
|
2998
|
+
const inQuery = containsTerm(query2, term);
|
|
2999
|
+
const inText = containsTerm(text, term);
|
|
3000
|
+
if (inQuery && inText) {
|
|
3001
|
+
score += 12;
|
|
3002
|
+
reasons.push(`\u9650\u5B9A\u8BCD ${term} +12`);
|
|
3003
|
+
} else if (inQuery && !inText) {
|
|
3004
|
+
score -= 10;
|
|
3005
|
+
reasons.push(`\u7F3A\u5C11\u9650\u5B9A\u8BCD ${term} -10`);
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
if (record.dt) {
|
|
3009
|
+
score += 5;
|
|
3010
|
+
reasons.push("\u6709\u6700\u65B0\u6570\u636E +5");
|
|
3011
|
+
}
|
|
3012
|
+
return { score, reasons };
|
|
3013
|
+
}
|
|
3014
|
+
function decide(scored, source = "search") {
|
|
3015
|
+
if (scored.length === 0) return { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3016
|
+
const sorted = [...scored].sort((a, b) => b.score - a.score);
|
|
3017
|
+
const top = sorted[0];
|
|
3018
|
+
if (!top) return { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3019
|
+
const second = sorted[1];
|
|
3020
|
+
const gap = second ? top.score - second.score : Number.POSITIVE_INFINITY;
|
|
3021
|
+
const confident = top.score >= 80 && gap >= 10 || top.score >= 60 && gap >= 20 || top.score >= 45 && !second;
|
|
3022
|
+
if (confident) {
|
|
3023
|
+
return { kind: "resolved", indicator: toResolved(top.record, source) };
|
|
3024
|
+
}
|
|
3025
|
+
if (top.score >= 30) {
|
|
3026
|
+
return {
|
|
3027
|
+
kind: "ambiguous",
|
|
3028
|
+
candidates: sorted.slice(0, 3).map((item) => toCandidate(item.record, item.score, item.reasons))
|
|
3029
|
+
};
|
|
3030
|
+
}
|
|
3031
|
+
return { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3032
|
+
}
|
|
3033
|
+
async function resolveFromSearch(provider, query2, period2, region2, options) {
|
|
3034
|
+
const result = await provider.search({
|
|
3035
|
+
keyword: query2,
|
|
3036
|
+
period: period2,
|
|
3037
|
+
pageSize: 50,
|
|
3038
|
+
signal: options.signal,
|
|
3039
|
+
noCache: options.noCache
|
|
3040
|
+
});
|
|
3041
|
+
const records = dedupeRecords(result.records);
|
|
3042
|
+
const scored = records.map((record) => {
|
|
3043
|
+
const { score, reasons } = scoreRecord(record, query2, period2, region2);
|
|
3044
|
+
return { record, score, reasons };
|
|
3045
|
+
}).filter((item) => item.score > 0);
|
|
3046
|
+
return decide(scored);
|
|
3047
|
+
}
|
|
3048
|
+
function categoryHints(query2) {
|
|
3049
|
+
const text = normalize(query2);
|
|
3050
|
+
const hints = [];
|
|
3051
|
+
if (/gdp|国内生产总值|地区生产总值|经济总量|生产总值/.test(text)) {
|
|
3052
|
+
hints.push("\u56FD\u6C11\u7ECF\u6D4E\u6838\u7B97", "\u7EFC\u5408");
|
|
3053
|
+
}
|
|
3054
|
+
if (/cpi|消费价格|物价|ppi|生产者价格/.test(text)) hints.push("\u4EF7\u683C\u6307\u6570");
|
|
3055
|
+
if (/人口|常住人口/.test(text)) hints.push("\u4EBA\u53E3");
|
|
3056
|
+
if (/社零|社会消费品|零售/.test(text)) hints.push("\u56FD\u5185\u8D38\u6613", "\u793E\u4F1A\u6D88\u8D39\u54C1\u96F6\u552E\u603B\u989D");
|
|
3057
|
+
if (/固投|固定资产投资|房地产/.test(text)) hints.push("\u56FA\u5B9A\u8D44\u4EA7\u6295\u8D44", "\u623F\u5730\u4EA7");
|
|
3058
|
+
if (/失业/.test(text)) hints.push("\u5C31\u4E1A", "\u57CE\u9547\u8C03\u67E5\u5931\u4E1A\u7387");
|
|
3059
|
+
if (/收入/.test(text)) hints.push("\u4EBA\u6C11\u751F\u6D3B");
|
|
3060
|
+
if (/工业|增加值/.test(text)) hints.push("\u5DE5\u4E1A");
|
|
3061
|
+
if (/粮食|农业|农林牧渔/.test(text)) hints.push("\u519C\u4E1A");
|
|
3062
|
+
if (/进出口|外贸|贸易/.test(text)) hints.push("\u5BF9\u5916\u7ECF\u6D4E\u8D38\u6613", "\u56FD\u5185\u8D38\u6613");
|
|
3063
|
+
if (/财政|预算/.test(text)) hints.push("\u8D22\u653F");
|
|
3064
|
+
if (/建筑业/.test(text)) hints.push("\u5EFA\u7B51\u4E1A");
|
|
3065
|
+
return [...new Set(hints)];
|
|
3066
|
+
}
|
|
3067
|
+
function canonicalName(text) {
|
|
3068
|
+
return normalize(text).replace(/分类/g, "");
|
|
3069
|
+
}
|
|
3070
|
+
function treeNameMatches(name, query2) {
|
|
3071
|
+
const cleaned = cleanQuery(query2);
|
|
3072
|
+
const normalizedName = canonicalName(name);
|
|
3073
|
+
if (!normalizedName) return false;
|
|
3074
|
+
const aliases = expandAliases(cleaned).map(canonicalName).filter(Boolean);
|
|
3075
|
+
if (aliases.some((alias) => normalizedName.includes(alias) || alias.includes(normalizedName))) {
|
|
3076
|
+
return true;
|
|
3077
|
+
}
|
|
3078
|
+
return queryTokens(cleaned).some((token) => normalizedName.includes(token));
|
|
3079
|
+
}
|
|
3080
|
+
function nameAffinity(name, query2) {
|
|
3081
|
+
const node = canonicalName(name);
|
|
3082
|
+
const target = canonicalName(query2);
|
|
3083
|
+
if (!node || !target) return 0;
|
|
3084
|
+
let score = 0;
|
|
3085
|
+
for (let index = 0; index < target.length - 1; index += 1) {
|
|
3086
|
+
const gram = target.slice(index, index + 2);
|
|
3087
|
+
if (node.includes(gram)) score += 1;
|
|
3088
|
+
}
|
|
3089
|
+
return score;
|
|
3090
|
+
}
|
|
3091
|
+
function treeRecord(indicator, leaf, period2, region2) {
|
|
3092
|
+
return {
|
|
3093
|
+
cid: indicator.cid,
|
|
3094
|
+
indicId: indicator.id,
|
|
3095
|
+
name: indicator.name,
|
|
3096
|
+
showName: indicator.showName,
|
|
3097
|
+
unit: indicator.unit,
|
|
3098
|
+
frequency: period2,
|
|
3099
|
+
dt: "",
|
|
3100
|
+
dtName: "",
|
|
3101
|
+
region: region2.text,
|
|
3102
|
+
regionCode: region2.value,
|
|
3103
|
+
value: "",
|
|
3104
|
+
typeValue: periodCode(period2),
|
|
3105
|
+
treePath: leaf.id
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
var SHARD_LABEL_RE = /\s*[((]\s*(\d{4})?\s*[-–—至]\s*(\d{4})?\s*[))]\s*$/;
|
|
3109
|
+
function parseShardLabel(name) {
|
|
3110
|
+
const match = SHARD_LABEL_RE.exec(name);
|
|
3111
|
+
if (!match) return void 0;
|
|
3112
|
+
const startYear = match[1] ? Number(match[1]) : void 0;
|
|
3113
|
+
const endYear = match[2] ? Number(match[2]) : void 0;
|
|
3114
|
+
if (startYear === void 0 && endYear === void 0) return void 0;
|
|
3115
|
+
const base = name.slice(0, match.index).trim();
|
|
3116
|
+
if (!base) return void 0;
|
|
3117
|
+
return {
|
|
3118
|
+
base,
|
|
3119
|
+
...startYear === void 0 ? {} : { startYear },
|
|
3120
|
+
...endYear === void 0 ? {} : { endYear }
|
|
3121
|
+
};
|
|
3122
|
+
}
|
|
3123
|
+
function shardComparable(text) {
|
|
3124
|
+
return normalize(text.replace(SHARD_LABEL_RE, ""));
|
|
3125
|
+
}
|
|
3126
|
+
function isLaterShard(a, b) {
|
|
3127
|
+
const aEnd = a.endYear ?? Number.POSITIVE_INFINITY;
|
|
3128
|
+
const bEnd = b.endYear ?? Number.POSITIVE_INFINITY;
|
|
3129
|
+
if (aEnd !== bEnd) return aEnd > bEnd;
|
|
3130
|
+
const aStart = a.startYear ?? Number.NEGATIVE_INFINITY;
|
|
3131
|
+
const bStart = b.startYear ?? Number.NEGATIVE_INFINITY;
|
|
3132
|
+
return aStart > bStart;
|
|
3133
|
+
}
|
|
3134
|
+
async function discoverShards(provider, leaf, record, code, resolved, options) {
|
|
3135
|
+
const parsed = parseShardLabel(leaf.name);
|
|
3136
|
+
if (!parsed || !leaf.parentId) return void 0;
|
|
3137
|
+
const siblings = await provider.getTree({
|
|
3138
|
+
pid: leaf.parentId,
|
|
3139
|
+
code,
|
|
3140
|
+
signal: options.signal,
|
|
3141
|
+
noCache: options.noCache
|
|
3142
|
+
});
|
|
3143
|
+
const shardLeaves = siblings.map((node) => ({ node, range: parseShardLabel(node.name) })).filter(
|
|
3144
|
+
(item) => item.node.isLeaf && item.range !== void 0 && item.range.base === parsed.base
|
|
3145
|
+
).sort((a, b) => (a.range.startYear ?? -Infinity) - (b.range.startYear ?? -Infinity));
|
|
3146
|
+
if (shardLeaves.length < 2) return void 0;
|
|
3147
|
+
const targetShow = shardComparable(record.showName);
|
|
3148
|
+
const targetName = shardComparable(record.name ?? "");
|
|
3149
|
+
const shards = [];
|
|
3150
|
+
for (const item of shardLeaves.slice(0, 8)) {
|
|
3151
|
+
const indicators = await provider.getIndicators({
|
|
3152
|
+
cid: item.node.id,
|
|
3153
|
+
signal: options.signal,
|
|
3154
|
+
noCache: options.noCache
|
|
3155
|
+
});
|
|
3156
|
+
const match = indicators.find((indicator) => shardComparable(indicator.showName) === targetShow) ?? (targetName ? indicators.find((indicator) => shardComparable(indicator.name) === targetName) : void 0);
|
|
3157
|
+
if (!match) continue;
|
|
3158
|
+
shards.push({
|
|
3159
|
+
cid: item.node.id,
|
|
3160
|
+
indicId: match.id,
|
|
3161
|
+
...item.range.startYear === void 0 ? {} : { startYear: item.range.startYear },
|
|
3162
|
+
...item.range.endYear === void 0 ? {} : { endYear: item.range.endYear },
|
|
3163
|
+
label: item.node.name
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
if (shards.length < 2) return void 0;
|
|
3167
|
+
if (!shards.some((shard) => shard.cid === resolved.cid && shard.indicId === resolved.indicId)) {
|
|
3168
|
+
shards.push({
|
|
3169
|
+
cid: resolved.cid,
|
|
3170
|
+
indicId: resolved.indicId,
|
|
3171
|
+
...parsed.startYear === void 0 ? {} : { startYear: parsed.startYear },
|
|
3172
|
+
...parsed.endYear === void 0 ? {} : { endYear: parsed.endYear },
|
|
3173
|
+
label: leaf.name
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3176
|
+
return shards.sort((a, b) => (a.startYear ?? -Infinity) - (b.startYear ?? -Infinity));
|
|
3177
|
+
}
|
|
3178
|
+
var NEGATIVE_TTL_MS = 5 * 60 * 1e3;
|
|
3179
|
+
var NEGATIVE_MAX_ENTRIES = 200;
|
|
3180
|
+
var negativeCache = /* @__PURE__ */ new Map();
|
|
3181
|
+
function negativeKey(query2, period2, scope) {
|
|
3182
|
+
return `${normalize(cleanQuery(query2))}|${period2}|${scope}`;
|
|
3183
|
+
}
|
|
3184
|
+
function readNegative(key) {
|
|
3185
|
+
const entry = negativeCache.get(key);
|
|
3186
|
+
if (!entry) return void 0;
|
|
3187
|
+
if (entry.expiresAt <= Date.now()) {
|
|
3188
|
+
negativeCache.delete(key);
|
|
3189
|
+
return void 0;
|
|
3190
|
+
}
|
|
3191
|
+
return entry.outcome;
|
|
3192
|
+
}
|
|
3193
|
+
function writeNegative(key, outcome) {
|
|
3194
|
+
negativeCache.delete(key);
|
|
3195
|
+
negativeCache.set(key, { expiresAt: Date.now() + NEGATIVE_TTL_MS, outcome });
|
|
3196
|
+
while (negativeCache.size > NEGATIVE_MAX_ENTRIES) {
|
|
3197
|
+
const oldest = negativeCache.keys().next().value;
|
|
3198
|
+
if (oldest === void 0) break;
|
|
3199
|
+
negativeCache.delete(oldest);
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
async function resolveFromTree(provider, query2, period2, region2, options) {
|
|
3203
|
+
const code = catalogCode(scopeOf(region2), period2);
|
|
3204
|
+
if (!code) {
|
|
3205
|
+
throw new NbsError("UNSUPPORTED_ACTION", "\u8BE5\u5730\u533A/\u9891\u7387\u7EC4\u5408\u6682\u672A\u652F\u6301", {
|
|
3206
|
+
retryable: false,
|
|
3207
|
+
hint: "\u4E3B\u8981\u57CE\u5E02\u76EE\u524D\u53EA\u6709\u5E74\u5EA6\u6570\u636E\uFF08code=8\uFF09\uFF1B\u6708\u5EA6 code=7 \u662F 36/70 \u57CE\u5E02\u6C47\u603B\u4EF7\u683C\u6307\u6570\uFF0C\u4E0D\u662F\u5355\u57CE\u5E02\u6570\u636E\u3002"
|
|
3208
|
+
});
|
|
3209
|
+
}
|
|
3210
|
+
const hints = categoryHints(query2);
|
|
3211
|
+
const queue = [
|
|
3212
|
+
{ pid: "", depth: 0, hinted: false }
|
|
3213
|
+
];
|
|
3214
|
+
const leaves = [];
|
|
3215
|
+
let treeRequests = 0;
|
|
3216
|
+
while (queue.length > 0 && treeRequests < 12 && leaves.length < 40) {
|
|
3217
|
+
const current = queue.shift();
|
|
3218
|
+
if (!current || current.depth > 4) continue;
|
|
3219
|
+
const nodes = await provider.getTree({
|
|
3220
|
+
pid: current.pid,
|
|
3221
|
+
code,
|
|
3222
|
+
signal: options.signal,
|
|
3223
|
+
noCache: options.noCache
|
|
3224
|
+
});
|
|
3225
|
+
treeRequests += 1;
|
|
3226
|
+
for (const node of nodes) {
|
|
3227
|
+
const matches = treeNameMatches(node.name, query2);
|
|
3228
|
+
const hinted = hints.some((hint) => node.name.includes(hint));
|
|
3229
|
+
const rootLevel = current.pid === "";
|
|
3230
|
+
const branchHinted = current.hinted || hinted;
|
|
3231
|
+
if (node.isLeaf && (matches || branchHinted)) {
|
|
3232
|
+
leaves.push({ node, affinity: nameAffinity(node.name, query2) });
|
|
3233
|
+
} else if (!node.isLeaf && (matches || hinted || rootLevel || current.hinted) && current.depth < 4) {
|
|
3234
|
+
queue.push({ pid: node.id, depth: current.depth + 1, hinted: branchHinted });
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
const scored = [];
|
|
3239
|
+
const leafByKey = /* @__PURE__ */ new Map();
|
|
3240
|
+
const recordByKey = /* @__PURE__ */ new Map();
|
|
3241
|
+
const shardGroups = /* @__PURE__ */ new Map();
|
|
3242
|
+
const selected = [...leaves].sort((a, b) => b.affinity - a.affinity).slice(0, 5).map((item) => item.node);
|
|
3243
|
+
for (const leaf of selected) {
|
|
3244
|
+
const indicators = await provider.getIndicators({
|
|
3245
|
+
cid: leaf.id,
|
|
3246
|
+
signal: options.signal,
|
|
3247
|
+
noCache: options.noCache
|
|
3248
|
+
});
|
|
3249
|
+
const range = parseShardLabel(leaf.name);
|
|
3250
|
+
for (const indicator of indicators) {
|
|
3251
|
+
const record = treeRecord(indicator, leaf, period2, region2);
|
|
3252
|
+
const { score, reasons } = scoreRecord(record, query2, period2, region2);
|
|
3253
|
+
if (!range) {
|
|
3254
|
+
scored.push({ record, score, reasons });
|
|
3255
|
+
leafByKey.set(`${record.cid}:${record.indicId}`, leaf);
|
|
3256
|
+
recordByKey.set(`${record.cid}:${record.indicId}`, record);
|
|
3257
|
+
continue;
|
|
3258
|
+
}
|
|
3259
|
+
const groupKey = `${range.base}|${shardComparable(record.showName)}|${record.unit ?? ""}`;
|
|
3260
|
+
const existing = shardGroups.get(groupKey);
|
|
3261
|
+
if (!existing || isLaterShard(range, existing.range)) {
|
|
3262
|
+
shardGroups.set(groupKey, { leaf, record, score, reasons, range });
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
for (const group of shardGroups.values()) {
|
|
3267
|
+
scored.push({ record: group.record, score: group.score, reasons: group.reasons });
|
|
3268
|
+
leafByKey.set(`${group.record.cid}:${group.record.indicId}`, group.leaf);
|
|
3269
|
+
recordByKey.set(`${group.record.cid}:${group.record.indicId}`, group.record);
|
|
3270
|
+
}
|
|
3271
|
+
if (scored.length === 0) return { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3272
|
+
const outcome = decide(scored, "tree");
|
|
3273
|
+
if (outcome.kind === "resolved") {
|
|
3274
|
+
const key = `${outcome.indicator.cid}:${outcome.indicator.indicId}`;
|
|
3275
|
+
const leaf = leafByKey.get(key);
|
|
3276
|
+
const record = recordByKey.get(key);
|
|
3277
|
+
if (leaf && record) {
|
|
3278
|
+
try {
|
|
3279
|
+
const shards = await discoverShards(
|
|
3280
|
+
provider,
|
|
3281
|
+
leaf,
|
|
3282
|
+
record,
|
|
3283
|
+
code,
|
|
3284
|
+
outcome.indicator,
|
|
3285
|
+
options
|
|
3286
|
+
);
|
|
3287
|
+
if (shards) outcome.indicator.shards = shards;
|
|
3288
|
+
} catch (error) {
|
|
3289
|
+
if (options.signal?.aborted) throw error;
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
return outcome;
|
|
3294
|
+
}
|
|
3295
|
+
function parseSelection(indicatorId2) {
|
|
3296
|
+
const [cid, indicId] = indicatorId2.split(":");
|
|
3297
|
+
if (!cid || !indicId) return void 0;
|
|
3298
|
+
return { cid, indicId };
|
|
3299
|
+
}
|
|
3300
|
+
async function resolveSelection(provider, indicatorId2, period2, region2, options) {
|
|
3301
|
+
const parsed = parseSelection(indicatorId2);
|
|
3302
|
+
if (!parsed) {
|
|
3303
|
+
throw notFound(
|
|
3304
|
+
"indicatorId \u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
3305
|
+
"\u8BF7\u4F7F\u7528 QueryResult.candidates[].id\uFF0C\u683C\u5F0F\u4E3A cid:indicId\u3002"
|
|
3306
|
+
);
|
|
3307
|
+
}
|
|
3308
|
+
const indicators = await provider.getIndicators({
|
|
3309
|
+
cid: parsed.cid,
|
|
3310
|
+
signal: options.signal,
|
|
3311
|
+
noCache: options.noCache
|
|
3312
|
+
});
|
|
3313
|
+
const found = indicators.find((indicator) => indicator.id === parsed.indicId);
|
|
3314
|
+
if (!found) {
|
|
3315
|
+
throw notFound("\u627E\u4E0D\u5230\u6307\u5B9A\u7684\u6307\u6807", "\u5019\u9009\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF1B\u8BF7\u91CD\u65B0\u641C\u7D22\u5E76\u9009\u62E9\u65B0\u7684 candidate id\u3002");
|
|
3316
|
+
}
|
|
3317
|
+
return {
|
|
3318
|
+
kind: "resolved",
|
|
3319
|
+
indicator: {
|
|
3320
|
+
cid: found.cid,
|
|
3321
|
+
indicId: found.id,
|
|
3322
|
+
name: found.name,
|
|
3323
|
+
displayName: found.showName,
|
|
3324
|
+
unit: found.unit,
|
|
3325
|
+
frequency: period2,
|
|
3326
|
+
region: region2.text,
|
|
3327
|
+
regionCode: region2.value,
|
|
3328
|
+
measure: found.measure,
|
|
3329
|
+
source: "selection"
|
|
3330
|
+
}
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3333
|
+
function inferPeriod(options) {
|
|
3334
|
+
if (options.period) return options.period;
|
|
3335
|
+
const text = `${options.start ?? ""} ${options.end ?? ""} ${options.query ?? ""}`;
|
|
3336
|
+
if (/\d{4}\s*-\s*\d{1,2}/.test(text) || /月|月度|MM/.test(text)) return "month";
|
|
3337
|
+
if (/\d{4}\s*Q[1-4]/i.test(text) || /\d{4}\s*SS/.test(text) || /季度|季/.test(text)) {
|
|
3338
|
+
return "quarter";
|
|
3339
|
+
}
|
|
3340
|
+
return "year";
|
|
3341
|
+
}
|
|
3342
|
+
async function resolveIndicator(provider, options, period2, region2) {
|
|
3343
|
+
const query2 = options.query?.trim();
|
|
3344
|
+
if (options.indicatorId) {
|
|
3345
|
+
return resolveSelection(provider, options.indicatorId, period2, region2, options);
|
|
3346
|
+
}
|
|
3347
|
+
if (!query2) {
|
|
3348
|
+
throw invalidArgument("\u7F3A\u5C11 query \u53C2\u6570", '\u793A\u4F8B\uFF1Aquery({ query: "GDP", action: "series" })');
|
|
3349
|
+
}
|
|
3350
|
+
const scope = scopeOf(region2);
|
|
3351
|
+
if (scope === "city" && period2 !== "year") {
|
|
3352
|
+
throw new NbsError("UNSUPPORTED_ACTION", "\u4E3B\u8981\u57CE\u5E02\u6708\u5EA6/\u5B63\u5EA6\u6570\u636E\u6682\u672A\u652F\u6301", {
|
|
3353
|
+
retryable: false,
|
|
3354
|
+
hint: "\u4E3B\u8981\u57CE\u5E02\u76EE\u524D\u53EA\u6709\u5E74\u5EA6\u6570\u636E\uFF08code=8\uFF09\uFF1B\u6708\u5EA6 code=7 \u662F 36/70 \u57CE\u5E02\u6C47\u603B\u4EF7\u683C\u6307\u6570\uFF0C\u4E0D\u662F\u5355\u57CE\u5E02\u6570\u636E\u3002"
|
|
3355
|
+
});
|
|
3356
|
+
}
|
|
3357
|
+
const curatedScope = scope === "national" ? "national" : scope === "province" ? "province" : "city";
|
|
3358
|
+
const curated = findCurated(query2, period2, curatedScope);
|
|
3359
|
+
if (curated) {
|
|
3360
|
+
return { kind: "resolved", indicator: fromCurated(curated, region2) };
|
|
3361
|
+
}
|
|
3362
|
+
const key = negativeKey(query2, period2, scope);
|
|
3363
|
+
const cachedNegative = readNegative(key);
|
|
3364
|
+
if (cachedNegative) return cachedNegative;
|
|
3365
|
+
if (scope !== "national") {
|
|
3366
|
+
const treeOutcome = await resolveFromTree(provider, query2, period2, region2, options);
|
|
3367
|
+
if (treeOutcome.kind !== "notFound") return treeOutcome;
|
|
3368
|
+
const outcome2 = { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3369
|
+
writeNegative(key, outcome2);
|
|
3370
|
+
return outcome2;
|
|
3371
|
+
}
|
|
3372
|
+
const searchOutcome = await resolveFromSearch(provider, query2, period2, region2, options);
|
|
3373
|
+
if (searchOutcome.kind === "resolved") return searchOutcome;
|
|
3374
|
+
const hints = categoryHints(query2);
|
|
3375
|
+
if (searchOutcome.kind === "notFound" || hints.length > 0) {
|
|
3376
|
+
const treeOutcome = await resolveFromTree(provider, query2, period2, region2, options);
|
|
3377
|
+
if (treeOutcome.kind === "resolved") return treeOutcome;
|
|
3378
|
+
if (treeOutcome.kind === "ambiguous") return treeOutcome;
|
|
3379
|
+
}
|
|
3380
|
+
if (searchOutcome.kind !== "notFound") return searchOutcome;
|
|
3381
|
+
const outcome = { kind: "notFound", suggestions: SUGGESTIONS };
|
|
3382
|
+
writeNegative(key, outcome);
|
|
3383
|
+
return outcome;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
// src/format.ts
|
|
3387
|
+
var EMPTY_VALUES = /* @__PURE__ */ new Set(["", "\u2014", "--", "-", "null", "None", "nan", "NaN"]);
|
|
3388
|
+
function formatNumber(raw) {
|
|
3389
|
+
const text = raw.trim();
|
|
3390
|
+
if (EMPTY_VALUES.has(text)) return "\u2014";
|
|
3391
|
+
const match = text.match(/^(-?)(\d+)(?:\.(\d+))?$/);
|
|
3392
|
+
if (!match) return text;
|
|
3393
|
+
const sign = match[1] ?? "";
|
|
3394
|
+
const integer = match[2] ?? "";
|
|
3395
|
+
const decimal = match[3];
|
|
3396
|
+
const grouped = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
3397
|
+
return `${sign}${grouped}${decimal === void 0 ? "" : `.${decimal}`}`;
|
|
3398
|
+
}
|
|
3399
|
+
|
|
3400
|
+
// src/series.ts
|
|
3401
|
+
var DEFAULT_MAX_POINTS = 240;
|
|
3402
|
+
function ordinalOf(period2, year, index) {
|
|
3403
|
+
if (period2 === "year") return year;
|
|
3404
|
+
if (period2 === "quarter") return year * 4 + (index - 1);
|
|
3405
|
+
return year * 12 + (index - 1);
|
|
3406
|
+
}
|
|
3407
|
+
function codeOf(period2, ordinal) {
|
|
3408
|
+
if (period2 === "year") return `${ordinal}YY`;
|
|
3409
|
+
if (period2 === "quarter") {
|
|
3410
|
+
const year2 = Math.floor(ordinal / 4);
|
|
3411
|
+
const quarter = ordinal % 4 + 1;
|
|
3412
|
+
return `${year2}${String(quarter).padStart(2, "0")}SS`;
|
|
3413
|
+
}
|
|
3414
|
+
const year = Math.floor(ordinal / 12);
|
|
3415
|
+
const month = ordinal % 12 + 1;
|
|
3416
|
+
return `${year}${String(month).padStart(2, "0")}MM`;
|
|
3417
|
+
}
|
|
3418
|
+
function currentOrdinal(period2, now = /* @__PURE__ */ new Date()) {
|
|
3419
|
+
const year = now.getFullYear();
|
|
3420
|
+
if (period2 === "year") return year;
|
|
3421
|
+
if (period2 === "quarter") return year * 4 + Math.floor(now.getMonth() / 3);
|
|
3422
|
+
return year * 12 + now.getMonth();
|
|
3423
|
+
}
|
|
3424
|
+
function parseYear(value) {
|
|
3425
|
+
const match = String(value).match(/(\d{4})/);
|
|
3426
|
+
return match?.[1] ? Number(match[1]) : void 0;
|
|
3427
|
+
}
|
|
3428
|
+
function parseOrdinal(period2, value, edge) {
|
|
3429
|
+
const text = String(value).trim();
|
|
3430
|
+
if (!text) return void 0;
|
|
3431
|
+
const year = parseYear(text);
|
|
3432
|
+
if (year === void 0) return void 0;
|
|
3433
|
+
if (period2 === "year") return year;
|
|
3434
|
+
if (period2 === "quarter") {
|
|
3435
|
+
const qMatch = text.match(/[Qq]\s*([1-4])/);
|
|
3436
|
+
const ssMatch = text.match(/^(\d{4})\s*(\d{2})SS$/);
|
|
3437
|
+
const q = qMatch?.[1] ? Number(qMatch[1]) : ssMatch?.[2] ? Number(ssMatch[2]) : edge === "start" ? 1 : 4;
|
|
3438
|
+
if (q < 1 || q > 4) return void 0;
|
|
3439
|
+
return ordinalOf("quarter", year, q);
|
|
3440
|
+
}
|
|
3441
|
+
const monthMatch = text.match(/(?:-|\/|年)\s*(\d{1,2})/);
|
|
3442
|
+
const mmMatch = text.match(/^(\d{4})(\d{2})MM$/);
|
|
3443
|
+
const month = monthMatch?.[1] ? Number(monthMatch[1]) : mmMatch?.[2] ? Number(mmMatch[2]) : edge === "start" ? 1 : 12;
|
|
3444
|
+
if (month < 1 || month > 12) return void 0;
|
|
3445
|
+
return ordinalOf("month", year, month);
|
|
3446
|
+
}
|
|
3447
|
+
function resolveRange(period2, start2, end2, now = /* @__PURE__ */ new Date()) {
|
|
3448
|
+
const current = currentOrdinal(period2, now);
|
|
3449
|
+
const endOrdinal = end2 === void 0 ? current : parseOrdinal(period2, end2, "end");
|
|
3450
|
+
if (endOrdinal === void 0) {
|
|
3451
|
+
throw invalidRange(
|
|
3452
|
+
`\u65E0\u6CD5\u89E3\u6790\u7ED3\u675F\u65F6\u95F4\uFF1A${String(end2)}`,
|
|
3453
|
+
period2 === "year" ? "\u5E74\u5EA6\u8BF7\u7528 2025 \u6216 2015" : period2 === "quarter" ? "\u5B63\u5EA6\u8BF7\u7528 2025Q1 \u6216 2025" : "\u6708\u5EA6\u8BF7\u7528 2025-01 \u6216 2025"
|
|
3454
|
+
);
|
|
3455
|
+
}
|
|
3456
|
+
let startOrdinal = start2 === void 0 ? void 0 : parseOrdinal(period2, start2, "start");
|
|
3457
|
+
if (startOrdinal === void 0) {
|
|
3458
|
+
const span = period2 === "year" ? 9 : period2 === "quarter" ? 7 : 11;
|
|
3459
|
+
startOrdinal = endOrdinal - span;
|
|
3460
|
+
}
|
|
3461
|
+
if (startOrdinal > endOrdinal) {
|
|
3462
|
+
throw invalidRange(
|
|
3463
|
+
`\u5F00\u59CB\u65F6\u95F4\u665A\u4E8E\u7ED3\u675F\u65F6\u95F4\uFF1A${String(start2)} > ${String(end2)}`,
|
|
3464
|
+
"\u8BF7\u68C0\u67E5 start/end \u6216 --start/--end\u3002"
|
|
3465
|
+
);
|
|
3466
|
+
}
|
|
3467
|
+
return { start: startOrdinal, end: endOrdinal };
|
|
3468
|
+
}
|
|
3469
|
+
function shardRange(shard, period2) {
|
|
3470
|
+
const start2 = shard.startYear === void 0 ? Number.NEGATIVE_INFINITY : ordinalOf(period2, shard.startYear, 1);
|
|
3471
|
+
const end2 = shard.endYear === void 0 ? Number.POSITIVE_INFINITY : ordinalOf(period2, shard.endYear, period2 === "year" ? 1 : period2 === "quarter" ? 4 : 12);
|
|
3472
|
+
return {
|
|
3473
|
+
cid: shard.cid,
|
|
3474
|
+
indicId: shard.indicId,
|
|
3475
|
+
start: start2,
|
|
3476
|
+
end: end2,
|
|
3477
|
+
label: shard.label
|
|
3478
|
+
};
|
|
3479
|
+
}
|
|
3480
|
+
function buildShardRanges(indicator, range) {
|
|
3481
|
+
if (!indicator.shards || indicator.shards.length === 0) {
|
|
3482
|
+
return [
|
|
3483
|
+
{
|
|
3484
|
+
cid: indicator.cid,
|
|
3485
|
+
indicId: indicator.indicId,
|
|
3486
|
+
start: range.start,
|
|
3487
|
+
end: range.end
|
|
3488
|
+
}
|
|
3489
|
+
];
|
|
3490
|
+
}
|
|
3491
|
+
return indicator.shards.map((shard) => shardRange(shard, indicator.frequency)).map((shard) => ({
|
|
3492
|
+
...shard,
|
|
3493
|
+
start: Math.max(shard.start, range.start),
|
|
3494
|
+
end: Math.min(shard.end, range.end)
|
|
3495
|
+
})).filter((shard) => shard.start <= shard.end).sort((a, b) => a.start - b.start);
|
|
3496
|
+
}
|
|
3497
|
+
function parsePeriodCode(code) {
|
|
3498
|
+
const year = code.match(/^(\d{4})YY$/);
|
|
3499
|
+
if (year?.[1]) return { period: year[1], name: `${year[1]}\u5E74` };
|
|
3500
|
+
const quarter = code.match(/^(\d{4})(\d{2})SS$/);
|
|
3501
|
+
if (quarter?.[1] && quarter[2]) {
|
|
3502
|
+
const q = Number(quarter[2]);
|
|
3503
|
+
if (q >= 1 && q <= 4) {
|
|
3504
|
+
return { period: `${quarter[1]}Q${q}`, name: `${quarter[1]}\u5E74\u7B2C${q}\u5B63\u5EA6` };
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
const month = code.match(/^(\d{4})(\d{2})MM$/);
|
|
3508
|
+
if (month?.[1] && month[2]) {
|
|
3509
|
+
const m = Number(month[2]);
|
|
3510
|
+
if (m >= 1 && m <= 12) {
|
|
3511
|
+
return { period: `${month[1]}-${String(m).padStart(2, "0")}`, name: `${month[1]}\u5E74${m}\u6708` };
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
return { period: code, name: code };
|
|
3515
|
+
}
|
|
3516
|
+
function parseValue(raw) {
|
|
3517
|
+
const text = raw.trim().replace(/,/g, "");
|
|
3518
|
+
if (!text || text === "\u2014" || text === "--" || text === "-" || text === "null" || text === "None") {
|
|
3519
|
+
return null;
|
|
3520
|
+
}
|
|
3521
|
+
const value = Number(text);
|
|
3522
|
+
return Number.isFinite(value) ? value : null;
|
|
3523
|
+
}
|
|
3524
|
+
function pointFromPeriod(period2, indicator, fallbackRegion, indicId = indicator.indicId) {
|
|
3525
|
+
const value = period2.values.find((item) => item.id === indicId) ?? period2.values[0] ?? void 0;
|
|
3526
|
+
if (!value) return void 0;
|
|
3527
|
+
const canonical = parsePeriodCode(period2.code);
|
|
3528
|
+
const rawValue = value.value ?? "";
|
|
3529
|
+
return {
|
|
3530
|
+
period: canonical.period,
|
|
3531
|
+
periodName: period2.name || canonical.name,
|
|
3532
|
+
value: parseValue(rawValue),
|
|
3533
|
+
rawValue,
|
|
3534
|
+
display: formatNumber(rawValue),
|
|
3535
|
+
unit: value.unit ?? indicator.unit,
|
|
3536
|
+
region: value.regionName || indicator.region || fallbackRegion
|
|
3537
|
+
};
|
|
3538
|
+
}
|
|
3539
|
+
function sortKey(period2) {
|
|
3540
|
+
const year = Number(period2.slice(0, 4));
|
|
3541
|
+
if (period2.includes("Q")) {
|
|
3542
|
+
const q = Number(period2.split("Q")[1] ?? 1);
|
|
3543
|
+
return year * 4 + (q - 1);
|
|
3544
|
+
}
|
|
3545
|
+
if (period2.includes("-")) {
|
|
3546
|
+
const month = Number(period2.split("-")[1] ?? 1);
|
|
3547
|
+
return year * 12 + (month - 1);
|
|
3548
|
+
}
|
|
3549
|
+
return year;
|
|
3550
|
+
}
|
|
3551
|
+
async function fetchSeries(provider, indicator, period2, options = {}) {
|
|
3552
|
+
const range = resolveRange(period2, options.start, options.end);
|
|
3553
|
+
const shardRanges = buildShardRanges(indicator, range);
|
|
3554
|
+
const notes = [];
|
|
3555
|
+
let partial = false;
|
|
3556
|
+
if (shardRanges.length === 0) {
|
|
3557
|
+
return {
|
|
3558
|
+
points: [],
|
|
3559
|
+
notes: [`\u6CA1\u6709\u8986\u76D6 ${String(options.start ?? "")}\u2013${String(options.end ?? "")} \u7684\u5206\u7247`],
|
|
3560
|
+
partial: false
|
|
3561
|
+
};
|
|
3562
|
+
}
|
|
3563
|
+
const pointsByPeriod = /* @__PURE__ */ new Map();
|
|
3564
|
+
let successes = 0;
|
|
3565
|
+
let firstError;
|
|
3566
|
+
for (const shard of shardRanges) {
|
|
3567
|
+
const dts = shard.start === shard.end ? codeOf(period2, shard.start) : `${codeOf(period2, shard.start)}-${codeOf(period2, shard.end)}`;
|
|
3568
|
+
try {
|
|
3569
|
+
const periods = await provider.getSeries({
|
|
3570
|
+
cid: shard.cid,
|
|
3571
|
+
indicId: shard.indicId,
|
|
3572
|
+
dts,
|
|
3573
|
+
region: {
|
|
3574
|
+
text: indicator.region ?? "\u5168\u56FD",
|
|
3575
|
+
value: indicator.regionCode ?? "000000000000"
|
|
3576
|
+
},
|
|
3577
|
+
signal: options.signal,
|
|
3578
|
+
noCache: options.noCache
|
|
3579
|
+
});
|
|
3580
|
+
successes += 1;
|
|
3581
|
+
for (const periodData of periods) {
|
|
3582
|
+
const point = pointFromPeriod(
|
|
3583
|
+
periodData,
|
|
3584
|
+
indicator,
|
|
3585
|
+
indicator.region ?? "\u5168\u56FD",
|
|
3586
|
+
shard.indicId
|
|
3587
|
+
);
|
|
3588
|
+
if (!point) continue;
|
|
3589
|
+
const existing = pointsByPeriod.get(point.period);
|
|
3590
|
+
if (!existing || existing.value === null || point.value !== null) {
|
|
3591
|
+
pointsByPeriod.set(point.period, point);
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
} catch (error) {
|
|
3595
|
+
partial = true;
|
|
3596
|
+
firstError ??= error;
|
|
3597
|
+
notes.push(`\u5206\u7247 ${dts} \u8BF7\u6C42\u5931\u8D25\uFF0C\u5DF2\u8FD4\u56DE\u5176\u4F59\u5206\u7247\u7684\u6570\u636E\u3002`);
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
if (successes === 0 && firstError) throw firstError;
|
|
3601
|
+
const sorted = [...pointsByPeriod.values()].sort((a, b) => sortKey(a.period) - sortKey(b.period));
|
|
3602
|
+
const beforeTrim = sorted.length;
|
|
3603
|
+
while (sorted.length > 0 && sorted[sorted.length - 1]?.value === null) {
|
|
3604
|
+
sorted.pop();
|
|
3605
|
+
}
|
|
3606
|
+
if (sorted.length < beforeTrim) {
|
|
3607
|
+
notes.push("\u672B\u5C3E\u5C1A\u672A\u53D1\u5E03\u7684\u6570\u636E\u70B9\u5DF2\u7701\u7565\u3002");
|
|
3608
|
+
}
|
|
3609
|
+
const maxPoints = options.maxPoints ?? DEFAULT_MAX_POINTS;
|
|
3610
|
+
const points = sorted.length > maxPoints ? sorted.slice(-maxPoints) : sorted;
|
|
3611
|
+
if (points.length < sorted.length) {
|
|
3612
|
+
notes.push(`\u6570\u636E\u70B9\u8F83\u591A\uFF0C\u4EC5\u8FD4\u56DE\u6700\u8FD1 ${maxPoints} \u4E2A\u3002`);
|
|
3613
|
+
}
|
|
3614
|
+
return { points, notes, partial };
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
// src/compare.ts
|
|
3618
|
+
var MAX_REGIONS = 8;
|
|
3619
|
+
async function compareRegions(provider, options, period2) {
|
|
3620
|
+
if (!options.regions || options.regions.length === 0) {
|
|
3621
|
+
throw invalidArgument("compare \u9700\u8981 regions \u53C2\u6570", '\u793A\u4F8B\uFF1Aregions: ["\u5E7F\u4E1C", "\u6C5F\u82CF", "\u6D59\u6C5F"]');
|
|
3622
|
+
}
|
|
3623
|
+
if (options.regions.length > MAX_REGIONS) {
|
|
3624
|
+
throw invalidArgument(`compare \u6700\u591A\u652F\u6301 ${MAX_REGIONS} \u4E2A\u5730\u533A`, "\u8BF7\u51CF\u5C11\u5730\u533A\u6570\u91CF\u6216\u5206\u591A\u6B21\u67E5\u8BE2\u3002");
|
|
3625
|
+
}
|
|
3626
|
+
const regions = [];
|
|
3627
|
+
for (const input of options.regions) {
|
|
3628
|
+
const region2 = resolveRegion(input);
|
|
3629
|
+
if (!region2) {
|
|
3630
|
+
throw invalidArgument(
|
|
3631
|
+
`\u65E0\u6CD5\u8BC6\u522B\u5730\u533A\uFF1A${input}`,
|
|
3632
|
+
`\u53EF\u7528\u5730\u533A\u5305\u62EC\uFF1A${regionSuggestions(input).join("\u3001") || "\u5E7F\u4E1C\u3001\u6C5F\u82CF\u3001\u6D59\u6C5F\u3001\u5C71\u4E1C\u3001\u6CB3\u5357"}`
|
|
3633
|
+
);
|
|
3634
|
+
}
|
|
3635
|
+
regions.push(region2);
|
|
3636
|
+
}
|
|
3637
|
+
const scopes = new Set(regions.map((region2) => scopeOf(region2)));
|
|
3638
|
+
if (scopes.size > 1) {
|
|
3639
|
+
throw invalidArgument("compare \u4E0D\u652F\u6301\u8DE8\u8303\u56F4\u6DF7\u6BD4", "\u8BF7\u5168\u90E8\u4F7F\u7528\u5168\u56FD\u3001\u5206\u7701\u6216\u4E3B\u8981\u57CE\u5E02\uFF0C\u4E0D\u8981\u6DF7\u5408\u3002");
|
|
3640
|
+
}
|
|
3641
|
+
if (scopes.has("city") && period2 !== "year") {
|
|
3642
|
+
throw new NbsError("UNSUPPORTED_ACTION", "\u4E3B\u8981\u57CE\u5E02\u6708\u5EA6/\u5B63\u5EA6\u5BF9\u6BD4\u6682\u672A\u652F\u6301", {
|
|
3643
|
+
retryable: false,
|
|
3644
|
+
hint: "\u4E3B\u8981\u57CE\u5E02\u76EE\u524D\u53EA\u6709\u5E74\u5EA6\u6570\u636E\uFF08code=8\uFF09\u3002"
|
|
3645
|
+
});
|
|
3646
|
+
}
|
|
3647
|
+
const first = regions[0];
|
|
3648
|
+
if (!first) throw invalidArgument("compare \u9700\u8981\u81F3\u5C11\u4E00\u4E2A\u5730\u533A");
|
|
3649
|
+
const resolution = await resolveIndicator(provider, options, period2, first);
|
|
3650
|
+
if (resolution.kind !== "resolved") return { resolution };
|
|
3651
|
+
const base = resolution.indicator;
|
|
3652
|
+
const series = [];
|
|
3653
|
+
const notes = [];
|
|
3654
|
+
let partial = false;
|
|
3655
|
+
for (const region2 of regions) {
|
|
3656
|
+
const indicator = {
|
|
3657
|
+
...base,
|
|
3658
|
+
region: region2.text,
|
|
3659
|
+
regionCode: region2.value
|
|
3660
|
+
};
|
|
3661
|
+
try {
|
|
3662
|
+
const result = await fetchSeries(provider, indicator, period2, {
|
|
3663
|
+
start: options.start,
|
|
3664
|
+
end: options.end,
|
|
3665
|
+
maxPoints: options.maxPoints,
|
|
3666
|
+
signal: options.signal,
|
|
3667
|
+
noCache: options.noCache
|
|
3668
|
+
});
|
|
3669
|
+
series.push({
|
|
3670
|
+
region: region2.text,
|
|
3671
|
+
regionCode: region2.value,
|
|
3672
|
+
points: result.points
|
|
3673
|
+
});
|
|
3674
|
+
notes.push(...result.notes.map((note) => `${region2.text}\uFF1A${note}`));
|
|
3675
|
+
if (result.partial) partial = true;
|
|
3676
|
+
} catch (error) {
|
|
3677
|
+
partial = true;
|
|
3678
|
+
notes.push(
|
|
3679
|
+
`${region2.text}\uFF1A\u67E5\u8BE2\u5931\u8D25\uFF0C${error instanceof Error ? error.message : String(error)}`
|
|
3680
|
+
);
|
|
3681
|
+
if (series.length === 0) throw error;
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
return {
|
|
3685
|
+
resolution,
|
|
3686
|
+
result: {
|
|
3687
|
+
indicator: base,
|
|
3688
|
+
series,
|
|
3689
|
+
notes,
|
|
3690
|
+
partial
|
|
3691
|
+
}
|
|
3692
|
+
};
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3695
|
+
// src/nbs-provider.ts
|
|
3696
|
+
var ROOT_ID = "69c574ab128a44e595cc0b24502b771b";
|
|
3697
|
+
var TTL = {
|
|
3698
|
+
search: 10 * 60 * 1e3,
|
|
3699
|
+
series: 30 * 60 * 1e3,
|
|
3700
|
+
tree: 24 * 60 * 60 * 1e3,
|
|
3701
|
+
indicators: 24 * 60 * 60 * 1e3,
|
|
3702
|
+
provinces: 7 * 24 * 60 * 60 * 1e3
|
|
3703
|
+
};
|
|
3704
|
+
var PERIOD_CODE2 = {
|
|
3705
|
+
year: "3",
|
|
3706
|
+
quarter: "2",
|
|
3707
|
+
month: "1"
|
|
3708
|
+
};
|
|
3709
|
+
function periodFromDtType(dtType) {
|
|
3710
|
+
if (dtType === "YY") return "year";
|
|
3711
|
+
if (dtType === "SS") return "quarter";
|
|
3712
|
+
if (dtType === "MM") return "month";
|
|
3713
|
+
return void 0;
|
|
3714
|
+
}
|
|
3715
|
+
function isLikelyUnit(value) {
|
|
3716
|
+
const text = value.trim();
|
|
3717
|
+
if (!text || text.length > 20) return false;
|
|
3718
|
+
if (/^\d{4}(-\d{4})?$/.test(text)) return false;
|
|
3719
|
+
if (/^\d+$/.test(text)) return false;
|
|
3720
|
+
if (text.includes("=")) return true;
|
|
3721
|
+
if (/[%%]/.test(text)) return true;
|
|
3722
|
+
if (text === "\u4EBA") return true;
|
|
3723
|
+
return /(亿元|万元|千元|元|美元|欧元|港元|百分点|万吨|亿吨|万千瓦|亿千瓦|万千瓦时|亿千瓦时|万人|亿人|人次|万平方米|亿平方米|平方公里|公顷|亩|台|辆|艘|架|张|件|部|所|个|户|头|只|吨|米|公里|升|立方米|年|岁|天|小时|分钟|秒)/.test(
|
|
3724
|
+
text
|
|
3725
|
+
);
|
|
3726
|
+
}
|
|
3727
|
+
function extractUnit(showName) {
|
|
3728
|
+
const matches = [...showName.matchAll(/[((]([^()()]*)[))]/g)].map((match) => match[1]?.trim() ?? "").filter(Boolean);
|
|
3729
|
+
for (let index = matches.length - 1; index >= 0; index -= 1) {
|
|
3730
|
+
const candidate = matches[index];
|
|
3731
|
+
if (candidate && isLikelyUnit(candidate)) return candidate;
|
|
3732
|
+
}
|
|
3733
|
+
if (/[%%]\s*$/.test(showName)) return "%";
|
|
3734
|
+
return void 0;
|
|
3735
|
+
}
|
|
3736
|
+
function parseYear2(value) {
|
|
3737
|
+
if (!value) return void 0;
|
|
3738
|
+
const match = value.match(/(\d{4})/);
|
|
3739
|
+
return match?.[1] ? Number(match[1]) : void 0;
|
|
3740
|
+
}
|
|
3741
|
+
function mapSearchItem(item) {
|
|
3742
|
+
const frequency = periodFromDtType(item.dt_type);
|
|
3743
|
+
const showName = item.show_name.trim();
|
|
3744
|
+
return {
|
|
3745
|
+
cid: item.cid,
|
|
3746
|
+
indicId: item.indic_id,
|
|
3747
|
+
name: item.i_name?.trim() || item.ek_name?.trim() || showName,
|
|
3748
|
+
showName,
|
|
3749
|
+
unit: extractUnit(showName),
|
|
3750
|
+
...frequency === void 0 ? {} : { frequency },
|
|
3751
|
+
dt: item.dt,
|
|
3752
|
+
dtName: item.dt_name,
|
|
3753
|
+
region: item.da_name || "\u5168\u56FD",
|
|
3754
|
+
regionCode: item.da,
|
|
3755
|
+
value: item.value,
|
|
3756
|
+
typeValue: item.type_value,
|
|
3757
|
+
explain: item.explain,
|
|
3758
|
+
treePath: item.treeinfo_globalid
|
|
3759
|
+
};
|
|
3760
|
+
}
|
|
3761
|
+
function mapTreeItem(item) {
|
|
3762
|
+
return {
|
|
3763
|
+
id: item._id,
|
|
3764
|
+
name: item.name.trim(),
|
|
3765
|
+
parentId: item.treeinfo_pid || void 0,
|
|
3766
|
+
level: item.treeinfo_level,
|
|
3767
|
+
isLeaf: item.isLeaf,
|
|
3768
|
+
startYear: parseYear2(item.sdate),
|
|
3769
|
+
endYear: parseYear2(item.edate)
|
|
3770
|
+
};
|
|
3771
|
+
}
|
|
3772
|
+
function mapIndicator(item, cid) {
|
|
3773
|
+
const measure = item.kj1_name?.trim() || item.kj2_name?.trim() || item.kj3_name?.trim() || item.dp_name?.trim() || void 0;
|
|
3774
|
+
return {
|
|
3775
|
+
id: item._id,
|
|
3776
|
+
cid: item.catalogid || cid,
|
|
3777
|
+
name: item._name.trim(),
|
|
3778
|
+
showName: item.i_showname.trim(),
|
|
3779
|
+
unit: item.du_name && item.du_name !== "\u65E0" ? item.du_name.trim() : void 0,
|
|
3780
|
+
measure,
|
|
3781
|
+
startDate: item.daterange_sdate ?? void 0,
|
|
3782
|
+
endDate: item.daterange_edate ?? void 0,
|
|
3783
|
+
note: item.i_annotation ?? void 0
|
|
3784
|
+
};
|
|
3785
|
+
}
|
|
3786
|
+
function mapSeries(periods) {
|
|
3787
|
+
return periods.map((period2) => ({
|
|
3788
|
+
code: period2.code,
|
|
3789
|
+
name: period2.name,
|
|
3790
|
+
values: period2.values.map((value) => ({
|
|
3791
|
+
id: value._id,
|
|
3792
|
+
name: value._name,
|
|
3793
|
+
showName: value.i_showname,
|
|
3794
|
+
unit: value.du_name && value.du_name !== "\u65E0" ? value.du_name : void 0,
|
|
3795
|
+
value: value.value,
|
|
3796
|
+
region: value.da,
|
|
3797
|
+
regionName: value.da_name
|
|
3798
|
+
}))
|
|
3799
|
+
}));
|
|
3800
|
+
}
|
|
3801
|
+
var NbsProviderImpl = class {
|
|
3802
|
+
client;
|
|
3803
|
+
constructor(client) {
|
|
3804
|
+
this.client = client;
|
|
3805
|
+
}
|
|
3806
|
+
async search(params) {
|
|
3807
|
+
const code = params.code ?? (params.period ? PERIOD_CODE2[params.period] : "");
|
|
3808
|
+
const page = params.page ?? 1;
|
|
3809
|
+
const pageSize = params.pageSize ?? 50;
|
|
3810
|
+
const cacheKey = `search:${code}:${page}:${pageSize}:${params.keyword}`;
|
|
3811
|
+
const data = await this.client.request("/query", {
|
|
3812
|
+
query: {
|
|
3813
|
+
search: params.keyword,
|
|
3814
|
+
pagenum: page,
|
|
3815
|
+
pageSize,
|
|
3816
|
+
code
|
|
3817
|
+
},
|
|
3818
|
+
cacheKey,
|
|
3819
|
+
cacheTtlMs: TTL.search,
|
|
3820
|
+
noCache: params.noCache,
|
|
3821
|
+
signal: params.signal
|
|
3822
|
+
});
|
|
3823
|
+
return {
|
|
3824
|
+
records: (data.data ?? []).map(mapSearchItem),
|
|
3825
|
+
count: data.count ?? 0
|
|
3826
|
+
};
|
|
3827
|
+
}
|
|
3828
|
+
async getTree(params) {
|
|
3829
|
+
const cacheKey = `tree:${params.code}:${params.pid ?? ""}`;
|
|
3830
|
+
const data = await this.client.request("/new/queryIndexTreeAsync", {
|
|
3831
|
+
query: {
|
|
3832
|
+
pid: params.pid ?? "",
|
|
3833
|
+
code: params.code
|
|
3834
|
+
},
|
|
3835
|
+
cacheKey,
|
|
3836
|
+
cacheTtlMs: TTL.tree,
|
|
3837
|
+
noCache: params.noCache,
|
|
3838
|
+
signal: params.signal
|
|
3839
|
+
});
|
|
3840
|
+
return (data ?? []).map(mapTreeItem);
|
|
3841
|
+
}
|
|
3842
|
+
async getIndicators(params) {
|
|
3843
|
+
const cacheKey = `indicators:${params.cid}`;
|
|
3844
|
+
const data = await this.client.request(
|
|
3845
|
+
"/new/queryIndicatorsByCid",
|
|
3846
|
+
{
|
|
3847
|
+
query: {
|
|
3848
|
+
cid: params.cid,
|
|
3849
|
+
dt: "",
|
|
3850
|
+
name: ""
|
|
3851
|
+
},
|
|
3852
|
+
cacheKey,
|
|
3853
|
+
cacheTtlMs: TTL.indicators,
|
|
3854
|
+
noCache: params.noCache,
|
|
3855
|
+
signal: params.signal
|
|
3856
|
+
}
|
|
3857
|
+
);
|
|
3858
|
+
return (data.list ?? []).map((item) => mapIndicator(item, params.cid));
|
|
3859
|
+
}
|
|
3860
|
+
async getSeries(params) {
|
|
3861
|
+
const cacheKey = `series:${params.cid}:${params.indicId}:${params.dts}:${params.region.value}`;
|
|
3862
|
+
const data = await this.client.request("/stream/esData", {
|
|
3863
|
+
method: "POST",
|
|
3864
|
+
body: {
|
|
3865
|
+
cid: params.cid,
|
|
3866
|
+
indicatorIds: [params.indicId],
|
|
3867
|
+
daCatalogId: "",
|
|
3868
|
+
das: [{ text: params.region.text, value: params.region.value }],
|
|
3869
|
+
showType: "1",
|
|
3870
|
+
dts: [params.dts],
|
|
3871
|
+
rootId: ROOT_ID
|
|
3872
|
+
},
|
|
3873
|
+
cacheKey,
|
|
3874
|
+
cacheTtlMs: TTL.series,
|
|
3875
|
+
noCache: params.noCache,
|
|
3876
|
+
signal: params.signal
|
|
3877
|
+
});
|
|
3878
|
+
return mapSeries(data ?? []);
|
|
3879
|
+
}
|
|
3880
|
+
async getProvinces(signal) {
|
|
3881
|
+
return this.client.request("/getAllProvince", {
|
|
3882
|
+
cacheKey: "provinces",
|
|
3883
|
+
cacheTtlMs: TTL.provinces,
|
|
3884
|
+
signal
|
|
3885
|
+
});
|
|
3886
|
+
}
|
|
3887
|
+
};
|
|
3888
|
+
|
|
3889
|
+
// src/index.ts
|
|
3890
|
+
var SOURCE_NAME = "\u56FD\u5BB6\u7EDF\u8BA1\u5C40";
|
|
3891
|
+
var SOURCE_URL = "https://data.stats.gov.cn/";
|
|
3892
|
+
var SHARED_CACHE = new TtlCache({ maxEntries: 200 });
|
|
3893
|
+
var SHARED_LIMITER = new RateLimiter({ minIntervalMs: 2e3, jitterMs: 250 });
|
|
3894
|
+
function sourceNow() {
|
|
3895
|
+
return {
|
|
3896
|
+
name: SOURCE_NAME,
|
|
3897
|
+
url: SOURCE_URL,
|
|
3898
|
+
retrievedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3899
|
+
};
|
|
3900
|
+
}
|
|
3901
|
+
function indicatorMeta(indicator) {
|
|
3902
|
+
return {
|
|
3903
|
+
id: `${indicator.cid}:${indicator.indicId}`,
|
|
3904
|
+
name: indicator.name,
|
|
3905
|
+
displayName: indicator.displayName,
|
|
3906
|
+
unit: indicator.unit,
|
|
3907
|
+
frequency: indicator.frequency,
|
|
3908
|
+
region: indicator.region,
|
|
3909
|
+
measure: indicator.measure,
|
|
3910
|
+
note: indicator.note
|
|
3911
|
+
};
|
|
3912
|
+
}
|
|
3913
|
+
function ambiguousResult(action, source, candidates) {
|
|
3914
|
+
return {
|
|
3915
|
+
ok: false,
|
|
3916
|
+
action,
|
|
3917
|
+
source,
|
|
3918
|
+
candidates,
|
|
3919
|
+
error: {
|
|
3920
|
+
code: "AMBIGUOUS",
|
|
3921
|
+
message: "\u627E\u5230\u591A\u4E2A\u53EF\u80FD\u7684\u6307\u6807\uFF0C\u65E0\u6CD5\u786E\u5B9A\u8981\u67E5\u54EA\u4E00\u4E2A",
|
|
3922
|
+
retryable: false,
|
|
3923
|
+
hint: "\u8BF7\u4ECE candidates \u4E2D\u9009\u62E9\u4E00\u4E2A\uFF0C\u628A\u5B83\u7684 id \u4F5C\u4E3A indicatorId \u518D\u67E5\uFF1BCLI \u53EF\u7528 --select <\u5E8F\u53F7> \u6216 --json \u67E5\u770B id\u3002"
|
|
3924
|
+
}
|
|
3925
|
+
};
|
|
3926
|
+
}
|
|
3927
|
+
function notFoundResult(action, source, query2, suggestions) {
|
|
3928
|
+
return {
|
|
3929
|
+
ok: false,
|
|
3930
|
+
action,
|
|
3931
|
+
source,
|
|
3932
|
+
error: {
|
|
3933
|
+
code: "NOT_FOUND",
|
|
3934
|
+
message: `\u6CA1\u6709\u627E\u5230\u4E0E\u201C${query2}\u201D\u5339\u914D\u7684\u6307\u6807`,
|
|
3935
|
+
retryable: false,
|
|
3936
|
+
hint: `\u6362\u4E00\u4E2A\u66F4\u5177\u4F53\u7684\u6307\u6807\u540D\uFF0C\u6216\u8BD5\u8BD5\uFF1A${suggestions.slice(0, 6).join("\u3001")}`,
|
|
3937
|
+
details: { suggestions }
|
|
3938
|
+
}
|
|
3939
|
+
};
|
|
3940
|
+
}
|
|
3941
|
+
function resolutionResult(action, source, query2, resolution) {
|
|
3942
|
+
if (resolution.kind === "ambiguous")
|
|
3943
|
+
return ambiguousResult(action, source, resolution.candidates);
|
|
3944
|
+
if (resolution.kind === "notFound") {
|
|
3945
|
+
return notFoundResult(action, source, query2, resolution.suggestions);
|
|
3946
|
+
}
|
|
3947
|
+
return void 0;
|
|
3948
|
+
}
|
|
3949
|
+
async function dispatch(provider, options, action, source) {
|
|
3950
|
+
if (action === "catalog") {
|
|
3951
|
+
const catalog = await fetchCatalog(
|
|
3952
|
+
provider,
|
|
3953
|
+
options,
|
|
3954
|
+
options.code ?? "3",
|
|
3955
|
+
options.pid ?? "",
|
|
3956
|
+
options.depth ?? 1
|
|
3957
|
+
);
|
|
3958
|
+
return {
|
|
3959
|
+
ok: true,
|
|
3960
|
+
action,
|
|
3961
|
+
source,
|
|
3962
|
+
nodes: catalog.nodes,
|
|
3963
|
+
...catalog.notes.length > 0 ? { notes: catalog.notes } : {}
|
|
3964
|
+
};
|
|
3965
|
+
}
|
|
3966
|
+
const query2 = options.query?.trim();
|
|
3967
|
+
if (!query2) {
|
|
3968
|
+
throw invalidArgument("\u7F3A\u5C11 query \u53C2\u6570", '\u793A\u4F8B\uFF1Aquery({ query: "GDP", action: "series" })');
|
|
3969
|
+
}
|
|
3970
|
+
const region2 = options.region ? resolveRegion(options.region) : inferRegionFromText(options.query) ?? NATIONAL_REGION;
|
|
3971
|
+
if (!region2) {
|
|
3972
|
+
throw invalidArgument(
|
|
3973
|
+
`\u65E0\u6CD5\u8BC6\u522B\u5730\u533A\uFF1A${options.region ?? ""}`,
|
|
3974
|
+
`\u53EF\u7528\u5730\u533A\u5305\u62EC\uFF1A${regionSuggestions(options.region ?? "").join("\u3001") || "\u5168\u56FD\u3001\u5E7F\u4E1C\u3001\u6C5F\u82CF\u3001\u6D59\u6C5F"}`
|
|
3975
|
+
);
|
|
3976
|
+
}
|
|
3977
|
+
const period2 = inferPeriod(options);
|
|
3978
|
+
if (action === "compare") {
|
|
3979
|
+
const compared = await compareRegions(provider, options, period2);
|
|
3980
|
+
const early2 = resolutionResult(action, source, query2, compared.resolution);
|
|
3981
|
+
if (early2) return early2;
|
|
3982
|
+
if (!compared.result) {
|
|
3983
|
+
throw new NbsError("UPSTREAM_ERROR", "compare \u6CA1\u6709\u8FD4\u56DE\u7ED3\u679C", { retryable: true });
|
|
3984
|
+
}
|
|
3985
|
+
return {
|
|
3986
|
+
ok: true,
|
|
3987
|
+
action,
|
|
3988
|
+
source,
|
|
3989
|
+
indicator: indicatorMeta(compared.result.indicator),
|
|
3990
|
+
series: compared.result.series,
|
|
3991
|
+
...compared.result.notes.length > 0 ? { notes: compared.result.notes } : {},
|
|
3992
|
+
...compared.result.partial ? { partial: true } : {}
|
|
3993
|
+
};
|
|
3994
|
+
}
|
|
3995
|
+
const resolution = await resolveIndicator(provider, options, period2, region2);
|
|
3996
|
+
const early = resolutionResult(action, source, query2, resolution);
|
|
3997
|
+
if (early) return early;
|
|
3998
|
+
if (resolution.kind !== "resolved") {
|
|
3999
|
+
throw new NbsError("UPSTREAM_ERROR", "\u6307\u6807\u89E3\u6790\u5931\u8D25", { retryable: true });
|
|
4000
|
+
}
|
|
4001
|
+
const indicator = resolution.indicator;
|
|
4002
|
+
const notes = [];
|
|
4003
|
+
if (indicator.note) notes.push(indicator.note);
|
|
4004
|
+
if (action === "search") {
|
|
4005
|
+
const limit = Math.max(1, Math.min(50, Math.floor(options.limit ?? 5)));
|
|
4006
|
+
const result = await fetchSeries(provider, indicator, period2, {
|
|
4007
|
+
start: options.start,
|
|
4008
|
+
end: options.end,
|
|
4009
|
+
maxPoints: Math.min(50, limit + 3),
|
|
4010
|
+
signal: options.signal,
|
|
4011
|
+
noCache: options.noCache
|
|
4012
|
+
});
|
|
4013
|
+
const nonNull = result.points.filter((point) => point.value !== null);
|
|
4014
|
+
const points = nonNull.length > 0 ? nonNull.slice(-limit) : result.points.slice(-limit);
|
|
4015
|
+
notes.push(
|
|
4016
|
+
...result.notes.filter(
|
|
4017
|
+
(note) => !note.startsWith("\u6570\u636E\u70B9\u8F83\u591A") && !note.startsWith("\u672B\u5C3E\u5C1A\u672A\u53D1\u5E03")
|
|
4018
|
+
)
|
|
4019
|
+
);
|
|
4020
|
+
return {
|
|
4021
|
+
ok: true,
|
|
4022
|
+
action,
|
|
4023
|
+
source: sourceNow(),
|
|
4024
|
+
indicator: indicatorMeta(indicator),
|
|
4025
|
+
points,
|
|
4026
|
+
...notes.length > 0 ? { notes } : {},
|
|
4027
|
+
...result.partial ? { partial: true } : {}
|
|
4028
|
+
};
|
|
4029
|
+
}
|
|
4030
|
+
if (action === "series") {
|
|
4031
|
+
const result = await fetchSeries(provider, indicator, period2, {
|
|
4032
|
+
start: options.start,
|
|
4033
|
+
end: options.end,
|
|
4034
|
+
maxPoints: options.maxPoints,
|
|
4035
|
+
signal: options.signal,
|
|
4036
|
+
noCache: options.noCache
|
|
4037
|
+
});
|
|
4038
|
+
notes.push(...result.notes);
|
|
4039
|
+
return {
|
|
4040
|
+
ok: true,
|
|
4041
|
+
action,
|
|
4042
|
+
source: sourceNow(),
|
|
4043
|
+
indicator: indicatorMeta(indicator),
|
|
4044
|
+
points: result.points,
|
|
4045
|
+
...notes.length > 0 ? { notes } : {},
|
|
4046
|
+
...result.partial ? { partial: true } : {}
|
|
4047
|
+
};
|
|
4048
|
+
}
|
|
4049
|
+
throw new NbsError("UNSUPPORTED_ACTION", `\u4E0D\u652F\u6301\u7684\u64CD\u4F5C\uFF1A${action}`, {
|
|
4050
|
+
retryable: false,
|
|
4051
|
+
hint: "\u53EF\u7528 action\uFF1Asearch\u3001series\u3001compare\u3001catalog\u3002"
|
|
4052
|
+
});
|
|
4053
|
+
}
|
|
4054
|
+
function createClient(options = {}) {
|
|
4055
|
+
return new NbsClient(options);
|
|
4056
|
+
}
|
|
4057
|
+
async function query(options = {}) {
|
|
4058
|
+
const action = options.action ?? "search";
|
|
4059
|
+
const totalTimeoutMs = Math.max(1e3, options.totalTimeoutMs ?? 45e3);
|
|
4060
|
+
const controller = new AbortController();
|
|
4061
|
+
let totalTimedOut = false;
|
|
4062
|
+
const onAbort = () => controller.abort(options.signal?.reason);
|
|
4063
|
+
if (options.signal) {
|
|
4064
|
+
if (options.signal.aborted) controller.abort(options.signal.reason);
|
|
4065
|
+
else options.signal.addEventListener("abort", onAbort, { once: true });
|
|
4066
|
+
}
|
|
4067
|
+
const timer = setTimeout(() => {
|
|
4068
|
+
totalTimedOut = true;
|
|
4069
|
+
controller.abort(new DOMException("Total query timeout", "TimeoutError"));
|
|
4070
|
+
}, totalTimeoutMs);
|
|
4071
|
+
const client = createClient({
|
|
4072
|
+
timeoutMs: options.timeoutMs,
|
|
4073
|
+
cache: SHARED_CACHE,
|
|
4074
|
+
limiter: SHARED_LIMITER,
|
|
4075
|
+
fetchImpl: options.fetchImpl,
|
|
4076
|
+
dispatcher: options.dispatcher,
|
|
4077
|
+
logger: options.debug ? options.logger ?? ((message, detail) => console.error(message, detail)) : void 0
|
|
4078
|
+
});
|
|
4079
|
+
const provider = new NbsProviderImpl(client);
|
|
4080
|
+
try {
|
|
4081
|
+
return await dispatch(provider, { ...options, signal: controller.signal }, action, sourceNow());
|
|
4082
|
+
} catch (error) {
|
|
4083
|
+
if (totalTimedOut) {
|
|
4084
|
+
return {
|
|
4085
|
+
ok: false,
|
|
4086
|
+
action,
|
|
4087
|
+
source: sourceNow(),
|
|
4088
|
+
error: toQueryError(timeoutError(totalTimeoutMs))
|
|
4089
|
+
};
|
|
4090
|
+
}
|
|
4091
|
+
return {
|
|
4092
|
+
ok: false,
|
|
4093
|
+
action,
|
|
4094
|
+
source: sourceNow(),
|
|
4095
|
+
error: toQueryError(error)
|
|
4096
|
+
};
|
|
4097
|
+
} finally {
|
|
4098
|
+
clearTimeout(timer);
|
|
4099
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
4100
|
+
}
|
|
4101
|
+
}
|
|
4102
|
+
|
|
4103
|
+
// src/mcp.ts
|
|
4104
|
+
var VERSION = "0.4.0";
|
|
4105
|
+
var region = zod.z.string().optional().describe("\u5730\u533A\u540D\u79F0\uFF0C\u5982 \u5168\u56FD\u3001\u5E7F\u4E1C\u3001\u5E7F\u5DDE\uFF1B\u9ED8\u8BA4\u5168\u56FD");
|
|
4106
|
+
var period = zod.z.enum(["year", "quarter", "month"]).optional().describe("\u6570\u636E\u9891\u7387\uFF1B\u4E0D\u586B\u5219\u6839\u636E start/end/\u5173\u952E\u8BCD\u63A8\u65AD");
|
|
4107
|
+
var start = zod.z.union([zod.z.string(), zod.z.number()]).optional().describe("\u8D77\u59CB\u65F6\u95F4\uFF0C\u5982 2015\u30012025Q1\u30012025-01");
|
|
4108
|
+
var end = zod.z.union([zod.z.string(), zod.z.number()]).optional().describe("\u7ED3\u675F\u65F6\u95F4\uFF0C\u5982 2025\u30012025Q4\u30012025-10");
|
|
4109
|
+
var indicatorId = zod.z.string().optional().describe("\u5019\u9009\u6307\u6807\u7684 cid:indicId\uFF0C\u7528\u4E8E AMBIGUOUS \u540E\u7684\u7CBE\u786E\u56DE\u67E5");
|
|
4110
|
+
function toolResult(result) {
|
|
4111
|
+
return {
|
|
4112
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
4113
|
+
isError: !result.ok
|
|
4114
|
+
};
|
|
4115
|
+
}
|
|
4116
|
+
function createMcpServer(queryFn = query) {
|
|
4117
|
+
const server = new mcp_js.McpServer(
|
|
4118
|
+
{ name: "china-nbs", version: VERSION },
|
|
4119
|
+
{
|
|
4120
|
+
instructions: "\u67E5\u8BE2\u4E2D\u56FD\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u6570\u636E\u53D1\u5E03\u5E93\u3002\u4F18\u5148\u7528 nbs_series \u53D6\u65F6\u95F4\u5E8F\u5217\uFF0Cnbs_search \u53D6\u6700\u65B0\u503C\u3002\u5982\u679C\u8FD4\u56DE AMBIGUOUS\uFF0C\u628A candidates \u5C55\u793A\u7ED9\u7528\u6237\uFF0C\u9009\u5B9A\u540E\u7528 indicatorId \u518D\u67E5\u3002\u4E0D\u8981\u7F16\u9020\u6570\u503C\uFF1B\u6240\u6709\u7ED3\u679C\u90FD\u5E26 source.retrievedAt\uFF0C\u5F15\u7528\u65F6\u6CE8\u660E\u67E5\u8BE2\u65F6\u95F4\u3002"
|
|
4121
|
+
}
|
|
4122
|
+
);
|
|
4123
|
+
server.registerTool(
|
|
4124
|
+
"nbs_search",
|
|
4125
|
+
{
|
|
4126
|
+
title: "\u641C\u7D22\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u6307\u6807\u5E76\u8FD4\u56DE\u6700\u65B0\u6570\u636E",
|
|
4127
|
+
description: "\u6309\u5173\u952E\u8BCD\u641C\u7D22\u6307\u6807\uFF0C\u8FD4\u56DE\u89E3\u6790\u540E\u7684\u6307\u6807\u4FE1\u606F\u4E0E\u6700\u8FD1\u51E0\u4E2A\u6570\u636E\u70B9\u3002\u9002\u5408\u56DE\u7B54\u201C\u6700\u65B0\u503C\u662F\u591A\u5C11\u201D\u3002",
|
|
4128
|
+
inputSchema: {
|
|
4129
|
+
query: zod.z.string().describe("\u6307\u6807\u5173\u952E\u8BCD\uFF0C\u5982 GDP\u3001CPI\u3001\u5E7F\u4E1C GDP\u3001\u5FEB\u9012\u4E1A\u52A1\u91CF"),
|
|
4130
|
+
region,
|
|
4131
|
+
period,
|
|
4132
|
+
limit: zod.z.number().int().min(1).max(50).optional().describe("\u8FD4\u56DE\u7684\u6700\u65B0\u6570\u636E\u70B9\u6570\u91CF\uFF0C\u9ED8\u8BA4 5")
|
|
4133
|
+
}
|
|
4134
|
+
},
|
|
4135
|
+
async ({ query: query2, region: region2, period: period2, limit }) => toolResult(await queryFn({ action: "search", query: query2, region: region2, period: period2, limit }))
|
|
4136
|
+
);
|
|
4137
|
+
server.registerTool(
|
|
4138
|
+
"nbs_series",
|
|
4139
|
+
{
|
|
4140
|
+
title: "\u67E5\u8BE2\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u6307\u6807\u65F6\u95F4\u5E8F\u5217",
|
|
4141
|
+
description: "\u6309\u5173\u952E\u8BCD\u67E5\u8BE2\u4E00\u4E2A\u6307\u6807\u7684\u65F6\u95F4\u5E8F\u5217\uFF0C\u652F\u6301\u5168\u56FD/\u5206\u7701/\u4E3B\u8981\u57CE\u5E02\u4E0E\u5E74/\u5B63/\u6708\u9891\u7387\u3002\u9002\u5408\u8D8B\u52BF\u3001\u540C\u6BD4\u3001\u5386\u53F2\u5BF9\u6BD4\u3002",
|
|
4142
|
+
inputSchema: {
|
|
4143
|
+
query: zod.z.string().describe("\u6307\u6807\u5173\u952E\u8BCD\uFF0C\u5982 GDP\u3001CPI\u3001\u5E7F\u4E1C GDP"),
|
|
4144
|
+
region,
|
|
4145
|
+
period,
|
|
4146
|
+
start,
|
|
4147
|
+
end,
|
|
4148
|
+
maxPoints: zod.z.number().int().min(1).max(1e3).optional().describe("\u6700\u5927\u6570\u636E\u70B9\uFF0C\u9ED8\u8BA4 240"),
|
|
4149
|
+
indicatorId
|
|
4150
|
+
}
|
|
4151
|
+
},
|
|
4152
|
+
async ({ query: query2, region: region2, period: period2, start: start2, end: end2, maxPoints, indicatorId: indicatorId2 }) => toolResult(
|
|
4153
|
+
await queryFn({
|
|
4154
|
+
action: "series",
|
|
4155
|
+
query: query2,
|
|
4156
|
+
region: region2,
|
|
4157
|
+
period: period2,
|
|
4158
|
+
start: start2,
|
|
4159
|
+
end: end2,
|
|
4160
|
+
maxPoints,
|
|
4161
|
+
indicatorId: indicatorId2
|
|
4162
|
+
})
|
|
4163
|
+
)
|
|
4164
|
+
);
|
|
4165
|
+
server.registerTool(
|
|
4166
|
+
"nbs_compare",
|
|
4167
|
+
{
|
|
4168
|
+
title: "\u5BF9\u6BD4\u591A\u4E2A\u5730\u533A\u7684\u540C\u4E00\u6307\u6807",
|
|
4169
|
+
description: "\u6BD4\u8F83\u4E00\u4E2A\u6307\u6807\u5728\u591A\u4E2A\u5730\u533A\u7684\u5E8F\u5217\u3002\u53EA\u652F\u6301\u5355\u6307\u6807\u591A\u5730\u533A\uFF1B\u591A\u6307\u6807\u8BF7\u5206\u591A\u6B21\u8C03\u7528\u3002\u6700\u591A 8 \u4E2A\u5730\u533A\u3002",
|
|
4170
|
+
inputSchema: {
|
|
4171
|
+
query: zod.z.string().describe("\u6307\u6807\u5173\u952E\u8BCD\uFF0C\u5982 GDP\u3001CPI"),
|
|
4172
|
+
regions: zod.z.array(zod.z.string()).min(1).max(8).describe('\u5730\u533A\u5217\u8868\uFF0C\u5982 ["\u5E7F\u4E1C","\u6C5F\u82CF","\u6D59\u6C5F"]'),
|
|
4173
|
+
period,
|
|
4174
|
+
start,
|
|
4175
|
+
end,
|
|
4176
|
+
maxPoints: zod.z.number().int().min(1).max(1e3).optional().describe("\u6BCF\u4E2A\u5730\u533A\u6700\u5927\u6570\u636E\u70B9"),
|
|
4177
|
+
indicatorId
|
|
4178
|
+
}
|
|
4179
|
+
},
|
|
4180
|
+
async ({ query: query2, regions, period: period2, start: start2, end: end2, maxPoints, indicatorId: indicatorId2 }) => toolResult(
|
|
4181
|
+
await queryFn({
|
|
4182
|
+
action: "compare",
|
|
4183
|
+
query: query2,
|
|
4184
|
+
regions,
|
|
4185
|
+
period: period2,
|
|
4186
|
+
start: start2,
|
|
4187
|
+
end: end2,
|
|
4188
|
+
maxPoints,
|
|
4189
|
+
indicatorId: indicatorId2
|
|
4190
|
+
})
|
|
4191
|
+
)
|
|
4192
|
+
);
|
|
4193
|
+
server.registerTool(
|
|
4194
|
+
"nbs_catalog",
|
|
4195
|
+
{
|
|
4196
|
+
title: "\u6D4F\u89C8\u56FD\u5BB6\u7EDF\u8BA1\u5C40\u5206\u7C7B\u6811",
|
|
4197
|
+
description: "\u5C55\u5F00\u5206\u7C7B\u6811\u8282\u70B9\uFF0C\u7528\u4E8E\u53D1\u73B0\u6307\u6807\u6240\u5728\u5206\u7C7B\u3002code\uFF1A1 \u5168\u56FD\u6708\u30012 \u5168\u56FD\u5B63\u30013 \u5168\u56FD\u5E74\u30014 \u5206\u7701\u6708\u30015 \u5206\u7701\u5B63\u30016 \u5206\u7701\u5E74\u30017 \u57CE\u5E02\u6708\u4EF7\u30018 \u57CE\u5E02\u5E74\u30019 \u6E2F\u6FB3\u53F0\u6708\u3002",
|
|
4198
|
+
inputSchema: {
|
|
4199
|
+
code: zod.z.string().optional().describe("\u5206\u7C7B code\uFF0C\u9ED8\u8BA4 3\uFF08\u5168\u56FD\u5E74\u5EA6\uFF09"),
|
|
4200
|
+
pid: zod.z.string().optional().describe("\u7236\u8282\u70B9 id\uFF1B\u7A7A\u8868\u793A\u6839\u8282\u70B9"),
|
|
4201
|
+
depth: zod.z.number().int().min(1).max(3).optional().describe("\u5C55\u5F00\u6DF1\u5EA6\uFF0C\u9ED8\u8BA4 1")
|
|
4202
|
+
}
|
|
4203
|
+
},
|
|
4204
|
+
async ({ code, pid, depth }) => toolResult(await queryFn({ action: "catalog", code, pid, depth }))
|
|
4205
|
+
);
|
|
4206
|
+
return server;
|
|
4207
|
+
}
|
|
4208
|
+
async function startMcpServer() {
|
|
4209
|
+
const server = createMcpServer();
|
|
4210
|
+
const transport = new stdio_js.StdioServerTransport();
|
|
4211
|
+
await server.connect(transport);
|
|
4212
|
+
process.stderr.write(`china-nbs MCP server ${VERSION} running on stdio
|
|
4213
|
+
`);
|
|
4214
|
+
}
|
|
4215
|
+
var isMain = process.argv[1] !== void 0 && (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('mcp.cjs', document.baseURI).href)) === url.pathToFileURL(process.argv[1]).href;
|
|
4216
|
+
if (isMain) {
|
|
4217
|
+
startMcpServer().catch((error) => {
|
|
4218
|
+
process.stderr.write(
|
|
4219
|
+
`${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
4220
|
+
`
|
|
4221
|
+
);
|
|
4222
|
+
process.exitCode = 1;
|
|
4223
|
+
});
|
|
4224
|
+
}
|
|
4225
|
+
|
|
4226
|
+
exports.createMcpServer = createMcpServer;
|
|
4227
|
+
exports.startMcpServer = startMcpServer;
|
|
4228
|
+
//# sourceMappingURL=mcp.cjs.map
|
|
4229
|
+
//# sourceMappingURL=mcp.cjs.map
|