Skip to main content

Questions tagged [pysal]

PySAL is an open source library of spatial analysis functions written in Python.

Filter by
Sorted by
Tagged with
3 votes
1 answer
289 views

Merging small polygons with neighbor polygons using GeoPandas and PySAL

I want to merge small polygons based on their area, etc. with adjacent neighbor polygons. For instance, we want to merge all countries in an iterative way to have a world map in which all small ...
Mohammad Mohseni Aref's user avatar
-1 votes
2 answers
229 views

Read shapefile into pysal [closed]

I've found the following Python module to work out the Mean Nearest Neighbor Distance Statistics of points https://pysal.org/notebooks/explore/pointpats/distance_statistics.html I've successfully ...
dabba293's user avatar
2 votes
2 answers
3k views

interpretation of Global Moran I values using pysal

I'm using pysal library (and this specific notebook) to run spatial autocorrelation. I have question regard the MORAN I value that I recieve. As far as I understand, in order to be able to say ...
ReutKeller's user avatar
  • 2,215
-1 votes
1 answer
129 views

Make probabilities with geospatial data

I work on a particular area, my data are geospatial types and are stored in a geodataframe which contains: a structure column (house, building, town hall, store etc). a neighbors_structure column ...
user184197's user avatar
-1 votes
1 answer
516 views

Python implementation to generate Delaunay triangulation based spatial weight matrix [closed]

I'm looking for Python implementation for Delaunay triangulation based spatial weights. There are a lot of spatial weights techniques available in a Python geospatial library PySAL but Delaunay ...
BetterCallMe's user avatar
2 votes
0 answers
2k views

PySAL, ValueError: cannot assign slice from input of different size

I want to calculate local moran's I statistics using pysal with Queen contiguity but I'm getting error. import geopandas as gpd from pysal.explore import esda from pysal.lib import ...
BetterCallMe's user avatar
1 vote
1 answer
317 views

Is it possible to compute higher order queens contiguity in PySAL?

I'm computing a spatial weights matrix in PySAL using Queens Contiguity. My problem is that I would like to consider areas that are contiguous to the first set of neighbours (ie. 2nd or even 3rd order ...
hexamon's user avatar
  • 2,666
0 votes
1 answer
298 views

How to interpret spatial random permutations against the observed value of the statistic (PySAL)

I have a map for which I calculate the value of the Global Moran's I. With the use of PySAL, there is also an option to do a computational inference. The result of such analysis is shown below. From ...
meteo_96's user avatar
  • 293
0 votes
0 answers
494 views

"PySAL"python qgis says --- is not recognised as an internal or external command

while loading hotspot analysis, it gives following 2 error 1. Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method 2. ModuleNotFoundError: No module named '...
pradeep's user avatar
3 votes
0 answers
474 views

Find spatial and temporal variability from a GeoPandas dataframe of polygons

I have a geopandas dataframe of polygons (all rectangles ~100mx120m) and each of these polygons has an attribute for time and % ice coverage. This is all derived from imagery I collected in the ...
clifgray's user avatar
  • 419
0 votes
1 answer
167 views

PySAL reading DBF column as None

I'm reading a Shapefile with PySAL in order to do some anlysis. The shapefile's DBF contains three columns, "id", "count" and "population". All three are large integers with no Null values. I try to ...
hexamon's user avatar
  • 2,666
0 votes
0 answers
93 views

Using Single Polygon for entire dataframe in PySAL?

I'm trying to calculate the queen contiguity weights using pysal's queen_from_shapefile() helper method based on this page Not being a GIS specialist I wanted to check my intuition on this Q&A ...
shanlodh's user avatar
  • 101
1 vote
0 answers
717 views

QGIS3.8 Hotspot Analysis Plugin not installing

I'm hoping someone on here might be able to help me. I'm fairly new to working with QGIS I'm completely lost. For my PhD project I have to use QGIS to produce georeferenced heatmaps based on ...
gariochquine's user avatar
2 votes
1 answer
411 views

Fixing colors of LISA Cluster maps from Pysal?

I am using the LISA Cluster package from Pysal to create a LISA (Local Indicator of Spatial Autocorrelation) map. As the example of the documentation shows, the color lightblue is used to identify ...
Oalvinegro's user avatar
6 votes
1 answer
5k views

Getis-Ord Gi* (arcgis 'hotspot analysis') with python? [closed]

Is it possible to compute Getis-Ord Gi* statistics (referred to as hotspot analysis in arcgis) with a Python library?
Juan Francisco Saldarriaga's user avatar
2 votes
2 answers
2k views

Compute Moran's I on more than one attribute

I am trying to compute global Moran's I to check for spatial autocorrelation among areas of a city. I am using python, in particular geopandas and pysal. My geodataframe looks like: District_name|...
sato's user avatar
  • 175
2 votes
0 answers
418 views

Classify / section line or group of points according to shape (with shapely objects)

Is there any python module/function that classifies/sections a shapely line according to the shape the line forms? If not, I could do it with the positions of the points that form the line. I would ...
Aurelie Navir's user avatar
1 vote
0 answers
673 views

Hotspot Analysis QGIS Error: An error has occurred while executing Python code: ValueError: Illegal field requested in GetField()

I am doing a hotspot analysis for chicken spatial distribution in QGIS using Ubuntu. I have already installed the repositories used for hotspot analysis. However, an error occurred after I chose a ...
monique 's user avatar
3 votes
2 answers
3k views

Moran's I on 2D arrays/rasters?

I would like to apply Moran's I spatial auto-correlation measure to 2D arrays or raster files in Python and I am wondering if there is an available implementation for it. I know Pysal offers an ...
GStav's user avatar
  • 329
3 votes
1 answer
734 views

Using PySAL to perform Hot/Cold Spots

So I am trying to figure out how to understand the Getis Ord results from pysal. I have a geographically enabled datatframe, and I want to figure out how to find both hot and cold spots from the ...
code base 5000's user avatar
2 votes
1 answer
212 views

Error while running PySAL SpaceTimeEvents function

I'm new to PySAL and trying to run Knox test to find space-time correlation in my dataset. My original dataset is in the form of csv including attributes such latitude, longitude, date and other ...
Poppin's user avatar
  • 21
1 vote
1 answer
174 views

Find maximum theoretical join count (spatial statistics)

In addition to calculating the joint count statistic, I would like to compare the actual count of joins to the theoretical maximum count of joins. I know how to compute the statistic and find the ...
eric s's user avatar
  • 365
1 vote
1 answer
2k views

Using R to do logistic geographically weighted regression(GWR) prediction

I'm using the R package "GWmodel" to do the logistic GWR, but this package doesn't provide the prediction function for generalized GWR(Binomial/Poisson). How can I do the Logistic GWR prediction using ...
hiyu's user avatar
  • 11
3 votes
1 answer
342 views

Read specific columns shapefile with PySAL

I'm using PySAL for work and I have encounter a problem. I want to calculate Moran’s I for serval fields, I can open and create a weight matrix from my shapefile (w) however I don't know how to ...
Victor A's user avatar
4 votes
1 answer
2k views

Adding python module to QGIS python interpreter on mac?

I'm on OS X El Capitan running QGIS version 2.18.2 which I installed via the Kyngchaos installers. I'm trying to install a plugin, which requires, among other things, that Pysal needs to be installed....
Aidian Holder's user avatar
4 votes
1 answer
2k views

Spatial weight for PySAL from a geojson file or geodataframe?

I want to calculate the Moran I value of a geojson file through python. Recently I am trying to use pysal and I find that I need to get the a spatial weight to realize it. But from the official guide ...
natsuapo's user avatar
  • 593
1 vote
2 answers
543 views

PySal and PostGIS (maybe via Shapely). How can these two interact?

I'm trying to learn the use of PySal and Python. As I'm already regular user of PostGIS, I would like to integrate the database as the storage medium for the data to be analysed. I'm using the test ...
JonasPedersen's user avatar
2 votes
2 answers
1k views

Distance-based spatial weights in pysal

I run into errors with distance-based spatial weights in pysal. When running a spatial lag model (e.g. twosls_sp.GM_Lag), I get the following exception: Exception: All entries on diagonal must equal ...
amball's user avatar
  • 1,532
3 votes
1 answer
1k views

Using pysal to map location of coordinates?

I am trying to map which county a set of coordinates I have are in. I want the code to go through each coordinate, check which county it is in, and then print the corresponding county. However, ...
JTH's user avatar
  • 133
0 votes
1 answer
529 views

How to merge CSV and county shapefile?

I have some data in a CSV file. One of the interested variable is test done (1=done, 2=not done). There is a variable of county name in which I would like to join with a county shapefile. I only know ...
KubiK888's user avatar
  • 189
11 votes
1 answer
1k views

PySAL natural breaks from Numpy array

I am attempting to extract natural break values from a raster using Python. The intended process goes: Arcpy raster object to NumPy Array (using RasterToNumPyArray) to natural break values (using ...
phloem's user avatar
  • 4,698
3 votes
1 answer
2k views

Python equivalent of spatstat's spatial point process functions

Is there a free Python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if that'...
stackoverflax's user avatar
1 vote
3 answers
781 views

Where to find PySAL toolbox for ArcGIS?

I installed PySAL but i can't find the toolbox for ArcGIS.
geogeek's user avatar
  • 27
4 votes
1 answer
547 views

BV LISA using PySal?

I want to run a LISA with a time series spatially lagged variable using PYSAL. I see that LISA will allow the definition of y & w but not Wy(t-k). Any thoughts how I can get the lagged variable ...
Rich H.'s user avatar
  • 71