Created
June 29, 2015 21:17
-
-
Save e-n-f/3a5e97134fe6e1275e17 to your computer and use it in GitHub Desktop.
Manhattan weighted centers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 2184465 40.7487 -73.9853 | |
3 517999 40.7502 -73.9847 | |
4 1293192 40.7482 -73.9857 | |
5 373274 40.7486 -73.985 | |
6 362141 40.7527 -73.9834 | |
7 498216 40.7506 -73.9844 | |
8 1324108 40.7469 -73.9862 | |
9 133 40.7583 -73.9766 | |
10 23 40.7298 -73.9924 | |
11 6495 40.7343 -73.9877 | |
12 30407 40.7478 -73.987 | |
13 25941 40.7479 -73.9886 | |
14 79004 40.7503 -73.9855 | |
15 146540 40.7543 -73.9821 | |
16 15786 40.7517 -73.9904 | |
17 155777 40.749 -73.9878 | |
18 286396 40.7407 -73.9903 | |
19 91525 40.7522 -73.9828 | |
20 295907 40.7469 -73.9864 | |
21 58659 40.7488 -73.9859 | |
22 146780 40.7445 -73.9883 | |
23 111321 40.7714 -73.9738 | |
24 235859 40.7605 -73.9737 | |
25 66591 40.759 -73.9843 | |
26 182993 40.7526 -73.9837 | |
27 89420 40.7545 -73.981 | |
28 158908 40.7176 -74.0022 | |
29 1445904 40.7489 -73.9854 | |
30 406150 40.7487 -73.9851 | |
31 12594 40.7509 -73.9841 | |
32 276106 40.7475 -73.9855 | |
33 3959 40.7502 -73.9844 | |
34 39752 40.7493 -73.9851 | |
35 1794313 40.748 -73.9858 | |
36 390152 40.7519 -73.9834 | |
37 166000 40.7517 -73.9835 | |
38 274932 40.7496 -73.9848 | |
39 433991 40.7485 -73.9853 | |
40 791543 40.7469 -73.9863 | |
41 1106730 40.7484 -73.9859 | |
42 1077735 40.749 -73.9848 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
grep ^36061 all-employment | awk -F, ' | |
{ | |
for (i = 2; i < 43; i++) { | |
lat[i] += $54 * $i; | |
lon[i] += $55 * $i; | |
sum[i] += $i; | |
} | |
} END { | |
for (i = 2; i < 43; i++) { | |
if (sum[i] != 0) { | |
print i, sum[i], lat[i]/sum[i], lon[i]/sum[i]; | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment