<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont

本文涉及的产品
转发路由器TR,750小时连接 100GB跨地域
简介: 行政区划的数据来源:国家统计局(截止2011年10月31日) 参考网址:http://www.stats.gov.cn/tjbz/xzqhdm/t20120105_402777427.htm 国家统计局给出的数据是网页格式的,如果需要把这些数据收纳到项目中来,需要费点儿周折。
行政区划的数据来源:国家统计局(截止2011年10月31日)

参考网址:http://www.stats.gov.cn/tjbz/xzqhdm/t20120105_402777427.htm

国家统计局给出的数据是网页格式的,如果需要把这些数据收纳到项目中来,需要费点儿周折。我用HttpClient工具读取了网页的内容,然后经过简单的分析拼接,最后得到了SQL脚本,SQL脚本的内容如下:

 注:本贴中的数据只限学习交流用,因此而引起的任何法律责任和纠纷均和作者无关。如需转帖,请注明出处。

-- ---------------------
-- 行政区划临时表
-- @author Programmer.Wenlong
-- @since 2012-03-09
-- ---------------------
create table temp(
	code varchar(8),
	name varchar(32),
	primary key(code)
);

insert into temp(code,name) values('110000','北京市');
insert into temp(code,name) values('110100','市辖区');
insert into temp(code,name) values('110101','东城区');
insert into temp(code,name) values('110102','西城区');
insert into temp(code,name) values('110105','朝阳区');
insert into temp(code,name) values('110106','丰台区');
insert into temp(code,name) values('110107','石景山区');
insert into temp(code,name) values('110108','海淀区');
insert into temp(code,name) values('110109','门头沟区');
insert into temp(code,name) values('110111','房山区');
insert into temp(code,name) values('110112','通州区');
insert into temp(code,name) values('110113','顺义区');
insert into temp(code,name) values('110114','昌平区');
insert into temp(code,name) values('110115','大兴区');
insert into temp(code,name) values('110116','怀柔区');
insert into temp(code,name) values('110117','平谷区');
insert into temp(code,name) values('110200','县');
insert into temp(code,name) values('110228','密云县');
insert into temp(code,name) values('110229','延庆县');
insert into temp(code,name) values('120000','天津市');
insert into temp(code,name) values('120100','市辖区');
insert into temp(code,name) values('120101','和平区');
insert into temp(code,name) values('120102','河东区');
insert into temp(code,name) values('120103','河西区');
insert into temp(code,name) values('120104','南开区');
insert into temp(code,name) values('120105','河北区');
insert into temp(code,name) values('120106','红桥区');
insert into temp(code,name) values('120110','东丽区');
insert into temp(code,name) values('120111','西青区');
insert into temp(code,name) values('120112','津南区');
insert into temp(code,name) values('120113','北辰区');
insert into temp(code,name) values('120114','武清区');
insert into temp(code,name) values('120115','宝坻区');
insert into temp(code,name) values('120116','滨海新区');
insert into temp(code,name) values('120200','县');
insert into temp(code,name) values('120221','宁河县');
insert into temp(code,name) values('120223','静海县');
insert into temp(code,name) values('120225','蓟县');
insert into temp(code,name) values('130000','河北省');
insert into temp(code,name) values('130100','石家庄市');
insert into temp(code,name) values('130101','市辖区');
insert into temp(code,name) values('130102','长安区');
insert into temp(code,name) values('130103','桥东区');
insert into temp(code,name) values('130104','桥西区');
insert into temp(code,name) values('130105','新华区');
insert into temp(code,name) values('130107','井陉矿区');
insert into temp(code,name) values('130108','裕华区');
insert into temp(code,name) values('130121','井陉县');
insert into temp(code,name) values('130123','正定县');
insert into temp(code,name) values('130124','栾城县');
insert into temp(code,name) values('130125','行唐县');
insert into temp(code,name) values('130126','灵寿县');
insert into temp(code,name) values('130127','高邑县');
insert into temp(code,name) values('130128','深泽县');
insert into temp(code,name) values('130129','赞皇县');
insert into temp(code,name) values('130130','无极县');
insert into temp(code,name) values('130131','平山县');
insert into temp(code,name) values('130132','元氏县');
insert into temp(code,name) values('130133','赵县');
insert into temp(code,name) values('130181','辛集市');
insert into temp(code,name) values('130182','藁城市');
insert into temp(code,name) values('130183','晋州市');
insert into temp(code,name) values('130184','新乐市');
insert into temp(code,name) values('130185','鹿泉市');
insert into temp(code,name) values('130200','唐山市');
insert into temp(code,name) values('130201','市辖区');
insert into temp(code,name) values('130202','路南区');
insert into temp(code,name) values('130203','路北区');
insert into temp(code,name) values('130204','古冶区');
insert into temp(code,name) values('130205','开平区');
insert into temp(code,name) values('130207','丰南区');
insert into temp(code,name) values('130208','丰润区');
insert into temp(code,name) values('130223','滦县');
insert into temp(code,name) values('130224','滦南县');
insert into temp(code,name) values('130225','乐亭县');
insert into temp(code,name) values('130227','迁西县');
insert into temp(code,name) values('130229','玉田县');
insert into temp(code,name) values('130230','唐海县');
insert into temp(code,name) values('130281','遵化市');
insert into temp(code,name) values('130283','迁安市');
insert into temp(code,name) values('130300','秦皇岛市');
insert into temp(code,name) values('130301','市辖区');
insert into temp(code,name) values('130302','海港区');
insert into temp(code,name) values('130303','山海关区');
insert into temp(code,name) values('130304','北戴河区');
insert into temp(code,name) values('130321','青龙满族自治县');

 

因数据较多,我已上传至http://download.csdn.net/detail/mycdsnstudy/4129537

当然,不同级别的行政区划之间还存在关联关系。只要把源数据导入到数据库中,剩的工作就相对简单了。

相关文章
|
Web App开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
TCP洪水攻击(SYN Flood)的诊断和处理 Posted by  海涛  on 2013 年 7 月 11 日 Tweet1 ​1. SYN Flood介绍 前段时间网站被攻击多次,其中最猛烈的就是TCP洪水攻击,即SYN Flood。
1011 0
|
存储 Web App开发 监控
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
我们以前使用过的对hbase和hdfs进行健康检查,及剩余hdfs容量告警,简单易用 1.针对hadoop2的脚本: #/bin/bashbin=`dirname $0`bin=`cd $bin;pwd`STATE_OK=...
1058 0
|
Web App开发 前端开发 Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
ZooKeeper 保证了数据的强一致性,  zk集群中任意节点(一个zkServer)上的相同znode下的数据一定是相同的。
807 0
|
Web App开发 大数据
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
                                                                               1.
1733 0
|
Web App开发 前端开发 算法
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
import java.util.LinkedHashMap;import java.util.Map; /** * LRU (Least Recently Used)  */public class LRUCache e...
635 0
|
Web App开发 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
原文见:http://kafka.apache.org/documentation.html#semantics kafka在生产者和消费者之间的传输是如何保证的,我们可以知道有这么几种可能提供的delivery guarantee: At most once 消息可能会丢,但绝不会重复传输 At least one 消息绝不会丢,但可能会重复传输 Exactly once 每条消息肯定会被传输一次且仅传输一次,很多时候这是用户所想要的。
905 0
|
Web App开发 Java Apache
|
Web App开发 算法 Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
(1)直接插入排序 [java] view plaincopy /** 直接插入排序 **/   /** 数组是引用类型,元素值将被改变 **/   public static void insertSort(i...
708 0
|
Web App开发 前端开发 Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to rename output from: hdfs://nameservice/user/hive/warehouse/om_dw.
742 0
下一篇
DataWorks