geosnap.analyze.incs module¶
Indicators of Neighborhood Change
-
geosnap.analyze.incs.
linc
(labels_sequence)[source]¶ Local Indicator of Neighborhood Change
- Returns
- lincs: array
local indicator of neighborhood change over all periods
Notes
The local indicator of neighborhood change defined here allows for singleton neighborhoods (i.e., neighborhoods composed of a single primitive area such as a tract or block.). This is in contrast to the initial implementation in [RAF+11] which prohibited singletons.
Examples
Time period 0 has the city defined as four neighborhoods on 10 tracts:
>>> labels_0 = [1, 1, 1, 1, 2, 2, 3, 3, 3, 4]
Time period 1 in the same city, with slight change in composition of the four neighborhoods
>>> labels_1 = [1, 1, 1, 1, 1, 2, 3, 3, 3, 4] >>> res = linc([labels_0, labels_1]) >>> res[4] 1.0 >>> res[1] 0.25 >>> res[7] 0.0 >>> res[-1] 0.0
And, in period 2, no change
>>> labels_2 = [1, 1, 1, 1, 1, 2, 3, 3, 3, 4] >>> res = linc([labels_1, labels_2]) >>> res[0] 0.0
We can pass more than two time periods, and get a “time-wise global linc” for each unit
>>> res = linc([labels_0, labels_1, labels_2]) >>> res[0] 0.25