数据源使用的统计用区划代码和城乡划分代码,可以在国家统计局官网查看。国家统计局每年都会更新代码,最早的数据是2009年,最新的是2023年。
public toShort() {
// 如果是自治区,只取前两个字
if (this.name.indexOf('自治区') !== -1) {
return this.name.substr(0, 2)
}
// remove 省 | 市
return this.name.replace(/[(\u7701)|(\u5E02)]/g, '')
}