-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgetAAC.m
More file actions
21 lines (19 loc) · 915 Bytes
/
getAAC.m
File metadata and controls
21 lines (19 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function [AAC] = getAAC(amenityTags, place, gridSize, sigma)
% Returns the correlation between 2 Amenity/Person as a single value for a single place
%
% INPUT:
% amenityTags{i} (String Cell) - Name of the amenities to
% consider (2 values only, i=1 and i=2)
% place (String) - Names of a polygon area in OpenSteetMap
% gridSize (Integer) - Grid granularity in metres
% sigma (Integer) - Standard deviation to use for gaussian blurring
% OUTPUT:
% AAC (Double) - A single value which
% represents the degree of correlation between 2 amenities
% EXAMPLE:
% [AAC] = getAAC({'bar','atm','hospital'},'Bristol',250,1)
% We want amenity to be weighted by population
populationWeighted = true;
amenityGrids = getAmenityGrids(amenityTags, place, gridSize, sigma, populationWeighted);
AAC = getCorrelation(amenityGrids);
AAC = AAC(1,2);