1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
|
%global _empty_manifest_terminate_build 0
Name: python-pysal
Version: 23.1
Release: 1
Summary: A library of spatial analysis functions.
License: BSD
URL: http://pysal.org
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e4/00/f239a341d68784f50a6fdd01e6678a04ff3dcaf777645619570b350c26bb/pysal-23.1.tar.gz
BuildArch: noarch
Requires: python3-libpysal
Requires: python3-access
Requires: python3-esda
Requires: python3-giddy
Requires: python3-inequality
Requires: python3-pointpats
Requires: python3-segregation
Requires: python3-spaghetti
Requires: python3-mgwr
Requires: python3-momepy
Requires: python3-spglm
Requires: python3-spint
Requires: python3-spreg
Requires: python3-spvcm
Requires: python3-tobler
Requires: python3-mapclassify
Requires: python3-splot
Requires: python3-spopt
Requires: python3-nose
Requires: python3-nose-progressive
Requires: python3-coverage
Requires: python3-sphinx
Requires: python3-sphinxcontrib-napoleon
Requires: python3-coveralls
Requires: python3-bokeh
Requires: python3-jupyter
Requires: python3-ipywidgets
Requires: python3-statsmodels
Requires: python3-twine
Requires: python3-wheel
Requires: python3-pytest
Requires: python3-pytest-mpl
Requires: python3-pytest-cov
Requires: python3-dateutil
Requires: python3-urllib3
Requires: python3-sphinx
Requires: python3-sphinxcontrib-napoleon
Requires: python3-sphinx-gallery
Requires: python3-sphinxcontrib-bibtex
Requires: python3-sphinx-bootstrap-theme
Requires: python3-numpydoc
Requires: python3-doc2dash
Requires: python3-matplotlib
Requires: python3-seaborn
Requires: python3-geopandas
Requires: python3-scikit-learn
Requires: python3-bokeh
Requires: python3-geojson
Requires: python3-folium
Requires: python3-mplleaflet
Requires: python3-statsmodels
Requires: python3-mapclassify
Requires: python3-numba
Requires: python3-numexpr
Requires: python3-palettable
Requires: python3-pandana
Requires: python3-urbanaccess
Requires: python3-descartes
%description
# Python Spatial Analysis Library
[](https://github.com/pysal/pysal/actions?query=workflow%3A%22Unit+Tests%22)
[](https://badge.fury.io/py/pysal)
[](https://anaconda.org/conda-forge/pysal)
[](https://gitter.im/pysal/pysal)
[](https://github.com/psf/black)
[](https://zenodo.org/badge/latestdoi/8295380)
<p align="center">
<img src="https://user-images.githubusercontent.com/8590583/89052459-bad41a00-d323-11ea-9be2-beb7d0d1b7ea.png" width="300" height="300" />
</p>
PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with an emphasis on geospatial vector data written in Python. It supports the development of high level applications for spatial analysis, such as
- detection of spatial clusters, hot-spots, and outliers
- construction of graphs from spatial data
- spatial regression and statistical modeling on geographically embedded networks
- spatial econometrics
- exploratory spatio-temporal data analysis
## PySAL Components
PySAL is a family of packages for spatial data science and is divided into four major components:
### Lib
solve a wide variety of computational geometry problems including graph construction from polygonal lattices, lines, and points, construction and interactive editing of spatial weights matrices & graphs - computation of alpha shapes, spatial indices, and spatial-topological relationships, and reading and writing of sparse graph data, as well as pure python readers of spatial vector data. Unike other PySAL modules, these functions are exposed together as a single package.
- [libpysal](https://pysal.org/libpysal) : `libpysal` provides foundational algorithms and data structures that support the rest of the library. This currently includes the following modules: input/output (`io`), which provides readers and writers for common geospatial file formats; weights (`weights`), which provides the main class to store spatial weights matrices, as well as several utilities to manipulate and operate on them; computational geometry (`cg`), with several algorithms, such as Voronoi tessellations or alpha shapes that efficiently process geometric shapes; and an additional module with example data sets (`examples`).
### Explore
The `explore` layer includes modules to conduct exploratory analysis of spatial and spatio-temporal data. At a high level, packages in `explore` are focused on enabling the user to better understand patterns in the data and suggest new interesting questions rather than answer existing ones. They include methods to characterize the structure of spatial distributions (either on networks, in continuous space, or on polygonal lattices). In addition, this domain offers methods to examine the *dynamics* of these distributions, such as how their composition or spatial extent changes over time.
- [esda](https://esda.readthedocs.io/en/latest/) : `esda` implements methods for the analysis of both global (map-wide) and local (focal) spatial autocorrelation, for both continuous and binary data. In addition, the package increasingly offers cutting-edge statistics about boundary strength and measures of aggregation error in statistical analyses
- [giddy](https://giddy.readthedocs.io/en/latest/) : `giddy` is an extension of `esda` to spatio-temporal data. The package hosts state-of-the-art methods that explicitly consider the role of space in the dynamics of distributions over time
- [inequality](https://inequality.readthedocs.io/en/latest/) : `inequality` provides indices for measuring inequality over space and time. These comprise classic measures such as the Theil *T* information index and the Gini index in mean deviation form; but also spatially-explicit measures that incorporate the location and spatial configuration of observations in the calculation of inequality measures.
- [momepy](https://docs.momepy.org) : `momepy` is a library for quantitative analysis of urban form - urban morphometrics. It aims to provide a wide range of tools for a systematic and exhaustive analysis of urban form. It can work with a wide range of elements, while focused on building footprints and street networks. momepy stands for Morphological Measuring in Python.
- [pointpats](https://pointpats.readthedocs.io/en/latest/) : `pointpats` supports the statistical analysis of point data, including methods to characterize the spatial structure of an observed point pattern: a collection of locations where some phenomena of interest have been recorded. This includes measures of centrography which provide overall geometric summaries of the point pattern, including central tendency, dispersion, intensity, and extent.
- [segregation](https://github.com/pysal/segregation) : `segregation` package calculates over 40 different segregation indices and provides a suite of additional features for measurement, visualization, and hypothesis testing that together represent the state-of-the-art in quantitative segregation analysis.
- [spaghetti](https://pysal.org/spaghetti) : `spaghetti` supports the the spatial analysis of graphs, networks, topology, and inference. It includes functionality for the statistical testing of clusters on networks, a robust all-to-all Dijkstra shortest path algorithm with multiprocessing functionality, and high-performance geometric and spatial computations using `geopandas` that are necessary for high-resolution interpolation along networks, and the ability to connect near-network observations onto the network
### Model
In contrast to `explore`, the `model` layer focuses on confirmatory analysis. In particular, its packages focus on the estimation of spatial relationships in data with a variety of linear, generalized-linear, generalized-additive, nonlinear, multi-level, and local regression models.
- [mgwr](https://mgwr.readthedocs.io/en/latest/) : `mgwr` provides scalable algorithms for estimation, inference, and prediction using single- and multi-scale geographically-weighted regression models in a variety of generalized linear model frameworks, as well model diagnostics tools
- [spglm](https://github.com/pysal/spglm) : `spglm` implements a set of generalized linear regression techniques, including Gaussian, Poisson, and Logistic regression, that allow for sparse matrix operations in their computation and estimation to lower memory overhead and decreased computation time.
- [spint](https://github.com/pysal/spint) : `spint` provides a collection of tools to study spatial interaction processes and analyze spatial interaction data. It includes functionality to facilitate the calibration and interpretation of a family of gravity-type spatial interaction models, including those with *production* constraints, *attraction* constraints, or a combination of the two.
- [spreg](https://spreg.readthedocs.io/) : `spreg` supports the estimation of classic and spatial econometric models. Currently it contains methods for estimating standard Ordinary Least Squares (OLS), Two Stage Least Squares (2SLS) and Seemingly Unrelated Regressions (SUR), in addition to various tests of homokestadicity, normality, spatial randomness, and different types of spatial autocorrelation. It also includes a suite of tests for spatial dependence in models with binary dependent variables.
- [spvcm](https://github.com/pysal/spvcm) : `spvcm` provides a general framework for estimating spatially-correlated variance components models. This class of models allows for spatial dependence in the variance components, so that nearby groups may affect one another. It also also provides a general-purpose framework for estimating models using Gibbs sampling in Python, accelerated by the `numba` package.
- [tobler](http://pysal.org/tobler/) : `tobler` provides functionality for for areal interpolation and dasymetric mapping. Its name is an homage to the legendary geographer Waldo Tobler a pioneer of dozens of spatial analytical methods. `tobler` includes functionality for interpolating data using area-weighted approaches, regression model-based approaches that leverage remotely-sensed raster data as auxiliary information, and hybrid approaches.
- [access](http://github.com/pysal/access) : `access` aims to make it easy for analysis to calculate measures of spatial accessibility. This work has traditionally had two challenges: [1] to calculate accurate travel time matrices at scale and [2] to derive measures of access using the travel times and supply and demand locations. `access` implements classic spatial access models, allowing easy comparison of methodologies and assumptions.
- [spopt](http://github.com/pysal/spopt): `spopt` is an open-source Python library for solving optimization problems with spatial data. Originating
from the original `region` module in PySAL, it is under active development for the inclusion of newly proposed models and methods for regionalization, facility location, and transportation-oriented solutions.
### Viz
The `viz` layer provides functionality to support the creation of geovisualisations and visual representations of outputs from a variety of spatial analyses. Visualization plays a central role in modern spatial/geographic data science. Current packages provide classification methods for choropleth mapping and a common API for linking PySAL outputs to visualization tool-kits in the Python ecosystem.
- [legendgram](https://github.com/pysal/legendgram) : `legendgram` is a small package that provides "legendgrams" legends that visualize the distribution of observations by color in a given map. These distributional visualizations for map classification schemes assist in analytical cartography and spatial data visualization
- [mapclassify](https://pysal.org/mapclassify) : `mapclassify` provides functionality for Choropleth map classification. Currently, fifteen different classification schemes are available, including a highly-optimized implementation of Fisher-Jenks optimal classification. Each scheme inherits a common structure that ensures computations are scalable and supports applications in streaming contexts.
- [splot](https://splot.readthedocs.io/en/latest/) : `splot` provides statistical visualizations for spatial analysis. It methods for visualizing global and local spatial autocorrelation (through Moran scatterplots and cluster maps), temporal analysis of cluster dynamics (through heatmaps and rose diagrams), and multivariate choropleth mapping (through value-by-alpha maps. A high level API supports the creation of publication-ready visualizations
# Installation
PySAL is available through [Anaconda](https://www.continuum.io/downloads) (in the defaults or conda-forge channel) We recommend installing PySAL from conda-forge:
``` {.sourceCode .bash}
conda config --add channels conda-forge
conda install pysal
```
PySAL can also be installed using pip:
``` {.sourceCode .bash}
pip install pysal
```
As of version 2.0.0 PySAL has shifted to Python 3 only.
Users who need an older stable version of PySAL that is Python 2 compatible can install version 1.14.3 through pip or conda:
``` {.sourceCode .bash}
conda install pysal==1.14.3
```
# Documentation
For help on using PySAL, check out the following resources:
- [Project Home](https://pysal.org)
- [Users](http://pysal.org/docs/users)
- [Developers](http://pysal.org/docs/devs/)
# Development
As of version 2.0.0, PySAL is now a collection of affiliated geographic data science packages. Changes to the code for any of the subpackages should be directed at the respective [upstream repositories](http://github.com/pysal/help), and not made here. Infrastructural changes for the meta-package, like those for tooling, building the package, and code standards, will be considered.
Development is hosted on [github](https://github.com/pysal/pysal).
Discussions of development as well as help for users occurs on the [developer list](http://groups.google.com/group/pysal-dev) as well as [gitter](https://gitter.im/pysal/pysal?).
# Getting Involved
If you are interested in contributing to PySAL please see our [development guidelines](https://github.com/pysal/pysal/wiki).
# Bug reports
To search for or report bugs, please see PySAL\'s [issues](http://github.com/pysal/pysal/issues).
# Build Instructions
To build the meta-package pysal see [tools/README.md](tools/README.md).
# License information
See the file \"LICENSE.txt\" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
%package -n python3-pysal
Summary: A library of spatial analysis functions.
Provides: python-pysal
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-pysal
# Python Spatial Analysis Library
[](https://github.com/pysal/pysal/actions?query=workflow%3A%22Unit+Tests%22)
[](https://badge.fury.io/py/pysal)
[](https://anaconda.org/conda-forge/pysal)
[](https://gitter.im/pysal/pysal)
[](https://github.com/psf/black)
[](https://zenodo.org/badge/latestdoi/8295380)
<p align="center">
<img src="https://user-images.githubusercontent.com/8590583/89052459-bad41a00-d323-11ea-9be2-beb7d0d1b7ea.png" width="300" height="300" />
</p>
PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with an emphasis on geospatial vector data written in Python. It supports the development of high level applications for spatial analysis, such as
- detection of spatial clusters, hot-spots, and outliers
- construction of graphs from spatial data
- spatial regression and statistical modeling on geographically embedded networks
- spatial econometrics
- exploratory spatio-temporal data analysis
## PySAL Components
PySAL is a family of packages for spatial data science and is divided into four major components:
### Lib
solve a wide variety of computational geometry problems including graph construction from polygonal lattices, lines, and points, construction and interactive editing of spatial weights matrices & graphs - computation of alpha shapes, spatial indices, and spatial-topological relationships, and reading and writing of sparse graph data, as well as pure python readers of spatial vector data. Unike other PySAL modules, these functions are exposed together as a single package.
- [libpysal](https://pysal.org/libpysal) : `libpysal` provides foundational algorithms and data structures that support the rest of the library. This currently includes the following modules: input/output (`io`), which provides readers and writers for common geospatial file formats; weights (`weights`), which provides the main class to store spatial weights matrices, as well as several utilities to manipulate and operate on them; computational geometry (`cg`), with several algorithms, such as Voronoi tessellations or alpha shapes that efficiently process geometric shapes; and an additional module with example data sets (`examples`).
### Explore
The `explore` layer includes modules to conduct exploratory analysis of spatial and spatio-temporal data. At a high level, packages in `explore` are focused on enabling the user to better understand patterns in the data and suggest new interesting questions rather than answer existing ones. They include methods to characterize the structure of spatial distributions (either on networks, in continuous space, or on polygonal lattices). In addition, this domain offers methods to examine the *dynamics* of these distributions, such as how their composition or spatial extent changes over time.
- [esda](https://esda.readthedocs.io/en/latest/) : `esda` implements methods for the analysis of both global (map-wide) and local (focal) spatial autocorrelation, for both continuous and binary data. In addition, the package increasingly offers cutting-edge statistics about boundary strength and measures of aggregation error in statistical analyses
- [giddy](https://giddy.readthedocs.io/en/latest/) : `giddy` is an extension of `esda` to spatio-temporal data. The package hosts state-of-the-art methods that explicitly consider the role of space in the dynamics of distributions over time
- [inequality](https://inequality.readthedocs.io/en/latest/) : `inequality` provides indices for measuring inequality over space and time. These comprise classic measures such as the Theil *T* information index and the Gini index in mean deviation form; but also spatially-explicit measures that incorporate the location and spatial configuration of observations in the calculation of inequality measures.
- [momepy](https://docs.momepy.org) : `momepy` is a library for quantitative analysis of urban form - urban morphometrics. It aims to provide a wide range of tools for a systematic and exhaustive analysis of urban form. It can work with a wide range of elements, while focused on building footprints and street networks. momepy stands for Morphological Measuring in Python.
- [pointpats](https://pointpats.readthedocs.io/en/latest/) : `pointpats` supports the statistical analysis of point data, including methods to characterize the spatial structure of an observed point pattern: a collection of locations where some phenomena of interest have been recorded. This includes measures of centrography which provide overall geometric summaries of the point pattern, including central tendency, dispersion, intensity, and extent.
- [segregation](https://github.com/pysal/segregation) : `segregation` package calculates over 40 different segregation indices and provides a suite of additional features for measurement, visualization, and hypothesis testing that together represent the state-of-the-art in quantitative segregation analysis.
- [spaghetti](https://pysal.org/spaghetti) : `spaghetti` supports the the spatial analysis of graphs, networks, topology, and inference. It includes functionality for the statistical testing of clusters on networks, a robust all-to-all Dijkstra shortest path algorithm with multiprocessing functionality, and high-performance geometric and spatial computations using `geopandas` that are necessary for high-resolution interpolation along networks, and the ability to connect near-network observations onto the network
### Model
In contrast to `explore`, the `model` layer focuses on confirmatory analysis. In particular, its packages focus on the estimation of spatial relationships in data with a variety of linear, generalized-linear, generalized-additive, nonlinear, multi-level, and local regression models.
- [mgwr](https://mgwr.readthedocs.io/en/latest/) : `mgwr` provides scalable algorithms for estimation, inference, and prediction using single- and multi-scale geographically-weighted regression models in a variety of generalized linear model frameworks, as well model diagnostics tools
- [spglm](https://github.com/pysal/spglm) : `spglm` implements a set of generalized linear regression techniques, including Gaussian, Poisson, and Logistic regression, that allow for sparse matrix operations in their computation and estimation to lower memory overhead and decreased computation time.
- [spint](https://github.com/pysal/spint) : `spint` provides a collection of tools to study spatial interaction processes and analyze spatial interaction data. It includes functionality to facilitate the calibration and interpretation of a family of gravity-type spatial interaction models, including those with *production* constraints, *attraction* constraints, or a combination of the two.
- [spreg](https://spreg.readthedocs.io/) : `spreg` supports the estimation of classic and spatial econometric models. Currently it contains methods for estimating standard Ordinary Least Squares (OLS), Two Stage Least Squares (2SLS) and Seemingly Unrelated Regressions (SUR), in addition to various tests of homokestadicity, normality, spatial randomness, and different types of spatial autocorrelation. It also includes a suite of tests for spatial dependence in models with binary dependent variables.
- [spvcm](https://github.com/pysal/spvcm) : `spvcm` provides a general framework for estimating spatially-correlated variance components models. This class of models allows for spatial dependence in the variance components, so that nearby groups may affect one another. It also also provides a general-purpose framework for estimating models using Gibbs sampling in Python, accelerated by the `numba` package.
- [tobler](http://pysal.org/tobler/) : `tobler` provides functionality for for areal interpolation and dasymetric mapping. Its name is an homage to the legendary geographer Waldo Tobler a pioneer of dozens of spatial analytical methods. `tobler` includes functionality for interpolating data using area-weighted approaches, regression model-based approaches that leverage remotely-sensed raster data as auxiliary information, and hybrid approaches.
- [access](http://github.com/pysal/access) : `access` aims to make it easy for analysis to calculate measures of spatial accessibility. This work has traditionally had two challenges: [1] to calculate accurate travel time matrices at scale and [2] to derive measures of access using the travel times and supply and demand locations. `access` implements classic spatial access models, allowing easy comparison of methodologies and assumptions.
- [spopt](http://github.com/pysal/spopt): `spopt` is an open-source Python library for solving optimization problems with spatial data. Originating
from the original `region` module in PySAL, it is under active development for the inclusion of newly proposed models and methods for regionalization, facility location, and transportation-oriented solutions.
### Viz
The `viz` layer provides functionality to support the creation of geovisualisations and visual representations of outputs from a variety of spatial analyses. Visualization plays a central role in modern spatial/geographic data science. Current packages provide classification methods for choropleth mapping and a common API for linking PySAL outputs to visualization tool-kits in the Python ecosystem.
- [legendgram](https://github.com/pysal/legendgram) : `legendgram` is a small package that provides "legendgrams" legends that visualize the distribution of observations by color in a given map. These distributional visualizations for map classification schemes assist in analytical cartography and spatial data visualization
- [mapclassify](https://pysal.org/mapclassify) : `mapclassify` provides functionality for Choropleth map classification. Currently, fifteen different classification schemes are available, including a highly-optimized implementation of Fisher-Jenks optimal classification. Each scheme inherits a common structure that ensures computations are scalable and supports applications in streaming contexts.
- [splot](https://splot.readthedocs.io/en/latest/) : `splot` provides statistical visualizations for spatial analysis. It methods for visualizing global and local spatial autocorrelation (through Moran scatterplots and cluster maps), temporal analysis of cluster dynamics (through heatmaps and rose diagrams), and multivariate choropleth mapping (through value-by-alpha maps. A high level API supports the creation of publication-ready visualizations
# Installation
PySAL is available through [Anaconda](https://www.continuum.io/downloads) (in the defaults or conda-forge channel) We recommend installing PySAL from conda-forge:
``` {.sourceCode .bash}
conda config --add channels conda-forge
conda install pysal
```
PySAL can also be installed using pip:
``` {.sourceCode .bash}
pip install pysal
```
As of version 2.0.0 PySAL has shifted to Python 3 only.
Users who need an older stable version of PySAL that is Python 2 compatible can install version 1.14.3 through pip or conda:
``` {.sourceCode .bash}
conda install pysal==1.14.3
```
# Documentation
For help on using PySAL, check out the following resources:
- [Project Home](https://pysal.org)
- [Users](http://pysal.org/docs/users)
- [Developers](http://pysal.org/docs/devs/)
# Development
As of version 2.0.0, PySAL is now a collection of affiliated geographic data science packages. Changes to the code for any of the subpackages should be directed at the respective [upstream repositories](http://github.com/pysal/help), and not made here. Infrastructural changes for the meta-package, like those for tooling, building the package, and code standards, will be considered.
Development is hosted on [github](https://github.com/pysal/pysal).
Discussions of development as well as help for users occurs on the [developer list](http://groups.google.com/group/pysal-dev) as well as [gitter](https://gitter.im/pysal/pysal?).
# Getting Involved
If you are interested in contributing to PySAL please see our [development guidelines](https://github.com/pysal/pysal/wiki).
# Bug reports
To search for or report bugs, please see PySAL\'s [issues](http://github.com/pysal/pysal/issues).
# Build Instructions
To build the meta-package pysal see [tools/README.md](tools/README.md).
# License information
See the file \"LICENSE.txt\" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
%package help
Summary: Development documents and examples for pysal
Provides: python3-pysal-doc
%description help
# Python Spatial Analysis Library
[](https://github.com/pysal/pysal/actions?query=workflow%3A%22Unit+Tests%22)
[](https://badge.fury.io/py/pysal)
[](https://anaconda.org/conda-forge/pysal)
[](https://gitter.im/pysal/pysal)
[](https://github.com/psf/black)
[](https://zenodo.org/badge/latestdoi/8295380)
<p align="center">
<img src="https://user-images.githubusercontent.com/8590583/89052459-bad41a00-d323-11ea-9be2-beb7d0d1b7ea.png" width="300" height="300" />
</p>
PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with an emphasis on geospatial vector data written in Python. It supports the development of high level applications for spatial analysis, such as
- detection of spatial clusters, hot-spots, and outliers
- construction of graphs from spatial data
- spatial regression and statistical modeling on geographically embedded networks
- spatial econometrics
- exploratory spatio-temporal data analysis
## PySAL Components
PySAL is a family of packages for spatial data science and is divided into four major components:
### Lib
solve a wide variety of computational geometry problems including graph construction from polygonal lattices, lines, and points, construction and interactive editing of spatial weights matrices & graphs - computation of alpha shapes, spatial indices, and spatial-topological relationships, and reading and writing of sparse graph data, as well as pure python readers of spatial vector data. Unike other PySAL modules, these functions are exposed together as a single package.
- [libpysal](https://pysal.org/libpysal) : `libpysal` provides foundational algorithms and data structures that support the rest of the library. This currently includes the following modules: input/output (`io`), which provides readers and writers for common geospatial file formats; weights (`weights`), which provides the main class to store spatial weights matrices, as well as several utilities to manipulate and operate on them; computational geometry (`cg`), with several algorithms, such as Voronoi tessellations or alpha shapes that efficiently process geometric shapes; and an additional module with example data sets (`examples`).
### Explore
The `explore` layer includes modules to conduct exploratory analysis of spatial and spatio-temporal data. At a high level, packages in `explore` are focused on enabling the user to better understand patterns in the data and suggest new interesting questions rather than answer existing ones. They include methods to characterize the structure of spatial distributions (either on networks, in continuous space, or on polygonal lattices). In addition, this domain offers methods to examine the *dynamics* of these distributions, such as how their composition or spatial extent changes over time.
- [esda](https://esda.readthedocs.io/en/latest/) : `esda` implements methods for the analysis of both global (map-wide) and local (focal) spatial autocorrelation, for both continuous and binary data. In addition, the package increasingly offers cutting-edge statistics about boundary strength and measures of aggregation error in statistical analyses
- [giddy](https://giddy.readthedocs.io/en/latest/) : `giddy` is an extension of `esda` to spatio-temporal data. The package hosts state-of-the-art methods that explicitly consider the role of space in the dynamics of distributions over time
- [inequality](https://inequality.readthedocs.io/en/latest/) : `inequality` provides indices for measuring inequality over space and time. These comprise classic measures such as the Theil *T* information index and the Gini index in mean deviation form; but also spatially-explicit measures that incorporate the location and spatial configuration of observations in the calculation of inequality measures.
- [momepy](https://docs.momepy.org) : `momepy` is a library for quantitative analysis of urban form - urban morphometrics. It aims to provide a wide range of tools for a systematic and exhaustive analysis of urban form. It can work with a wide range of elements, while focused on building footprints and street networks. momepy stands for Morphological Measuring in Python.
- [pointpats](https://pointpats.readthedocs.io/en/latest/) : `pointpats` supports the statistical analysis of point data, including methods to characterize the spatial structure of an observed point pattern: a collection of locations where some phenomena of interest have been recorded. This includes measures of centrography which provide overall geometric summaries of the point pattern, including central tendency, dispersion, intensity, and extent.
- [segregation](https://github.com/pysal/segregation) : `segregation` package calculates over 40 different segregation indices and provides a suite of additional features for measurement, visualization, and hypothesis testing that together represent the state-of-the-art in quantitative segregation analysis.
- [spaghetti](https://pysal.org/spaghetti) : `spaghetti` supports the the spatial analysis of graphs, networks, topology, and inference. It includes functionality for the statistical testing of clusters on networks, a robust all-to-all Dijkstra shortest path algorithm with multiprocessing functionality, and high-performance geometric and spatial computations using `geopandas` that are necessary for high-resolution interpolation along networks, and the ability to connect near-network observations onto the network
### Model
In contrast to `explore`, the `model` layer focuses on confirmatory analysis. In particular, its packages focus on the estimation of spatial relationships in data with a variety of linear, generalized-linear, generalized-additive, nonlinear, multi-level, and local regression models.
- [mgwr](https://mgwr.readthedocs.io/en/latest/) : `mgwr` provides scalable algorithms for estimation, inference, and prediction using single- and multi-scale geographically-weighted regression models in a variety of generalized linear model frameworks, as well model diagnostics tools
- [spglm](https://github.com/pysal/spglm) : `spglm` implements a set of generalized linear regression techniques, including Gaussian, Poisson, and Logistic regression, that allow for sparse matrix operations in their computation and estimation to lower memory overhead and decreased computation time.
- [spint](https://github.com/pysal/spint) : `spint` provides a collection of tools to study spatial interaction processes and analyze spatial interaction data. It includes functionality to facilitate the calibration and interpretation of a family of gravity-type spatial interaction models, including those with *production* constraints, *attraction* constraints, or a combination of the two.
- [spreg](https://spreg.readthedocs.io/) : `spreg` supports the estimation of classic and spatial econometric models. Currently it contains methods for estimating standard Ordinary Least Squares (OLS), Two Stage Least Squares (2SLS) and Seemingly Unrelated Regressions (SUR), in addition to various tests of homokestadicity, normality, spatial randomness, and different types of spatial autocorrelation. It also includes a suite of tests for spatial dependence in models with binary dependent variables.
- [spvcm](https://github.com/pysal/spvcm) : `spvcm` provides a general framework for estimating spatially-correlated variance components models. This class of models allows for spatial dependence in the variance components, so that nearby groups may affect one another. It also also provides a general-purpose framework for estimating models using Gibbs sampling in Python, accelerated by the `numba` package.
- [tobler](http://pysal.org/tobler/) : `tobler` provides functionality for for areal interpolation and dasymetric mapping. Its name is an homage to the legendary geographer Waldo Tobler a pioneer of dozens of spatial analytical methods. `tobler` includes functionality for interpolating data using area-weighted approaches, regression model-based approaches that leverage remotely-sensed raster data as auxiliary information, and hybrid approaches.
- [access](http://github.com/pysal/access) : `access` aims to make it easy for analysis to calculate measures of spatial accessibility. This work has traditionally had two challenges: [1] to calculate accurate travel time matrices at scale and [2] to derive measures of access using the travel times and supply and demand locations. `access` implements classic spatial access models, allowing easy comparison of methodologies and assumptions.
- [spopt](http://github.com/pysal/spopt): `spopt` is an open-source Python library for solving optimization problems with spatial data. Originating
from the original `region` module in PySAL, it is under active development for the inclusion of newly proposed models and methods for regionalization, facility location, and transportation-oriented solutions.
### Viz
The `viz` layer provides functionality to support the creation of geovisualisations and visual representations of outputs from a variety of spatial analyses. Visualization plays a central role in modern spatial/geographic data science. Current packages provide classification methods for choropleth mapping and a common API for linking PySAL outputs to visualization tool-kits in the Python ecosystem.
- [legendgram](https://github.com/pysal/legendgram) : `legendgram` is a small package that provides "legendgrams" legends that visualize the distribution of observations by color in a given map. These distributional visualizations for map classification schemes assist in analytical cartography and spatial data visualization
- [mapclassify](https://pysal.org/mapclassify) : `mapclassify` provides functionality for Choropleth map classification. Currently, fifteen different classification schemes are available, including a highly-optimized implementation of Fisher-Jenks optimal classification. Each scheme inherits a common structure that ensures computations are scalable and supports applications in streaming contexts.
- [splot](https://splot.readthedocs.io/en/latest/) : `splot` provides statistical visualizations for spatial analysis. It methods for visualizing global and local spatial autocorrelation (through Moran scatterplots and cluster maps), temporal analysis of cluster dynamics (through heatmaps and rose diagrams), and multivariate choropleth mapping (through value-by-alpha maps. A high level API supports the creation of publication-ready visualizations
# Installation
PySAL is available through [Anaconda](https://www.continuum.io/downloads) (in the defaults or conda-forge channel) We recommend installing PySAL from conda-forge:
``` {.sourceCode .bash}
conda config --add channels conda-forge
conda install pysal
```
PySAL can also be installed using pip:
``` {.sourceCode .bash}
pip install pysal
```
As of version 2.0.0 PySAL has shifted to Python 3 only.
Users who need an older stable version of PySAL that is Python 2 compatible can install version 1.14.3 through pip or conda:
``` {.sourceCode .bash}
conda install pysal==1.14.3
```
# Documentation
For help on using PySAL, check out the following resources:
- [Project Home](https://pysal.org)
- [Users](http://pysal.org/docs/users)
- [Developers](http://pysal.org/docs/devs/)
# Development
As of version 2.0.0, PySAL is now a collection of affiliated geographic data science packages. Changes to the code for any of the subpackages should be directed at the respective [upstream repositories](http://github.com/pysal/help), and not made here. Infrastructural changes for the meta-package, like those for tooling, building the package, and code standards, will be considered.
Development is hosted on [github](https://github.com/pysal/pysal).
Discussions of development as well as help for users occurs on the [developer list](http://groups.google.com/group/pysal-dev) as well as [gitter](https://gitter.im/pysal/pysal?).
# Getting Involved
If you are interested in contributing to PySAL please see our [development guidelines](https://github.com/pysal/pysal/wiki).
# Bug reports
To search for or report bugs, please see PySAL\'s [issues](http://github.com/pysal/pysal/issues).
# Build Instructions
To build the meta-package pysal see [tools/README.md](tools/README.md).
# License information
See the file \"LICENSE.txt\" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
%prep
%autosetup -n pysal-23.1
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-pysal -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 23.1-1
- Package Spec generated
|