Skip to content

Calculating global and local spatial autocorrelation of income noted per each polish county in 2022 based on Moran's I and LISA statistics. Calculations were conducted using the following packages: pySAL, splot.esda, geopandas.

Notifications You must be signed in to change notification settings

mkupisie/Calculating-spatial-autocorrelation-of-income-pySAL-esda-geopandas

Repository files navigation

Calculating global and spatial autocorrelation of income

Calculating global and local spatial autocorrelation of income (average monthly gross wages and salaries) noted per each polish county in 2022 based on Moran's I and LISA statistics. Calculations were conducted using the following packages: pySAL, splot.esda, geopandas.

Detailed steps of calculating spatial autocorrelation are described within the code.

Note: For the purpose of spatial autocorrelation calculation, the geometry of counties shapefile must have been fixed as it contained overlapping polygons (overlapping polygons could influence the results as in the calculation 'neighbour' was defined as any polygon that is sharing at least one common vertex of the border).

Fixing overlapping polygons

For this purpose the following steps and vector function in QGIS were used:

  • Topology Checker: to identify overlapping polygons
  • Polygon Self-Intersection: to create new separate polygons from overlapping parts
  • Editing ids of new created polygons, so that it is the same as one of the polygons to which it is adjacent
  • Dissolve: to dissolve polygons based on their unique ids

the technique can be seen here: https://www.youtube.com/watch?v=DMmGTtLx73M (this technique was chosen for the purpose of the spatial autocorrelation calculation, because the area of the overlapping polygons was less than 1% of the Poland area, so regardless of which neighboring polygon the overlapping layers were attached to, it should not affect the results).

Topology checker QGIS_topography_checker_overlapping

Polygon Self-intersection QGIS_intersected_parts

Topology checker after dissolving polygons topology_check_after

About

Calculating global and local spatial autocorrelation of income noted per each polish county in 2022 based on Moran's I and LISA statistics. Calculations were conducted using the following packages: pySAL, splot.esda, geopandas.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published