<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Converting my .dbf to a Spatial Weights Matrix .swm in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324198#M1074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully used Python script to convert my .swm file to a .dbf, but I have not been able to convert the .dbf [after adjusting my weights] back to something that can read by ArcGIS, such as a .txt or .swm.&amp;nbsp; When I created the .swm file with my Input .shp, I declared the Unique ID as&amp;nbsp; "Data_ID" from the Input .shp.&amp;nbsp; I had to create this unique field in spite of the fact that the Input .shp already had FID.&amp;nbsp; This is an example of my .dbf output from the .swm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Field1&amp;nbsp;&amp;nbsp; Data_ID&amp;nbsp; NID&amp;nbsp; WEIGHT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.333&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.333&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.500&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it was strange that the "Field1" field was present with the 0 values.&amp;nbsp; I deleted this field given that it appeared to have no logical purpose, and it is not a field on my Input .shp.&amp;nbsp; That left me with the 2nd, 3rd, and 4th columns.&amp;nbsp; The Unique ID field in the Input .shp is of "short" data type.&amp;nbsp; I noticed that Microsoft Excel defaults the Data_ID field in my .dbf to "double" data type.&amp;nbsp; This would likely cause problems due to incoherent data types (short versus double).&amp;nbsp; I tried saving my .dbf as text(tab delimited) and also as a .csv file, but I received toolbox errors when trying to generate a new Spatial Weights Matrix.&amp;nbsp; These errors also happen when trying to import the .txt or .csv as the SWM table for Local Moran.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ArcToolbox error that I keep seeing when I try to generate a .swm with my .dbf is that my table's Unique ID field does not match the Input Feature's Unique ID.&amp;nbsp; According to me, they do match.&amp;nbsp; However, the data type problem might persist due to the fact that the Input .shp Unique ID is "short" integer.&amp;nbsp; A text file might be able to bypass this data type issue.&amp;nbsp; Toolbox has also told me on a few attempts that it cannot locate my Unique ID field, but I know that my Unique ID is the same on both the Input .shp and the various files that I have tried to import during generation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that my specific question is, "what do I need to do with my initial .dbf so that I can (after adjusting my weights) generate a new .swm?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2011 03:43:51 GMT</pubDate>
    <dc:creator>ChrisWeston</dc:creator>
    <dc:date>2011-09-20T03:43:51Z</dc:date>
    <item>
      <title>Converting my .dbf to a Spatial Weights Matrix .swm</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324198#M1074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully used Python script to convert my .swm file to a .dbf, but I have not been able to convert the .dbf [after adjusting my weights] back to something that can read by ArcGIS, such as a .txt or .swm.&amp;nbsp; When I created the .swm file with my Input .shp, I declared the Unique ID as&amp;nbsp; "Data_ID" from the Input .shp.&amp;nbsp; I had to create this unique field in spite of the fact that the Input .shp already had FID.&amp;nbsp; This is an example of my .dbf output from the .swm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Field1&amp;nbsp;&amp;nbsp; Data_ID&amp;nbsp; NID&amp;nbsp; WEIGHT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.333&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.333&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.500&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it was strange that the "Field1" field was present with the 0 values.&amp;nbsp; I deleted this field given that it appeared to have no logical purpose, and it is not a field on my Input .shp.&amp;nbsp; That left me with the 2nd, 3rd, and 4th columns.&amp;nbsp; The Unique ID field in the Input .shp is of "short" data type.&amp;nbsp; I noticed that Microsoft Excel defaults the Data_ID field in my .dbf to "double" data type.&amp;nbsp; This would likely cause problems due to incoherent data types (short versus double).&amp;nbsp; I tried saving my .dbf as text(tab delimited) and also as a .csv file, but I received toolbox errors when trying to generate a new Spatial Weights Matrix.&amp;nbsp; These errors also happen when trying to import the .txt or .csv as the SWM table for Local Moran.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ArcToolbox error that I keep seeing when I try to generate a .swm with my .dbf is that my table's Unique ID field does not match the Input Feature's Unique ID.&amp;nbsp; According to me, they do match.&amp;nbsp; However, the data type problem might persist due to the fact that the Input .shp Unique ID is "short" integer.&amp;nbsp; A text file might be able to bypass this data type issue.&amp;nbsp; Toolbox has also told me on a few attempts that it cannot locate my Unique ID field, but I know that my Unique ID is the same on both the Input .shp and the various files that I have tried to import during generation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that my specific question is, "what do I need to do with my initial .dbf so that I can (after adjusting my weights) generate a new .swm?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 03:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324198#M1074</guid>
      <dc:creator>ChrisWeston</dc:creator>
      <dc:date>2011-09-20T03:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting my .dbf to a Spatial Weights Matrix .swm</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324199#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;More info....this is the error code that I get when trying to generate a new .swm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000722: Could not read input spatial weights table due to conflict with the field names&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This baffles me since the Unique Id from the Input .shp is also on the file I'm using as the table for the .swm generation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 04:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324199#M1075</guid>
      <dc:creator>ChrisWeston</dc:creator>
      <dc:date>2011-09-20T04:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Converting my .dbf to a Spatial Weights Matrix .swm</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324200#M1076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, I figured it out.&amp;nbsp; Read the above thread entitled "How to convert .dbf to a spatial weights matrix"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 06:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/converting-my-dbf-to-a-spatial-weights-matrix-swm/m-p/324200#M1076</guid>
      <dc:creator>ChrisWeston</dc:creator>
      <dc:date>2011-09-21T06:39:17Z</dc:date>
    </item>
  </channel>
</rss>

