Closed TransUMD closed 4 years ago
Could you include your example code and data so we can debug?
Hello,
I attached the sample code and data. It is basically a hexagon-based shapefile with the value attached in each hexagon, and I am trying to apply queen weight but it reported the silent_island_warning message.
The kernel weights works.
Hi, I have also been experiencing this error.
I think the issue lies within weights.py of libpysal. At line 941-946, where the script checks for items that have no neighbours, it checks the bool of the attribute 'silent_island_warning'. This attribute is not mentioned anywhere else in the file, pehaps the devs were planning on implementing it at some point.
There is an existing, presumably more general, 'silence_warnings' bool setting. When I substituted in 'silence_warnings' for 'silent_island_warning' on line 945 of weights.py I acheived the desired result of the module warning me when I have islands.
This should be resolved via #206
This should be resolved via #206
Thanks. I merged the latest code and it ran through now.
Thanks for the development team for the prompt reply.
Dear developers,
Following up with this question. I was able solve the problem as mentioned above.
But when I applied esda.moran.Moran_Local to shapefile I provide above, it reported lots of silent island (no neighbors). However, the shapefile is a fully connected hexagon, as shown below.
I was not sure why this happened.
Thank you.
Best,
can you include the files so that we can check into this?
Sergio (Serge) Rey Founding Director, Center for Geospatial Sciences Professor, School of Public Policy University of California, Riverside sergio.rey@ucr.edu
On Tue, Dec 3, 2019 at 10:39 AM M.Yang notifications@github.com wrote:
Dear developers,
Following up with this question. I was able solve the problem as mentioned above.
But when I applied esda.moran.Moran_Local to shapefile I provide above, it reported lots of silent island (no neighbors). However, the shapefile is a fully connected hexagon, as shown below.
[image: image] https://user-images.githubusercontent.com/29628412/70079190-3b464d80-15d2-11ea-8af6-edd1a7c4843e.png
I was not sure why this happened.
Thank you.
Best,
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pysal/libpysal/issues/204?email_source=notifications&email_token=AAA42GQNZIVB52EGL4GIJNDQW2RUXA5CNFSM4JH7OF22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF2MGCI#issuecomment-561300233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA42GS4KT57R6BICF3ZLDTQW2RUXANCNFSM4JH7OF2Q .
The hexagon lattice may look as if there are no islands (and should form a single connected component), but this is not the case.
For details, see this gist.
TL;DR: You can get a w
with a single component using:
w = libpysal.weights.fuzzy_contiguity(blgp)
The hexagon lattice may look as if there are no islands (and should form a single connected component), but this is not the case.
For details, see this gist.
TL;DR: You can get a
w
with a single component using:w = libpysal.weights.fuzzy_contiguity(blgp)
Thank you very much for the help!
Hello, I used this a few months ago, but now it always has errors, TypeError: float() argument must be a string or a number, not 'Point', how can I do to solve this problem?
Hello,
I was using libpysal to conduct esda. I was doing the spatial weights using continuity weights but it pops up the following errors:
AttributeError Traceback (most recent call last)