I have used GeoDa to create a .gal weights file from a shape file, Queen congruity. In GeoDa there are no disconnected polygons. When I read this into Jupyter Notebook I am informed that there are 6 disconnected components:
w = libpysal.io.open("data.gal").read()
w.transform='r'
C:Program FilesAnaconda3envsmarkov_envLibsite-packageslibpysalioiohandlersgal.py:185: UserWarning: The weights matrix is not fully connected:
There are 6 disconnected components.
w = W(neighbors, id_order=ids)
However when I get the histogram of connections I see that there are no zero bins. Also the sum of the frequencies, 35672, is exactly the number of areas I have in my shape file.
w.histogram
[(1, 123),
(2, 734),
(3, 2446),
(4, 5596),
(5, 8155),
(6, 7722),
(7, 4971),
(8, 2731),
(9, 1397),
(10, 737),
(11, 433),
(12, 238),
(13, 140),
(14, 83),
(15, 59),
(16, 41),
(17, 24),
(18, 13),
(19, 9),
(20, 8),
(21, 6),
(22, 2),
(23, 2),
(24, 1),
(25, 1)]
Is there anyway to identify the 6 components that it believes to be not connected?