[Openspace] Spatial Variables
Luis Galvis
galvis at uiuc.edu
Mon Mar 12 07:12:08 CST 2007
I would suggest two things, one is that after you create the weights matrix
in GeoDA, open it in R and with the package spdep you can transform the
matrix in form of neighbor list to a squared matrix. Look for the command
nb2mat.
Alternatively you can edit the weights matrix in Excel, for instance, or in
any text editor, and you will see that for .GAL matrices the number of
neighbors is added to each observation. See the excerpt below and you will
notice that observation 23003 has 4 neighbors whose IDs appear in the line
right below:
0 674 patentNE FIPSNO
23003 4
23019 23021 23025 23029
55007 4
55129 55031 55003 55113
55031 4
55013 55129 55007 55113
55003 4
55113 55051 55099 55007
55051 4
55099 55125 26053 55003
23025 6
23011 23007 23027 23019 23021 23003
The only drawback of this option is that if you just need the list of
neighbors you´ll have to manually edit the file to get rid of the extra
lines. You could use filters in excel to erase them all at once...
Luis.
On 3/12/07, Jordan B Marvakov <jay at mail.orbitel.bg> wrote:
>
> Hello Everyone,
>
> I am in need of a specific type of spatial variables, which I haven't
> found a waz to produce using GeoDa. I suspect it is not possible, but
> I just wanted to verify.
>
> I need to obtain, from a certain shapefile: the "spatial total" of the
> variable X (as opposed to the "spatial average" w_X), or alternatively
> the total number of neighbors for each spatial class, or a N x N
> binary matrix, which indicates if the two regions are neigbors.
>
> Thanks in advance for the assistance.
>
> Best Regards,
> Jordan
>
> --
> Jordan B Marvakov
> Ph.D. Student, Economics Dept.
> Clark University, Worcester, MA
>
> _______________________________________________
> Openspace mailing list
> Openspace at sal.uiuc.edu
> http://sal.uiuc.edu/mailman/listinfo/openspace
>
More information about the Openspace
mailing list