文档收集于互联网,已重新整理排版
.word
版本可编辑
,
有帮助欢迎下载支持
.
1
文档来源为
:
从网络收集整理
.word
版本可编辑
.
**
创建空间权重矩阵介绍
*
设置默认路径
cdC:\Users\xiubo\Desktop\F18.v4\F101994\sheng
**
创建新文件
*shp2dta:reads
a
shape
(.shp)
and
dbase
(.dbf)
file
from
disk
and
converts
them
into
Stata
datasets.
*shp2dta:
读取
CHN_adm1
文件
*CHN_adm1
:为已有的地图文件
*database(chinaprovince)
:表示创建一个名称为“
chinaprovince
”的
dBase
数据集
*database(filename)
:
SpecifiesfilenameofnewdBasedataset
*coordinates(coord)
:创建一个名称为“
coord
”的坐标系数据集
*coordinates(filename)
:
Specifiesfilenameofnewcoordinatesdataset
*gencentroids(stub)
:
Createscentroidvariables
*genid(newvarname)
:
Createsuniqueidvariablefordatabase.dta
shp2dtausingCHN_adm1,database(chinaprovince)coordinates(coord)genid(id)gencentroids(c)
**
绘制
年中國
GDP
分布圖
*spmap:Visualizationofspatialdata
*clnumber(#):numberofclasses
*id(idvar):basemappolygonidentifier(
识别符,声明变量名,一般以字母或下划线开头,包含
数字、字母、下划线
)
*_GDP
:变量
*coord:
之前创建的坐标系数据集
spmap_GDP
usingcoord,id(id)clnumber(5)
*
更改变量名
renamex_clongitude
renamey_clatitude