Questions tagged [pysal]

Pysal is a spatial analysis library written in Python. It provides a variety of functions for interpreting common spatial data file formats and performing common analyses on them, with the goal of being easy to providing core functionality that is easier to integrate into higher level projects.

Pysal is an open-source library of spatial data analysis tools written in Python. It is able to read a variety of common data file formats such as shapefiles, DBF, CSV, WKT, GeoDa, GAL, GWT, and files from popular programs such as ArcGIS, MATLAB, and Stata. It provides functions for assessing autocorrelation, spatial econometrics, analyzing spatial data over time and more.

68 questions
1
vote
1 answer

PySAL OLS Model: AttributeError: 'OLS' object has no attribute 'predict'

I have divided my data into training and validation samples and have successfully fit my model with three types of linear models. What I cannot figure out how to do is apply the model to the validation sample to evaluate the fit. When I attempt to…
ewgrashorn
  • 21
  • 3
1
vote
0 answers

Spatial auto correlation in date line

Currently, I'm calculating spatial autocorrelation. The question is that, when calculating local spatial autocorrelation with pysal in python, is this calculation has no problem in dateline? my data is distributed from -180/180 and the code I used…
KimHG
  • 75
  • 1
  • 6
1
vote
0 answers

Python3 pysal error message for large dataset

I am using a package called pysal to run the following Theil Decomposition to find within and between outputs. When I create a small dataframe below the package works. See code below: import pysal…
scartar
  • 21
  • 2
1
vote
0 answers

Error in generation queen spatial weigth matrix

I tried to generate a queen spatial weight matrix with pysal to calculate Moran's I. The shapefile used is here , called br_unidades_da_federacao. I executed the code w = ps.queen_from_shapefile('BRUFE250GC_SIR.shp') but received an error message…
Oalvinegro
  • 458
  • 5
  • 21
1
vote
1 answer

pysal polygon object not returning centroid

I used pysal/cenpy to extract geo info, but the object is returning errors by calling centroid import cenpy as cen import pysal as ps import geopandas as gpd dataset = 'ACSSF5Y2015' con =…
ziad
  • 11
  • 2
1
vote
1 answer

Silence warning in PySAL weights command using geopandas df

I am calculating a weights matrix for a geopandas df. I know there is a keyword that will allow me to silence the island warning (pysal doc), but I get a keyword error when I try to use it... wt = ps.weights.DistanceBand.from_dataframe(df,…
jtam
  • 814
  • 1
  • 8
  • 24
1
vote
0 answers

create random data with certain degree of spatial autocorrelation

I need to create a random 1000x1000 matrix with certain degree of spatial autocorrelation. I have found a python library pysal, but the process need creating a 1000000x1000000 matrix, which makes the program crashing. Is there any way solving this…
Boorn
  • 11
  • 3
1
vote
1 answer

Plotting linesegments with Pysal in a map

I am using Pysal to visualize geospatial data. I want to plot segments between individuals (network) but I don't know how to plot my list of LineSegment shapes (lc). So how can I display those LineSegment in my map ? (Below, the plotting…
EmilienS
  • 21
  • 3
1
vote
0 answers

Creating Univariate Moran Scatterplot in PySal

I'm trying to create a Moran's scatterplot using PySAL -- the one with HH/HL/LH/LL quadrants -- and think I've got there but would like to check my understanding/interpretation/code. The code below uses the built-in North Carolina SIDS data set and…
JonR
  • 176
  • 1
  • 5
0
votes
0 answers

Spatial Queens Weights on Continental USA using Pysal

I´m new to spatial analysis and I want to get spatial weights (Queens) for all the counties in continental USA. As far as I know, I need to exclude all the small Islands, which are technically part of continental USA but not adjacent to the…
Lorenz
  • 1
  • 3
0
votes
0 answers

Export summary from python (spreg -pysal) to latex

I did a SARAR spatial regression of the pysal spreg library (spreg.GM_Combo). def reg_spatial(dep_var, independ_var): m2 = spreg.GM_Combo( # Dependent variable pgdf[[dep_var]].values, pgdf[independ_var].values, w=w_queen, …
0
votes
1 answer

pip install pysall - failed to build rvlib

I want to install the package pysal. I have tried using 'pip install pysal', and I already have all of its dependencies installed. This is the error I get: python setup.py bdist_wheel did not run successfully. exit code: 1 then note: This error…
Squarepeg
  • 41
  • 4
0
votes
0 answers

Perform distance statistics (g function, nn and so on) on 2 populations in 3d

Im looking for some help to perform distance statistical analysis on 2 different polutations in 3d. I was using already using matplotlib and pysal to do some plotting and coordinates extractions but im not able to perform distance analysis. I found…
Ali_Nass
  • 838
  • 1
  • 9
  • 27
0
votes
0 answers

Problem with voronoi library (scipy Voronoi, geovoronoi and libpysal Voronoi)

I'm having problems with several libraries and I can't think of a way to fix the problem. When I perform Voronoi processing. Some polygons are generated "inwards" causing numerous polygon overlaps. Here is the code snippet that generated the…
Ramon
  • 1
  • 1
0
votes
0 answers

AttributeError: module 'pysal' has no attribute 'pdio'

I'm currently learning how to use PySAL (http://darribas.org/gds_scipy16/ipynb_md/01_data_processing.html) and I've come across some problems when trying to use PySAL functions. After succesfully loading pysal as ps, I'm trying to use ps.pdio, but…
HM_ft
  • 98
  • 5