-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgetManyPlacesPAC.m
More file actions
22 lines (20 loc) · 938 Bytes
/
getManyPlacesPAC.m
File metadata and controls
22 lines (20 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function [manyPlacesPAC] = getManyPlacesPAC(amenityTags, places, gridSize, sigma)
% Returns the correlation between population and amenity in grid format for various places and amenities
%
% INPUT:
% amenityTags{i} (String Cell) - Name of the amenities to consider
% places{j} (String Cell) - Names of polygon areas in OpenSteetMap
% gridSize (Integer) - Grid granularity in metres
% sigma (Integer) - Standard deviation to use for gaussian blurring
% OUTPUT:
% manyPlacesPAC(i,j) (Double) - Correlation of amenity
% map of amenityTags{i} and population of places{j} in grid format
% EXAMPLE:
% [manyPlacesPAC] = getManyPlacesPAC({'bar','atm','hospital'},{'Bristol','London'},250,1)
p = length(places);
a = length(amenityTags);
manyPlacesPAC = zeros(p,a);
for i=1:p
place = places{i};
manyPlacesPAC(i,:) = getPAC(amenityTags, place, gridSize, sigma);
end