AZP

The automatic zoning procedure (AZP) was initially outlined in Openshaw (1977) as a way to address some of the consequences of the modifiable areal unit problem (MAUP). In essence, it consists of a heuristic to find the best set of combinations of contiguous spatial units into p regions, minimizing the within sum of squares as a criterion of homogeneity. The number of regions needs to be specified beforehand.

azpGreedy()

A simulated annealing algorithm to solve the AZP problem

function azpGreedy(
    WeightResult w,
    Number k, 
    Array vals,
    Number inits,
    Array init_region,
    Array min_bound_values, 
    Array min_bounds,
    Array max_bound_values, 
    Array max_bounds,
    String scale_method,
    String distance_type,
    Number seed)

Arguments

Return

Examples

const jsgeoda = require('jsgeoda');
const fs = require('fs');

// load data
const data = fs.readFileSync('./data/natregimes.geojson').buffer;

// create jsgeoda instance
const geoda = await jsgeoda.New();

// load geojson in jsgeoda
const nat = geoda.readGeoJSON(data);

// create a queen contiguity weights
const w = geoda.getQueenWeights(nat);

// get values
const hr60 = geoda.getColumn(nat, "HR60");
const ue60 = geoda.getColumn(nat, "UE60");

// set minimum bound
const po60 = geoda.getColumn(nat, "PO60");

// apply azp_greedy
const inits = 1;
const init_region = [];
const min_bound_vals = [po60];
const min_bounds = [17845200];
const azp = geoda.azpGreedy(w, 20, [hr60, ue60], inits, init_region, min_bound_vals,min_bounds);

Try it yourself in the playground (jsgeoda + deck.gl):

azpSA()

A simulated annealing algorithm to solve the AZP problem

function azpSA(
    WeightResult w,
    Number k, 
    Array vals,
    Number cooling_rate,
    Number sa_maxit,
    Number inits,
    Array init_region,
    Array min_bound_values, 
    Array min_bounds,
    Array max_bound_values, 
    Array max_bounds,
    String scale_method,
    String distance_type,
    Number seed)

Arguments

Return

azpTabu()

A tabu algorithm to solve the AZP problem

function azpTabu(
    WeightResult w,
    Number k, 
    Array vals,
    Number tabu_length,
    Number conv_tabu,
    Number inits,
    Array init_region,
    Array min_bound_values, 
    Array min_bounds,
    Array max_bound_values, 
    Array max_bounds,
    String scale_method,
    String distance_type,
    Number seed)

Arguments

Return

Last updated