我正在尝试对 shapefile(shp) 执行空间自相关函数。我如何为此生成女王邻接?
我阅读了 pysal 文档并看到了“queen_from_shapefile”,但出现错误。
这是我的代码:
shp= gpd.read_file(r'..\data\districts.shp')
Q_w = ps.queen_from_shapefile(shp)
我不断得到的错误是
AttributeError: module 'pysal' has no attribute 'queen_from_shapefile'