Skip to content

Commit 6fb1138

Browse files
committed
Updated readme - version 1.0
1 parent 0c09b66 commit 6fb1138

File tree

2 files changed

+33
-29
lines changed

2 files changed

+33
-29
lines changed

README.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,28 @@
22

33
# Pyinterpolate
44

5-
**version 1.0** - *TBA*
5+
**version 1.0**
66

77
--
88

9-
Pyinterpolate is the Python library for **spatial statistics**. The package provides access to spatial statistics tools used in various studies. This package helps you **interpolate spatial data** with the *Kriging* technique.
9+
Pyinterpolate is the Python library for **spatial statistics**. The package provides access to spatial statistics tools (variogram analysis, Kriging, Poisson Kriging, Indicator Kriging, Inverse Distance Weighting).
1010

1111
If you’re:
1212

13-
- GIS expert,
14-
- geologist,
15-
- mining engineer,
16-
- ecologist,
17-
- public health specialist,
18-
- data scientist.
13+
- GIS expert
14+
- Geologist
15+
- Social scientist
1916

2017
Then you might find this package useful. The core functionalities of Pyinterpolate are spatial interpolation and spatial prediction for point and block datasets.
2118

22-
Pyinterpolate has functions for:
19+
Pyinterpolate performs:
2320

24-
1. *Ordinary Kriging* and *Simple Kriging* (spatial interpolation from points),
25-
2. *Centroid-based Poisson Kriging* of polygons (spatial interpolation from blocks and areas),
26-
3. *Area-to-area* and *Area-to-point Poisson Kriging* of Polygons (spatial interpolation and data deconvolution from areas to points).
27-
4. *Inverse Distance Weighting*.
28-
5. *Semivariogram regularization and deconvolution*.
29-
6. *Semivariogram modeling and analysis*.
30-
31-
[MORE ABOUT SEMIVARIOGRAM MODELING]
21+
1. *Ordinary Kriging* and *Simple Kriging* - spatial interpolation from points
22+
2. *Centroid-based Poisson Kriging* of polygons - spatial interpolation from blocks and regions
23+
3. *Area-to-area* and *Area-to-point Poisson Kriging* of Polygons - spatial interpolation and data deconvolution from areas to points
24+
4. *Inverse Distance Weighting* - benchmarking spatial interpolation technique
25+
5. *Semivariogram regularization and deconvolution* - transforming variogram of areal data in regards to point support data
26+
6. *Semivariogram modeling and analysis* - is your data spatially correlated? How do neighbors influence each other?
3227

3328
## How does it work?
3429

@@ -46,15 +41,17 @@ point_data = gpd.read_file('dem.gpkg') # x (lon), y (lat), value
4641
**[2.]** Pass loaded data to `pyinterpolate`, calculate experimental variogram.
4742

4843
```python
49-
from pyinterpolate import calculate_semivariance
44+
from pyinterpolate import ExperimentalVariogram
5045

5146

52-
search_radius = 500
47+
step_size = 500
5348
max_range = 40000
5449

55-
experimental_semivariogram = calculate_semivariance(ds=point_data,
56-
step_size=search_radius,
57-
max_range=max_range)
50+
experimental_variogram = ExperimentalVariogram(
51+
ds=point_data,
52+
step_size=step_size,
53+
max_range=max_range
54+
)
5855
```
5956

6057
**[3.]** Fit experimental semivariogram to theoretical model, it is equivalent of the `fit()` method known from machine learning packages.
@@ -63,12 +60,16 @@ experimental_semivariogram = calculate_semivariance(ds=point_data,
6360
from pyinterpolate import build_theoretical_variogram
6461

6562

63+
sill = experimental_variogram.variance
64+
nugget = 0
65+
variogram_range = 8000
66+
6667
semivar = build_theoretical_variogram(
67-
experimental_variogram=experimental_semivariogram,
68-
models_group='spherical',
69-
sill=400,
70-
rang=20000,
71-
nugget=0
68+
experimental_variogram=experimental_variogram,
69+
models_group='linear',
70+
nugget=nugget,
71+
rang=variogram_range,
72+
sill=sill
7273
)
7374
```
7475

@@ -95,7 +96,9 @@ print(prediction) # [predicted, variance error, lon, lat]
9596
>> [211.23, 0.89, 20000, 60000]
9697
```
9798

98-
With Pyinterpolate you can analyze and transform aggregated data. [TODO: example figure cancer]
99+
With Pyinterpolate you can analyze and transform aggregated data. Here is the example of spatial disaggregation of areal data into point support using Poisson Kriging:
100+
101+
![Example use case](fig1_example.png)
99102

100103
## Status
101104

@@ -149,6 +152,7 @@ All tests are grouped in the `test` directory. If you would like to contribute,
149152
* B2G project related to the large-scale infrastructure maintenance (2020-2021).
150153
* E-commerce service for reporting and analysis, building spatial / temporal profiles of customers (2022+).
151154
* The external data augmentation for e-commerce services (2022+).
155+
* Regional aggregates transformation and preprocessing for location intelligence tasks (2025+).
152156

153157
## Community
154158

@@ -157,7 +161,7 @@ Join our community in Discord: [Discord Server Pyinterpolate](https://discord.gg
157161

158162
## Bibliography
159163

160-
PyInterpolate was created thanks to many resources and all of them are pointed here:
164+
Pyinterpolate was created thanks to many resources and all of them are pointed here:
161165

162166
- Armstrong M., Basic Linear Geostatistics, Springer 1998,
163167
- GIS Algorithms by Ningchuan Xiao: https://uk.sagepub.com/en-gb/eur/gis-algorithms/book241284

fig1_example.png

729 KB
Loading

0 commit comments

Comments
 (0)